bug-texinfo
[Top][All Lists]
Advanced

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

Re: Improving standalone info usability


From: Gavin Smith
Subject: Re: Improving standalone info usability
Date: Fri, 21 Mar 2014 20:09:09 +0000

On Sun, Mar 9, 2014 at 7:37 PM, Gavin Smith <address@hidden> wrote:
> I have implemented adjustment of anchor offsets. (For example, the
> entry for "makeinfo" in the dir file is a link to an anchor.)
>
> Attached patches apply against SVN version 5419. First patch can be
> applied with "patch -p3" and the others with "patch -p1" in the "info"
> subdirectory. Some of the changes require still require some polish,
> but at least they should be more understandable split up.

Here is my work so far. Charset conversion is implemented.

The last set of changes I posted led to the contents of nodes being
freed too early. Now they are not freed at all. (Before these changes,
contents_cache was never freed, and this is carried forward.) It will
be possible to fix this, but it will require more code. There are two
systems for garbage collection already in the program -
info_gc_file_buffers (used for whole file buffers, only called when a
search is performed) and add_gcable_pointer, used for "transient"
nodes that did not come from a file. One of these can be adapted.

The "buffer list" implemented in nodemenu.c is not yet processed, nor
are any other "transient" nodes. Again, this is not hard to fix.

Some notes on charset conversion. I considered three ways of doing this:

* Node-by-node (I have done it this way).
* Whole file at once (as I did in the patches I posted a while back -
http://lists.gnu.org/archive/html/bug-texinfo/2014-02/msg00038.html).
Slow and cannot adjust anchor offsets.
* In the display code - I thought that
info-utils.c:printed_representation could be adapted. Nodes would be
stored in their file encoding, but displayed in the terminal's
encoding. This would have been nice, and is maybe still possible. It
would avoid having to free the contents of nodes individually and
anchor offsets would be automatically correct. It looked like it would
have to be done character-by-character, though, which could have been
inefficient. Additionally, a multibyte iterator system is used in a
few places in the code (mbi_iterator_t - I think this is from gnulib),
which requires the text it is iterating over to be encoded in the
current locale encoding.

(Incidentally, I came across a program called luit used by xterm
(http://www.x.org/archive/X11R6.8.1/doc/luit.1.html) which seems to be
a partial solution to this problem - however, it only supports UTF-8
terminals.)

The attachment anchors.info is a test file to check that anchors point
to the same place regardless of the character encoding used by the
terminal.

The git.log attachment summarizes the changes in these patches (output
of "git log").

Attachment: 01.patch
Description: Text Data

Attachment: 02.patch
Description: Text Data

Attachment: 03.patch
Description: Text Data

Attachment: 04.patch
Description: Text Data

Attachment: 05.patch
Description: Text Data

Attachment: 06.patch
Description: Text Data

Attachment: 07.patch
Description: Text Data

Attachment: 08.patch
Description: Text Data

Attachment: 09.patch
Description: Text Data

Attachment: 10.patch
Description: Text Data

Attachment: 11.patch
Description: Text Data

Attachment: 12.patch
Description: Text Data

Attachment: 13.patch
Description: Text Data

Attachment: anchors.info
Description: Binary data

Attachment: git.log
Description: Text Data


reply via email to

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