emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Man-fontify-manpage does not handle man, version 1.5o1, ANSI escape


From: Stefan
Subject: Re: Man-fontify-manpage does not handle man, version 1.5o1, ANSI escape sequences
Date: Tue, 30 Nov 2004 08:16:36 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin)

> This patch did not work as is.  Here is a list of issues and
> fixes/workarounds. I append my new working version at the end.

Thanks, I actually reread the code this morning and was about to send
a "sorry, I must have been stoned or something".

> 2. The numeric (I'm not sure its safe to assume ASCII) character values
>    need to be changed to the corresponding number. So I changed these 
> expressions
>    (char-after (match-beginning 2))
>    (char-after (match-beginning 1))
> to
>    (- (char-after (match-beginning 2)) ?0)
>    (- (char-after (match-beginning 1)) ?0)
> I not at all confident in the mutli-byte character set portability of this.

There's no multibyte char in sight, so don't worry.
Instead of (- <foo> ?0) I'd use ?1 ?4 ?7 in the case branches.

>                 (t (error "Unexpeced case"))))

This should say "Unexpected internal error" or somesuch, to make it clear
that the problem is not that we saw an unexpected sequence (which should not
trigger an error but should just be ignored) but that we bumped into a bug
in our own code.

>> BTW, is it right that bold is turned on with \e[1m and turned off with
>> \e[22m?  It seems odd that it isn't \e[21m to turn it off or \e[2m to turn
>> it on, seeing how the other fit the \e[Nm and \e[2Nm rule.
> Yeah I noticed that "almost" rule. Here is the reference I used:

Thank you,


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]