From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: how to put into a journal info about the email sent Date: Fri, 24 Oct 2014 10:02:10 -0700 Message-ID: <87a94lh04t.fsf@ericabrahamsen.net> References: <87ppdhh3rh.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: notmuch-bounces-gxuj+Tv9EO5zyzON3hdc1g@public.gmane.org Errors-To: notmuch-bounces-gxuj+Tv9EO5zyzON3hdc1g@public.gmane.org To: notmuch-gxuj+Tv9EO5zyzON3hdc1g@public.gmane.org Cc: emacs-orgmode-mXXj517/zsQ@public.gmane.org List-Id: emacs-orgmode.gnu.org David Edmondson writes: > On Fri, Oct 24 2014, Eric Abrahamsen wrote: >> David Belohrad writes: >> >>> Dear All, >>> >>> i'm using org. And I'm using notmuch (that's why I address both mailing >>> lists). Now, writing an email in everyday bussiness requires a >>> non-significant time of your workhours. So I'd like to have this event >>> in my org agenda. So any time I send some email with a given subject, >>> I'd like to 'automatically' entry the information about it into >>> e.g. sentmails.org in form of a diary entry, with appropriate tag. >> >> I do something like this in Gnorb, which I'd recommend you use except >> it's mostly Gnus specific. >> >> I do it in two parts, but you could do it in one. Basically I add a >> function to the `message-header-hook' (which ensures that all the >> message headers have been generated properly). > > Does `message-generate-headers-first' not do what you want for this > specific part? Yeah, I think I looked at that previously. But this thing is going in a hook anyway, might as well use the hook that *doesn't* require me to call that function explicitly. >> Obviously the downside is that, without a "Gcc:" header, org can't >> actually make a real link to the message. It doesn't know where it's >> going to be. However if you know that all your sent messages can be >> reached with a link that looks like "notmuch:id#Message-id", then you >> can make that yourself in your org capture template with something like > > As you suggest, know the message-id should be good enough to generate a > notmuch link, though you may have to wait for the notmuch index to be > updated for the link to be valid. Yup, I've got the same issue with nnimap -- you have to wait for the next sync to get access to the message. So far it hasn't been a problem, though.