0

I’ve been having problems with elisp debugging lately.

I restarted emacs and problems appear to have disappeared. But I noticed something else: all of the In-buffer settings, e.g.

#+BEGIN_QUOTE

#+END_QUOTE

now appear on a very small courier font, instead of the default Monaco. (They used to be Monaco.)

Do you know how I can get back to the old font settings?

I had code for auto-insert-alist and code for yasnippet in my .emacs and I commented them out, but that did not help.

Time stamps and text in tables also chenged to Courier.

This happens only in org-mode.


Font definition in org-faces.el

(defface org-meta-line '((t :inherit (fixed-pitch font-lock-comment-face)))
  "Face for meta lines starting with \"#+\"."
  :group 'org-faces
  :version "22.1")

This is the result of starting emacs with ~% emacs -Q:

~ % emacs -Q                                             
2022-09-09 21:57:33.056 Emacs-x86_64-10_14[43886:27045992] 

It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out.  

If you are implementing the view's -layout method, you can call -[super layout] instead. 

Break on void _NSDetectedLayoutRecursion(void) to debug.  

This will be logged only once.  

This may break in the future.

C-u C-x =:

             position: 5 of 85 (5%), column: 4
            character: T (displayed as T) (codepoint 84, #o124, #x54)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x54
               script: latin
               syntax: w    which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 54" or "C-x 8 RET LATIN CAPITAL LETTER T"
          buffer code: #x54
            file code: #x54 (encoded by coding system undecided-unix)
              display: by this font (glyph code):
    mac-ct:-*-Courier-normal-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x37)

Character code properties: customize what to show
  name: LATIN CAPITAL LETTER T
  general-category: Lu (Letter, Uppercase)
  decomposition: (84) ('T')

There are text properties here:
  face                 org-meta-line
  font-lock-fontified  t
  fontified            t

M-: (face-at-point):

org-meta-line

M-x describe-face:

Face: org-meta-line (sample) (customize this face)

Documentation:
Face for meta lines starting with "#+".

Defined in ‘org-faces.el’.


           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: unspecified
            Slant: unspecified
       Foreground: unspecified
DistantForeground: unspecified
       Background: unspecified
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
           Extend: unspecified
          Inherit: (fixed-pitch font-lock-comment-face)

  This face was introduced, or its default value was changed, in
  version 22.1 of Emacs.
zeynel
  • 129
  • 8
  • Time stamps and text in tables also chenged to Courier – zeynel Sep 09 '22 at 18:37
  • If this is specific to Org mode then please add that tag. If it's not then maybe provide more general info, as the info you provide seems specific to Org mode. – Drew Sep 09 '22 at 18:42
  • Don't add relevant info in a comment - put it in the question. – Drew Sep 09 '22 at 18:43
  • Do you see the same problem if you start Emacs with `emacs -Q` (no init file)? If so, can you provide a step-by-step recipe to reproduce it, from `emacs -Q`? – Drew Sep 09 '22 at 18:43
  • @Drew Yes, I still see the small courier font for date stamps, tables and anything starting with `#+`. I updated the question with the result from the terminal. – zeynel Sep 09 '22 at 19:06
  • 1
    Start with `emacs -Q`, open an Org mode file that exhibits the problem, place your cursor on one of the problematic characters, say `C-u C-x =` and paste the result into your question literally. With the cursor at the same point, say `M-: (face-at-point)` and paste *that* into your question. Then say `M-x describe-face` and enter the face you got previously - then paste the results of that into your question. – NickD Sep 09 '22 at 22:03
  • What @NickD said. It sounds like you just need to customize the face to be one that you like, and that its default setting is something you don't like (e.g. too small). This would then be a duplicate question, no doubt: (1) how to know what face(s) are used on some text or (2) how to customize a face. If that's the case, please delete the question. Thx. – Drew Sep 09 '22 at 22:43
  • @NickD Thanks. I added the results to the question. It says `Face for meta lines starting with "#+". Defined in ‘org-faces.el’.` But I could not find this file. – zeynel Sep 10 '22 at 05:08
  • @Drew I didn't make any changes regarding fonts. I'm curious to know why this happenned. @NickD's comments contains valuable information. So, I'm puzzled why you asked me to delete the question without resolving the issue. Those meta lines, inherited the default font and size but they were gray in color. It seems that the behavior of meta lines are defined in `org-faces.el` but I could not find that file. – zeynel Sep 10 '22 at 05:17
  • When I search for the file `org-faces.el` the file is not found and I get this message `error in process sentinel: Wrong type argument: integer-or-marker-p, nil [2 times]` – zeynel Sep 10 '22 at 07:42
  • 1
    Please reread what I wrote. I said IF it's the case that this is a duplicate question then please delete it. It's not necessarily about font changes _you_ made. Perhaps Org has redefined the default appearance of some face, and you don't like that change, but you can customize that face to get whatever you like. Etc. – Drew Sep 10 '22 at 16:54
  • 2
    If you can't find a library that some of the code you use needs, and you're using `emacs -Q`, then the fault is in some standard library. A wild guess is that you somehow have a non-vanilla version of Org, which is missing that library. Just be clear with all of your testing and reporting that you're using `emacs -Q`; otherwise, all bets are off (and in that case you need to bisect your init file). – Drew Sep 10 '22 at 16:56
  • 1
    In the output of `M-x describe-face RET org-meta-line`, the filename `org-faces.el` should be a link. Try clicking on it and see if it takes you there. – NickD Sep 11 '22 at 02:41
  • @NickD Great, thanks. I opened the file. It’s a long file with font definitions for org-mode. I copied the definition for meta lines to my question. As far as I understand, the font for meta lines is supposed to inherit the default font, but it doesn't. It used to, but now it doesn't. – zeynel Sep 11 '22 at 08:43
  • @NickD I also did the same procedure starting with `emacs -Q` on another machine (Macbook Pro). In this machine, meta lines are in the same font as the default font but they are grayed out a little. (This is how it was in my machine too.) The font definitions for meta lines in both machines are same. I don’t know if all these make any sense. – zeynel Sep 11 '22 at 08:45
  • 1
    It seems to be a bug. The `fixed-pitch` inherirtance was introduced with commit [667cb6f1aeac330272d55cd2b8849ef75bf7e685](https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=667cb6f1aeac330272d55cd2b8849ef75bf7e685) into Org mode and it was reverted with [8aff825682f75c2e889ba02a8bd5e2fbf7778009](https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8aff825682f75c2e889ba02a8bd5e2fbf7778009), in both cases without any explanation in the commits, so I don't know anything more about it. There might have been some discussion on the ML, but I have not searched for it. – NickD Sep 12 '22 at 02:20
  • 1
    Actually, the original commit contains a [link to the explanation](https://list.orgmode.org/875z8njaol.fsf@protesilaos.com/). The revert commit does not, but it seems that the original commit created some unforeseen problems. – NickD Sep 12 '22 at 02:23
  • Very interesting. So, are these upgrades automatic? Because I don't think I upgraded recently. – zeynel Sep 12 '22 at 14:25
  • 1
    No, you seem to have a version of Org mode that came after the original commit (2021-04-27) and before the revert (2022-04-19). I would upgrade. – NickD Sep 12 '22 at 16:15
  • Ok. So I'll try Homebrew `brew install --cask emacs`. After installation do I need to do anything in my `.emacs` file? I have version 28.1. – zeynel Sep 12 '22 at 16:45

0 Answers0