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 v4] emacs: add notmuch-address-post-completion-hook
Date: Sun, 13 Nov 2016 14:39:16 +0200	[thread overview]
Message-ID: <m21syfa70r.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87oa1ju924.fsf@qmul.ac.uk>


(Trying to send this w/o Mark in To: -- in the hope also Mark receive this
email to his gmail account...)

On Sun, Nov 13 2016, Mark Walters <markwalters1009@gmail.com> wrote:

> On Sat, 12 Nov 2016, David Bremner <david@tethera.net> wrote:
>> Tomi Ollila <tomi.ollila@iki.fi> writes:
>>
>>> Like someone (whose message I cannot find just now) mentioned in another
>>> thread, just now it is right time to mention here too...
>>>
>>> https://www.gnu.org/software/emacs/manual/html_node/elisp/Hooks.html
>>>
>>> ... that when hook name ends with `-hook` it is supposed to be "normal hook"
>>> -- a function which does not take arguments nor return values.
>>>
>>> So, I'd like to suggest that this variable is renamed to 
>>> notmuch-address-completion-functions
>>>
>>
>> Well, I guess the -functions convention should be followed, but
>> notmuch-address-completion-functions seems a bit vague.
>
> Maybe notmuch-address-post-completion-functions ?
>
> Alternatively maybe we can end in -hook-functions to indicate it is a
> function which is like a hook?

I found *-hook-functions format mystically familiar but could not found any
references in emacs 24.5 (nor now latest git) elisp source; there has been
loadhist-hook-functions and vc-backend-hook-functions in the source but
those have been removed/replaced later (w/o explanation why). otoh there
are plenty of *-hook-function references (which value seem to be expected to
be symbol to function). Then I recognized I have had such definitions in
my *own* elisp configuration files something like 25 years... ;) (copied
from someone in my early emacs days).

So, after more grepping it looks to me that this 
    notmuch-address-post-completion-functions
is pretty good suggestion.

(Grepping through elisp source distributed with emacs there are quite
a few lines like (run-hook-with-args '...-hook args..). it is easy to
end up being incompliant with the emacs convention. But other code
not being compliant is not good reason to do the same (and thanks to
Matt (in id:qf537j3hu4p.fsf@marmstrong-linux.kir.corp.google.com) for
rest of us to recognize this early enough))

BTW: I just noticed that the message subject said: 
emacs: add notmuch-address-post-completion-hook
but the currently used variable name lacked this -post- part
-- caused a bit of confusion of what/why am I suggesting here ;)

Tomi

>
> Best wishes
>
> Mark

  reply	other threads:[~2016-11-13 12:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03  0:36 [PATCH] emacs: add notmuch-address-post-completion-hook David Bremner
2016-11-03  9:27 ` Mark Walters
2016-11-03 11:38   ` David Bremner
2016-11-03 11:56   ` [PATCH v3] " David Bremner
2016-11-03 17:08     ` Mark Walters
2016-11-03 18:00       ` David Bremner
2016-11-04  1:02         ` [PATCH v4] " David Bremner
2016-11-04  6:33           ` Mark Walters
2016-11-04 15:53           ` David Bremner
2016-11-12 19:07           ` Tomi Ollila
2016-11-12 21:39             ` David Bremner
2016-11-13  7:34               ` Mark Walters
2016-11-13 12:39                 ` Tomi Ollila [this message]
2016-11-13 13:03                   ` [PATCH] emacs: rename notmuch-address-completion-hook to notmuch-address-post-completion-functions David Bremner
2016-11-13 17:28                     ` 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=m21syfa70r.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).