]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix docstring and init of Gnus search -remove-prefix options
authorEric Abrahamsen <eric@ericabrahamsen.net>
Tue, 15 Feb 2022 00:06:14 +0000 (16:06 -0800)
committerEric Abrahamsen <eric@ericabrahamsen.net>
Tue, 15 Feb 2022 00:06:14 +0000 (16:06 -0800)
* lisp/gnus/gnus-search.el (*-remove-prefix): For all engine defaults,
remove incorrect docs stating this is a regexp (it's a string). Also,
use `expand-file-name' to get the correct default value, not `concat'
and (getenv "HOME").

lisp/gnus/gnus-search.el

index 4babe9f96f0da2bb4f5c9bc87fbc1130ff2e772a..605d8a34e950afc44b635766211aeed22e2d2010 100644 (file)
@@ -167,10 +167,9 @@ Instead, use this:
 This variable can also be set per-server."
   :type '(repeat string))
 
-(defcustom gnus-search-swish++-remove-prefix (concat (getenv "HOME") "/Mail/")
+(defcustom gnus-search-swish++-remove-prefix (expand-file-name "Mail/" "~")
   "The prefix to remove from each file name returned by swish++
-in order to get a group name (albeit with / instead of .).  This is a
-regular expression.
+in order to get a group name (albeit with / instead of .).
 
 This variable can also be set per-server."
   :type 'regexp)
@@ -204,10 +203,9 @@ This variable can also be set per-server."
   :type '(repeat string)
   :version "28.1")
 
-(defcustom gnus-search-swish-e-remove-prefix (concat (getenv "HOME") "/Mail/")
+(defcustom gnus-search-swish-e-remove-prefix (expand-file-name "Mail/" "~")
   "The prefix to remove from each file name returned by swish-e
-in order to get a group name (albeit with / instead of .).  This is a
-regular expression.
+in order to get a group name (albeit with / instead of .).
 
 This variable can also be set per-server."
   :type 'regexp
@@ -252,7 +250,7 @@ This variable can also be set per-server."
   :type '(repeat string)
   :version "28.1")
 
-(defcustom gnus-search-namazu-remove-prefix (concat (getenv "HOME") "/Mail/")
+(defcustom gnus-search-namazu-remove-prefix (expand-file-name "Mail/" "~")
   "The prefix to remove from each file name returned by Namazu
 in order to get a group name (albeit with / instead of .).
 
@@ -296,10 +294,9 @@ This variable can also be set per-server."
   :type '(repeat string)
   :version "28.1")
 
-(defcustom gnus-search-notmuch-remove-prefix (concat (getenv "HOME") "/Mail/")
+(defcustom gnus-search-notmuch-remove-prefix (expand-file-name "Mail/" "~")
   "The prefix to remove from each file name returned by notmuch
-in order to get a group name (albeit with / instead of .).  This is a
-regular expression.
+in order to get a group name (albeit with / instead of .).
 
 This variable can also be set per-server."
   :type 'regexp
@@ -339,10 +336,9 @@ This variable can also be set per-server."
   :version "28.1"
   :type '(repeat string))
 
-(defcustom gnus-search-mairix-remove-prefix (concat (getenv "HOME") "/Mail/")
+(defcustom gnus-search-mairix-remove-prefix (expand-file-name "Mail/" "~")
   "The prefix to remove from each file name returned by mairix
-in order to get a group name (albeit with / instead of .).  This is a
-regular expression.
+in order to get a group name (albeit with / instead of .).
 
 This variable can also be set per-server."
   :version "28.1"
@@ -826,7 +822,7 @@ quirks.")
     :documentation "Location of the config file, if any.")
    (remove-prefix
     :initarg :remove-prefix
-    :initform (concat (getenv "HOME") "/Mail/")
+    :initform (expand-file-name "Mail/" "~")
     :type string
     :documentation
     "The path to the directory where the indexed mails are