unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Org-mode support
@ 2011-02-07 21:22 Matthieu Lemerre
  2011-02-13 19:25 ` Darren McGuicken
  2011-03-16  3:57 ` micah anderson
  0 siblings, 2 replies; 9+ messages in thread
From: Matthieu Lemerre @ 2011-02-07 21:22 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]


Hi everyone,

I have written the org-mode support for notmuch a while ago. It allows
to open links to notmuch from org-mode and create org-mode link from
notmuch buffers.

The current maintainer of the package is looking for feedback for
inclusion of the package in the org-mode trunk, so if anyone is using
org-mode, I think it would be a good idea to say so on the orgmode
mailing list!

I have attached the corresponding file.

Matthieu


[-- Attachment #2: org-notmuch.el --]
[-- Type: application/emacs-lisp, Size: 3727 bytes --]

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

* Re: Org-mode support
  2011-02-07 21:22 Org-mode support Matthieu Lemerre
@ 2011-02-13 19:25 ` Darren McGuicken
  2011-02-13 22:24   ` Matthieu Lemerre
  2011-03-16  3:57 ` micah anderson
  1 sibling, 1 reply; 9+ messages in thread
From: Darren McGuicken @ 2011-02-13 19:25 UTC (permalink / raw)
  To: Matthieu Lemerre, notmuch

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

On Mon, 07 Feb 2011 22:22:17 +0100, Matthieu Lemerre <racin@free.fr> wrote:
> I have written the org-mode support for notmuch a while ago. It allows
> to open links to notmuch from org-mode and create org-mode link from
> notmuch buffers.

Excellent, thanks for this, I'll check it out - how does this compare to
the org support for something like gnus?

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Org-mode support
  2011-02-13 19:25 ` Darren McGuicken
@ 2011-02-13 22:24   ` Matthieu Lemerre
  2011-02-15  7:40     ` Albin Stjerna
  0 siblings, 1 reply; 9+ messages in thread
From: Matthieu Lemerre @ 2011-02-13 22:24 UTC (permalink / raw)
  To: Darren McGuicken, notmuch

On Sun, 13 Feb 2011 19:25:05 +0000, Darren McGuicken <mailing-notmuch@fernseed.info> wrote:
> On Mon, 07 Feb 2011 22:22:17 +0100, Matthieu Lemerre <racin@free.fr> wrote:
> > I have written the org-mode support for notmuch a while ago. It allows
> > to open links to notmuch from org-mode and create org-mode link from
> > notmuch buffers.
> 
> Excellent, thanks for this, I'll check it out - how does this compare to
> the org support for something like gnus?

I don't know exactly how org-mode supports gnus, but I think pretty much
the same... Basically what it allows is: 

1. When calling org-store-link (or org-capture) from a notmuch-message
or notmuch-search window, store a link to this buffer.

2. When opening a link in org-mode, if the link is a notmuch link, open
the corresponding notmuch buffer.

I use this to empty my inbox and quickly store todo items to my TODO
list/gtd file along the way.

I believe that further org/notmuch integration could be beneficial, and
this represents a first step.

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

* Re: Org-mode support
  2011-02-13 22:24   ` Matthieu Lemerre
@ 2011-02-15  7:40     ` Albin Stjerna
  2011-02-15 21:46       ` Darren McGuicken
  0 siblings, 1 reply; 9+ messages in thread
From: Albin Stjerna @ 2011-02-15  7:40 UTC (permalink / raw)
  To: Matthieu Lemerre, Darren McGuicken, notmuch

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

On Sun, 13 Feb 2011 23:24:46 +0100, Matthieu Lemerre <racin@free.fr> wrote:

> I use this to empty my inbox and quickly store todo items to my TODO
> list/gtd file along the way.

I use it in much the same fashion. Very useful—thank you! :) Does it
have its own code repository somewhere by the way?

> I believe that further org/notmuch integration could be beneficial, and
> this represents a first step.

Here I'd like to call your attention to notmorg, [1] which is another,
quite different, interaction layer between notmuch and
org-mode. Basically, it generates an agenda file containing all mails
tagged »todo«, with optionally generated scheduled/deadline tags. Of
course, it could be updated to use your interaction code to link back to
the actual notmuch emails.

Footnotes: 
[1]  https://github.com/krl/notmorg

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

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

* Re: Org-mode support
  2011-02-15  7:40     ` Albin Stjerna
@ 2011-02-15 21:46       ` Darren McGuicken
  0 siblings, 0 replies; 9+ messages in thread
From: Darren McGuicken @ 2011-02-15 21:46 UTC (permalink / raw)
  To: Albin Stjerna, Matthieu Lemerre, notmuch

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Tue, 15 Feb 2011 08:40:06 +0100, Albin Stjerna <albin@eval.nu> wrote:
> Here I'd like to call your attention to notmorg, [...]  it generates
> an agenda file containing all mails tagged »todo«, with optionally
> generated scheduled/deadline tags. Of course, it could be updated to
> use your interaction code to link back to the actual notmuch emails.

This sounds really useful for the org junkies amongst us!  Sadly it
appears to be broken, at least when using Jamie's crypto branch.  Are
you running vanilla 0.5 with no problems?

If so, I'm guessing the reason may be that David's improved multipart
handling patch series changes the json output in a manner not handled by
the notmorg lisp since I'm seeing some output in my messages buffer
which begins with a line 'Wrong type argument: stringp, ((:content"',
then an email body, then ends with a line beginning '" :content-type
"text/plain"' and the list signature...

CC-ing Kristoffer, the maintainer.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: Org-mode support
  2011-02-07 21:22 Org-mode support Matthieu Lemerre
  2011-02-13 19:25 ` Darren McGuicken
@ 2011-03-16  3:57 ` micah anderson
  2011-03-16 23:28   ` Matthieu Lemerre
  1 sibling, 1 reply; 9+ messages in thread
From: micah anderson @ 2011-03-16  3:57 UTC (permalink / raw)
  To: Matthieu Lemerre, notmuch

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]


Hi Matthieu!

On Mon, 07 Feb 2011 22:22:17 +0100, Matthieu Lemerre <racin@free.fr> wrote:
> I have written the org-mode support for notmuch a while ago. It allows
> to open links to notmuch from org-mode and create org-mode link from
> notmuch buffers.
> 
> The current maintainer of the package is looking for feedback for
> inclusion of the package in the org-mode trunk, so if anyone is using
> org-mode, I think it would be a good idea to say so on the orgmode
> mailing list!

Thanks so much for sending this, its very interesting! I've just started
trying it and have managed to use M-x org-store-link on your email to
add an org-mode todo item to try out org-mode support for notmuch :)

I have one question, how do you add multiple query arguments? For
example, in my org file I tried 'notmuch-search:tag:notmuch' - this
worked great, but if I did 'notmuch-search:tag:notmuch and subject:Org'
the link only works up until the first space.

I also noticed that David Bremner has done something similar[0] and I
wonder if you have looked at his code[1], or if David has looked at
yours. Perhaps the start of a collaboration?

Micah

0. id:1259979997-31544-1-git-send-email-david@tethera.net
1. http://pivot.cs.unb.ca/git/?p=org-mode.git;a=shortlog;h=refs/heads/notmuch-link

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Org-mode support
  2011-03-16  3:57 ` micah anderson
@ 2011-03-16 23:28   ` Matthieu Lemerre
  2011-03-20 15:40     ` micah anderson
  2011-04-14 12:55     ` Florian Friesdorf
  0 siblings, 2 replies; 9+ messages in thread
From: Matthieu Lemerre @ 2011-03-16 23:28 UTC (permalink / raw)
  To: micah anderson, notmuch


Hi Micah,

> Thanks so much for sending this, its very interesting! I've just started
> trying it and have managed to use M-x org-store-link on your email to
> add an org-mode todo item to try out org-mode support for notmuch :)

Great, that's how it is supposed to be used! :)

> I have one question, how do you add multiple query arguments? For
> example, in my org file I tried 'notmuch-search:tag:notmuch' - this
> worked great, but if I did 'notmuch-search:tag:notmuch and subject:Org'
> the link only works up until the first space.

This is because org-mode links must be url encoded (this is a org-mode
limitation, could do nothing about it). So in links that contain spaces,
such as yours, spaces must be replaced by %20, like this:

[[notmuch-search:toto%20and%20tata][Notmuch search: toto and tata]]

> I also noticed that David Bremner has done something similar[0] and I
> wonder if you have looked at his code[1], or if David has looked at
> yours. Perhaps the start of a collaboration?

If I remember correctly, I specifically forbid myself to look into this
code because David had copyright issues with its employer. But I believe
that both codes are doing essentially the same thing.

Matthieu

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

* Re: Org-mode support
  2011-03-16 23:28   ` Matthieu Lemerre
@ 2011-03-20 15:40     ` micah anderson
  2011-04-14 12:55     ` Florian Friesdorf
  1 sibling, 0 replies; 9+ messages in thread
From: micah anderson @ 2011-03-20 15:40 UTC (permalink / raw)
  To: Matthieu Lemerre, notmuch

[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]

On Thu, 17 Mar 2011 00:28:30 +0100, Matthieu Lemerre <racin@free.fr> wrote:

> > I have one question, how do you add multiple query arguments? For
> > example, in my org file I tried 'notmuch-search:tag:notmuch' - this
> > worked great, but if I did 'notmuch-search:tag:notmuch and subject:Org'
> > the link only works up until the first space.
> 
> This is because org-mode links must be url encoded (this is a org-mode
> limitation, could do nothing about it). So in links that contain spaces,
> such as yours, spaces must be replaced by %20, like this:
> 
> [[notmuch-search:toto%20and%20tata][Notmuch search: toto and tata]]

Thanks, I'm somewhat new to org-mode, so I appreciate that information!

> > I also noticed that David Bremner has done something similar[0] and I
> > wonder if you have looked at his code[1], or if David has looked at
> > yours. Perhaps the start of a collaboration?
> 
> If I remember correctly, I specifically forbid myself to look into this
> code because David had copyright issues with its employer. But I believe
> that both codes are doing essentially the same thing.

It sounds like you are right about the copyright issues. 

I noticed one thing about your org add-on that would be nice to improve:
it doesn't appear as if you support linking to a thread in
notmuch-search-mode. If I have a search buffer, generated by "notmuch
search tag:notmuch" and I find in there your message with the Subject
"Org-mode support" and I put my cursor on it and do M-x org-store-link,
the link that is generated is to "Notmuch search: tag:notmuch" rather
than to the thread id that is under the cursor. A minor thing, but could
be quite useful.

thanks!
micah

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: Org-mode support
  2011-03-16 23:28   ` Matthieu Lemerre
  2011-03-20 15:40     ` micah anderson
@ 2011-04-14 12:55     ` Florian Friesdorf
  1 sibling, 0 replies; 9+ messages in thread
From: Florian Friesdorf @ 2011-04-14 12:55 UTC (permalink / raw)
  To: Matthieu Lemerre, micah anderson, notmuch


[-- Attachment #1.1: Type: text/plain, Size: 135 bytes --]


First, thanks a lot for org-notmuch!

I attached a minimal patch to require org so it is enough to require
org-notmuch in user init.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-org-notmuch-require-org-for-org-add-link-type-and-ot.patch --]
[-- Type: text/x-patch, Size: 717 bytes --]

From 4128169c3d22527342c90b675e847f4227f3b0c1 Mon Sep 17 00:00:00 2001
From: Florian Friesdorf <flo@chaoflow.net>
Date: Thu, 14 Apr 2011 14:44:54 +0200
Subject: [PATCH] org-notmuch: require org for org-add-link-type and others

---
 contrib/lisp/org-notmuch.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/contrib/lisp/org-notmuch.el b/contrib/lisp/org-notmuch.el
index 9cde34f..9283385 100644
--- a/contrib/lisp/org-notmuch.el
+++ b/contrib/lisp/org-notmuch.el
@@ -41,6 +41,8 @@
 
 ;;; Code:
 
+(require 'org)
+
 ;; Install the link type
 (org-add-link-type "notmuch" 'org-notmuch-open)
 (add-hook 'org-store-link-functions 'org-notmuch-store-link)
-- 
1.7.4.4


[-- Attachment #1.3: Type: text/plain, Size: 187 bytes --]


-- 
Florian Friesdorf <flo@chaoflow.net>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo@chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

end of thread, other threads:[~2011-04-14 12:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 21:22 Org-mode support Matthieu Lemerre
2011-02-13 19:25 ` Darren McGuicken
2011-02-13 22:24   ` Matthieu Lemerre
2011-02-15  7:40     ` Albin Stjerna
2011-02-15 21:46       ` Darren McGuicken
2011-03-16  3:57 ` micah anderson
2011-03-16 23:28   ` Matthieu Lemerre
2011-03-20 15:40     ` micah anderson
2011-04-14 12:55     ` Florian Friesdorf

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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).