all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Damien Cassou <damien@cassou.me>
Cc: Magnus Henoch <magnus.henoch@gmail.com>,
	Nicolas Petton <nicolas@petton.fr>,
	Iku Iwasa <iku.iwasa@gmail.com>,
	galaunay <gaby.launay@tutanota.com>,
	Ted Zlatanov <tzz@lifelogs.com>,
	36052@debbugs.gnu.org, Keith Amidon <camalot@picnicpark.org>
Subject: bug#36052: 26.2.50; [PATCH] Improve auth-source-pass
Date: Sat, 08 Jun 2019 18:38:43 -0400	[thread overview]
Message-ID: <87tvcz1z4c.fsf@gmail.com> (raw)
In-Reply-To: <87sgskhydy.fsf@cassou.me> (Damien Cassou's message of "Sat, 08 Jun 2019 17:47:53 +0200")

Damien Cassou <damien@cassou.me> writes:
>>
>> Double spacing, and this ChangeLog entry is a little sparse.  It looks
>> like the last two prose paragraphs could be easily made into ChangeLog
>> entries, since they're already talking about specific functions.
>
>
> I thought about doing that as well but didn't. If you insist, I will do
> the requested changes but here are my reasons for not doing it right
> away:
>
> - The changes are on private methods (with the "--" naming convention)
>   and I'm not sure how much of private changes should be in the
>   ChangeLog.

AFAIK, we don't keep "private" functions out of the ChangeLog.  Same
with even more internal C functions.

> - The commit message you mention modifies functions that are modified
>   again by a later patch (named "Refactoring of auth-source-pass"). I
>   usually only send the latest version of my code and not the whole
>   history but, this time, I'm not the author of the original version and
>   I believe the author deserves to have his name in Emacs' git history
>   because of the massive work he did for the package.
>
> - I have tried not to rewrite too much of contributor's code and text in
>   their own commit so that the authorship makes sense. I have no problem
>   changing contributions in a later commit though (as I've shown in the
>   patch "Refactoring of auth-source-pass").

Sure that make sense, but I think the commit message only needs some
pretty minor formatting (although it seems that the original patch
message has a typo in the function name mentioned, it should be
auth-source-pass--matching-entries rather than
auth-source-pass--applicable-entries), e.g., just change the last
two paragraphs into:

    This commit implements that strategy.  It is in spirit a refactor of
    the existing code.
    * lisp/auth-source-pass.el (auth-source-pass--matching-entries): New
    function, generate an ordered list of regular expression matchers for
    all possible names that could be in the password-store for the entry to
    be found and then makes a pass over the password-store entry names
    accumulating the matching entries in a list after the regexp that
    matched.  This implementation ensures the password-store entry list
    still only has to be scanned once.
    (auth-source-pass--find-match-unambiguous): Use it to obtain candidate
    entries and then parse them one by one until an entry containing the
    desired information is located.  When complete, return the parsed data of
    the entry instead of the entry name so that the information can be used
    directly to construct the auth-source response.

and then at least mention the other functions:

    (auth-source-pass--build-result): Update accordingly.
    (auth-source-pass--select-one-entry)
    (auth-source-pass--entry-valid-p)
    (auth-source-pass--find-all-by-entry-name) 
    (auth-source-pass--find-one-by-entry-name): Remove.
    (auth-source-pass--select-from-entries) 
    (auth-source-pass--accumulate-matches) 
    (auth-source-pass--entry-reducer) 
    (auth-source-pass--generate-entry-suffixes) 
    (auth-source-pass--domains) 
    (auth-source-pass--name-port-user-suffixes): New functions.





  parent reply	other threads:[~2019-06-08 22:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02  9:11 bug#36052: 26.2.50; [PATCH] Improve auth-source-pass Damien Cassou
2019-06-07  0:43 ` Noam Postavsky
2019-06-08 15:47   ` Damien Cassou
2019-06-08 16:02     ` Eli Zaretskii
2019-06-08 22:38     ` Noam Postavsky [this message]
2019-06-13 19:59     ` Damien Cassou
2019-06-13 21:23       ` Noam Postavsky
2019-06-14  7:10       ` Damien Cassou
2019-06-14  7:47       ` Eli Zaretskii
2019-06-14 16:16         ` Damien Cassou
2019-06-22  9:02           ` Eli Zaretskii
2019-06-24  7:26             ` Damien Cassou
2019-06-24 14:33               ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=87tvcz1z4c.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=36052@debbugs.gnu.org \
    --cc=camalot@picnicpark.org \
    --cc=damien@cassou.me \
    --cc=gaby.launay@tutanota.com \
    --cc=iku.iwasa@gmail.com \
    --cc=magnus.henoch@gmail.com \
    --cc=nicolas@petton.fr \
    --cc=tzz@lifelogs.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.