bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

Emacs - Bugs mailing list
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))



Reply | Threaded
Open this post in threaded view
|

bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

Eli Zaretskii
> 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" <[hidden email]>
>
> 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 | Threaded
Open this post in threaded view
|

bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

Emacs - Bugs mailing list
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 | Threaded
Open this post in threaded view
|

bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

Eli Zaretskii
> From: "Edward J. Sabol" <[hidden email]>
> CC: [hidden email]
> 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.



Reply | Threaded
Open this post in threaded view
|

bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

Emacs - Bugs mailing list
> 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



Reply | Threaded
Open this post in threaded view
|

bug#38193: 26.2; Editing a message in RMAIL should trigger an update to its summary line

Eli Zaretskii
> From: "Edward J. Sabol" <[hidden email]>
> CC: [hidden email]
> 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.