all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil
@ 2004-06-09 18:10 Francis Litterio
  2004-06-10 20:15 ` Francis Litterio
  0 siblings, 1 reply; 4+ messages in thread
From: Francis Litterio @ 2004-06-09 18:10 UTC (permalink / raw)


The below patch causes the Buffer-menu header to have a consistent face
for all characters when Buffer-menu-use-header is set to nil.  I was
motivated to make this change after setting Buffer-menu-use-header to
nil and noticing that the mixture of text having 'fixed-pitch face with
text having my personal default face (the X windows 6x10 font) made the
header look bad.

I hope the Emacs developer community finds this useful.
--
Francis Litterio
franl@world.std.com
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.


--- buff-menu.el.~1.66.~	2004-03-31 20:23:36.000000000 -0500
+++ buff-menu.el	2004-06-09 14:09:36.071049600 -0400
@@ -606,7 +606,10 @@
   (let* ((old-buffer (current-buffer))
 	 (standard-output standard-output)
 	 (mode-end (make-string (- Buffer-menu-mode-width 2) ? ))
-	 (header (concat " " (propertize "CRM " 'face 'fixed-pitch)
+	 (header (concat (if Buffer-menu-use-header-line " ")
+			 (if Buffer-menu-use-header-line
+			     (propertize "CRM " 'face 'fixed-pitch)
+			   "CRM ")
 			 (Buffer-menu-buffer+size
 			  (Buffer-menu-make-sort-button "Buffer" 2)
 			  (Buffer-menu-make-sort-button "Size" 3))
@@ -629,7 +632,7 @@
       (erase-buffer)
       (setq standard-output (current-buffer))
       (unless Buffer-menu-use-header-line
-	(insert header (propertize "---" 'face 'fixed-pitch) " ")
+	(insert header "--- ")
 	(insert (Buffer-menu-buffer+size "------" "----"))
 	(insert "  ----" mode-end "----\n")
 	(put-text-property 1 (point) 'intangible t))

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

* Re: PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil
  2004-06-09 18:10 PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil Francis Litterio
@ 2004-06-10 20:15 ` Francis Litterio
  2004-06-15 15:28   ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Francis Litterio @ 2004-06-10 20:15 UTC (permalink / raw)


I wrote:

> The below patch causes the Buffer-menu header to have a consistent face
> for all characters when Buffer-menu-use-header is set to nil.

The more I think about this, the more I realize that I should simply
set the font of face 'fixed-pitch to match my default font.  Then the
Buffer-menu header looks fine whether or not Buffer-menu-use-header is
nil or non-nil.

I don't think my patch is the right solution to the problem I saw.

Sorry for the confusion.
--
Francis Litterio
franl@world.std.com
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.

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

* Re: PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil
  2004-06-10 20:15 ` Francis Litterio
@ 2004-06-15 15:28   ` Juri Linkov
  2004-06-16  1:34     ` Miles Bader
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2004-06-15 15:28 UTC (permalink / raw)
  Cc: emacs-devel

Francis Litterio <franl@world.std.com> writes:
>> The below patch causes the Buffer-menu header to have a consistent face
>> for all characters when Buffer-menu-use-header is set to nil.
>
> The more I think about this, the more I realize that I should simply
> set the font of face 'fixed-pitch to match my default font.  Then the
> Buffer-menu header looks fine whether or not Buffer-menu-use-header is
> nil or non-nil.
>
> I don't think my patch is the right solution to the problem I saw.

No, I think your initial suggestion was right.  There is no reason to
display characters in fixed-pitch in the buffer with a buffer list
and to put additional space when Buffer-menu-use-header is nil.

Moreover, I don't understand why displaying text in the header line
needs special treatment by adding the space and using special fonts?
Why the header line can't start at the left fringe?  The header line
is often used as a fixed part of the buffer that doesn't scroll,
so it makes sense to line it up with the buffer and to use the same
font in which its buffer is displayed.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil
  2004-06-15 15:28   ` Juri Linkov
@ 2004-06-16  1:34     ` Miles Bader
  0 siblings, 0 replies; 4+ messages in thread
From: Miles Bader @ 2004-06-16  1:34 UTC (permalink / raw)
  Cc: Francis Litterio, emacs-devel

On Tue, Jun 15, 2004 at 06:28:19PM +0300, Juri Linkov wrote:
> Moreover, I don't understand why displaying text in the header line
> needs special treatment by adding the space and using special fonts?
> Why the header line can't start at the left fringe?  The header line
> is often used as a fixed part of the buffer that doesn't scroll,
> so it makes sense to line it up with the buffer and to use the same
> font in which its buffer is displayed.

I don't the space is necessary -- Kim's recent changes should do that in a
better way -- but I presume the use of the fixed-width font is so that the
single-letter headers for the first three `columns' _exactly_ line up with
the corresponding text.  Those headers are already kind of cryptic, so that
is important for anyone that uses a variable-pitch header face (which is not
uncommon).

The current solution is kind of bad be because the `fixed-pitch' face is
often jarringly different from the default face, but in practice it's
probably good enough for now.

For future releases I intend to add `attribute filtered' face-inheritance
(something which Stefan has also mentioned), which should make it easer to
get a face that just inherits the default face's font/size without screwing
up other attributes.

-Miles
-- 
Run away!  Run away!

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

end of thread, other threads:[~2004-06-16  1:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-09 18:10 PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil Francis Litterio
2004-06-10 20:15 ` Francis Litterio
2004-06-15 15:28   ` Juri Linkov
2004-06-16  1:34     ` Miles Bader

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.