Gnus development mailing list
 help / color / mirror / Atom feed
* variable-width font in summary buffer?
@ 2008-07-05 12:48 David Abrahams
  2008-07-06  3:09 ` Miles Bader
  0 siblings, 1 reply; 5+ messages in thread
From: David Abrahams @ 2008-07-05 12:48 UTC (permalink / raw)
  To: info-gnus-english; +Cc: ding


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: variable-width font in summary buffer?
  2008-07-05 12:48 variable-width font in summary buffer? David Abrahams
@ 2008-07-06  3:09 ` Miles Bader
  2008-07-06  3:25   ` David Abrahams
  0 siblings, 1 reply; 5+ messages in thread
From: Miles Bader @ 2008-07-06  3:09 UTC (permalink / raw)
  To: David Abrahams; +Cc: ding

David Abrahams <dave@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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: variable-width font in summary buffer?
  2008-07-06  3:09 ` Miles Bader
@ 2008-07-06  3:25   ` David Abrahams
  2008-07-06 12:49     ` Johan Bockgård
  0 siblings, 1 reply; 5+ messages in thread
From: David Abrahams @ 2008-07-06  3:25 UTC (permalink / raw)
  To: Miles Bader; +Cc: ding


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

> David Abrahams <dave@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.

That sounds like a neat feature idea, but probably not much use to
someone not equipped to develop Gnus features(?)

Thanks for replying,

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: variable-width font in summary buffer?
  2008-07-06  3:25   ` David Abrahams
@ 2008-07-06 12:49     ` Johan Bockgård
  2009-03-16 21:37       ` David Abrahams
  0 siblings, 1 reply; 5+ messages in thread
From: Johan Bockgård @ 2008-07-06 12:49 UTC (permalink / raw)
  To: ding

David Abrahams <dave@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: variable-width font in summary buffer?
  2008-07-06 12:49     ` Johan Bockgård
@ 2009-03-16 21:37       ` David Abrahams
  0 siblings, 0 replies; 5+ messages in thread
From: David Abrahams @ 2009-03-16 21:37 UTC (permalink / raw)
  To: ding


on Sun Jul 06 2008, bojohan+news-AT-dd.chalmers.se (Johan Bockgård) wrote:

> David Abrahams <dave@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,

Looks like I forgot to thank you for this.  It works; thanks!

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-16 21:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-05 12:48 variable-width font in summary buffer? David Abrahams
2008-07-06  3:09 ` Miles Bader
2008-07-06  3:25   ` David Abrahams
2008-07-06 12:49     ` Johan Bockgård
2009-03-16 21:37       ` David Abrahams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).