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

2016-09-05 Thread Antonio Radici
Control: tag -1 +pending

On Sat, Jul 30, 2016 at 11:15:48AM +0100, Klaus Ethgen wrote:
> With the new package it is not possible to reset X-Labels like it was
> with the old dgc.xlabel_ext patch.
> 
> You can set labels without any problem but removing them does not work.
> 
> My binding to remove the Labels is:
>ifdef edit-label macro index "M0" "'^?\n!'" 
> "'Clear priority (X-Label) of message'"
> 
> (Removed compiling settings as I build it locally trying to fix that
> issue.)

Hi Klaus,
first of all thanks for the patch!
I've already submitted this patch in git, it will be part of 1.7.0-2.

Richard is aware of it and he's likely to include it in the next neomutt version
(we talked on IRC about that).



Bug#832971: It is not possible to reset X-Labels

2016-08-31 Thread Klaus Ethgen
-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' '^U!' 
> '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  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(>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-16Klaus Ethgen 
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-



Bug#832971: It is not possible to reset X-Labels

2016-07-30 Thread Richard Russon
Hi Klaus,

I'm Rich/FlatCap -- Maintainer of NeoMutt.
I've just tested the labels and they work for me.

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' '^U!' 'Clear 
priority (X-Label) of message'"

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

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

Cheers,
Rich



signature.asc
Description: PGP signature


Bug#832971: It is not possible to reset X-Labels (anymore)

2016-07-30 Thread Klaus Ethgen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Package: mutt
Version: 1.6.2-1
Severity: normal

With the new package it is not possible to reset X-Labels like it was
with the old dgc.xlabel_ext patch.

You can set labels without any problem but removing them does not work.

My binding to remove the Labels is:
   ifdef edit-label macro index "M0" "'^?\n!'" "'Clear 
priority (X-Label) of message'"

(Removed compiling settings as I build it locally trying to fix that
issue.)
- -- 
Klaus Ethgen   http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16Klaus Ethgen 
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C
-BEGIN PGP SIGNATURE-
Version: GnuPG v2
Comment: Charset: ISO-8859-1

iQGcBAEBCgAGBQJXnH5KAAoJEKZ8CrGAGfasGnUL/Awb8f7EviD5iCAL9jUG01+n
3YPh1VwjUmd0WSss8gaTAH3AMalJIYpSkacD0O4MuqGUOg2vqsI7NKZBY2V1Wf6K
mokQxVGEQwn4wd4qOlvCzGMg7bp39FKM5YH6utaqM08+d6w3mh9WT/M73fpxtUhu
rd+m1HEy4jVFw3MFf/i0Q2NGdBrWhEoGAOnKk8dsgNDc2Sxytuio13XUCPQnHQwr
KKssMjwW9wsC8SEzv4wknZbi1zXN+0O8AGaxB4EivE+CE7yii/YNB+6fTBll8mJj
xQ8qpyuXrdfSY+ehUer+nBbSVvX4OCHXbW3HXG+Ln1sJyZvHBXakefTCr6gIlqyj
FxHk8LwYiYDBATqkinmUymhnzTQEjoSVazoa0kd4cfB0U5ZKhj9Px8jW1f/zn0Or
aRucMPSD/U2i6ghuTsfZ0OnP8Swf43sbBmYqSTgKN1yUvevULV6LXPSNPjvqtxmx
WxBxs3uXcUJ3d4U0yEXJqmtqPOOTp3VYTmWCAYUALQ==
=LdxT
-END PGP SIGNATURE-