1

我有两个在 chemacs2 的帮助下运行的 emacs 设置,一个带有 doom config,一个带有 vannila emacs,在 org-mode 下配置很少。这已经运行了几个月,然后今天我收到以下错误。即使(setq debug-on-error t)除了这个,我也没有收到任何消息/信息。

$ emacsclient -c --alternate-editor='' org-protocol://capture://link/title/encoded
Waiting for Emacs...
>>> *ERROR*: Wrong type argument: arrayp, nil  <<<

这是启动顺序

$ emacsclient -c --alternate-editor='' "org-protocol://capture://link/title/encoded"
emacsclient: connect: Connection refused

Warning: due to a long standing Gtk+ bug
https://gitlab.gnome.org/GNOME/gtk/issues/221
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
Loading /etc/emacs/site-start.d/00debian.el (source)...
Loading /etc/emacs/site-start.d/00debian.el (source)...done
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /home/vanangamudi/kadal/aalar/emacs/.emacs.d/chemacs.el (source)...
Loading /home/vanangamudi/emacs/vanilla.d/init.el (source)...
Followed link to /home/vanangamudi/kadal/aalar/emacs/vanilla.d/config.org
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Wrote /home/vanangamudi/emacs/vanilla.d/config.el
Tangled 7 code blocks from config.org
Loading /home/vanangamudi/emacs/vanilla.d/config.el (source)...
Loading /home/vanangamudi/emacs/vanilla.d/config.el (source)...done
Loaded ~/emacs/vanilla.d/config.el
Loading /home/vanangamudi/emacs/vanilla.d/init.el (source)...done
Loading /home/vanangamudi/kadal/aalar/emacs/.emacs.d/chemacs.el (source)...done
Loading /home/vanangamudi/emacs/vanilla.d/init.el (source)...
Loading /home/vanangamudi/emacs/vanilla.d/config.el (source)...
Loading /home/vanangamudi/emacs/vanilla.d/config.el (source)...done
Loaded ~/emacs/vanilla.d/config.el
Loading /home/vanangamudi/emacs/vanilla.d/init.el (source)...done
Starting Emacs daemon.
Emacs daemon should have started, trying to connect again
Waiting for Emacs...
*ERROR*: Wrong type argument: arrayp, nil
4

1 回答 1

2

我认为您使用了错误的命令格式。尝试这个:

emacsclient "org-protocol://capture?template=L&url=www.test.com/SomeLink&title=Something&body=Site"

请注意,我定义了要在 URL 中使用的模板键。确保您有一个带有该密钥的模板。我用的是:

     ("L" "Protocol Link" entry (file+headline "~/capture-test.org" "Captured")
      "* %? [[%:link][%:description]] \nCaptured On: %U")

还值得阅读该函数的文档org-protocol-capture(通过键入C-h f org-protocol-capture)。

于 2021-02-02T23:11:23.560 回答