From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 725236DE0297 for ; Sun, 13 Nov 2016 04:38:34 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.531 X-Spam-Level: X-Spam-Status: No, score=0.531 tagged_above=-999 required=5 tests=[AWL=-0.121, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id STu6zM0NP-LG for ; Sun, 13 Nov 2016 04:38:32 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 1B6E16DE00AC for ; Sun, 13 Nov 2016 04:38:31 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 5A5E51000CA; Sun, 13 Nov 2016 14:39:16 +0200 (EET) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH v4] emacs: add notmuch-address-post-completion-hook In-Reply-To: <87oa1ju924.fsf@qmul.ac.uk> References: <87k2ckl9zb.fsf@tesseract.cs.unb.ca> <20161104010243.23316-1-david@tethera.net> <8760nstm24.fsf@tethera.net> <87oa1ju924.fsf@qmul.ac.uk> User-Agent: Notmuch/0.23.1+44~gfdccb81 (https://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2016 12:38:34 -0000 (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 wrote: > On Sat, 12 Nov 2016, David Bremner wrote: >> Tomi Ollila 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