emacs-devel
[Top][All Lists]
Advanced

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

Re: info invisible changes


From: Kim F. Storm
Subject: Re: info invisible changes
Date: 12 Nov 2002 11:11:30 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     > I agree with Stefan that the text should be refilled in the top-level
>     > dir node -- it's special because it contains much more hidden text than
>     > a normal node, and looks especially bad without refilling, and also it's
>     > not connected with a file (it's generated), so it's safe to modify.
> 
> There is no reason to hesitate about refilling the dir node.  It is
> constructed inside Emacs anyway.

Actually, the *info* buffer is now detached from the original info
file (it uses insert-file to setup the buffer), so we can modify the
*info* quite freely.

In any case, with the current implementation in info.el, I simply
tried to apply fill-paragraph to the sections of the *info* buffer
where I mangle the *note references ...  and although it actually does
a fair job most of the time, it sometimes fails horribly because the
code in fill.el suffers from a number of serious problems:

1) it doesn't test for 'invisible properties, so it happily processes
   invisible text when deciding the (visible) width of the lines,

2) it doesn't test for 'display properties, so if a part of the buffer
   text is hidden and visibly replaced with some other text (or an
   image), the hidden (rather than the visible) text is used for
   filling, and

3) when the fill code inserts a newline to wrap the text, it may
   insert that newline in an invisible part of the buffer, so it has
   no visible effect (i.e. displaying one very long line rather than
   two normal width lines).

Is someone working on fixing fill.el to deal with these text properties?

If not, should the code in fill.el be modified in general to deal with
these properties, or can it be done by adding another type of filling
specifically for this type of mangled text?  Please advise!

I think that if we fix those problems, a simple call to fill-paragraph
at the right place in Info-fontify-node will do a reasonble job of
presenting the mangled information in a more readable form.


++kfs





reply via email to

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