Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001634 [1003.1(2016/18)/Issue7+TC2] Shell and Utilities Editorial Enhancement Request 2023-02-18 20:11 2024-06-11 09:07
Reporter steffen View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name steffen98141
Organization
User Reference
Section mailx
Page Number 2960
Line Number 98141-2
Interp Status ---
Final Accepted Text See Note: 0006193.
Summary 0001634: mailx: more clarification on system mailbox
Description The current text "suggests" the commands work in any
mailbox, but the code bases shortcut to "edstop()"
unless in a primary (system) mailbox, and only then
$MBOX comes into play at all.

(My own clone has a TODO to change that for the "mbox"
command, as that always makes sense, like $MBOX being
the default for the "save" command, but that
off-topic. And was issue #991.)
Desired Action on page 2960, line 98141-2, "touch", change

        Touch the specified messages. If any message in
        msglist is not specifically deleted nor saved
        in a file, it shall be placed in the mbox upon
        normal termination. See exit and quit.

to

        Touch the specified messages. If the current
        mailbox is the system mailbox any message in
        msglist that is not specifically deleted nor
        saved in a file shall be placed in the mbox
        upon normal termination. See exit and quit.
Tags applied_after_i8d3, tc3-2008
Attached Files

- Relationships

-  Notes
(0006157)
steffen (reporter)
2023-02-18 21:10

Addition:
on page 2957, lines 98020ff, "hold" / "preserve", change

        Mark the messages in msglist to be retained in
        the mailbox when mailx terminates.[.]

to

        In a primary (system) mailbox, mark the
        messages in msglist to be retained in the
        mailbox when mailx terminates regardless of the
        setting of hold[the internal variable].[.]


That is to say, finally (also regarding issue 991),
that mbox, hold (preserve), (and touch) are ways to
counteract the setting of the variable hold.
(0006159)
steffen (reporter)
2023-02-18 23:27

P.S.:
to make it plain.
The "touch" and "mbox" commands only differ in that "touch" may be overwritten by explicit "delete" or "save".
If they are adhered to, the messages are _moved_ to $MBOX -- and i think this should be said instead of the "placed" (because that could also be "copy" aka duplication).
(0006162)
steffen (reporter)
2023-02-20 23:50

After a ML list intermezzo here something refined:

on page 2957, line 98020 ff., "hold" / "preserve", change

        Mark the messages in msglist to be retained in the mailbox
        when mailx terminates. This shall override any commands
        that might previously have marked the messages to be
        deleted. During the current invocation of mailx, only the
        delete, dp, or dt commands shall remove the preserve
        marking of a message.

to

        Allowed only in the system mailbox.
        Mark the messages in msglist to be preserved, as if the
        hold variable were set, upon normal termination, or when
        the folder is changed.
        This shall override any commands that might previously
        have marked the messages to be deleted.
        During the current invocation of mailx, only the delete,
        dp, or dt commands shall remove the preserve marking of
        a message.
        See exit and quit.

on page 2960, line 98141-2, "touch", change

        Touch the specified messages.
        If any message in msglist is not specifically deleted nor
        saved in a file, it shall be placed in the mbox upon
        normal termination.
        See exit and quit.

to

        Allowed only in the system mailbox.
        Touch the specified messages.
        Unless overriden by the hold variable, any message in
        msglist that is not specifically deleted nor saved in
        a file shall be placed in the mbox upon normal
        termination, or when the folder is changed.
        See exit and quit.

(Different to "hold" / "delete" this is not ensured by code like

        if (edit) {
                printf("Cannot \"preserve\" in edit mode\n");
                return(1);
        }

(yet), but the requirement is effective.)

Furthermore the solution of issue 991 for the "mbox" command has
to be furtherly refined. The editor notes by then were

        Change on page 2923, starting at line
        96567:
Arrange for the given messages to end up
        in the mbox save file when mailx terminates
        normally.
to:
Arrange for the given
        messages to be moved to the mbox save file when
        mailx terminates normally or when the folder is
        changed. This command can be used in any folder; for
        messages residing in the system mailbox, mailx
        shall ignore the settings of the internal variables
        [no]hold and [no]keepsave when the
        mbox command has been used to mark them
        explicitly.


This shall instead read

        Allowed only in the system mailbox.
        Arrange for the given messages to end up in the secondary
        mailbox, overriding a possibly set hold variable, upon
        normal termination, or when the folder is changed.
        See exit and quit.

(The requirement is not enforced (yet), but effective.)
(0006165)
steffen (reporter)
2023-02-21 23:01

One more iteration on that that clarifies which commands strip
which flags again.
This now correctly reflects what V10 Mail, BSD Mail of Apple of
2015, OpenBSD Mail of 2023-01-28, and s-nail (devel) do.
It also adds a possible change for the hold variable.

on page 2957, line 98020 ff., "hold" / "preserve", change

        Mark the messages in msglist to be retained in the mailbox
        when mailx terminates. This shall override any commands
        that might previously have marked the messages to be
        deleted. During the current invocation of mailx, only the
        delete, dp, or dt commands shall remove the preserve
        marking of a message.

to

        Allowed only in the system mailbox.
        Mark the messages in msglist to be preserved, as if the
        hold variable were set, upon normal termination, or when
        the folder is changed.
        This shall override any commands that might previously
        have marked the messages to be deleted,
        and only the delete, dp, or dt, as well as the mbox and
        touch commands shall remove the preserve mark of a message.

on page 2960, line 98141-2, "touch", change

        Touch the specified messages.
        If any message in msglist is not specifically deleted nor
        saved in a file, it shall be placed in the mbox upon
        normal termination.
        See exit and quit.

to

        Allowed only in the system mailbox.
        Touch the specified messages.
        Unless overriden by the hold variable, any message in
        msglist that is not specifically deleted nor saved in
        a file shall be placed in the mbox upon normal
        termination, or when the folder is changed.
        Overrides a former hold or preserve request.

Furthermore the solution of issue 991 for the "mbox" command has
to be furtherly refined.
Its editor notes shall instead read

        Allowed only in the system mailbox.
        Arrange for the given messages to end up in the secondary
        mailbox, overriding a possibly set hold variable, upon
        normal termination, or when the folder is changed.
        Overrides a former hold or preserve request.

Ditto. Let's center on the variable.
On page 2952, lines 97820 ff, variable "hold", change

        hold
        Preserve all messages that are read in the system mailbox
        instead of putting them in the mbox save file. The default
        shall be nohold.

to

        hold
        Disable message moving of read messages from the system
        mailbox to the mbox save file upon normal program
        termination or folder change.
        This automatic email management is complemented with the
        commands hold (and preserve), mbox, and touch, which
        partially override the hold variable.
        The default shall be nohold.

On page 2953, lines 97972 ff, "exit", "xit", change

        Exit from mailx without changing the mailbox.
        No messages shall be saved in the mbox (see also quit).

to

        Exit from mailx without performing automatic message
        moving, or any other management tasks.
        Also see quit.

On page 2959, lines 98078 ff, "quit", "EOF", change

        Terminate mailx, storing messages that were read in mbox
        (if the current mailbox is the system mailbox and unless
        hold is set), deleting messages that have been explicitly
        saved (unless keepsave is set), discarding messages that
        have been deleted, and saving all remaining messages in
        the mailbox.

to

        Terminate mailx normally.
        Dependent upon the conditions documented for the variable
        hold this may perform automatic message moving.
        It will delete messages that have been explicitly saved
        (unless keepsave is set), discard messages that have been
        deleted, and save all remaining messages in the mailbox.

(Better yet, move that to the folder command, instead of vice
versa, and only say

        It will quit the folder and perform management task as
        documented there.)

Thank you.
(0006193)
Don Cragun (manager)
2023-03-06 16:27

Make the changes in Note: 0006165 except for the line 98078 change.

On page 2956 lines 97977 ff, fi[le] [file], fold[er] [file], change:
Quit (see the quit command) from the current file of messages and read in the file named by the pathname file. If no argument is given, the name and status of the current mailbox will be written.
to:
If no argument is given, write the name and status of the current mailbox. Otherwise, close the current file of messages after performing actions as specified for the quit command (except for terminating mailx) and then read in the file named by the pathname file. The behavior is unspecified if file is not a valid mbox.


On page 2959, lines 98078 ff, "quit", "EOF", change:
Terminate mailx, storing messages that were read in mbox (if the current mailbox is the system mailbox and unless hold is set), deleting messages that have been explicitly saved (unless keepsave is set), discarding messages that have been deleted, and saving all remaining messages in the mailbox.
to:
Terminate mailx normally, performing automatic message moving as specified in the description of the variable hold, deleting messages that have been explicitly saved (unless keepsave is set), discarding messages that have been deleted, and saving all remaining messages in the mailbox.

- Issue History
Date Modified Username Field Change
2023-02-18 20:11 steffen New Issue
2023-02-18 20:11 steffen Name => steffen98141
2023-02-18 20:11 steffen Section => mailx
2023-02-18 20:11 steffen Page Number => 2960
2023-02-18 20:11 steffen Line Number => 98141-2
2023-02-18 21:10 steffen Note Added: 0006157
2023-02-18 23:27 steffen Note Added: 0006159
2023-02-20 23:50 steffen Note Added: 0006162
2023-02-21 23:01 steffen Note Added: 0006165
2023-03-06 16:27 Don Cragun Note Added: 0006193
2023-03-06 16:30 Don Cragun Interp Status => ---
2023-03-06 16:30 Don Cragun Final Accepted Text => See Note: 0006193.
2023-03-06 16:30 Don Cragun Status New => Resolved
2023-03-06 16:30 Don Cragun Resolution Open => Accepted As Marked
2023-03-06 16:30 Don Cragun Tag Attached: tc3-2008
2023-05-16 10:59 geoffclare Status Resolved => Applied
2023-05-16 10:59 geoffclare Tag Attached: applied_after_i8d3
2024-06-11 09:07 agadmin Status Applied => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker