* bug#5002: complicated properties @ 2009-11-23 13:05 Vivek Dasmohapatra [not found] ` <handler.5002.B5002.12589815477801.ackinfo@emacsbugs.donarmstrong.com> 0 siblings, 1 reply; 2+ messages in thread From: Vivek Dasmohapatra @ 2009-11-23 13:05 UTC (permalink / raw) To: 5002 Ok, I can see how some of those properties would cause problems. I'm going to go through the docs for those properties and make sure there's no reason htlfontify should support them (intangible might have implications for invisibility) but at first glance I can't think of a reason they should stay. I'll probably implement a defcustom so if other such props turn up in the future users can easily add them to the excluded list. ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <handler.5002.B5002.12589815477801.ackinfo@emacsbugs.donarmstrong.com>]
* bug#5002: patch [not found] ` <handler.5002.B5002.12589815477801.ackinfo@emacsbugs.donarmstrong.com> @ 2009-11-26 5:32 ` Vivek Dasmohapatra 0 siblings, 0 replies; 2+ messages in thread From: Vivek Dasmohapatra @ 2009-11-26 5:32 UTC (permalink / raw) To: 5002 [-- Attachment #1: Type: TEXT/PLAIN, Size: 313 bytes --] Tags: patch This patch should allow those props to be stripped. A defcustom has been added and the properties listed in it should be ripped out just after the buffer is copied. (I have dropped rear-nonsticky from the list of props to ignore, it does not seem problematic (or likely to be problematic) to me.) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: TEXT/x-diff; name=htmlfontify-ignored-props.patch, Size: 1400 bytes --] diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index f60e7e8..cdad960 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -373,6 +373,18 @@ commands in `hfy-etags-cmd-alist'." :tag "shell-file-name" :type '(file)) +(defcustom hfy-ignored-properties '(read-only + intangible + modification-hooks + insert-in-front-hooks + insert-behind-hooks + point-entered + point-left) + "Properties to omit when copying a fontified buffer for html transformation." + :group 'htmlfontify + :tag "ignored-properties" + :type '(repeat symbol)) + (defun hfy-which-etags () "Return a string indicating which flavour of etags we are using." (let ((v (shell-command-to-string (concat hfy-etags-bin " --version")))) @@ -1623,6 +1635,8 @@ FILE, if set, is the file name." (delete-overlay rovl)) (copy-to-buffer html-buffer (point-min) (point-max)) (set-buffer html-buffer) + ;; rip out props that could interfere with our htmlisation of the buffer: + (remove-text-properties (point-min) (point-max) hfy-ignored-properties) ;; Apply overlay invisible spec (setq orig-ovls (sort orig-ovls ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-26 5:32 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-23 13:05 bug#5002: complicated properties Vivek Dasmohapatra [not found] ` <handler.5002.B5002.12589815477801.ackinfo@emacsbugs.donarmstrong.com> 2009-11-26 5:32 ` bug#5002: patch Vivek Dasmohapatra
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.