[Top][All Lists]

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

Re: PATCH: num3-mode for highlighting groups of digits in long numbers

From: felix
Subject: Re: PATCH: num3-mode for highlighting groups of digits in long numbers
Date: Thu, 6 Sep 2012 16:41:24 -0700

On Thu, Sep 6, 2012 at 4:18 PM, Jambunathan K <address@hidden> wrote:

> Hello everyone,
> This time I bring to you a patch adding num3-mode which helps read long
> numbers by alternating highlighting of group of digits in a long
> number, so for instance something like:
>       12345678.12345678
> would be displayed as ("-" symbolising underscore):
>       12345678.12345678
>         ---       ---
> This also works for hexadecimal numbers by grouping 4-digits at a time,
> ie.:
>       0x0123456789ABCDEF
>         ----    ----

Just curious.

Can we highlight like telephone numbers by creating an *extra* dash,
space or a point.

Tel no: 1234567890 rendered as
Tel no: 12345-67890

In some ways, the highlighting as seen above is in-band and not
out-of-band (as underlines are).  It is also naturally how one would
write down long numbers on a piece of paper for ease of reading.

That would throw off alignment of things like monospace-formatted tables. Even if columns in a table are separated with tabs, adding extra chars in the rendering can mess up the alignment.

One alternative is to tweak interletter spacing so that groups of digits are bunched together, so that there's a noticeable gap between groups, but the digits still occupy the same width they normally would. I think this would be hard to do reliably in current emacs. I don't see any way to reduce interletter spacing other than using a smaller font, and there doesn't seem to be a way to compute the pixel width of text either.

reply via email to

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