all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephan Hennig <mailing_list@arcor.de>
To: emacs-devel@gnu.org
Subject: Re: linum and AUCTeX: line number face
Date: Mon, 17 Sep 2007 15:57:02 +0200	[thread overview]
Message-ID: <fcm15l$ib7$1@sea.gmane.org> (raw)
In-Reply-To: <87zlzm9uy7.fsf@escher.local.home>

[-- Attachment #1: Type: text/plain, Size: 2925 bytes --]

Stephen Berman schrieb:

> If you customize the linum face to default, then all line numbers 
> have the default face.  It seems the default face does not "inherit" 
> the face properties of the string that the linum display property is 
> on, whereas, for example, the shadow face, used by default by 
> linum.el version 0.9n and later, does inherit at least some face 
> properties or attributes.

Thanks!  For \bfseries using default face works for all fonts I've
tried.  But for \section commands the behaviour is even more strange.

As long as default face refers to, e.g., 'Courier New' or 'Bitstream
Vera Sans Mono' all seems to be well.  But when default refers to, e.g.,
'Outline-Consolas' or 'Lucida Sans Typewriter' weight is still inherited
from line's face if there's a \section command in that line.

To reproduce the problem, put the following lines into file .emacs:

(progn (cd "~/elisp") (normal-top-level-add-subdirs-to-load-path))
(require 'linum)
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:stipple nil :background "SystemWindow" :foreground
"SystemWindowText" :inverse-video nil :box nil :strike-through nil
:overline nil :underline nil :slant normal :weight normal :height 108
:width normal :family "Bitstream Vera Sans Mono"))))
 '(linum ((t (:inherit default))))
)

1. Start emacs by typing 'emacs'.
2. C-x C-f test.tex (or activate LaTeX-mode by other means).
3. Type '2 RET \section{test} RET 2 RET'.
4. M-x linum-mode
5. Compare the '2' printed by linum and the two '2's in the buffer.
Both are rendered differently.

I've additionally attached a small screen shot, where the problem can
also be seen for a number '8' (try zooming in).

System:
GNU Emacs 22.1.50.1 (i386-mingw-nt5.1.2600) of 2007-07-07 on NEUTRINO
AUCTeX 11.84
linum.el 0.9t


> I don't know just which other faces behave like default and which
> like shadow (though the face (not just the weight) bold seems to
> inherit even more attributes than shadow), nor do I know why there is
> this difference.

Hm, could it be that 'default' in general refers to a specific font
whereas 'shadow' doesn't (Font Family is *)?  I agree that 'shadow'
shouldn't be an explicit face definition, but modify "what's already
there", e.g., change a property of text set in default face.  But
inheriting font-locking related properties (and only for /some/ fonts)
is bad, IMHO.  Are there means to toggle that behaviour?


> But I do know that this has to do generally with display properties
> and display margins, not just with linum.el.

I guess, I've never met those 'display margins' before.  Could you
please give a hint about what you're speaking to somebody not so good at
managing Emacs (yet)?

Best regards,
Stephan Hennig


[-- Attachment #2: linum-vera.png --]
[-- Type: image/png, Size: 2599 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2007-09-17 13:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46ea83d1$0$16117$9b4e6d93@newsspool1.arcor-online.net>
2007-09-16 10:30 ` linum and AUCTeX: line number face Stephan Hennig
2007-09-16 21:11   ` Stephen Berman
2007-09-17 13:57     ` Stephan Hennig [this message]
2007-09-17 15:02       ` David Kastrup
2007-09-17 16:20         ` Stefan Monnier
2007-09-17 22:54           ` Stephen Berman
2007-10-11 16:30             ` Stephan Hennig
2007-09-17 17:38         ` Stephan Hennig
2007-09-17 22:54           ` Stephen Berman
2007-09-18  9:51             ` Stephan Hennig
2007-09-17 22:54       ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fcm15l$ib7$1@sea.gmane.org' \
    --to=mailing_list@arcor.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.