is it possible to go to the folders via the sidebar?

Globe Trotter itsme_410 at yahoo.com
Thu Oct 29 03:05:19 UTC 2020


My apologies for answering my own question, but I have found the bug: there is an extraneous \" and it should be the following:

mailboxes `find ~/Maildir/* -type d | grep -v "tmp\|new\|cur" | sed 's|~/Maildir/|=\"|g' | sed 's|$||g' | tr '\n' ' '`

It works now, and the problems have also been resolved.

Thanks again!





On Wednesday, October 28, 2020, 9:07:15 PM CDT, Globe Trotter via Mutt-users <mutt-users at mutt.org> wrote: 





Thanks, I will top-post here, because I feel that there is something wrong with my setup and before answering your questions I have to get this right.

So, I set folders using 

set mbox_type=Maildir
set spoolfile="~/Maildir/inbox"
set folder = "~/Maildir/"
mailboxes `find ~/Maildir/* -type d | grep -v "tmp\|new\|cur" | sed 's|~/Maildir/|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '`

and the find gives me the correct list with complete pathnames.

find ~/Maildir/* -type d | grep -v "tmp\|new\|cur" | sed 's|~/Maildir/|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '

However, when I list the folders on the sidebar, I get the following:


backup /home/gt/Maildir/aster                  
bills /home/gt/Maildir/classes
classes/evaluations /home/gt/Maildir/committee

and so on. So, as you can see, the sidebar is in pairs. I have folders /home/gt/Maildir/backup as well as /home/gt/Maildir/bills and /home/gt/Maildir/bills and /home/gt/Maildir/classes/evaluations/

What is causing this? Here is my .muttrc.



set mbox_type=Maildir
set spoolfile="~/Maildir/inbox"
set folder = "~/Maildir/"
mailboxes `find ~/Maildir/* -type d | grep -v "tmp\|new\|cur" | sed 's|~/Maildir/|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '`

set sidebar_visible = yes
set sidebar_width = 50
set sidebar_short_path = no
set sidebar_delim_chars = '/.'
set sidebar_folder_indent = no
set sidebar_indent_string = '  '
set sidebar_new_mail_only = no
set sidebar_divider_char = '|'
set sidebar_next_new_wrap = no
set mail_check_stats
set sidebar_sort_method = 'unsorted'

# --------------------------------------------------------------------------
# FUNCTIONS – shown with an example mapping
# --------------------------------------------------------------------------
# Move the highlight to the previous mailbox
bind index,pager \Cp sidebar-prev
# Move the highlight to the next mailbox
bind index,pager \Cn sidebar-next
# Open the highlighted mailbox
bind index,pager \Co sidebar-open
# Move the highlight to the previous page
# This is useful if you have a LOT of mailboxes.
bind index,pager \CU sidebar-page-up
# Move the highlight to the next page
# This is useful if you have a LOT of mailboxes.
bind index,pager \CD sidebar-page-down
# Move the highlight to the previous mailbox containing new, or flagged,
# mail.
bind index,pager \CP sidebar-prev-new
# Move the highlight to the next mailbox containing new, or flagged, mail.
bind index,pager \CN sidebar-next-new
# Toggle the visibility of the Sidebar.
bind index,pager \CV sidebar-toggle-visible




Thanks in advance!


On Wednesday, October 28, 2020, 6:47:27 PM CDT, Cameron Simpson <cs at cskk.id.au> wrote: 





On 26Oct2020 23:09, Globe Trotter via Mutt-users <mutt-users at mutt.org> wrote:
>On Monday, October 26, 2020, 5:19:58 PM CDT, Cameron Simpson <cs at cskk.id.au> wrote:
>>On 25Oct2020 23:43, Globe Trotter via Mutt-users <mutt-users at mutt.org> 
>>wrote:
>>>> I highlight on the folder user1 and I get: /home/gt/user1  is not a mailbox.
>>>Hmm, me too.
>> I withdraw this - I had a nonexistent name in my mailboxes list. With
>> that fixed, the sidebar behaves correctly for me.
>> More investigation needed. Does it fail for all your mailboxes, or 
>> just specific ones?
>
>I am not sure: here is my setting, and I can not get the cursor to go 
>to the sidebar at all anymore. Is there some setting I am missing?

The cursor does not go to the sidebar. It is kind of like a control 
separately manipulated. So you need some key bindings to operate it. On 
my machine the sidebar hightlights the current folder (whose index is 
shown) and separately highlights a "selected" folder, which you move 
around before using <sidebar-open> to switch to the selected new folder.

My settings are presently just this:

    [~/rc/mutt(hg:default)]fleet2*> g sidebar *
    macros:77:macro index J <sidebar-next>
    macros:78:macro index K <sidebar-prev>
    macros:79:macro index O <sidebar-open>
    settings:112:set sidebar_divider_char=" | "
    settings:113:set sidebar_folder_indent=yes
    settings:114:set sidebar_indent_string="→"
    settings:115:set sidebar_short_path=yes
    settings:116:set sidebar_sort_method=alpha
    settings:117:set sidebar_visible=yes

Looking at your settings:

># Should the mailbox paths be abbreviated?
>set sidebar_short_path = yes

You could try turning this off to ensure that the paths it shows are in 
fact the paths you expect.

># When abbreviating mailbox path names, use any of these characters as path
># separators. Only the part after the last separators will be shown.
># For file folders '/' is good. For IMAP folders, often '.' is useful.
>set sidebar_delim_chars = '/'

And turn this off too, again just to debug.

># 
>--------------------------------------------------------------------------
># FUNCTIONS – shown with an example mapping
># --------------------------------------------------------------------------
># Move the highlight to the previous mailbox
>bind index,pager \Cp sidebar-prev
># Move the highlight to the next mailbox
>bind index,pager \Cn sidebar-next
># Open the highlighted mailbox
>bind index,pager \Co sidebar-open

Hmm, these are nicer than my bindings. I think I'll adopt them.

># Toggle the visibility of the Sidebar.
>bind index,pager \CV sidebar-toggle-visible

Also nice.

>Some setting is probably messed up. Not sure what I am looking for. Thanks!

I'd turn off the abbreviation settings mentioned above. Then cut/paste 
the displayed folder paths into "cd" shell commands or the like to see 
if they are correct. You may need to widen the widedar for this.

Also, are you naming mailboxes with full paths or with +foo or =foo 
abbreviations? The latter are more reliable, particularly since the rest 
of mutt also relies on that prefix and will break pretty obviously if it 
is wrong.

Cheers,

Cameron Simpson <cs at cskk.id.au
> (formerly cs at zip.com.au
)


More information about the Mutt-users mailing list