unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
Subject: Re: [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when signature involved
Date: Thu, 05 Sep 2013 19:42:11 +0300	[thread overview]
Message-ID: <87d2on9q58.fsf@nikula.org> (raw)
In-Reply-To: <m2txhzfiw2.fsf@guru.guru-group.fi>

On Thu, 05 Sep 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Thu, Sep 05 2013, Jani Nikula <jani@nikula.org> wrote:
>
>> On Wed, 04 Sep 2013, "Tomi.Ollila" <tomi.ollila@iki.fi> wrote:
>>> From: Tomi Ollila <tomi.ollila@iki.fi>
>>>
>>> When composing a reply, notmuch-mua-reply attempts to  cite the
>>> the original message by inserting it before the user signature, if
>>> one is present. The existing method used to search the signature
>>> separator backward from the end of the buffer and then move one
>>> line up. In case of variable `message-signature-insert-empty-line'
>>> being nil (and `message-signature-setup-hook' not intervening) this
>>> caused point to go to the beginning of '--text follows this line--'
>>> separator line, and citation was inserted there.
>>> This change checks the value of `message-signature-insert-empty-line'
>>> and doesn't move point if that is nil. Additional narrowing to
>>> the body region ensures that point never goes to the separator line
>>> (or beyond).
>>>
>>> Original patch from "Geoffrey H. Ferrari", continued with iterations
>>> from Jani and Mark.
>>
>> Hi Tomi, I don't think you've sufficiently convinced me why we need all
>> this complexity instead of just doing [1]. And if you do get me
>> convinced, I'd like the reason to be in the commit message and in a
>> comment above the piece of code in question.
>
> (add-hook 'message-signature-setup-hook 
>    (lambda () (insert "Insert this text before the citation not after.\n")))
>
> From emacs documentation:
>
> message-signature-setup-hook is a variable defined in `message.el'.
> Its value is nil
>
>   This variable may be risky if used as a file-local variable.
>
> Documentation:
> Normal hook, run each time a new outgoing message is initialized.
> It is run after the headers have been inserted and before
> the signature is inserted.
>
> You can customize this variable.
>
>
> Adding the comments is a good idea -- if the above convinces you
> I'll prepare comments along this idea.

Meh. Fair enough. Thanks for the explanation.

Cheers,
Jani.

  reply	other threads:[~2013-09-05 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 19:20 [PATCH 1/1] emacs: fix notmuch-mua-reply point placement when signature involved Tomi.Ollila
2013-09-05  9:19 ` Mark Walters
2013-09-05 14:11 ` Jani Nikula
2013-09-05 14:22   ` Tomi Ollila
2013-09-05 16:42     ` Jani Nikula [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-06 14:32 Tomi Ollila
2013-09-06 17:16 ` Mark Walters
2013-09-09  1:53 ` David Bremner

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=87d2on9q58.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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).