GNU bug report logs - #5002
htmlfontify should remove some text properties

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 21 Nov 2009 12:10:06 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5002 in the body.
You can then email your comments to 5002 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#5002; Package emacs. (Sat, 21 Nov 2009 12:10:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 21 Nov 2009 12:10:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>, Vivek Dasmohapatra <vivek <at> etla.org>
Subject: htmlfontify should remove some text properties
Date: Sat, 21 Nov 2009 13:05:09 +0100
[Message part 1 (text/plain, inline)]
I just notice when I played a bit with hfyview.el that there is a bug
in hfy-fontify-buffer. Or at least I believe it is there.

The problem seems to be that a substring is copied with all text
properties to the new buffer. Some of them will prevent htmlfontify
from working correctly. I think the call to copy-buffer should be
replaced with something that does the same thing but removes some of
the text properties.

This is what I just did in hfyview.el, but that is the wrong place to
do it. See line 512 in the attached hfyview.el for some suspicious
text properties (I am not sure how they work so I took them all.
Beside that I saw that font-sticky and rear-nonsticky is not described
on (info "(elisp) Special Properties").)

I found the problem when I did like this:

 load hfyview.el
 M-x hfyview-frame-mode
 M-x
 Push <apps>

This will work now, but that is due to that the call to propertize on
line 515 in hfyview.el removes some text properties from the variable
str before the insertion in the buffer. (I am not sure which ones that
helped here.)

If you do not remove these text properties then the content of the
minibuffer will not be shown in the htmlfontify output.

I have attached hfyview.el
[hfyview.el (text/plain, attachment)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#5002; Package emacs. (Mon, 23 Nov 2009 13:10:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vivek Dasmohapatra <vivek <at> etla.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 23 Nov 2009 13:10:06 GMT) Full text and rfc822 format available.

Message #10 received at 5002 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Vivek Dasmohapatra <vivek <at> etla.org>
To: 5002 <at> debbugs.gnu.org
Subject: complicated properties
Date: Mon, 23 Nov 2009 13:05:22 +0000 (GMT)
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.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#5002; Package emacs. (Thu, 26 Nov 2009 05:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vivek Dasmohapatra <vivek <at> etla.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 26 Nov 2009 05:40:04 GMT) Full text and rfc822 format available.

Message #15 received at 5002 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Vivek Dasmohapatra <vivek <at> etla.org>
To: 5002 <at> debbugs.gnu.org
Subject: Re: bug#5002: patch
Date: Thu, 26 Nov 2009 05:32:35 +0000 (GMT)
[Message part 1 (text/plain, inline)]
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.)
[htmlfontify-ignored-props.patch (text/x-diff, attachment)]

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 09 Dec 2009 06:05:05 GMT) Full text and rfc822 format available.

Notification sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
bug acknowledged by developer. (Wed, 09 Dec 2009 06:05:06 GMT) Full text and rfc822 format available.

Message #20 received at 5002-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Vivek Dasmohapatra <vivek <at> etla.org>
Subject: Re: bug#5002: patch
Date: Wed, 09 Dec 2009 00:57:43 -0500
> 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.

Installed,


        Stefan



bug archived. Request was from Debbugs Internal Request <bug-gnu-emacs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Jan 2010 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.