emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: email ui choices?
Date: Tue, 14 Jul 2015 16:51:41 -0400	[thread overview]
Message-ID: <CAN_Dec9jp=Nfa3VOPxUUnDPDAoxM8Fi5=9Jy2vauV0s0Wvv3bw@mail.gmail.com> (raw)
In-Reply-To: <874ml7vv0j.fsf@ericabrahamsen.net>

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

On Tue, Jul 14, 2015 at 7:27 AM, Eric Abrahamsen <eric@ericabrahamsen.net>
wrote:

> Matt Price <moptop99@gmail.com> writes:
>
> > On Tue, Jul 14, 2015 at 6:51 AM, Eric Abrahamsen <
> eric@ericabrahamsen.net> 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

[-- Attachment #2: Type: text/html, Size: 3836 bytes --]

  reply	other threads:[~2015-07-14 20:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  0:16 email ui choices? Matt Price
2015-07-14  8:48 ` Juergen Christoffel
2015-07-14 10:51   ` Eric Abrahamsen
2015-07-14 11:10     ` Matt Price
2015-07-14 11:27       ` Eric Abrahamsen
2015-07-14 20:51         ` Matt Price [this message]
2015-07-15  1:46           ` Eric Abrahamsen
2015-07-14 22:29       ` Juergen Christoffel
2015-07-14 23:22         ` Matt Price
2015-07-14 11:35     ` Rasmus
2015-07-14 11:41       ` Eric Abrahamsen
2015-07-14 12:01         ` Rasmus
2015-07-14 14:47           ` Jorge A. Alfaro-Murillo
2015-07-15  1:14           ` Eric Abrahamsen
2015-07-15  8:56             ` Rasmus
2015-07-15  9:27               ` Eric Abrahamsen
2015-07-15  9:37                 ` Rasmus
2015-07-16  3:27                   ` 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='CAN_Dec9jp=Nfa3VOPxUUnDPDAoxM8Fi5=9Jy2vauV0s0Wvv3bw@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).