[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38193: 26.2; Editing a message in RMAIL should trigger an update to
From: |
Edward J. Sabol |
Subject: |
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.