emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Orm Finnendahl <orm.finnendahl@selma.hfmdk-frankfurt.de>
To: emacs-orgmode@gnu.org
Subject: org-capture config broken
Date: Wed, 25 Aug 2021 14:05:15 +0200	[thread overview]
Message-ID: <YSYx+xyu0irTaW3z@t14s-orm.localdomain> (raw)


 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

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.


(setq org-capture-templates
         (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))

             reply	other threads:[~2021-08-25 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 12:05 Orm Finnendahl [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YSYx+xyu0irTaW3z@t14s-orm.localdomain \
    --to=orm.finnendahl@selma.hfmdk-frankfurt.de \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).