unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH 2/2] emacs: add function to resend message to new recipients
Date: Mon, 31 Aug 2015 22:01:22 +0300	[thread overview]
Message-ID: <m2si6zffjx.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87lhcss06e.fsf@maritornes.cs.unb.ca>

On Mon, Aug 31 2015, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>>
>>   emacs -q -L $PWD/emacs -l emacs/notmuch.el -f notmuch --eval '(progn (setq notmuch-address-command "nottoomuch-addresses.sh") (notmuch-address-message-insinuate))'
>>

> Ah, I missed notmuch-address-message-insinuate; it does work if I run
> that. I wonder if this can be simplified at all now that
> notmuch-message-mode exists. In general I'm leery of running code when we
> load notmuch*.el, as this has a history of causing problems for people
> using notmuch e.g. as a search tool for gnus.

Currently as both setting notmuch-address-command and
notmuch-address-message-insinunate us required I would not attempt to do any
"magic" there. Whenever we get built-in address completion (i.e built-in
is used when notmuch-address-command is kept nil we could consider to add
some defcustom which can be used to activate address completion -- but 
as there are these *-insinunate -commands in many elisp packages it is
probably best to investigate whether this really can be "automated".
Perhaps some lazy initialization could be in place, then.

> The completion interface takes a little getting used to, but it's
> definitely usable. And of course much better than what we have now ;).
>
> One thing I noticed which I _think_ is a bug, is that after calling
> notmuch-show-resend-message, notmuch-view-raw-message doesn't work
> anymore, complaining about a read-only buffer.

That is interesting in a sense that I could not reproduce. I think I know
exactly why this happens: notmuch-view-raw-message creates read-only buffer
which is not removed after message is resent: re-running
notmuch-view-raw-message on same message will `get-buffer-create' with
same name and pick the old read-only buffer; inserting data to that buffer
fails -- just that in my tests (V C-x b RET V) I could not get the same
outcome.

The simplest change is to change (bury-buffer) with (kill-buffer). The raw
message buffer that was used to send should not be interesting; more
interesting is the current (same) message in notmuch-show buffer -- and 'V'
can be used to re-view the raw message. 
What could be added is printing the message id of the message resent to
*Messages* buffer. This way re-sender can verify what was resent if being
unsure. Just that in the case I've used this I have not looked back...

So, probably I make applicable RFC patch of this feature...


>
> d

Tomi

  reply	other threads:[~2015-08-31 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 20:07 [PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated Tomi Ollila
2015-08-26 20:07 ` [PATCH 2/2] emacs: add function to resend message to new recipients Tomi Ollila
2015-08-30 12:56   ` David Bremner
2015-08-30 14:58     ` Tomi Ollila
2015-08-31  1:42       ` David Bremner
2015-08-31 19:01         ` Tomi Ollila [this message]
2015-08-31 23:11           ` David Bremner
2015-08-30 12:28 ` [PATCH 1/2] emacs: add defsubst notmuch-address--message-insinuated David Bremner
2015-08-30 15:02   ` Tomi Ollila

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://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2si6zffjx.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.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://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).