Neomutt: signature config is set by default and now the value is also checked

Created on 21 Oct 2020  路  5Comments  路  Source: neomutt/neomutt

Expected Behaviour

By default, if I don't set 'signature', and don't happen to have a file ~/.signature, no error.

Actual Behaviour

Even though I do not set 'signature', because of the default value and because of error checking I get an error:

/home/scott/.signature: No such file or directory (errno = 2)

Steps to Reproduce

Do not set the 'signature' config and temporarily move any file you may have in ~/.signature.

How often does this happen?

  • Always

When did it start to happen?

  • When I tested current master.

I'm guessing it started to happen after cfa1ef3642232de4c0566a48bcde0c224ecc88bf, which is related to #2694. @jindraj can you confirm?

I see a few possibilities:

  1. The previous behavior, where 'signature' is set to "~/.signature" but the value of 'signature' is not checked to see if the file exists.
  2. The config 'signature' does not have a default value; and when the config is set the value is checked to see if the file exists.
  3. The config 'signature' is set to "~/.signature" by default, but the value of the config is only checked if the value does not equal the default value (i.e., it is sure that the user chose to set the config).

Just to give my own two cents, I prefer 2. However, changing the default value would cause problems when users upgrade. I guess 3 is safer. I guess the choice should also depend on what is done for similar configs.

bug

All 5 comments

I'm guessing it started to happen after cfa1ef3, which is related to #2694. @jindraj can you confirm?

Yes, there was no message prior to my commit.

  1. The previous behaviour, where 'signature' is set to "~/.signature" but the value of 'signature' is not checked to see if the file exists.

I still think it's nice to let user know why the signature isn't appended.

  1. The config 'signature' does not have a default value; and when the config is set the value is checked to see if the file exists.

To change the defaults I would need @flatcap to approve. If anyone is using default value for the signature, all these people would have to add the signature to their config. Otherwise this would break their composing by not appending the signature.

  1. The config 'signature' is set to "~/.signature" by default, but the value of the config is only checked if the value does not equal the default value (i.e., it is sure that the user chose to set the config).

This would behave inconsistently based on value.

I agree with @jindraj : although this is a change in behaviour, I favour explicity. If you're not using a signature, I think it's better to unset signature rather than relying on NeoMutt not caring too much about not finding the default file :)

Thanks for the quick comments, jindraj and gahr. I guess in that case let's put a note in the release notes that users should expect an error if they are not using a signature file, and that they should add unset signature to their configs?

After discussion possible steps on IRC we agreed on following (your 1.)

13:22:44         gahr | let's issue the warning if the setting is != the default
13:22:56      mgedmin | +1
13:23:02      flatcap | ok, the partial solution

Ah good to know. I hope someday to participate on IRC, but probably not for a while.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asakura42 picture asakura42  路  5Comments

TornaxO7 picture TornaxO7  路  4Comments

misaflo picture misaflo  路  3Comments

rexVictor picture rexVictor  路  4Comments

tdehaeze picture tdehaeze  路  4Comments