AUCTeX and XEmacs

Stephen J. Turnbull stephen at xemacs.org
Wed Sep 1 20:34:00 EDT 2004


>>>>> "Ralf" == Ralf Angeli <dev.null at iwi.uni-sb.de> writes:

    Ralf> The current implementation in AUCTeX (which is just an
    Ralf> adaption of the code in CVS Emacs) does the whole
    Ralf> lowering/raising stuff via font-locking.

This is not going to work in XEmacs any time soon, and my initial
reaction is that it is an abuse of text properties.  *sigh*  We'll see,
but it will surely not be implemented in XEmacs 21.4, because it would
require serious meddling with redisplay.

    >> Why do you need to [put linebreaks and multiple faces in an end
    >> glyph]?  (There may be alternative ways to accomplish the
    >> task.)  You may simply need to use the baseline or contrib-p
    >> flags, but I've never really tried it.

    Ralf> Sorry, I probably switched topics without indicating this
    Ralf> clearly.  AUCTeX provides functionality to "fold" LaTeX
    Ralf> macros and environments.  That means, if you have
    Ralf> e.g. "\emph{foo}" in your LaTeX source you can hide the
    Ralf> macro part and the braces and only "foo" will be displayed
    Ralf> with the respective face provided by font-locking.  Another
    Ralf> possibility is to show a predefined string instead of the
    Ralf> whole macro.  That means you can display "[f]" instead of
    Ralf> "\footnote{bar}".  The original content will only be
    Ralf> revealed upon entering the display string with the cursor.

    Ralf> There are cases where the content of the LaTeX macro spans
    Ralf> several lines in the buffer.  This is handled nicely by
    Ralf> Emacs where the display property of an overlay can hold
    Ralf> linebreaks.  In XEmacs the end-glyph property of an extent
    Ralf> is used with a glyph made of the contents of the LaTeX
    Ralf> macro.  Unfortunately linebreaks will vanish if the
    Ralf> respective string is transformed to a glyph.

It's a hack but what you probably could do is use a layout glyph.  A
layout glyph is a compound glyph like a TeX box.  It is either an hbox
or a vbox (determined by a property in the layout's initializer).

Unfortunately this is not documented at all, I'm afraid.  I've got a
bit in a workspace for 21.5, but the best place to look is in
dialog-items.el, I think, which gives an example of a complex layout
(a search dialog).

I gather that the reason that the real content is in the glyph and the
display is in the buffer is because XEmacs end glyphs cannot be
entered by the pointer?

    >> *Ask, for Heaven's sake!*

    Ralf> If you haven't noticed, I just did. (c; (I, personally,
    Ralf> haven't done so before because, like you, I don't think that
    Ralf> this a very valuable feature.)

OK.  You have my apologies.


-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.




More information about the XEmacs-Beta mailing list