[Pkg-mutt-maintainers] Bug#832971: It is not possible to reset X-Labels

Klaus Ethgen Klaus at Ethgen.de
Wed Aug 31 07:31:14 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Rich,

Am Sa den 30. Jul 2016 um 19:16 schrieb Richard Russon:
> I'm Rich/FlatCap -- Maintainer of NeoMutt.

Thanks for your Answer. I just seen them today when I tested with the
newest mutt version in debian.

> I've just tested the labels and they work for me.

I cannot  tell that. It is still possible to set the lable but deleting
(unsetting) is not possible.

And looking in the code I would say that it is indead not possible to
unset it.

> There seem to be a LOT of quotes in your config example.
> I've removed a few and everything works as expected:
> 
> ifdef edit-label "macro index 'M0' '<edit-label>^U<enter><clear-flag>!' 'Clear priority (X-Label) of message'"

Well, that is equal to the example I posted. At least function wise and
how mutt is handling it.

> In this email I've typed out ^U as two separate characters, but in the
> config file it's the literal <ctrl-U> character -- kill line.

Yes. True. Sorry. In my config, I have that as one character.

My former setup was to use ^? (ctrl-?) instead of ^U but both is not
working.

> Please can you try this config and let me know if it works.

By the way, using the following patch in the version before (It does not
apply to the newest version as the name M_X_LABEL was changed; but this
can be easily changed.) I had the labels back working. However, I might
have missed some caching issue here as I seen some artefacts to double
clean a label. I think, that information is somewhere cached and not
proper updated by my patch.
   --- a/copy.c
   +++ b/copy.c
   @@ -446,8 +446,7 @@ mutt_copy_header (FILE *in, HEADER *h, F
	  char *tmp = NULL;
	  int fail = 0;
    
   -      if (fail == 0 &&
   -          ((h->env->kwtypes & M_X_LABEL) || (h->env->kwtypes == 0)) &&
   +      if (((h->env->kwtypes & M_X_LABEL) || (h->env->kwtypes == 0)) &&
	      (option(OPTKEYWORDSLEGACY) || option(OPTKEYWORDSSTANDARD) == 0))
	  {
	    mutt_labels(buf, sizeof(buf), h->env, XlabelDelim);
   --- a/headers.c
   +++ b/headers.c
   @@ -281,11 +281,10 @@ static int label_message(HEADER *hdr, ch
      {
	mutt_label_ref_dec(hdr->env);
	mutt_free_list(&hdr->env->labels);
   +    hdr->env->labels = NULL;
      }
    
   -  if (new == NULL)
   -    hdr->env->labels = NULL;
   -  else
   +  if (new != NULL && *new != '\0')
      {
	char *last, *label;

The second chunk eliminates the real bug and I had to do the first junk
too to put it to work.

Regards
   Klaus
- -- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <Klaus at Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-----BEGIN PGP SIGNATURE-----
Comment: Charset: ISO-8859-1

iQGcBAEBCgAGBQJXxoe5AAoJEKZ8CrGAGfasmtUMAJytEweP+xG0wNkqqvAmawN3
EIp3ntEEpJQEPTv4PdtQm9blCMmaM/V1RstmHipXHhc8tooM3Hw/Qjy5DInbvK0L
V4TQEtOLz3qOOhlggGKXuV6US7XFNzoc1297ijP1Z+mBxps/aI8pCtKxM3Vuo82+
vyIRCBHO5UIBbIYGUPXFBnqm3jLVhihULLQSXxxzTqMdpoQ22gl492Rav0eLGRBW
y4wSfczUSCOCchuU4Oy9jLxwpIFzjQob+MBrLxpJSw7Tx2s6PhaeDIYdx5IumS7E
rqvoQNKKnDbUTC9hCMGKW8oy1pvyQlRdDi3CFrvdTnHr/im+MbBpJAYUz8kjh9gV
kz0IyUm16PtClmIMnxKaaDwe5SBgmOcotYHyR21qL230vwHVSBDAox3v1BjUBTpf
7P6G1r8OPv/QSb4Bywp7VS3xxvFUWIB8IJyiOMsv/tjk4Q3cLa5Y8m8XYl/vSS7M
RuEsa1ulrOjIBvJHwVcb9kJS+IK1iVvjwR3S/AcISQ==
=taRq
-----END PGP SIGNATURE-----



More information about the Pkg-mutt-maintainers mailing list