David Abrahams | 5 Jul 14:45

variable-width font in summary buffer?


I'd like to use a variable-width font in my summary buffers, but it
seems that, especially when displaying threads, much of what Gnus does there
depends on a monospaced font.

Is anyone successfully using a variable-pitch font in the summary
buffer, and if so, do you have any configuration tips?

Thanks,

--

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
Miles Bader | 6 Jul 05:09
Gravatar

Re: variable-width font in summary buffer?

David Abrahams <dave <at> boostpro.com> writes:
> I'd like to use a variable-width font in my summary buffers, but it
> seems that, especially when displaying threads, much of what Gnus does there
> depends on a monospaced font.
>
> Is anyone successfully using a variable-pitch font in the summary
> buffer, and if so, do you have any configuration tips?

It shouldn't be that hard if gnus maintains lets you add text-properties
to the summary-buffer format string.  If it does, you could add display
properties like (space :align-to COLUMN) instead of using spaces for
padding.

Actually, gnus probably ought to have a format spec that allows doing
this simply.

E.g., it could use %N| to add a space which aligns to column N ("%45|"
would align to column 45).

Perhaps just "%|" (without a column) could auto-calculate the column
based on the calculated "fixed-width" position.

-Miles

--

-- 
We have met the enemy, and he is us.  -- Pogo

David Abrahams | 6 Jul 05:25

Re: variable-width font in summary buffer?


on Sat Jul 05 2008, Miles Bader <miles-AT-gnu.org> wrote:

> David Abrahams <dave <at> boostpro.com> writes:
>> I'd like to use a variable-width font in my summary buffers, but it
>> seems that, especially when displaying threads, much of what Gnus does there
>> depends on a monospaced font.
>>
>> Is anyone successfully using a variable-pitch font in the summary
>> buffer, and if so, do you have any configuration tips?
>
> It shouldn't be that hard if gnus maintains lets you add text-properties
> to the summary-buffer format string.  If it does, you could add display
> properties like (space :align-to COLUMN) instead of using spaces for
> padding.

Hi Miles,

That's an interesting idea.  Do you have any pointers that might help me
discover how to do that?  I'm a longtime emacs user but this sounds like
a bit of a stretch for me to figure out on my own.

> Actually, gnus probably ought to have a format spec that allows doing
> this simply.
>
> E.g., it could use %N| to add a space which aligns to column N ("%45|"
> would align to column 45).
>
> Perhaps just "%|" (without a column) could auto-calculate the column
> based on the calculated "fixed-width" position.
(Continue reading)

Johan Bockgård | 6 Jul 14:49

Re: variable-width font in summary buffer?

David Abrahams <dave <at> boostpro.com> writes:

> on Sat Jul 05 2008, Miles Bader <miles-AT-gnu.org> wrote:
>
>> It shouldn't be that hard if gnus maintains lets you add
>> text-properties to the summary-buffer format string. If it does, you
>> could add display properties like (space :align-to COLUMN) instead of
>> using spaces for padding.
>
> That's an interesting idea. Do you have any pointers that might help
> me discover how to do that? I'm a longtime emacs user but this sounds
> like a bit of a stretch for me to figure out on my own.

There are several ways to do this, like

  (defvar my-align-foo (propertize " " 'display '(space :align-to 50)))

then

  (setq gnus-summary-line-format "[...] %~(form my-align-foo)@%s\n")

or

  (defun gnus-user-format-function-align-foo (dummy) my-align-foo)
  (setq gnus-summary-line-format "[...] %u&align-foo;%s\n")

--

-- 
Johan Bockgård

(Continue reading)


Gmane