aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorF. Jason Park2022-11-01 22:46:24 -0700
committerF. Jason Park2022-11-16 21:34:36 -0800
commit2cf9e699ef0fc43a4eadaf00a1ed2f876765c64d (patch)
treec01e9bdcd25372207f94650315d1596ae445454d /doc/misc
parent0147e1ed831151dddac65727886d5a70bbab9f02 (diff)
downloademacs-2cf9e699ef0fc43a4eadaf00a1ed2f876765c64d.tar.gz
emacs-2cf9e699ef0fc43a4eadaf00a1ed2f876765c64d.zip
Make auth-source-pass behave more like other backends
* lisp/auth-source-pass.el (auth-source-pass-extra-query-keywords): Add new option to bring search behavior more in line with other backends. (auth-source-pass-search): Add new keyword params `max' and `require' and consider new option `auth-source-pass-extra-query-keywords' for dispatch. (auth-source-pass--match-regexp, auth-source-pass--retrieve-parsed, auth-source-pass--match-parts): Add supporting variable and helpers. (auth-source-pass--build-result-many, auth-source-pass--find-match-many): Add "-many" variants for existing workhorse functions. * test/lisp/auth-source-pass-tests.el: Require `ert-x'. (auth-source-pass-can-start-from-auth-source-search): Ensure `auth-source-pass-extra-query-keywords' is enabled around test body. (auth-source-pass-extra-query-keywords--wild-port-miss-netrc, auth-source-pass-extra-query-keywords--wild-port-miss, auth-source-pass-extra-query-keywords--wild-port-hit-netrc, auth-source-pass-extra-query-keywords--wild-port-hit, auth-source-pass-extra-query-keywords--wild-port-req-miss-netrc, auth-source-pass-extra-query-keywords--wild-port-req-miss, auth-source-pass-extra-query-keywords--netrc-akib, auth-source-pass-extra-query-keywords--akib, auth-source-pass-extra-query-keywords--netrc-host, auth-source-pass-extra-query-keywords--host, auth-source-pass-extra-query-keywords--baseline, auth-source-pass-extra-query-keywords--port-type, auth-source-pass-extra-query-keywords--hosts-first, auth-source-pass-extra-query-keywords--ambiguous-user-host, auth-source-pass-extra-query-keywords--suffixed-user, auth-source-pass-extra-query-keywords--user-priorities): Add juxtaposed netrc and extra-query-keywords pairs to demo optional extra-compliant behavior. * doc/misc/auth.texi: Add option `auth-source-pass-extra-query-keywords' to auth-source-pass section. * etc/NEWS: Mention `auth-source-pass-extra-query-keywords' in Emacs 29.1 package changes section. (Bug#58985.) Special thanks to Akib Azmain Turja <akib@disroot.org> for helping improve this patch.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/auth.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 9dc63af6bcc..872e5f88f55 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -526,6 +526,8 @@ If several entries match, the one matching the most items (where an
526while searching for an entry matching the @code{rms} user on host 526while searching for an entry matching the @code{rms} user on host
527@code{gnu.org} and port @code{22}, then the entry 527@code{gnu.org} and port @code{22}, then the entry
528@file{gnu.org:22/rms.gpg} is preferred over @file{gnu.org.gpg}. 528@file{gnu.org:22/rms.gpg} is preferred over @file{gnu.org.gpg}.
529However, such processing is not applied when the option
530@code{auth-source-pass-extra-parameters} is set to @code{t}.
529 531
530Users of @code{pass} may also be interested in functionality provided 532Users of @code{pass} may also be interested in functionality provided
531by other Emacs packages: 533by other Emacs packages:
@@ -549,6 +551,22 @@ Set this variable to a string that should separate an host name from a
549port in an entry. Defaults to @samp{:}. 551port in an entry. Defaults to @samp{:}.
550@end defvar 552@end defvar
551 553
554@defvar auth-source-pass-extra-query-keywords
555This expands the selection of available keywords to include
556@code{:max} and @code{:require} and tells more of them to accept a
557list of query parameters as an argument. When searching, it also
558favors the @samp{rms@@gnu.org.gpg} form for usernames over the
559@samp{gnu.org/rms.gpg} form, regardless of whether a @code{:user}
560param was provided.
561
562In general, if you prefer idiosyncrasies traditionally exhibited by
563this backend, such as prioritizing field count in a filename, try
564setting this option to @code{nil}. But, if you experience problems
565predicting the outcome of searches relative to other auth-source
566backends or encounter code expecting to query multiple backends
567uniformly, try flipping it back to @code{t} (the default).
568@end defvar
569
552@node Help for developers 570@node Help for developers
553@chapter Help for developers 571@chapter Help for developers
554 572