[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-capture in message-mode buffer
From: |
Tassilo Horn |
Subject: |
Re: [O] org-capture in message-mode buffer |
Date: |
Tue, 24 May 2011 12:41:14 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Leo <address@hidden> writes:
Hi!
>> is there an agreement here on whether the patch appearing in this
>> thread
>>
>> http://patchwork.newartisans.com/patch/783/
>>
>> should be applied or not?
>
> I don't really know.
Ditto. :-)
The problem is that creating a link to a message with no Gcc errors
right now. For interactive use, that's the right thing, I guess. But
of course preventing `org-capture' from working is bad.
An alternative to the proposed patch is this:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index a5ece8b..bc5ab20 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -187,7 +187,8 @@ If `org-store-link' was called with a prefix arg the
meaning of
group newsgroups message-id x-no-archive))
(org-add-link-props :link link :description desc)
link))
- ((eq major-mode 'message-mode)
+ ((and (eq major-mode 'message-mode)
+ (called-interactively-p))
(setq org-store-link-plist nil) ; reset
(save-excursion
(save-restriction
--8<---------------cut here---------------end--------------->8---
If `org-store-link' is called interactively but no Gcc header is there,
you get an error just like it is right now. But if it is called
non-interactively through `org-capture', the condition fails and thus no
org-gnus link is created, but a file link to your draft folder. One may
argue that a file link is not the right thing, either.
Basically, there should be a possibility to let the link creator
functions return "yes, I was the right handler, but because of reason X,
I couldn't create a link". Is there something like that?
Bye,
Tassilo
- [O] org-capture in message-mode buffer, Leo, 2011/05/04
- Re: [O] org-capture in message-mode buffer, Ulf Stegemann, 2011/05/04
- Re: [O] org-capture in message-mode buffer, Leo, 2011/05/04
- Re: [O] org-capture in message-mode buffer, Ulf Stegemann, 2011/05/05
- Re: [O] org-capture in message-mode buffer, Leo, 2011/05/05
- Re: [O] org-capture in message-mode buffer, Leo, 2011/05/05
- Re: [O] org-capture in message-mode buffer, Ulf Stegemann, 2011/05/05
- Re: [O] org-capture in message-mode buffer, Leo, 2011/05/08
- Re: [O] org-capture in message-mode buffer, Carsten Dominik, 2011/05/23
- Re: [O] org-capture in message-mode buffer, Leo, 2011/05/23
- Re: [O] org-capture in message-mode buffer,
Tassilo Horn <=
- Re: [O] org-capture in message-mode buffer, Carsten Dominik, 2011/05/24
- Re: [O] org-capture in message-mode buffer, Tassilo Horn, 2011/05/24
- Re: [O] org-capture in message-mode buffer, Carsten Dominik, 2011/05/24