Strange problems with org-capture

47 views
Skip to first unread message

Ross Donaldson

unread,
Apr 4, 2016, 2:29:35 PM4/4/16
to mu-discuss
Hello all --

I'm fishing around for any insight in to what might be causing org-capture to explode when I try to use it from the mu4e message or header view. I've written up the whole works on the Emacs StackExchange, but here's a recap: 

If my org capture template contains the templating characters `%l`, `%a`, or `%A`, org capture fails with `args-out-of-range` while trying to `replace-match`, deep inside the `org-capture-fill-template` function. In the debugger, I can clearly see that the match is correctly set, and values are being parsed from it; `replace-match` is trying to replace a valid match with a valid string, and it explodes. I'm using mu 0.9.16 in Emacs 24.5.1; my org version is 8.3.4. I can reproduce this, absolutely reliably, on OSX and Fedora. 

And I'm entirely at a loss. Org-capture works flawlessly everywhere else in Emacs. Capturing an org link works perfectly if I call it manually. Right now my work-around is to manually capture a link to a message, then use org-capture to create a TODO item into the body of which I manually insert a message link -- functional, but clunkier than it needs to be. 

Any suggestion?

Thanks very much,
Ross

Dirk-Jan C. Binnema

unread,
Apr 4, 2016, 2:48:15 PM4/4/16
to mu-di...@googlegroups.com
Hi Ross,

On Monday Apr 04 2016, Ross Donaldson wrote:

> Hello all --
>
> I'm fishing around for any insight in to what might be causing org-capture
> to explode when I try to use it from the mu4e message or header view. I've
> written up the whole works on the Emacs StackExchange
> <http://emacs.stackexchange.com/questions/21352/org-capture-mu4e-failures>,
> but here's a recap:
>
> If my org capture template contains the templating characters `%l`, `%a`,
> or `%A`, org capture fails with `args-out-of-range` while trying to
> `replace-match`, deep inside the `org-capture-fill-template` function. In
> the debugger, I can clearly see that the match is correctly set, and values
> are being parsed from it; `replace-match` is trying to replace a valid
> match with a valid string, and it explodes. I'm using mu 0.9.16 in Emacs
> 24.5.1; my org version is 8.3.4. I can reproduce this, absolutely reliably,
> on OSX and Fedora.
>
> And I'm entirely at a loss. Org-capture works flawlessly everywhere else in
> Emacs. Capturing an org link works perfectly if I call it manually. Right
> now my work-around is to manually capture a link to a message, then use
> org-capture to create a TODO item into the body of which I manually insert
> a message link -- functional, but clunkier than it needs to be.
>
> Any suggestion?

Hmm, that's annoying... I'm using capture templates with mu4e all the
time, and I've never seen this (with Fedora 23), and it seems I'm using
the same org-version. Has this this problem come up recently, or have
there been versions of emacs / org / mu4e where this did not happen?

It could also be that some other package is causing trouble... can you
reproduce when running emacs -Q with just org / mu4e? And did you try
with some older org-version?

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema Helsinki, Finland
e:dj...@djcbsoftware.nl w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C

Ross Donaldson

unread,
Apr 4, 2016, 4:00:56 PM4/4/16
to mu-discuss
Dirk --

I've only recently started using org-capture, so alas, I can't speak to older combinations. That said, I hadn't thought to try emacs -Q -- excellent suggestion! (That one always slips my mind, somehow.) Trying with an older org version is also an interesting idea -- I'll give that a try as well. 

Will report back soon.

--Ross

Ross Donaldson

unread,
Apr 4, 2016, 4:09:18 PM4/4/16
to mu-discuss
Holy crap, you're right -- if I start emacs with -Q and juuuust enough configs for mu4e to find my email, capture works perfectly. 

Well. I guess.... it's time to play a game of "which part of my configs is hosing org-capture." This should be fun.

Thanks again for the reminder about emacs -Q!
Reply all
Reply to author
Forward
0 new messages