[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/comint-mime e7c847a 6/8: Fix interaction between HTML r
From: |
ELPA Syncer |
Subject: |
[elpa] externals/comint-mime e7c847a 6/8: Fix interaction between HTML rendering and process mark |
Date: |
Mon, 18 Oct 2021 12:57:18 -0400 (EDT) |
branch: externals/comint-mime
commit e7c847af897d14c560a7eceedc9bad2e51e87e55
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>
Fix interaction between HTML rendering and process mark
---
comint-mime.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/comint-mime.el b/comint-mime.el
index 9192bb1..9e3e03c 100644
--- a/comint-mime.el
+++ b/comint-mime.el
@@ -144,18 +144,21 @@ from `comint-mode', or interactively after starting the
comint."
(defun comint-mime-render-html (header data)
"Render HTML from HEADER and DATA provided by `comint-mime-osc-handler'."
(insert
- (with-temp-buffer
- (insert data)
- (decode-coding-region (point-min) (point-max) 'utf-8)
- (shr-render-region (point-min) (point-max))
- ;; Don't let font-lock override those faces
- (goto-char (point-min))
- (let (match)
- (while (setq match (text-property-search-forward 'face))
- (put-text-property (prop-match-beginning match) (prop-match-end match)
- 'font-lock-face (prop-match-value match))))
- (put-text-property (point-min) (point-max) 'comint-mime header)
- (buffer-string))))
+ ;; FIXME: This `save-excursion' is needed since the patch fixing
+ ;; bug#51009. Is this reliable or are there better solutions?
+ (save-excursion
+ (with-temp-buffer
+ (insert data)
+ (decode-coding-region (point-min) (point-max) 'utf-8)
+ (shr-render-region (point-min) (point-max))
+ ;; Don't let font-lock override those faces
+ (goto-char (point-min))
+ (let (match)
+ (while (setq match (text-property-search-forward 'face))
+ (put-text-property (prop-match-beginning match) (prop-match-end
match)
+ 'font-lock-face (prop-match-value match))))
+ (put-text-property (point-min) (point-max) 'comint-mime header)
+ (buffer-string)))))
;;;; LaTeX
(autoload 'org-format-latex "org")
- [elpa] branch externals/comint-mime created (now d9cdad5), ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime a8b0f67 1/8: Initial commit, ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime 95d9d34 2/8: Improve Matplotlib setup from IPython, ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime 6b95376 5/8: Reduce Emacs version requirement to 28 (from 28.1), ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime 3e02807 7/8: Update copyright assignment, ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime d9cdad5 8/8: Convert README to org format, ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime e7c847a 6/8: Fix interaction between HTML rendering and process mark,
ELPA Syncer <=
- [elpa] externals/comint-mime bb9a1ad 3/8: Hide setup from shell history, at least when "ignorespace" is set, ELPA Syncer, 2021/10/18
- [elpa] externals/comint-mime 9cf131d 4/8: Disable LaTeX rendering by default for now, ELPA Syncer, 2021/10/18