emacs-devel
[Top][All Lists]
Advanced

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

Re: info invisible changes


From: Miles Bader
Subject: Re: info invisible changes
Date: Wed, 6 Nov 2002 07:30:16 -0500
User-agent: Mutt/1.3.28i

On Wed, Nov 06, 2002 at 01:46:28PM +0100, Kim F. Storm wrote:
> > Hmmm, well it looks _less_ bad: now the text is all in a properly-
> > indented, but absurdly narrow column.
> 
> Weren't they in an absurdly narrow column already ?  ;-)

Indeed, but pushed over to the right side of the window by the long node
name, which made it look vaguely natural (though still bad).  Luckily this
generally only seems to be the case in the dir menu, and that's the one that
it's OK to modify...

> > Morever, the format of the menu entries seems regular enough that
> > finding the bounds required to fill/reindent; something like
> > 
> >   (goto-char START-OF-MENU-ENTRY-TEXT)
> >   (forward-sentence)
> >   (while (looking-at ".*\n[ \t]+[^ \t]")
> >     (forward-sentence))
> >   ;; point is now at END-OF-MENU-ENTRY-TEXT
> > 
> > seems to work alright.
>
> Maybe.  If you send me some misc dir files which have particular problems,
> I can probably do a better job at getting this right.

I'm just using my normal dir menu, which is emacs' dir merged with the
(auto-generated) debian dir file.  If you don't have a debian system, I can
send you a copy of my file.

I did try out the above lisp by hand on a bunch of entries in my dir menu,
and it worked every time (though there's always an exception I suppose).

BTW, on the issue of whether it's OK to modify the buffer contents, I think
it should be OK; (buffer-file-name) is always nil in the *info* buffer, after
all.  I think a lot of this stuff would become _much_ simpler if you could
must munge the buffer instead of using invisible/display properties (with all
their associated oddities), perhaps using text properties to store the
necessary non-displayed info instead of parsing the buffer for it -- of
course this would perhaps be a bigger change, since you'd have to modify the
various info-getting functions too, but I don't see why it would be _that_
big a job (presumably the modified code would support both text-property
stored info and buffer-parsing, for backward compatibility).

-Miles

-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.




reply via email to

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