#3207: Conform to XDG Base Directory Specification
--------------------------+----------------------
  Reporter:  wraichia     |      Owner:  mutt-dev
      Type:  enhancement  |     Status:  closed
  Priority:  minor        |  Milestone:
 Component:  mutt         |    Version:
Resolution:  fixed        |   Keywords:
--------------------------+----------------------
Changes (by Damien Riegel <damien.riegel@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42fee7585faeef1c1abec1d127a7bb292605383a"
 6841:42fee7585fae]:
 {{{
 #!CommitTicketReference repository=""
 revision="42fee7585faeef1c1abec1d127a7bb292605383a"
 search muttrc file according to XDG Base Specification (closes #3207)

 First of all, the MUTT_VERSION symbol is now concatenated (when
 possible) at compile time.

 Then, the logic to find the config file has been changed a bit to remove
 unnecessary calls to access(), so now each possible locations for the
 config file is only tested once, and it stops as soon as a valid one has
 been found. So instead of:

   access("/home/dkc/.muttrc-1.7.1", F_OK) = -1 ENOENT (No such file or
 directory)
   access("/home/dkc/.muttrc", F_OK)       = 0
   access("/home/dkc/.muttrc", F_OK)       = 0
   access("/home/dkc/.muttrc", F_OK)       = 0
   [... Tests for Muttrc ... ]
   access("/home/dkc/.muttrc", F_OK)       = 0

 We now have:

   access("/home/dkc/.muttrc-1.7+13 (f658e517960e)", F_OK) = -1 ENOENT (No
 such file or directory)
   access("/home/dkc/.muttrc", F_OK)       = 0

 It also cleans up the case where -F is passed on the command line but
 points to a non-existent file by moving the error path closer to the
 actual fail condition.

 Finally, it adds partial support for the XDG Base Directory
 Specification. mutt will now try to locate its config at:

   $XDG_CONFIG_HOME/mutt/muttrc-MUTT_VERSION
   $XDG_CONFIG_HOME/mutt/muttrc.

 If XDG_CONFIG_HOME is not set, it will use '~/.config' as a default.
 }}}

--
Ticket URL: <https://dev.mutt.org/trac/ticket/3207#comment:8>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to