💾 Archived View for thatit.be › 2024-02-10-10-37-55.gmi captured on 2024-08-24 at 23:51:32. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-08-18)

-=-=-=-=-=-=-

muttrc tweaks

It’s been driving me nuts that I don’t see the date in my list of email. Sure, I see a month and a day, but when I’m searching through email I don’t know what the year is. Maybe it’s a sign that I need to delete more messages?

Anyway, this set me off on a journey to figure out and fix the issue. It’s actually pretty clearly described in the muttrc manual. The relevant fields are date_format and index_format.

   date_format
          Type: string
          Default: “!%a, %b %d, %Y at %I:%M:%S%p %Z”

          This variable controls the format of the date printed by the  “%d”  sequence
          in $index_format.  This is passed to the strftime(3) function to process the
          date, see the man page for the proper syntax.

There’s a little more, but it wasn’t relevant to what I was doing. The key bit of information is that “%d” in the index_format setting will get expanded to the date and that the format of the date is plain strftime format.

The index_format is also in the same man page:

   index_format
          Type: string
          Default: “%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s”

          This variable allows you to customize the message index display to your per‐
          sonal taste.

          “Format strings” are similar to the strings used in the C function printf(3)
          to format output (see the man page for more details).  For an explanation of
          the %? construct, see the $status_format  description.   The  following  se‐
          quences are defined in Mutt:

Okay, here it goes on to list all the options. But what I cared about were the values in the default.

          %b     filename of the original message folder (think mailbox)
          %c     number of characters (bytes) in the message (see formatstrings‐size)
          %C     current message number
          %d     date  and time of the message in the format specified by $date_format
                 converted to sender’s time zone
          %D     date and time of the message in the format specified by  $date_format
                 converted to the local time zone
          %e     current message number in thread
          %F     author name, or recipient name if the message is from you
          %l     number  of  lines  in  the  unprocessed  message  (may  not work with
                 maildir, mh, and IMAP folders)
          %L     If an address in the “To:” or “Cc:” header field matches  an  address
                 defined   by   the  users  “subscribe”  command,  this  displays  ”To
                 <list-name>”, otherwise the same as %F.
          %s     subject of the message
          %Z     a  three  character set of message status flags.  the first character
                 is  new/read/replied  flags  (“n”/“o”/“r”/“O”/“N”).   the  second  is
                 deleted  or encryption flags (“D”/“d”/“S”/“P”/“s”/“K”).  the third is
                 either tagged/flagged (“*”/“!”), or one of the characters  listed  in
                 $to_chars.

I don’t care about message index, more important to me is the date and the time. I also don’t care about the alphabet soup between the sender and the subject. With the above format string, my favorite date time format doesn’t have room to get expanded, so I dropped the stuff I don’t care about and set the format to be formatted in my local timezone.

Here’s what I putt in my muttrc:

set date_format="%F %T"
set index_format="%D %Z %-15.15L %s"

This gives me something like…

2024-02-09 10:36:53     Nac Mac Feegles   Regarding your questions…
2024-02-10 10:37:02 N + Sam Vimes         Is this your cow?

I’m considering dropping the seconds off of the date format, but because I’ve saved some room in the status I’ll leave it for now and maybe remove that later. That change would look like this:

set date_format="%F %H:%M"

Another thing that was bothering me is the way links were getting wrapped and having the + continuation marker in them, which I discovered is super easy to turn off, so I’ve added this to my muttrc as well:

set markers=no

Now I can highlight a link using the typical tmux magic and paste it somewhere useful without having to modify it.

Tags

#index

#mutt

#cli

Navigation

index

tags

prev ⏰

⏰ next

updated: 2024-02-10 11:05:28

generated: 2024-08-16