all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-capture config broken
@ 2021-08-25 12:05 Orm Finnendahl
  2021-08-25 16:16 ` org-capture config broken (org-protocol URI syntax) Maxim Nikulin
  2021-08-26  9:48 ` org-capture config broken Orm Finnendahl
  0 siblings, 2 replies; 4+ messages in thread
From: Orm Finnendahl @ 2021-08-25 12:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

 I use a custom script (dating back to a post from 2013) to capture my
mutt Emails using org-capture. It worked flawlessly but stopped
working some time ago (I don't exactly know, when, probably last
year).

I assume the code has changed and doesn't accept the syntax of the
org-protocol line any more.

I'm calling emacsclient with the following command:

emacsclient org-protocol:/capture:/m/mutt:YSYuf6sKfSbwtIeB@example.com/mail/%20%20Subject%3A%20test%0A%20%20%20%20From%3A%20Unknown%20%3Cdummy%40example.com%3E

It fails printing "*ERROR*: Wrong type argument: arrayp, nil" in the terminal and posts

"Greedy org protocol handler. Killing client"

in the minibuffer.

The emacsclient commmand above is generated with a perl script using
uri_escape for everything after /mail/. The single slashes in the
protocol line of the emacsclient command seem strange, but I couldn't
find any hint in the internet how the syntax is supposed to be for a
certain org-capture-template.

Maybe someone can help to debug it? Below is my init.el configuration.

Best,
Orm

(setq org-capture-templates
      (quote
       (("m"
         "Mail"
         entry
         (file+headline "~/work/gtd.org" "Incoming")
         "* %^{Title}\n  Source: %u, %:link\n  %i"
         :empty-lines 1)
        ;; ... more templates here ...
        )))
;; ensure that emacsclient will show just the note to be edited when invoked
;; from Mutt, and that it will shut down emacsclient once finished;
;; fallback to legacy behavior when not invoked via org-protocol.
(add-hook 'org-capture-mode-hook 'delete-other-windows)
(setq my-org-protocol-flag nil)
(defadvice org-capture-finalize (after delete-frame-at-end activate)
  "Delete frame at remember finalization"
  (progn (if my-org-protocol-flag (delete-frame))
         (setq my-org-protocol-flag nil)))
(defadvice org-capture-kill (after delete-frame-at-end activate)
  "Delete frame at remember abort"
  (progn (if my-org-protocol-flag (delete-frame))
         (setq my-org-protocol-flag nil)))
(defadvice org-protocol-capture (before set-org-protocol-flag activate)
  (setq my-org-protocol-flag t))



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-26 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25 12:05 org-capture config broken Orm Finnendahl
2021-08-25 16:16 ` org-capture config broken (org-protocol URI syntax) Maxim Nikulin
2021-08-26  9:48 ` org-capture config broken Orm Finnendahl
2021-08-26 14:09   ` Maxim Nikulin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.