Discussion:
[mh-e:bugs] #470 MH-E discards text properties in emacs > v24
Bill Wohler
2014-07-30 04:58:55 UTC
Permalink
- **summary**: mh-e discards text properties in emacs > v24 --> MH-E discards text properties in emacs > v24



---

** [bugs:#470] MH-E discards text properties in emacs > v24**

**Status:** unread
**Milestone:** mh-e-contrib-1.5
**Created:** Mon Mar 04, 2013 11:17 AM UTC by Ted Phelps
**Last Updated:** Mon Mar 04, 2013 11:19 AM UTC
**Owner:** nobody

While chasing bug 267, I noticed that the text-mode function, which is called by mh-show-mode, discards all text properties. HTML e-mail rendered via shr.el gets rendered first, and then mh-show-mode is invoked: all of the careful highlighting and coloring is thrown away. Amusingly, the overlays shr uses to pad tables remain, so the result not the improvement you might think.

-Ted


---

Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Bill Wohler
2014-08-05 04:00:10 UTC
Permalink
- **status**: unread --> open
- **Milestone**: mh-e-contrib-1.5 --> mh-e-8.6



---

** [bugs:#470] MH-E discards text properties in emacs > v24**

**Status:** open
**Milestone:** mh-e-8.6
**Created:** Mon Mar 04, 2013 11:17 AM UTC by Ted Phelps
**Last Updated:** Wed Jul 30, 2014 04:58 AM UTC
**Owner:** nobody

While chasing bug 267, I noticed that the text-mode function, which is called by mh-show-mode, discards all text properties. HTML e-mail rendered via shr.el gets rendered first, and then mh-show-mode is invoked: all of the careful highlighting and coloring is thrown away. Amusingly, the overlays shr uses to pad tables remain, so the result not the improvement you might think.

-Ted


---

Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Mike Kupfer
2015-06-21 23:18:32 UTC
Permalink
- **Milestone**: mh-e-8.6 --> mh-e-8.7



---

** [bugs:#470] MH-E discards text properties in emacs > v24**

**Status:** open
**Milestone:** mh-e-8.7
**Created:** Mon Mar 04, 2013 11:17 AM UTC by Ted Phelps
**Last Updated:** Tue Aug 05, 2014 04:00 AM UTC
**Owner:** nobody

While chasing bug 267, I noticed that the text-mode function, which is called by mh-show-mode, discards all text properties. HTML e-mail rendered via shr.el gets rendered first, and then mh-show-mode is invoked: all of the careful highlighting and coloring is thrown away. Amusingly, the overlays shr uses to pad tables remain, so the result not the improvement you might think.

-Ted


---

Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Mike Kupfer
2015-12-26 20:13:16 UTC
Permalink
I recently ran into this problem on Emacs 24.5 and Emacs 25 without knowing about this bug. I agree with Ted's analysis of the root cause. It's non-obvious from just looking at the code, because the definition of text-mode doesn't show any font-lock calls. I don't know if it's some magic associated with derived modes or if there's a hook getting invoked invisibly. But you can see the rendering change if you set a breakpoint at entry to mh-show-mode and then walk through with the debugger. I eventually got this stack. On entry to font-lock-default-function, the message was rendered using shr. On return from font-lock-default-function, the rendering had changed.

Debugger entered--entering a function:
* font-lock-default-function(nil)
* font-lock-mode(-1)
* font-lock-change-mode()
* kill-all-local-variables()
* text-mode()
* #[nil ... ("/usr/local/share/emacs/24.5/lisp/mh-e/mh-show.elc" . 103006) nil]()
* apply(#[nil ... ("/usr/local/share/emacs/24.5/lisp/mh-e/mh-show.elc" . 103006) nil] nil)
* mh-show-mode()
mh-display-msg(5 "+emacs/test-cases/html")
mh-show-msg(nil)
mh-show(nil t)
call-interactively(mh-show nil nil)
command-execute(mh-show)

I tried moving the mh-show-mode call to come before the MIME rendering.

(mh-show-mode)
;; Use mm to display buffer
(when (and mh-decode-mime-flag (not formfile))
(mh-add-missing-mime-version-header)
(setf (mh-buffer-data) (mh-make-buffer-data))
(mh-mime-display))
;; Header cleanup

That doesn't quite work, because mh-show-mode wants to make the buffer read-only. But if I comment out that line in mh-show-mode, the message appears to display correctly.


---

** [bugs:#470] MH-E discards text properties in emacs > v24**

**Status:** open
**Milestone:** mh-e-8.7
**Created:** Mon Mar 04, 2013 11:17 AM UTC by Ted Phelps
**Last Updated:** Sun Jun 21, 2015 11:18 PM UTC
**Owner:** nobody
**Attachments:**

- [12703](https://sourceforge.net/p/mh-e/bugs/470/attachment/12703) (395 Bytes; application/octet-stream)


While chasing bug 267, I noticed that the text-mode function, which is called by mh-show-mode, discards all text properties. HTML e-mail rendered via shr.el gets rendered first, and then mh-show-mode is invoked: all of the careful highlighting and coloring is thrown away. Amusingly, the overlays shr uses to pad tables remain, so the result not the improvement you might think.

-Ted


---

Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Mike Kupfer
2015-12-26 20:14:22 UTC
Permalink
- **assigned_to**: Mike Kupfer
- **Comment**:

adding this to my queue



---

** [bugs:#470] MH-E discards text properties in emacs > v24**

**Status:** open
**Milestone:** mh-e-8.7
**Created:** Mon Mar 04, 2013 11:17 AM UTC by Ted Phelps
**Last Updated:** Sat Dec 26, 2015 08:13 PM UTC
**Owner:** Mike Kupfer
**Attachments:**

- [12703](https://sourceforge.net/p/mh-e/bugs/470/attachment/12703) (395 Bytes; application/octet-stream)


While chasing bug 267, I noticed that the text-mode function, which is called by mh-show-mode, discards all text properties. HTML e-mail rendered via shr.el gets rendered first, and then mh-show-mode is invoked: all of the careful highlighting and coloring is thrown away. Amusingly, the overlays shr uses to pad tables remain, so the result not the improvement you might think.

-Ted


---

Sent from sourceforge.net because mh-e-***@lists.sourceforge.net is subscribed to https://sourceforge.net/p/mh-e/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/mh-e/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Loading...