emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [ANN] Gnorb: Glue code between Gnus, Org, and BBDB
Date: Sat, 10 May 2014 15:34:00 +0200	[thread overview]
Message-ID: <m2a9ap69mf.fsf@top-wifi.irisa.fr> (raw)
In-Reply-To: <87iopdhqla.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 10 May 2014 18:32:01 +0800")

On 2014-05-10 12:32, Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> I usually avoid putting links in my tasks. For instance, the task
>> I generated from your email to the list looks like this:
>>
>>   **** TODO Reply to this when I will have tried gnorb		       :@fun:
>>    [2014-05-07 Wed 11:25]
>>   
>>   [[gnus:lists.orgmode#87r446bcut.fsf@ericabrahamsen.net][Email from Eric Abrahamsen: {O} {ANN} Gnorb: Glue code bet (Wed, 07 May 2014 09:23:54 +0800)]]
>>
>> Would it be difficult to handle such emails when the link is inside the
>> TODO, instead of in the heading?
>
> Not at all! In fact, the next tweak for this is an option allowing you
> to expand the scope of the scan for links. I'll probably default it to
> checking the first paragraph of the entry text, but you'll be able to go
> all the way to 'subtree.

That would be great indeed.

>> I can of course change my capture format. I'm just wondering why you
>> prefer to have the link in the mail.
>
> Heck no I don't want you to change your format! I'm very sensitive to
> issues of mental overhead and workflow/file-format lock-in with this
> package. The whole point is to help you think *less*, not more, and I
> don't want people having to write a bunch of code or change their files
> to make it work. Ideally everything would just happen by calling
> functions, and it will be the responsibility of those functions to
> look at your TODO structure and do the right thing.

A more robust alternative than looking at the note's text could be to
have a property with the link to the mail. (Later) I see that your
LOGBOOK example uses a property to track the message. Could this be
considered as the link? And I also see you only record the message
id. How do you get to the right folder using it?

> Actually, let me hijack this for a second and ask a more general
> question. I announced the package at this stage, and not when it was
> more complete, because the next thing to do is flesh out its email
> handling capabilities, and I'd love to get feedback on that first.

For comparison, my email handling workflow is very simple. I have
a "capture with link" template that looks like this, that I can use
from inside gnus:

#+begin_src emacs-lisp
          ("T" "todo with link" entry (file "refile-orgx.org")
           "* TODO %?\n %U\n\n%a")
#+end_src

I'm also making sure the link text has enough information to find the
mail again if it's moved (I would love a more robust linking system,
maybe based on notmuch, but this works well enough for the moment). To
do so, I set `org-email-link-description-format' to "Email %c: %.30s (%d)".

To follow a link, I don't simply click on it as it usually breaks my
carefully crafted layout for my agenda and todo files. So I have a very
simple function that creates a frame to display the link:

#+begin_src emacs-lisp
  (defun as/copy-link-and-open-in-new-frame ()
    (interactive)
    "Copies the next link found and opens it in a new frame"
    (org-next-link)
    (let ((link (org-element-property :raw-link (org-element-link-parser))))
      (make-frame '((name . "follow-link")))
      (select-frame-by-name "follow-link")
      (org-open-link-from-string link)))
#+end_src

This setup is why I'm so interested in gnorb: it's too much manual
manipulation and friction.

> I'm writing two more functions to complement `gnorb-org-handle-mail'. In
> the end there will be three:
>
> 1. A function that says "make an Org todo out of the email I'm sending
> now" (to keep track of conversations that need following-up).
>
> 2. A function that says "this email I just received is relevant to some
> Org heading, and should trigger a TODO state-change or a note on that
> heading". It will be able to suggest the correct heading.
>
> 3. A function that says "send an email by reading the current Org
> heading and doing what I what". That's `gnorb-org-handle-mail'.

These three functions would be most useful indeed.

> I just said I don't want to enforce anything, but one thing I want to
> strongly *encourage* is the use of the LOGBOOK drawer to keep track of
> email threads/conversations. By using `org-log-into-drawer', the "@"
> cookie for TODO keywords, and `org-add-note', you can keep track of all
> the important developments in an email conversation, using links to
> specific messages. I do a fair amount of business negotiation via email,
> and this is pretty crucial for me. I end up with headings looking like
> this:
>
> * WAIT Sort out copyright agreement with [[bbdb:johnbob]]
>   :LOGBOOK:
>   - State "WAIT"      from "REPLY"       [2014-05-08 Sat 09:45] \\
>     I told him that might work, but we'd need to limit the language zone
>   - State "REPLY"      from "WAIT"       [2014-05-07 Sat 15:09] \\
>     He [[gnus:link][wrote back]] and proposed 14% royalties
>   - Note taken on [2014-05-06 Sat 12:56] \\
>     Mattbob [[gnus:link][wrote]] and reminded me to ask about digital rights
>   - State "WAIT"       from "EMAIL"       [2014-05-04 Fri 13:25] \\
>     Wrote to Johnbob and proposed terms.
>   :END:
>   :PROPERTIES
>   :GNORB_MSG_IDS: 46bcut.fsf@ericabrahamsen.net jj8m.fsf@johnbob.fr
>   :END:
>
> I'd like gnorb to do all the complicated bits for you. You should just
> be able to call whichever of the three functions is relevant, and then
> gnorb will put you in the right place, with a link loaded, to take a
> note or annotate a state-change. In the above example,
> `gnorb-org-handle-mail' should see that there are gnus links in the
> LOGBOOK, and start a reply to the most recent one.

I know how to record state changes in the logbook (in the definition of
`org-todo-keywords'), but I don't know how one adds notes. Do you do it
by hand?

> I use the BBDB a lot because when I think "now I have to do XYZ", that
> often starts with thinking of the people involved with the task. So I go
> to the record in BBDB, and then call `gnorb-bbdb-mail-search' to see
> messages from them, or `gnorb-bbdb-tag-agenda' to see Org todos related
> to them. When I do a tags search in Org, `gnorb-org-popup-bbdb' shows me
> relevant contacts. I'm going to expand this so that org-occur also does
> a generalized BBDB search, and pops up the relevant buffer. The more
> information that's available using BBDB as a starting point, the more
> you'll use BBDB, of course!
>
> All this depends on you giving your BBDB records an "org-tag" field,
> which is pretty much the only file-format buy-in that Gnorb asks of you
> (I hope it remains the only one).

Basic question: how does one add such a tag? I'm a very very basic user
of bbdb, in the sense that I only use it to expand addresses when
writing messages. I know it can do much more, but I don't know how.

> Roland Winkler just made changes to the BBDB codebase that will allow us
> to store links to recently-received messages as an Xfield on each
> record, and I think that will be awesome (I happily stole this idea from
> org-contacts). It will also depend on people running the development
> version of BBDB, which will mean it will have a userbase of about four
> :)

Such information would be useful, indeed. But you already provide
a similar function with gnorb-bbdb-mail-search, don't you?

> Sorry, this was a bit of a brain-dump. I think the issue of how people
> use email is fascinating, though, and I plan to look at software like
> Google Tasks or whatever, to collect some ideas. I'd love input from
> anyone with opinions!

I also find the topic very interesting. Thanks again for your work!

Alan

  reply	other threads:[~2014-05-10 13:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  1:23 [ANN] Gnorb: Glue code between Gnus, Org, and BBDB Eric Abrahamsen
2014-05-07  2:45 ` Thomas S. Dye
2014-05-07  3:14   ` Eric Abrahamsen
2014-05-09 11:15 ` Alan Schmitt
2014-05-10 10:32   ` Eric Abrahamsen
2014-05-10 13:34     ` Alan Schmitt [this message]
2014-05-10 16:36       ` Eric Abrahamsen
2014-05-10 18:01         ` Alan Schmitt
2014-05-26  9:09     ` Eric Abrahamsen
  -- strict thread matches above, loose matches on Subject: below --
2014-05-06  9:21 Eric Abrahamsen

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=m2a9ap69mf.fsf@top-wifi.irisa.fr \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).