GNU bug report logs - #6534
Suggestion for character references in html-mode

Previous Next

Package: emacs;

Reported by: Esa Peuha <esa.peuha <at> gmail.com>

Date: Mon, 28 Jun 2010 21:52:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 6534 AT debbugs.gnu.org.

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

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


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6534; Package emacs. (Mon, 28 Jun 2010 21:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Esa Peuha <esa.peuha <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 28 Jun 2010 21:52:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Esa Peuha <esa.peuha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Suggestion for character references in html-mode
Date: Tue, 29 Jun 2010 00:39:54 +0300
[Message part 1 (text/plain, inline)]
In nxml-mode, numeric character references (such as &#160;) are
displayed with the referred-to character following the reference. It
would be nice if html-mode did the same. (The format of these
references is the same in xml and html, so sharing code for this
should be simple.)
[Message part 2 (text/html, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6534; Package emacs. (Tue, 29 Jun 2010 09:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 6534 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Esa Peuha <esa.peuha <at> gmail.com>
Cc: 6534 <at> debbugs.gnu.org
Subject: Re: bug#6534: Suggestion for character references in html-mode
Date: Tue, 29 Jun 2010 12:06:55 +0300
> In nxml-mode, numeric character references (such as &#160;) are
> displayed with the referred-to character following the reference. It
> would be nice if html-mode did the same. (The format of these
> references is the same in xml and html, so sharing code for this
> should be simple.)

I think this functionality should be separated into a new package
because it's useful for character notations of other modes as well,
e.g. Emacs Lisp with #x, C with 0x, Perl with \x, etc.

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6534; Package emacs. (Tue, 01 Mar 2016 14:15:02 GMT) Full text and rfc822 format available.

Message #11 received at 6534 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 6534 <at> debbugs.gnu.org, Esa Peuha <esa.peuha <at> gmail.com>
Subject: Re: bug#6534: Suggestion for character references in html-mode
Date: Tue, 01 Mar 2016 17:04:42 +1100
Juri Linkov <juri <at> jurta.org> writes:

>> In nxml-mode, numeric character references (such as &#160;) are
>> displayed with the referred-to character following the reference. It
>> would be nice if html-mode did the same. (The format of these
>> references is the same in xml and html, so sharing code for this
>> should be simple.)
>
> I think this functionality should be separated into a new package
> because it's useful for character notations of other modes as well,
> e.g. Emacs Lisp with #x, C with 0x, Perl with \x, etc.

That does sound exceedingly useful...  Hm...  perhaps I should have a go
at it unless this already exists somewhere?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6534; Package emacs. (Wed, 02 Mar 2016 00:34:02 GMT) Full text and rfc822 format available.

Message #14 received at 6534 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 6534 <at> debbugs.gnu.org, Esa Peuha <esa.peuha <at> gmail.com>
Subject: Re: bug#6534: Suggestion for character references in html-mode
Date: Wed, 02 Mar 2016 02:28:29 +0200
> Juri Linkov <juri <at> jurta.org> writes:
>
>>> In nxml-mode, numeric character references (such as &#160;) are
>>> displayed with the referred-to character following the reference. It
>>> would be nice if html-mode did the same. (The format of these
>>> references is the same in xml and html, so sharing code for this
>>> should be simple.)
>>
>> I think this functionality should be separated into a new package
>> because it's useful for character notations of other modes as well,
>> e.g. Emacs Lisp with #x, C with 0x, Perl with \x, etc.
>
> That does sound exceedingly useful...  Hm...  perhaps I should have a go
> at it unless this already exists somewhere?

When I looked at prior art the closest matches were the package rainbow-mode
from ELPA that displays colors by character codes, and prettify-symbols-mode
that transforms characters into alternative representation.  But doing this
using font-lock-keywords is so trivial, it was easier to just put a small
piece of code in ~/.emacs.




This bug report was last modified 9 years and 104 days ago.

Previous Next


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