[Top][All Lists]

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

Re: [AUCTeX-devel] align and pretty-symbols.

From: Tassilo Horn
Subject: Re: [AUCTeX-devel] align and pretty-symbols.
Date: Mon, 07 Dec 2015 18:22:47 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

Hi Uwe,

> I am not sure that this is off topic.

It depends on if it is AUCTeX-related.  I think you'll get the very same
situation with Emacs stock `latex-mode', right?  Then it's not really on
topic, though I have no problem answering some pretty-symbols questions
here, too.

> However I just found out that align (from align.el shipped with GNU
> emacs) has an issue, if I want to align for example the align
> environment it depends whether I had pretty-symbol on or not. So I
> send three screenshots.
>     -  align executed when pretty-symbol is off.
>     -  just turn pretty-symbol on
>     -  run again align with pretty-symbol on
> Is this a bug or missing feature,

The way it works is correct but align.el simply doesn't play well with
`prettify-symbols-mode' (and it cannot).  The intention of align.el is
to _physically_ align stuff, e.g., transform

    int a = 1;
    short foo = 2;
    double blah = 4;

to the aligned version

    int    a    = 1;
    short  foo  = 2;
    double blah = 4;

I.e., in this example, it aligns the types at column A, the variable
names at column B, and the =-signs at column C.  Such a physically
aligned block does obviously only look aligned when "foo" is displayed
as "foo" and not as a prettified symbol.

What you are expecting is that the alignment adjusts even with
`prettify-symbols-mode' turned on.  But that doesn't make sense for hard
alignment which inserts spaces for aligning stuff.  If it would align
according to the definitions of `prettify-symbols-mode', the aligning
would be nonsense to anyone looking at the file without
`prettify-symbols-mode' turned on.  It would even break with
`prettify-symbols-mode' if symbols get added/removed from

Long story short: prettify-symbols-mode + hard alignment => nonsense

> shall I send a bug report to John W?

Even if it were a bug you should send a bug report simply with M-x
report-emacs-bug instead of writing the maintainer noted in the file


reply via email to

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