unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* tach.el: an attachment interface for message mode.
@ 2012-01-20 17:04 Jesse Rosenthal
  2012-01-20 17:21 ` Aaron Ecay
  2012-01-20 22:43 ` Xavier Maillard
  0 siblings, 2 replies; 4+ messages in thread
From: Jesse Rosenthal @ 2012-01-20 17:04 UTC (permalink / raw)
  To: notmuch

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

Dear All,

I sent this to the list a couple of years back, but now that things are
moving again, and there are new eyes on the list, I thought I'd send it
again. I believe I'm the only person to use this (and might well
continue to be so) but I've been using it for a couple of years without
any problems, and it has made using message mode a lot more
convenient. As far as I know, this doesn't intersect with the recent
security problems pointed out in mml-mode, but I could be wrong.

My issue was this: the handling of (outgoing) attachments in
message-mode left a lot to be desired. MML's markup can be confusing,
and can easily be edited by mistake.

Thus: tach.el. Tach is a minor mode that adds mutt-like attachment
handling to message mode. It's not notmuch specific, but I wrote it to
use with notmuch, and I thought it might be of use to some on the
list.

You can find tach.el attached to this email.

To use tach, put tach.el in your load-path, and add the following to
your .emacs:

(require 'tach)
(add-hook 'message-mode-hook 'tach-minor-mode)

Now when you type "C-c C-a" in message-mode, you should get a new window
with an attachment list. In that window, you can add and delete
attachments using `+' and `-', and scroll through them using the arrow
keys or the emacs direction commands.

tach.el will convert the attachments into MML markup as a last
step before sending. Hopefully you should never have to deal with it by
hand.

Some details: tach actually makes a numerical list at the bottom of the
message itself, separated by a custom separator. The message is narrowed
to above this separator, and the attachment window is an indirect buffer
narrowed to the region below the separator. The separator is erased when
the messages are translated to mml markup at the end.

This has remained at its earliest stages, and the usual disclaimers
apply. It certainly needs more a lot more commenting and
documentation. But I thought it might be useful, or at least fun to play
around with. And it might fill a niche for some users, as notmuch's
popularity continues to grow.

Best,
Jesse



[-- Attachment #2: tach.el --]
[-- Type: application/emacs-lisp, Size: 9819 bytes --]

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

* Re: tach.el: an attachment interface for message mode.
  2012-01-20 17:04 tach.el: an attachment interface for message mode Jesse Rosenthal
@ 2012-01-20 17:21 ` Aaron Ecay
  2012-01-20 22:43 ` Xavier Maillard
  1 sibling, 0 replies; 4+ messages in thread
From: Aaron Ecay @ 2012-01-20 17:21 UTC (permalink / raw)
  To: Jesse Rosenthal, notmuch

Ha!  As I was recently looking at the MML stuff, I spent some time
googling around looking for this – I knew I had seen a “mutt-like”
attachment interface for emacs mail writing, but I couldn’t seem to come
across it.  I will definitely get it set up and play with it.  I don’t
have cause to attach files to email very often, but I’ll let you know
how it works out.

Thanks a lot,

-- 
Aaron Ecay

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

* Re: tach.el: an attachment interface for message mode.
  2012-01-20 17:04 tach.el: an attachment interface for message mode Jesse Rosenthal
  2012-01-20 17:21 ` Aaron Ecay
@ 2012-01-20 22:43 ` Xavier Maillard
  2012-01-20 22:54   ` Jesse Rosenthal
  1 sibling, 1 reply; 4+ messages in thread
From: Xavier Maillard @ 2012-01-20 22:43 UTC (permalink / raw)
  To: Jesse Rosenthal, notmuch

On Fri, 20 Jan 2012 12:04:49 -0500, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:

[ ... ]

> Thus: tach.el. Tach is a minor mode that adds mutt-like attachment
> handling to message mode. It's not notmuch specific, but I wrote it to
> use with notmuch, and I thought it might be of use to some on the
> list.

I like it.

> Now when you type "C-c C-a" in message-mode, you should get a new window
> with an attachment list. In that window, you can add and delete
> attachments using `+' and `-', and scroll through them using the arrow
> keys or the emacs direction commands.

Simple but at first it is not easy to understand what to do with that
window. Also, there is no way to toggle the window visibility. But for a
first shot, it is a good shot :D
 
I tried it by adding tach.el to myself. When sending the message, I have
been asked whether I'd like to update copyright date and change licence
to GPL3, huh ? Is this something specific to how tach.el works ?

/Xavier

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

* Re: tach.el: an attachment interface for message mode.
  2012-01-20 22:43 ` Xavier Maillard
@ 2012-01-20 22:54   ` Jesse Rosenthal
  0 siblings, 0 replies; 4+ messages in thread
From: Jesse Rosenthal @ 2012-01-20 22:54 UTC (permalink / raw)
  To: Xavier Maillard, notmuch

Hi Xavier,

On Fri, 20 Jan 2012 23:43:01 +0100, Xavier Maillard <xavier@maillard.im> wrote:

> I like it.
Thanks for giving it a try.

> Simple but at first it is not easy to understand what to do with that
> window. Also, there is no way to toggle the window visibility. But for a
> first shot, it is a good shot :D

There could be a prompt in the minibuffer, I suppose, or the blank
second window could have a prompt in it as well.  And it would actually
be easy enough to add that toggle, since the window is really just a
different sort of view on a numerical list at the bottom of the
page. I'll give it a shot soon.

> I tried it by adding tach.el to myself. When sending the message, I have
> been asked whether I'd like to update copyright date and change licence
> to GPL3, huh ? Is this something specific to how tach.el works ?

I actually have no idea what this could come from. The date is a couple
of years back, and the license is GPL2+. I'm not sure why it would
prompt you to change that. Ever come across this before?

Best, 
Jesse

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

end of thread, other threads:[~2012-01-20 22:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-20 17:04 tach.el: an attachment interface for message mode Jesse Rosenthal
2012-01-20 17:21 ` Aaron Ecay
2012-01-20 22:43 ` Xavier Maillard
2012-01-20 22:54   ` Jesse Rosenthal

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