Bug 145710

Summary: "U" command doesn't work in mail
Product: [Fedora] Fedora Reporter: Josh Boyer <jwboyer>
Component: mailxAssignee: Ivana Varekova <varekova>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-27 11:05:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to add "U" command none

Description Josh Boyer 2005-01-20 19:47:21 UTC
Description of problem:

According to the man page for mail(1):
     unread  (U) Takes a message list and marks each message as not
having been read.

The "unread" command works just fine, but mail does not handle the
shortcut "U" command.

>  40 davej      Thu Jan 20 13:22 121/5409  "Fedora Core 3
Update:"
& U 40
Unknown command: "U"
& unread 40
&


Version-Release number of selected component (if applicable):

mailx-8.1.1-33

How reproducible:

Always

Steps to Reproduce:
1. Open mail
2. Read a message
3. Type "U <num>" where <num> is the number of the email you'd like to
mark as unread
  
Actual results:

Unknown command

Expected results:

Message is marked as unread

Additional info:

I'll try to look into why this is later.

Comment 1 Josh Boyer 2005-01-20 23:53:59 UTC
The problem seems to come from the way that isprefix() in lex.c looks
up commands.  It simply compares each character in the parsed word to
the list of command names.  Since there is no command starting with
"U", it fails.

I'll attach a patch that fixes the problem shortly.

Comment 2 Josh Boyer 2005-01-20 23:55:34 UTC
Created attachment 110036 [details]
Patch to add "U" command

This patch adds a "U" command, which is essentially a shortcut for unread as
the man page states.

Tested it locally and it works.

Comment 3 Josh Boyer 2005-01-22 03:14:15 UTC
I realize folks are busy, but is there any interest in this bug?  I'm
sure it's probably present in FC4/RHEL4 as well.

I'd check the changes into CVS myself, but I don't have a developer
account.

Comment 4 Ivana Varekova 2005-01-24 16:12:39 UTC
Thank you for your notices. 
Thanks for the patch. 
The problem was fixed.
Ivana Varekova


Comment 5 Josh Boyer 2005-01-25 15:27:38 UTC
Thanks.  Will this be released as an update to FC3, or will it go into
FC4?

Comment 6 Ivana Varekova 2005-01-27 11:05:49 UTC
The fixed release is 8.1.1-41.
It will be in FC4.
Thank you for your bug report and patch.
Ivana Varekova