emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] email ui choices?


From: Matt Price
Subject: Re: [O] email ui choices?
Date: Tue, 14 Jul 2015 16:51:41 -0400



On Tue, Jul 14, 2015 at 7:27 AM, Eric Abrahamsen <address@hidden> wrote:
Matt Price <address@hidden> writes:

> On Tue, Jul 14, 2015 at 6:51 AM, Eric Abrahamsen <address@hidden> wrote:

[...]


I'll include a shameless-plug-cum-general-recommendation: I use
org-attach a lot to keep files associated with Org headings, and to me
this feels like a natural use-case for that.

Yes, it sounds like a pretty good idea.  I am trying to figure out a couple of attachment issues; to start with, I was hoping to set a dnd-handler, anmd have drag-and-dropping local files create an attachment. I am close, but the actual attachment isn't being created. This is what I have:

(setq dnd-protocol-alist
      `(("^\\(file\\)://" . mwp-file-dnd) ,@dnd-protocol-alist))

(defun mwp-file-dnd (uri action)
  (cond ((eq major-mode 'org-mode)
         ;; (message uri)
         (insert "[[%s][Description Property")
         (org-attach-attach uri nil "lns" ) ;; this appears to work, but doesn't create the link
         )
        (t
         (let ((dnd-protocol-alist
                (rassq-delete-all
                 'mwp-file-dnd
                 (copy-alist dnd-protocol-alist))))
           (dnd-handle-one-url nil action uri)))
        ))


I wrote a library called Gnorb (in the package manager) that provides
some glue-code between Gnus and Org (and BBDB), and there are a few
hooks in there that might be useful to you.

It sounds like you're digesting quite a bit all at once, so you probably
don't want to install all of Gnorb. If you're interested in some of the
bits, I might be able to peel those off into separate functions:
specifically, taking files from the org-attach directory and attaching
them to outgoing emails being sent from an Org heading. I can't promise
I could do it cleanly, but I'd be happy to look into it.

If you could do that, that would be just super.  Right now my lone mailing function sends me to message-mode:

  (defun mime-send-mail ()
    "org-mime-subtree and HTMLize"
    (interactive)
    (org-mark-subtree)
    (let ((subject  (nth 4 (org-heading-components))))
      (org-mime-subtree)
      (insert "\nBest,\nMP.\n")
      (org-mime-htmlize)
      (command-execute 'mml-attach-file)
      (message-goto-to)
      )
    )

mml-attach-file asks a whole bunch of questions about mime type, etc.  I don't know how to fill those values in automatically, but I guess it would be, in pseudo code

(dolist (thisfile org-attach-all-attachments) (mml-attach-file thisfile FILL IN OTHER ARGUMENTS)

If you have something like that in gnorb that'd be awesome.  Thanks once again,
Matt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]