GNU bug report logs - #38193
26.2; Editing a message in RMAIL should trigger an update to its summary line

Previous Next

Package: emacs;

Reported by: Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>

Date: Wed, 13 Nov 2019 06:40:01 UTC

Severity: normal

Found in version 26.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38193 in the body.
You can then email your comments to 38193 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38193; Package emacs. (Wed, 13 Nov 2019 06:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 13 Nov 2019 06:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ed Sabol <edward.j.sabol <at> nasa.gov>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2;
 Editing a message in RMAIL should trigger an update to its summary
 line
Date: Wed, 13 Nov 2019 00:34:00 -0500 (EST)
Steps:
1. Open an existing RMAIL file with multiple messages in rmail-mode.
2. Press "h" to generate the corresponding rmail-summary buffer.
3. Hit "e" to edit some message.
4. Change the Subject: header of the message in some noticeable way.
5. Press C-c C-c to finish editing the message.

Result:
The corresponding summary line for the edited message is not updated to
reflect the message's new Subject: header. I expect that it should.
It used to work like that in older Emacs, pre 22.x for sure, so I
consider this to be a regression, albeit a very old one!

Same for other headers like From: and To:.


In GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, X toolkit)
 of 2019-04-12 built on heasarcdev
Windowing system distributor 'Scientific Linux', version 11.0.11704000
System Description:	Scientific Linux release 6.10 (Carbon)

Recent messages:
Parsing /Home/lhea2/sabol/.mailrc... done
Mark set
Editing: Type C-c C-c to return to Rmail, C-c C-] to abort
Computing summary lines...done
Editing: Type C-c C-c to return to Rmail, C-c C-] to abort
Computing summary lines...done
Saving file /Home/lhea2/sabol/Mail/RMAIL...
Wrote /Home/lhea2/sabol/Mail/RMAIL [2 times]
Computing summary lines...done
Making completion list...

Configured using:
 'configure --prefix=/software/usr/contrib
 --exec-prefix=/software/usr/contrib/linux-6.x --with-x-toolkit=athena
 --with-toolkit-scroll-bars=no --with-jpeg=no --with-gif=no
 --with-tiff=no --with-gnutls=no'

Configured features:
XAW3D XPM PNG SOUND GSETTINGS GLIB NOTIFY LIBSELINUX LIBXML2 FREETYPE
XFT ZLIB LUCID X11 XDBE XIM THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: RMAIL Summary

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort emacsbug sendmail rmailedit mail-extr qp rmailsum rmailmm
message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs
cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads inotify
dynamic-setting font-render-setting x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 117388 19492)
 (symbols 48 20833 2)
 (miscs 40 5507 5869)
 (strings 32 36097 7923)
 (string-bytes 1 1291947)
 (vectors 16 15244)
 (vector-slots 8 529193 12588)
 (floats 8 58 240)
 (intervals 56 5821 11)
 (buffers 992 16)
 (heap 1024 31454 10375))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38193; Package emacs. (Sat, 16 Nov 2019 10:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 38193 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>,
 Ed Sabol <edward.j.sabol <at> nasa.gov>
Cc: 38193 <at> debbugs.gnu.org
Subject: Re: bug#38193: 26.2;
 Editing a message in RMAIL should trigger an update to its summary
 line
Date: Sat, 16 Nov 2019 12:50:13 +0200
> Date: Wed, 13 Nov 2019 00:34:00 -0500 (EST)
> From: Ed Sabol via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Steps:
> 1. Open an existing RMAIL file with multiple messages in rmail-mode.
> 2. Press "h" to generate the corresponding rmail-summary buffer.
> 3. Hit "e" to edit some message.
> 4. Change the Subject: header of the message in some noticeable way.
> 5. Press C-c C-c to finish editing the message.
> 
> Result:
> The corresponding summary line for the edited message is not updated to
> reflect the message's new Subject: header. I expect that it should.
> It used to work like that in older Emacs, pre 22.x for sure, so I
> consider this to be a regression, albeit a very old one!
> 
> Same for other headers like From: and To:.

Thanks.  Does the patch below fix this?

diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 01d5524..02ca2a8 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -340,10 +340,11 @@ rmail-cease-edit
         ;; Delete previous body.  This must be after all insertions at the end,
         ;; so the marker for the beginning of the next message isn't messed up.
         (delete-region end (point-max)))
-      (rmail-set-attribute rmail-edited-attr-index t))
-;;;??? BROKEN perhaps.
-;;;    (if (boundp 'rmail-summary-vector)
-;;;	(aset rmail-summary-vector (1- rmail-current-message) nil))
+      (rmail-set-attribute rmail-edited-attr-index t)
+      (if (rmail-summary-exists)
+          (let ((msgnum rmail-current-message))
+            (with-current-buffer rmail-summary-buffer
+              (rmail-summary-update-line msgnum)))))
     (rmail-show-message)
     (rmail-toggle-header (if pruned 1 0))
     ;; Restore mime display state.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38193; Package emacs. (Tue, 19 Nov 2019 00:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 38193 <at> debbugs.gnu.org (full text, mbox):

From: "Edward J. Sabol" <edward.j.sabol <at> nasa.gov>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38193 <at> debbugs.gnu.org
Subject: Re: bug#38193: 26.2;
 Editing a message in RMAIL should trigger an update to its summary
 line
Date: Mon, 18 Nov 2019 19:15:03 -0500 (EST)
Eli Zaretskii
> Thanks.  Does the patch below fix this?

Yes, it does! Thank you very much!

Regards,
Ed


>> Steps:
>> 1. Open an existing RMAIL file with multiple messages in rmail-mode.
>> 2. Press "h" to generate the corresponding rmail-summary buffer.
>> 3. Hit "e" to edit some message.
>> 4. Change the Subject: header of the message in some noticeable way.
>> 5. Press C-c C-c to finish editing the message.
>> 
>> Result:
>> The corresponding summary line for the edited message is not updated to
>> reflect the message's new Subject: header. I expect that it should.
>> It used to work like that in older Emacs, pre 22.x for sure, so I
>> consider this to be a regression, albeit a very old one!
>> 
>> Same for other headers like From: and To:.
>
> Thanks.  Does the patch below fix this?
>
> diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
> index 01d5524..02ca2a8 100644
> --- a/lisp/mail/rmailedit.el
> +++ b/lisp/mail/rmailedit.el
> @@ -340,10 +340,11 @@ rmail-cease-edit
>          ;; Delete previous body.  This must be after all insertions at the end,
>          ;; so the marker for the beginning of the next message isn't messed up.
>          (delete-region end (point-max)))
> -      (rmail-set-attribute rmail-edited-attr-index t))
> -;;;??? BROKEN perhaps.
> -;;;    (if (boundp 'rmail-summary-vector)
> -;;;	(aset rmail-summary-vector (1- rmail-current-message) nil))
> +      (rmail-set-attribute rmail-edited-attr-index t)
> +      (if (rmail-summary-exists)
> +          (let ((msgnum rmail-current-message))
> +            (with-current-buffer rmail-summary-buffer
> +              (rmail-summary-update-line msgnum)))))
>      (rmail-show-message)
>      (rmail-toggle-header (if pruned 1 0))
>      ;; Restore mime display state.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 19 Nov 2019 16:01:02 GMT) Full text and rfc822 format available.

Notification sent to Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>:
bug acknowledged by developer. (Tue, 19 Nov 2019 16:01:03 GMT) Full text and rfc822 format available.

Message #16 received at 38193-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>
Cc: 38193-done <at> debbugs.gnu.org
Subject: Re: bug#38193: 26.2;
 Editing a message in RMAIL should trigger an update to its summary
 line
Date: Tue, 19 Nov 2019 18:00:30 +0200
> From: "Edward J. Sabol" <edward.j.sabol <at> nasa.gov>
> CC: 38193 <at> debbugs.gnu.org
> Date: Mon, 18 Nov 2019 19:15:03 -0500 (EST)
> 
> Eli Zaretskii
> > Thanks.  Does the patch below fix this?
> 
> Yes, it does! Thank you very much!

Thanks for testing, I installed that change.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38193; Package emacs. (Tue, 19 Nov 2019 19:08:02 GMT) Full text and rfc822 format available.

Message #19 received at 38193-done <at> debbugs.gnu.org (full text, mbox):

From: "Edward J. Sabol" <edward.j.sabol <at> nasa.gov>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38193-done <at> debbugs.gnu.org
Subject: Re: bug#38193: 26.2;
 Editing a message in RMAIL should trigger an update to its summary
 line
Date: Tue, 19 Nov 2019 14:07:56 -0500 (EST)
> Thanks for testing, I installed that change.

Not sure if it makes a difference, but I was just compiling Emacs 26.3 after
applying the patch you provided and it spat out the following:

In end of data:
../../lisp/mail/rmailedit.el:499:1:Warning: the function
     rmail-summary-update-line is not known to be defined.

Thanks,
Ed




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38193; Package emacs. (Tue, 19 Nov 2019 19:26:02 GMT) Full text and rfc822 format available.

Message #22 received at 38193-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ed Sabol <esabol <at> milkyway.gsfc.nasa.gov>
Cc: 38193-done <at> debbugs.gnu.org
Subject: Re: bug#38193: 26.2;
 Editing a message in RMAIL should trigger an update to its summary
 line
Date: Tue, 19 Nov 2019 21:25:50 +0200
> From: "Edward J. Sabol" <edward.j.sabol <at> nasa.gov>
> CC: 38193-done <at> debbugs.gnu.org
> Date: Tue, 19 Nov 2019 14:07:56 -0500 (EST)
> 
> > Thanks for testing, I installed that change.
> 
> Not sure if it makes a difference, but I was just compiling Emacs 26.3 after
> applying the patch you provided and it spat out the following:
> 
> In end of data:
> ../../lisp/mail/rmailedit.el:499:1:Warning: the function
>      rmail-summary-update-line is not known to be defined.

Yes, the change I installed solves this.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 18 Dec 2019 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.