nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Clearing `cur' Message.

2012-10-14 10:08:24
Ralph wrote:

How does one clear `cur' for a folder?  It can be set with `folder 42'
though the mandatory line of output is annoying.

I just redirect the output to /dev/null.  There is a folder
-noprint, currently undocumented.  All it does now is allow
output of the folder stack while suppressing other output.
Maybe change it to suppress all output?

When there is no current message, e.g. after `rmm', ~/.mh_sequences
still contains the old value and mark still lists it.  For a new folder,
there is no .mh_sequences but once one's created it seems cur never
leaves it.  If I delete the `cur:' line from .mh_sequences then all
seems well;  mark still lists it but it's empty.  Is that a valid
workaround?

That could cause confusion if there was nothing else in
.mh_sequences:

    /*
     * If no mh-sequences file is defined, or if a mh-sequences file
     * is defined but empty (*mh_seq == '\0'), then pretend folder
     * is readonly.  This will force all sequences to be private.
     */
    if (mh_seq == NULL || *mh_seq == '\0')
        set_readonly (mp);

The workaround for now would be to set cur: to something that
isn't a message.  `mhpath new` will give you one, but as a
full path.  "cur: 0" seems to work.

But we really should come up with an interface to do that.
folder -clearmessage?  Or folder -clear, but that seems like
it should clear the current folder, too.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>