]> granicus.if.org Git - neomutt/commitdiff
restore ~/.config/mutt to config search path
authorRichard Russon <rich@flatcap.org>
Fri, 15 Sep 2017 13:36:42 +0000 (14:36 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 18 Sep 2017 12:59:58 +0000 (13:59 +0100)
Some people are still using this dir.
It will be deprecated in the future.

Also, drop the dated/versioned config files.
Nobody was using them.

    ~/.mutt/neomutt-20170912

doc/manual.xml.head
init.c
muttlib.c

index 32b4b5afc30e8fd56299e126c9e4e09efd5ea854..3d38169762446edd241f0a2b09ea4e964561018b 100644 (file)
@@ -2897,9 +2897,6 @@ color sidebar_divider   color8  default
         <title>NeoMutt config file search order</title>
         <tgroup cols="1">
           <tbody>
-            <row>
-              <entry>neomuttrc-20170912</entry>
-            </row>
             <row>
               <entry>neomuttrc</entry>
             </row>
@@ -2938,10 +2935,6 @@ color sidebar_divider   color8  default
               </row>
             </thead>
             <tbody>
-              <row>
-                <entry>/etc/xdg/neomutt/neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
-              </row>
               <row>
                 <entry>/etc/xdg/neomutt/neomuttrc</entry>
               </row>
@@ -2949,10 +2942,6 @@ color sidebar_divider   color8  default
                 <entry>/etc/xdg/neomutt/Muttrc</entry>
                 <entry>Note the case of the filename</entry>
               </row>
-              <row>
-                <entry>/etc/neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
-              </row>
               <row>
                 <entry>/etc/neomuttrc</entry>
               </row>
@@ -2960,10 +2949,6 @@ color sidebar_divider   color8  default
                 <entry>/etc/Muttrc</entry>
                 <entry>Note the case of the filename</entry>
               </row>
-              <row>
-                <entry>/usr/share/neomutt/neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
-              </row>
               <row>
                 <entry>/usr/share/neomutt/neomuttrc</entry>
               </row>
@@ -2983,7 +2968,7 @@ color sidebar_divider   color8  default
         <literal>XDG_CONFIG_HOME</literal> environment variable, which defaults
         to
         <literal>~/.config/neomutt</literal>. Next, it looks in
-        <literal>~</literal>(your home directory). Finally, it tries
+        <literal>~</literal> (your home directory). Finally, it tries
         <literal>~/.neomutt</literal>.</para>
         <para>You may specify your own location for the user config file using
         the
@@ -2994,18 +2979,13 @@ color sidebar_divider   color8  default
 
         <table id="neomuttrc-user-files">
           <title>NeoMutt user config file locations</title>
-          <tgroup cols="2">
+          <tgroup cols="1">
             <thead>
               <row>
                 <entry>File Location</entry>
-                <entry>Notes</entry>
               </row>
             </thead>
             <tbody>
-              <row>
-                <entry>~/.config/neomutt/neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
-              </row>
               <row>
                 <entry>~/.config/neomutt/neomuttrc</entry>
               </row>
@@ -3013,18 +2993,16 @@ color sidebar_divider   color8  default
                 <entry>~/.config/neomutt/muttrc</entry>
               </row>
               <row>
-                <entry>~/.neomutt/neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
+                <entry>~/.config/mutt/neomuttrc</entry>
               </row>
               <row>
-                <entry>~/.neomutt/neomuttrc</entry>
+                <entry>~/.config/mutt/muttrc</entry>
               </row>
               <row>
-                <entry>~/.neomutt/muttrc</entry>
+                <entry>~/.neomutt/neomuttrc</entry>
               </row>
               <row>
-                <entry>~/.mutt/neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
+                <entry>~/.neomutt/muttrc</entry>
               </row>
               <row>
                 <entry>~/.mutt/neomuttrc</entry>
@@ -3032,10 +3010,6 @@ color sidebar_divider   color8  default
               <row>
                 <entry>~/.mutt/muttrc</entry>
               </row>
-              <row>
-                <entry>~/.neomuttrc-20170912</entry>
-                <entry>NeoMutt release version</entry>
-              </row>
               <row>
                 <entry>~/.neomuttrc</entry>
               </row>
diff --git a/init.c b/init.c
index 0c3c54c58c60f5728e723734a5896d48eff8c2fa..2aff16170ca197db82450d3a97532bf9b050c637 100644 (file)
--- a/init.c
+++ b/init.c
@@ -4042,34 +4042,24 @@ static int execute_commands(struct ListHead *p)
 static char *find_cfg(const char *home, const char *xdg_cfg_home)
 {
   const char *names[] = {
-    "neomuttrc-" PACKAGE_VERSION, "neomuttrc", "muttrc", NULL,
+    "neomuttrc", "muttrc", NULL,
   };
 
   const char *locations[][2] = {
-    {
-        xdg_cfg_home, "neomutt/",
-    },
-    {
-        home, ".neomutt/",
-    },
-    {
-        home, ".mutt/",
-    },
-    {
-        home, ".",
-    },
-    {
-        NULL, NULL,
-    },
+    { xdg_cfg_home, "neomutt/" },
+    { xdg_cfg_home, "mutt/" },
+    { home, ".neomutt/" },
+    { home, ".mutt/" },
+    { home, "." },
+    { NULL, NULL },
   };
+
   for (int i = 0; locations[i][0] || locations[i][1]; i++)
   {
-    int j;
-
     if (!locations[i][0])
       continue;
 
-    for (j = 0; names[j]; j++)
+    for (int j = 0; names[j]; j++)
     {
       char buffer[STRING];
 
@@ -4384,10 +4374,6 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands)
       if (mutt_set_xdg_path(XDG_CONFIG_DIRS, buffer, sizeof(buffer)))
         break;
 
-      snprintf(buffer, sizeof(buffer), "%s/neomuttrc-%s", SYSCONFDIR, PACKAGE_VERSION);
-      if (access(buffer, F_OK) == 0)
-        break;
-
       snprintf(buffer, sizeof(buffer), "%s/neomuttrc", SYSCONFDIR);
       if (access(buffer, F_OK) == 0)
         break;
@@ -4396,10 +4382,6 @@ void mutt_init(int skip_sys_rc, struct ListHead *commands)
       if (access(buffer, F_OK) == 0)
         break;
 
-      snprintf(buffer, sizeof(buffer), "%s/neomuttrc-%s", PKGDATADIR, PACKAGE_VERSION);
-      if (access(buffer, F_OK) == 0)
-        break;
-
       snprintf(buffer, sizeof(buffer), "%s/neomuttrc", PKGDATADIR);
       if (access(buffer, F_OK) == 0)
         break;
index e934131908927888efd02eae33efa3c74d132c25..379909f7448f99a5cce8da9ebb02c483a83afb3a 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1758,15 +1758,6 @@ int mutt_set_xdg_path(enum XdgType type, char *buf, size_t bufsize)
 
   while ((token = strsep(&xdg, ":")))
   {
-    if (snprintf(buf, bufsize, "%s/%s/neomuttrc-%s", token, PACKAGE, PACKAGE_VERSION) < 0)
-      continue;
-    mutt_expand_path(buf, bufsize);
-    if (access(buf, F_OK) == 0)
-    {
-      rc = 1;
-      break;
-    }
-
     if (snprintf(buf, bufsize, "%s/%s/neomuttrc", token, PACKAGE) < 0)
       continue;
     mutt_expand_path(buf, bufsize);