* weird font-lock / coding interaction @ 2007-10-18 14:30 Sven Utcke 2007-10-22 9:38 ` What font is this symbol in (was: weird font-lock / coding interaction) Sven Utcke 2007-10-29 11:31 ` weird font-lock / coding interaction Xah Lee 0 siblings, 2 replies; 5+ messages in thread From: Sven Utcke @ 2007-10-18 14:30 UTC (permalink / raw) To: help-gnu-emacs Hi, I like to use 10x20 as my font in Emacs, and never had any problem so far. However, here at my new employee I see weird interactions between font-lock and what might be a coding issue. If, e.g., I use "\bf" in a LaTeX-mode file (deprecated, I know :-) I instead see what looks roughtly like "¥bf" (it's actually a differently looking Yen-symbol, presumably from a different font). Any idea what could be the reason and how to debug this? I never before had any problem like this! This is GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-08-11 on yort.fnal.gov with hasgksssven>/.../utcke% echo $LANG en_US Any help appreciated Sven -- ___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __ / __| |/ / __| __| phone: +49 40 8998-5317 | \| __/ __\ \ / / | (_ | ' <\__ \__ \ fax : +49 40 8998-4203 | |) | _|\__ \\ V / \___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_| ^ permalink raw reply [flat|nested] 5+ messages in thread
* What font is this symbol in (was: weird font-lock / coding interaction) 2007-10-18 14:30 weird font-lock / coding interaction Sven Utcke @ 2007-10-22 9:38 ` Sven Utcke 2007-10-24 0:47 ` What font is this symbol in Tim X 2007-10-29 11:31 ` weird font-lock / coding interaction Xah Lee 1 sibling, 1 reply; 5+ messages in thread From: Sven Utcke @ 2007-10-22 9:38 UTC (permalink / raw) To: help-gnu-emacs Hi, I really would like to get this problem licked: > I like to use 10x20 as my font in Emacs, and never had any problem so > far. However, here at my new employee I see weird interactions > between font-lock and what might be a coding issue. If, e.g., I use > "\bf" in a LaTeX-mode file (deprecated, I know :-) I instead see what > looks roughtly like "¥bf" (it's actually a differently looking > Yen-symbol, presumably from a different font). So how do I debug this? More specifically, how do I find out from what font a particular symbol in an emacs-buffer is taken? Thanks Sven -- ___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __ / __| |/ / __| __| phone: +49 40 8998-5317 | \| __/ __\ \ / / | (_ | ' <\__ \__ \ fax : +49 40 8998-4203 | |) | _|\__ \\ V / \___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_| ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What font is this symbol in 2007-10-22 9:38 ` What font is this symbol in (was: weird font-lock / coding interaction) Sven Utcke @ 2007-10-24 0:47 ` Tim X 2007-10-29 9:40 ` Sven Utcke 0 siblings, 1 reply; 5+ messages in thread From: Tim X @ 2007-10-24 0:47 UTC (permalink / raw) To: help-gnu-emacs Sven Utcke <utcke+news@informatik.uni-hamburg.de> writes: > Hi, > > I really would like to get this problem licked: > >> I like to use 10x20 as my font in Emacs, and never had any problem so >> far. However, here at my new employee I see weird interactions >> between font-lock and what might be a coding issue. If, e.g., I use >> "\bf" in a LaTeX-mode file (deprecated, I know :-) I instead see what >> looks roughtly like "¥bf" (it's actually a differently looking >> Yen-symbol, presumably from a different font). > > So how do I debug this? More specifically, how do I find out from > what font a particular symbol in an emacs-buffer is taken? > For emacs 22, M-x describe-char should give you some relevant details. Tim ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What font is this symbol in 2007-10-24 0:47 ` What font is this symbol in Tim X @ 2007-10-29 9:40 ` Sven Utcke 0 siblings, 0 replies; 5+ messages in thread From: Sven Utcke @ 2007-10-29 9:40 UTC (permalink / raw) To: help-gnu-emacs Tim X <timx@nospam.dev.null> writes: > Sven Utcke <utcke+news@informatik.uni-hamburg.de> writes: > >> I like to use 10x20 as my font in Emacs, and never had any problem so > >> far. However, here at my new employee I see weird interactions > >> between font-lock and what might be a coding issue. If, e.g., I use > >> "\bf" in a LaTeX-mode file (deprecated, I know :-) I instead see what > >> looks roughtly like "¥bf" (it's actually a differently looking > >> Yen-symbol, presumably from a different font). > > > > So how do I debug this? More specifically, how do I find out from > > what font a particular symbol in an emacs-buffer is taken? > > For emacs 22, M-x describe-char should give you some relevant details. Alas, this is: GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) of 2006-08-11 on yort.fnal.gov Any ideas? Sven -- ___ _ _____ ___ Dr.-Ing. Sven Utcke ___ ___ _____ __ / __| |/ / __| __| phone: +49 40 8998-5317 | \| __/ __\ \ / / | (_ | ' <\__ \__ \ fax : +49 40 8998-4203 | |) | _|\__ \\ V / \___|_|\_\___|___/ http://www.desy.de/~utcke (to come)|___/|___|___/ |_| ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: weird font-lock / coding interaction 2007-10-18 14:30 weird font-lock / coding interaction Sven Utcke 2007-10-22 9:38 ` What font is this symbol in (was: weird font-lock / coding interaction) Sven Utcke @ 2007-10-29 11:31 ` Xah Lee 1 sibling, 0 replies; 5+ messages in thread From: Xah Lee @ 2007-10-29 11:31 UTC (permalink / raw) To: help-gnu-emacs On Oct 18, 7:30 am, Sven Utcke <utcke+n...@informatik.uni-hamburg.de> wrote: > Hi, > > I like to use 10x20 as my font in Emacs, and never had any problem so > far. However, here at my new employee I see weird interactions > between font-lock and what might be a coding issue. If, e.g., I use > "\bf" in a LaTeX-mode file (deprecated, I know :-) I instead see what > looks roughtly like "¥bf" (it's actually a differently looking > Yen-symbol, presumably from a different font). > > Any idea what could be the reason and how to debug this? I never > before had any problem like this! As Tim said, in emacs 22 you can just use “Ctrl+u Ctrl+x =”. (invokes what-cursor-position) If you don't have 22, prob better to just upgrade. Might solve your prob too. I was trying to write a code to print the font used anyway, not successful but migth give you a start. here's the doc: http://xahlee.org/elisp/Text-Properties.html here the code i started with (defun xx () (interactive) (insert ;(get-char-property (point) "face") (text-properties-at (point)) ) ) as a after thought, pasted below is the what-cursor-position source code from emacs 22. Xah xah@xahlee.org ∑ http://xahlee.org/ (defun what-cursor-position (&optional detail) "Print info on cursor position (on screen and within buffer). Also describe the character after point, and give its character code in octal, decimal and hex. For a non-ASCII multibyte character, also give its encoding in the buffer's selected coding system if the coding system encodes the character safely. If the character is encoded into one byte, that code is shown in hex. If the character is encoded into more than one byte, just \"...\" is shown. In addition, with prefix argument, show details about that character in *Help* buffer. See also the command `describe-char'." (interactive "P") (let* ((char (following-char)) (beg (point-min)) (end (point-max)) (pos (point)) (total (buffer-size)) (percent (if (> total 50000) ;; Avoid overflow from multiplying by 100! (/ (+ (/ total 200) (1- pos)) (max (/ total 100) 1)) (/ (+ (/ total 2) (* 100 (1- pos))) (max total 1)))) (hscroll (if (= (window-hscroll) 0) "" (format " Hscroll=%d" (window-hscroll)))) (col (current-column))) (if (= pos end) (if (or (/= beg 1) (/= end (1+ total))) (message "point=%d of %d (%d%%) <%d-%d> column=%d%s" pos total percent beg end col hscroll) (message "point=%d of %d (EOB) column=%d%s" pos total col hscroll)) (let ((coding buffer-file-coding-system) encoded encoding-msg display-prop under-display) (if (or (not coding) (eq (coding-system-type coding) t)) (setq coding default-buffer-file-coding-system)) (if (not (char-valid-p char)) (setq encoding-msg (format "(%d, #o%o, #x%x, invalid)" char char char)) ;; Check if the character is displayed with some `display' ;; text property. In that case, set under-display to the ;; buffer substring covered by that property. (setq display-prop (get-text-property pos 'display)) (if display-prop (let ((to (or (next-single-property-change pos 'display) (point-max)))) (if (< to (+ pos 4)) (setq under-display "") (setq under-display "..." to (+ pos 4))) (setq under-display (concat (buffer-substring-no-properties pos to) under-display))) (setq encoded (and (>= char 128) (encode-coding-char char coding)))) (setq encoding-msg (if display-prop (if (not (stringp display-prop)) (format "(%d, #o%o, #x%x, part of display \"%s\")" char char char under-display) (format "(%d, #o%o, #x%x, part of display \"%s\"->\"%s\")" char char char under-display display-prop)) (if encoded (format "(%d, #o%o, #x%x, file %s)" char char char (if (> (length encoded) 1) "..." (encoded-string-description encoded coding))) (format "(%d, #o%o, #x%x)" char char char))))) (if detail ;; We show the detailed information about CHAR. (describe-char (point))) (if (or (/= beg 1) (/= end (1+ total))) (message "Char: %s %s point=%d of %d (%d%%) <%d-%d> column=%d%s" (if (< char 256) (single-key-description char) (buffer-substring-no-properties (point) (1+ (point)))) encoding-msg pos total percent beg end col hscroll) (message "Char: %s %s point=%d of %d (%d%%) column=%d%s" (if enable-multibyte-characters (if (< char 128) (single-key-description char) (buffer-substring-no-properties (point) (1+ (point)))) (single-key-description char)) encoding-msg pos total percent col hscroll)))))) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-29 11:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-10-18 14:30 weird font-lock / coding interaction Sven Utcke 2007-10-22 9:38 ` What font is this symbol in (was: weird font-lock / coding interaction) Sven Utcke 2007-10-24 0:47 ` What font is this symbol in Tim X 2007-10-29 9:40 ` Sven Utcke 2007-10-29 11:31 ` weird font-lock / coding interaction Xah Lee
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.