Gnus development mailing list
 help / color / mirror / Atom feed
* variable-pitch font in article buffer
@ 2008-06-19  6:10 Miles Bader
  2008-07-01 20:41 ` Ted Zlatanov
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2008-06-19  6:10 UTC (permalink / raw)
  To: ding

Now that Emacs CVS has the face-remapping-alist featrue, I'll mention
this little hack I have in ~/.gnus:


(defun gnus-article-variable-pitch-mode (&optional arg)
  "Apply `variable-pitch-mode' in article buffer."
  (interactive (list (or current-prefix-arg (quote toggle))))
  (with-current-buffer gnus-article-buffer
    (variable-pitch-mode arg)))

(add-hook 'gnus-summary-mode-hook
          (lambda () (local-set-key "v" 'gnus-article-variable-pitch-mode)))

(add-hook 'gnus-article-mode-hook
          (lambda () (variable-pitch-mode t)))


I dunno if something similar is desirable for default Gnus, but having a
variable-pitch font in the article buffer is often really nice --
messages with lots of prose can be significantly easier to read.

However some articles really need a fixed-pitch font, thus the
easy-to-hit summary-buffer binding to toggle variable-pitch mode in the
article buffer.

-Miles

-- 
"Suppose we've chosen the wrong god. Every time we go to church we're
just making him madder and madder." -- Homer Simpson




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

* Re: variable-pitch font in article buffer
  2008-06-19  6:10 variable-pitch font in article buffer Miles Bader
@ 2008-07-01 20:41 ` Ted Zlatanov
  2008-07-01 22:18   ` Miles Bader
  0 siblings, 1 reply; 7+ messages in thread
From: Ted Zlatanov @ 2008-07-01 20:41 UTC (permalink / raw)
  To: Miles Bader; +Cc: ding

On Thu, 19 Jun 2008 15:10:40 +0900 Miles Bader <miles@gnu.org> wrote: 

MB> Now that Emacs CVS has the face-remapping-alist featrue, I'll mention
MB> this little hack I have in ~/.gnus:

MB> (defun gnus-article-variable-pitch-mode (&optional arg)
MB>   "Apply `variable-pitch-mode' in article buffer."
MB>   (interactive (list (or current-prefix-arg (quote toggle))))
MB>   (with-current-buffer gnus-article-buffer
MB>     (variable-pitch-mode arg)))

MB> (add-hook 'gnus-summary-mode-hook
MB>           (lambda () (local-set-key "v" 'gnus-article-variable-pitch-mode)))

MB> (add-hook 'gnus-article-mode-hook
MB>           (lambda () (variable-pitch-mode t)))


MB> I dunno if something similar is desirable for default Gnus, but having a
MB> variable-pitch font in the article buffer is often really nice --
MB> messages with lots of prose can be significantly easier to read.

MB> However some articles really need a fixed-pitch font, thus the
MB> easy-to-hit summary-buffer binding to toggle variable-pitch mode in the
MB> article buffer.

This might make sense as a group/topic property that's also triggered by
article contents, etc.  How do you use it, always manually?

Ted



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

* Re: variable-pitch font in article buffer
  2008-07-01 20:41 ` Ted Zlatanov
@ 2008-07-01 22:18   ` Miles Bader
  2008-07-03 20:59     ` Ted Zlatanov
  0 siblings, 1 reply; 7+ messages in thread
From: Miles Bader @ 2008-07-01 22:18 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> writes:
> MB> However some articles really need a fixed-pitch font, thus the
> MB> easy-to-hit summary-buffer binding to toggle variable-pitch mode in the
> MB> article buffer.
>
> This might make sense as a group/topic property that's also triggered by
> article contents, etc.  How do you use it, always manually?

I just toggle it "manually" (my hook turns it on by default).

Variable-pitch seems to work well (and is generally more readable) for
about 99% of articles; I rarely turn it off even in technical groups
where people post patches and code etc.

[Even ascii art tables are a bit of a wash these days since half the
time the author apparent sent it using a MUA using a variable-width
font, and aligned things accordingly!!]

-Miles

-- 
Congratulation, n. The civility of envy.



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

* Re: variable-pitch font in article buffer
  2008-07-01 22:18   ` Miles Bader
@ 2008-07-03 20:59     ` Ted Zlatanov
  2008-07-03 21:10       ` Miles Bader
  2008-07-04 12:55       ` James Cloos
  0 siblings, 2 replies; 7+ messages in thread
From: Ted Zlatanov @ 2008-07-03 20:59 UTC (permalink / raw)
  To: Miles Bader; +Cc: ding

On Wed, 02 Jul 2008 07:18:11 +0900 Miles Bader <miles@gnu.org> wrote: 

MB> Ted Zlatanov <tzz@lifelogs.com> writes:
MB> However some articles really need a fixed-pitch font, thus the
MB> easy-to-hit summary-buffer binding to toggle variable-pitch mode in the
MB> article buffer.
>> 
>> This might make sense as a group/topic property that's also triggered by
>> article contents, etc.  How do you use it, always manually?

MB> I just toggle it "manually" (my hook turns it on by default).

MB> Variable-pitch seems to work well (and is generally more readable) for
MB> about 99% of articles; I rarely turn it off even in technical groups
MB> where people post patches and code etc.

MB> [Even ascii art tables are a bit of a wash these days since half the
MB> time the author apparent sent it using a MUA using a variable-width
MB> font, and aligned things accordingly!!]

So maybe a keymap would be appropriate so users can toggle it back, plus
a variable called gnus-article-variable-pitch-mode that defaults to nil
and, when enabled, turns v-p-m on.

I wouldn't use it personally, I like the fixed width spacing better, but
I imagine a lot of user would appreciate it.  It also looks jarringly
inconsistent with the thread display IMO.

Opinions, anyone?

Ted



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

* Re: variable-pitch font in article buffer
  2008-07-03 20:59     ` Ted Zlatanov
@ 2008-07-03 21:10       ` Miles Bader
  2008-07-04 12:55       ` James Cloos
  1 sibling, 0 replies; 7+ messages in thread
From: Miles Bader @ 2008-07-03 21:10 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

On Fri, Jul 4, 2008 at 5:59 AM, Ted Zlatanov <tzz@lifelogs.com> wrote:
> It also looks jarringly
> inconsistent with the thread display IMO.

Not at all, if you're using sane fonts, and the mono and v.p. faces
share a common look.  For instance, the bitstream vera fonts, which
should be usually be the defautl using Emacs CVS.

If you're using insane fonts, of course, a bit of tweaking is usually
good to knock the v.p. face into shape (e.g. scalng the size up or
down a notch to match the default face better is often nice).

-Miles

-- 
Will Rogers  - "I don't make jokes. I just watch the government and
report the facts."



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

* Re: variable-pitch font in article buffer
  2008-07-03 20:59     ` Ted Zlatanov
  2008-07-03 21:10       ` Miles Bader
@ 2008-07-04 12:55       ` James Cloos
  2008-07-04 14:13         ` Miles Bader
  1 sibling, 1 reply; 7+ messages in thread
From: James Cloos @ 2008-07-04 12:55 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: Miles Bader, ding

>>>>> "Ted" == Ted Zlatanov <tzz@lifelogs.com> writes:

Ted> So maybe a keymap would be appropriate so users can toggle it back,
Ted> plus a variable called gnus-article-variable-pitch-mode that
Ted> defaults to nil and, when enabled, turns v-p-m on.

Agreed.  Miles' code included:

 (add-hook 'gnus-summary-mode-hook
  (lambda () (local-set-key "v" 'gnus-article-variable-pitch-mode)))

I've been using it for a while now (with DejaVu Mono as the fixed font
and DejaVu Serif as the variable-pitch font).  Very cool indeed.

I'd live to see a variable pitch mode for the Summary and Group buffers,
too, using something other than spaces to place the columnar data.  I
don't know whether Emacs has the necessary support for that yet, though.

Variable-pitch-mode also works well in message buffers.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



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

* Re: variable-pitch font in article buffer
  2008-07-04 12:55       ` James Cloos
@ 2008-07-04 14:13         ` Miles Bader
  0 siblings, 0 replies; 7+ messages in thread
From: Miles Bader @ 2008-07-04 14:13 UTC (permalink / raw)
  To: James Cloos; +Cc: Ted Zlatanov, ding

James Cloos <cloos@jhcloos.com> writes:
> I'd live to see a variable pitch mode for the Summary and Group buffers,
> too, using something other than spaces to place the columnar data.  I
> don't know whether Emacs has the necessary support for that yet, though.

"Stretch-glyphs" can be used to align text a bit more flexibly; they're
basically like tabs that aren't restricted to tab-stops.

However obviously such a thing is likely to be rather unportable to
people's custom summary format strings.

Perhaps the thing to do is (1) add magic chars to the summary format
string spec that lets one specify which parts will use a variable-pitch
face, and (2) try to use stretch-glyphs instead of spaces for aligning
the end of padded parts.

-Miles

-- 
Genealogy, n. An account of one's descent from an ancestor who did not
particularly care to trace his own.



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

end of thread, other threads:[~2008-07-04 14:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-19  6:10 variable-pitch font in article buffer Miles Bader
2008-07-01 20:41 ` Ted Zlatanov
2008-07-01 22:18   ` Miles Bader
2008-07-03 20:59     ` Ted Zlatanov
2008-07-03 21:10       ` Miles Bader
2008-07-04 12:55       ` James Cloos
2008-07-04 14:13         ` Miles Bader

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).