invert the "abort-noattach" question

2018-11-02 Thread Daan van Rossum
Dear mutt devs,

The abort_noattach feature that was added in mutt 1.10 is useful but 
counter-intuitive.  You expect a "do you wish to continue" question and 
automatically answer "N", which results in accidentally sending the email 
without attachment.

I learned to be really careful with this question now, but wondered if it is a 
good idea (or even still possible) to invert this question so other users don't 
run into this as well.

Best, Daan


signature.asc
Description: PGP signature


Re: invert the "abort-noattach" question

2018-11-02 Thread Kevin J. McCarthy
On Fri, Nov 02, 2018 at 11:58:57AM +0100, Daan van Rossum wrote:
> The abort_noattach feature that was added in mutt 1.10 is useful but
> counter-intuitive.  You expect a "do you wish to continue" question
> and automatically answer "N", which results in accidentally sending
> the email without attachment.
> 
> I learned to be really careful with this question now, but wondered if
> it is a good idea (or even still possible) to invert this question so
> other users don't run into this as well.

Unfortunately, there is more precedence to the feature than the 1.10
release.  It was pulled from a Debian patch, and has also been in
NeoMutt for a while.  So, while I'm sympathetic, I think it would cause
more turmoil to reverse the behavior.

You do have a good point about the inconsistency with the prompts
though.  Looking at other quadoptions it's split down the middle which
answer aborts potentially undesirable behavior:

With these you answer "yes" to stop:
abort_noattach
abort_nosubject
abort_unmodified
postpone

While with these you answer no:
delete
pop_delete
print
quit

The upside is the first four all have to do with message composition, so
generally choosing "yes" during message composition is the safe answer!

For your case, you may want to try setting $abort_noattach to "yes", and
then adding a 'Y' macro to override:

macro compose Y 'set abort_noattach=no\
set abort_noattach=yes'

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: invert the "abort-noattach" question

2018-11-02 Thread Ian Collier
On Fri, Nov 02, 2018 at 10:08:30AM -0700, Kevin J. McCarthy wrote:
> With these you answer "yes" to stop:
> abort_noattach
> abort_nosubject
> abort_unmodified
> postpone

The postpone question is special because both answers stop.
In fact, if you quit accidentally and get asked the question
"Postpone this message? ([yes]/no):" then what you should never
do is answer "no" on the grounds that you want to continue editing
the message instead of postponing it, because that will actually
discard the message.

imc


Re: invert the "abort-noattach" question

2018-11-02 Thread Patrick Shanahan
* Ian Collier  [11-02-18 14:20]:
> On Fri, Nov 02, 2018 at 10:08:30AM -0700, Kevin J. McCarthy wrote:
> > With these you answer "yes" to stop:
> > abort_noattach
> > abort_nosubject
> > abort_unmodified
> > postpone
> 
> The postpone question is special because both answers stop.
> In fact, if you quit accidentally and get asked the question
> "Postpone this message? ([yes]/no):" then what you should never
> do is answer "no" on the grounds that you want to continue editing
> the message instead of postponing it, because that will actually
> discard the message.

yes, you *should* 
to abort the questioned action

you cannot expect mutt to know what or when you make an unintended action.

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Registered Linux User #207535@ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode


Re: invert the "abort-noattach" question

2018-11-02 Thread Cameron Simpson

On 02Nov2018 17:19, Patrick Shanahan  wrote:

* Ian Collier  [11-02-18 14:20]:

On Fri, Nov 02, 2018 at 10:08:30AM -0700, Kevin J. McCarthy wrote:
> With these you answer "yes" to stop:
> abort_noattach
> abort_nosubject
> abort_unmodified
> postpone

The postpone question is special because both answers stop.
In fact, if you quit accidentally and get asked the question
"Postpone this message? ([yes]/no):" then what you should never
do is answer "no" on the grounds that you want to continue editing
the message instead of postponing it, because that will actually
discard the message.


yes, you *should* 
to abort the questioned action

you cannot expect mutt to know what or when you make an unintended 
action.


No, but you can and often should make the default answers to questions 
(a) not throw data away and (b) more generally, not do harm.


On that basis: postpone should default to yes.

Now, on the premise of Heuer's Law:

   If it can't be turned off, it's not a feature. - Karl Heuer

the settings of postpone and abort_noattach etc should constitute the 
defaults, and mutt's _unconfigured_ state should set these to "do no 
harm, lose no data" defaults.


My personal practice is that (a) defaults should do the least harm and 
that (b) the default answer should be "no" or "false" consistently, and 
options construed such that "no" or "false" means the safer choice.


As an example, when I write Python functions with optional Boolean 
parameters, those parameters _always_ default to False, and the 
parameter's name is so defined that False is the safer (or less weird, 
when "safer" is less well defined) mode.


Cheers,
Cameron Simpson