Bug 145710 - "U" command doesn't work in mail
Summary: "U" command doesn't work in mail
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mailx
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-20 19:47 UTC by Josh Boyer
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-27 11:05:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to add "U" command (487 bytes, patch)
2005-01-20 23:55 UTC, Josh Boyer
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.