nmh-workers
[Top] [All Lists]

Re: comp man page

2020-07-29 03:50:36
On Tue, 28 Jul 2020 16:40:07 -0400 Ken Hornstein <kenh@pobox.com> sez:

There is a nice feature for comp that I can't find in its man
page.  If the user's ~/.mh_profile has a Draft-folder: entry
(I don't know what happens if it doesn't.) then if comp has a
"-use" flag, comp takes on optional argument:  A message
number in the folder designated by ~/.mh_profile from which to
start.

Hm, I guess I knew about this, and "-use" IS in the man page,
but it doesn't explain what happens when you have a draft
folder.  (If you don't have one then "-use" will ise the draft
file).  The comp(1) man page refers to mh-draft(5) and that
DOES explain how -use works.  I am unsure if more detail should
be put into comp(1); thoughts?

As a user who _barely_ uses more than the basic features of NMH,
I was completely unaware of all this.  (That is my fault, of
course.  B-)  The SYNOPSIS section does not show that "-use"
optionally takes an argument.  Maybe add a (possibly
parenthetical) sentence to the end of the current -use
explanation paragraph -- e.g.

       The switch -use directs comp to continue editing an
       already started message.  That is, if a comp (or dist,
       repl, or forw) is terminated without sending the draft,
       the draft can be edited again via â??comp -useâ??.  Note:
       consult also the mh-draft(5) man page if using the draft
       folder facility.

And sigh, the handling around the draft file vs a draft folder
is a confusing mess.  In a perfect world I'd just switch
everything to draft folders and toss draft file handling in the
trash can.

I can see how that might make things more uniform.  B-)  I'd need
to change my muscle memory, but I wouldn't mind.

On that note, and for folks and Norms curious about -use, lack of
Draft-folder, etc., I provide the following anec-data.

I'm a user who _probably_ saw "-draftfolder" in the man pages at
some point over the years, but never paid it much attention.  (As
a result, I have come up with my own draft message/file system --
a.k.a. badly reinventing the wheel.  B-)  This means that I do
not have an entry for "Draft-folder" entry in my ~/.mh_profile
file.  Here's what happens when I use the "-use" flag.

(Note:  I do have a "Path" entry -- set to "Mail" -- though.)

When I want to edit a draft message that I have previously quit
editing in the middle of, I have always done:

     $ comp -use

This brings up ~/Mail/draft in my editor, as expected.  (I rarely
use the "-file" option; like I said "reinventing the wheel."  B-)

I just tried it with an argument, and it appears comp(1) treats
that like a message number or list:

     $ scan +inbox 44444
       44444+ 20/07/28 Ken Hornstein      Re: comp man page<<>There is a nice 
feature
     $ comp -use 44444
     [... opens up an editor session on ~/Mail/draft ...]

As far as I can tell, comp(1) is just verifying that the message
exists.  It doesn't use it to construct a new reply (and thus
overwrite what's already in ~/Mail/draft), or change the current
message.  In particular, if the number or list doesn't exist,
comp will complain about it:

     $ comp -use blah
     comp: bad message list blah
     $ show 99999
     show: message 99999 doesn't exist
     $ comp -use 99999
     comp: message 99999 doesn't exist

This seems like an unintentional "feature."  (It seems harmless.)

                                Bob

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