* BUG-#+ Fontification @ 2009-05-28 20:28 Bernt Hansen 2009-05-28 21:43 ` Carsten Dominik 0 siblings, 1 reply; 13+ messages in thread From: Bernt Hansen @ 2009-05-28 20:28 UTC (permalink / raw) To: emacs-orgmode Hi Carsten, The following commit breaks fontification for #+ lines at the top of org files. bernt@gollum:~/git/org-mode$ git bisect good 476493d3b300b8dc379ea7e42c974461d6f3dfb5 is first bad commit commit 476493d3b300b8dc379ea7e42c974461d6f3dfb5 Author: Carsten Dominik <carsten.dominik@gmail.com> Date: Sat May 23 22:58:38 2009 +0200 Fontification: Better treatment of #+ lines and blocks The content of blocks like #+begin_example will be marked with a separate face. That same face is also used for single lines introducing text for specific backends. :040000 040000 e2e5414b39664d3a24ff4365d924e1925a1e9174 91dcbde55b4ee8a92c4222f556a0ca3dd5e139cb M lisp This commit and everything after shows #+STARTUP: and other lines in black. They were red before that. Is the face definition missing maybe? I forget how to check what face is active in Emacs for a specific character - I need to write that down the next time I relearn it :) -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 20:28 BUG-#+ Fontification Bernt Hansen @ 2009-05-28 21:43 ` Carsten Dominik 2009-05-28 21:47 ` Bernt Hansen 0 siblings, 1 reply; 13+ messages in thread From: Carsten Dominik @ 2009-05-28 21:43 UTC (permalink / raw) To: Bernt Hansen; +Cc: emacs-orgmode On May 28, 2009, at 10:28 PM, Bernt Hansen wrote: > Hi Carsten, > > The following commit breaks fontification for #+ lines at the top of > org > files. > > bernt@gollum:~/git/org-mode$ git bisect good > 476493d3b300b8dc379ea7e42c974461d6f3dfb5 is first bad commit > commit 476493d3b300b8dc379ea7e42c974461d6f3dfb5 > Author: Carsten Dominik <carsten.dominik@gmail.com> > Date: Sat May 23 22:58:38 2009 +0200 > > Fontification: Better treatment of #+ lines and blocks > > The content of blocks like #+begin_example will be marked with a > separate face. That same face is also used for single lines > introducing text for specific backends. > > :040000 040000 e2e5414b39664d3a24ff4365d924e1925a1e9174 > 91dcbde55b4ee8a92c4222f556a0ca3dd5e139cb M lisp > > > This commit and everything after shows #+STARTUP: and other lines in > black. They were red before that. > > Is the face definition missing maybe? I forget how to check what face > is active in Emacs for a specific character - I need to write that > down > the next time I relearn it :) C-u C-x = The face should be `org-meta-line' and is defined in org-faces. > > -Bernt > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 21:43 ` Carsten Dominik @ 2009-05-28 21:47 ` Bernt Hansen 2009-05-28 21:48 ` Bernt Hansen 0 siblings, 1 reply; 13+ messages in thread From: Bernt Hansen @ 2009-05-28 21:47 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Carsten Dominik <carsten.dominik@gmail.com> writes: > On May 28, 2009, at 10:28 PM, Bernt Hansen wrote: > >> Is the face definition missing maybe? I forget how to check what face >> is active in Emacs for a specific character - I need to write that >> down >> the next time I relearn it :) > > C-u C-x = > > The face should be `org-meta-line' and is defined in org-faces. Thanks! It is org-meta-line ... but I don't have an org-faces anywhere (function or variable). -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 21:47 ` Bernt Hansen @ 2009-05-28 21:48 ` Bernt Hansen 2009-05-28 22:10 ` Bernt Hansen 0 siblings, 1 reply; 13+ messages in thread From: Bernt Hansen @ 2009-05-28 21:48 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Bernt Hansen <bernt@norang.ca> writes: > Carsten Dominik <carsten.dominik@gmail.com> writes: > >> On May 28, 2009, at 10:28 PM, Bernt Hansen wrote: >> >>> Is the face definition missing maybe? I forget how to check what face >>> is active in Emacs for a specific character - I need to write that >>> down >>> the next time I relearn it :) >> >> C-u C-x = >> >> The face should be `org-meta-line' and is defined in org-faces. > > Thanks! It is org-meta-line ... but I don't have an org-faces anywhere > (function or variable). Okay I should spend 2 more seconds before replying... org-faces.el Face: org-meta-line (sample) (customize this face) Documentation: Face for meta lines startin with "#+". Defined in `org-faces.el'. Family: unspecified Width: unspecified Height: unspecified Weight: unspecified Slant: unspecified Foreground: unspecified Background: unspecified Underline: unspecified Overline: unspecified Strike-through: unspecified Box: unspecified Inverse: unspecified Stipple: unspecified Font or fontset: unspecified Inherit: unspecified [back] So that would probably be why it's all black for me :) -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 21:48 ` Bernt Hansen @ 2009-05-28 22:10 ` Bernt Hansen 2009-05-28 22:34 ` Nick Dokos 0 siblings, 1 reply; 13+ messages in thread From: Bernt Hansen @ 2009-05-28 22:10 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Bernt Hansen <bernt@norang.ca> writes: > Face: org-meta-line (sample) (customize this face) > Documentation: Face for meta lines startin with "#+". > Defined in `org-faces.el'. > > Family: unspecified > Width: unspecified > Height: unspecified > Weight: unspecified > Slant: unspecified > Foreground: unspecified > Background: unspecified > Underline: unspecified > Overline: unspecified > Strike-through: unspecified > Box: unspecified > Inverse: unspecified > Stipple: unspecified > Font or fontset: unspecified > Inherit: unspecified > > [back] > > So that would probably be why it's all black for me :) So to 'fix' this issue I customized the face and set Foreground to 'Firebrick' (red) which I think is what it used to look like. Should this face not have some default colouring defined? or are we supposed to customize it. That just jumped out at me as different from the default behaviour we used to have -- and is what prompted this thread. Sorry if I'm being a nuisance :) -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 22:10 ` Bernt Hansen @ 2009-05-28 22:34 ` Nick Dokos 2009-05-28 22:59 ` Bernt Hansen 2009-05-28 23:01 ` Bernt Hansen 0 siblings, 2 replies; 13+ messages in thread From: Nick Dokos @ 2009-05-28 22:34 UTC (permalink / raw) To: Bernt Hansen; +Cc: emacs-orgmode, Carsten Dominik Bernt Hansen <bernt@norang.ca> wrote: > Bernt Hansen <bernt@norang.ca> writes: > > > Face: org-meta-line (sample) (customize this face) > > Documentation: Face for meta lines startin with "#+". > > Defined in `org-faces.el'. > > > > Family: unspecified > > Width: unspecified > > Height: unspecified > > Weight: unspecified > > Slant: unspecified > > Foreground: unspecified > > Background: unspecified > > Underline: unspecified > > Overline: unspecified > > Strike-through: unspecified > > Box: unspecified > > Inverse: unspecified > > Stipple: unspecified > > Font or fontset: unspecified > > Inherit: unspecified > > > > [back] > > > > So that would probably be why it's all black for me :) > > So to 'fix' this issue I customized the face and set Foreground to > 'Firebrick' (red) which I think is what it used to look like. Should > this face not have some default colouring defined? or are we supposed to > customize it. That just jumped out at me as different from the default > behaviour we used to have -- and is what prompted this thread. > It *is* initialized: ,---- | (defface org-meta-line | (org-compatible-face 'font-lock-comment-face nil) <-------- | "Face for meta lines startin with \"#+\"." | :group 'org-faces | :version "22.1") `---- It should look like a comment - but you may have defined the face somehow and the macrology might be incapable of redefining it. Have you tried restarting emacs? Nick ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 22:34 ` Nick Dokos @ 2009-05-28 22:59 ` Bernt Hansen [not found] ` <8298.1243566088@gamaville.dokosmarshall.org> 2009-05-28 23:01 ` Bernt Hansen 1 sibling, 1 reply; 13+ messages in thread From: Bernt Hansen @ 2009-05-28 22:59 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode, Carsten Dominik Nick Dokos <nicholas.dokos@hp.com> writes: > Bernt Hansen <bernt@norang.ca> wrote: > >> Bernt Hansen <bernt@norang.ca> writes: >> >> > Face: org-meta-line (sample) (customize this face) >> > Documentation: Face for meta lines startin with "#+". >> > Defined in `org-faces.el'. >> > >> > Family: unspecified >> > Width: unspecified >> > Height: unspecified >> > Weight: unspecified >> > Slant: unspecified >> > Foreground: unspecified >> > Background: unspecified >> > Underline: unspecified >> > Overline: unspecified >> > Strike-through: unspecified >> > Box: unspecified >> > Inverse: unspecified >> > Stipple: unspecified >> > Font or fontset: unspecified >> > Inherit: unspecified >> > >> > [back] >> > >> > So that would probably be why it's all black for me :) >> >> So to 'fix' this issue I customized the face and set Foreground to >> 'Firebrick' (red) which I think is what it used to look like. Should >> this face not have some default colouring defined? or are we supposed to >> customize it. That just jumped out at me as different from the default >> behaviour we used to have -- and is what prompted this thread. >> > > It *is* initialized: > > ,---- > | (defface org-meta-line > | (org-compatible-face 'font-lock-comment-face nil) <-------- > | "Face for meta lines startin with \"#+\"." > | :group 'org-faces > | :version "22.1") > `---- > > It should look like a comment - but you may have defined the face > somehow and the macrology might be incapable of redefining it. Have you > tried restarting emacs? Yes - I started a minimal emacs session to isolate the commit where it turns black. -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <8298.1243566088@gamaville.dokosmarshall.org>]
* Re: BUG-#+ Fontification [not found] ` <8298.1243566088@gamaville.dokosmarshall.org> @ 2009-05-29 5:33 ` Nick Dokos 2009-05-29 7:40 ` Carsten Dominik 2009-05-29 11:14 ` Bernt Hansen 0 siblings, 2 replies; 13+ messages in thread From: Nick Dokos @ 2009-05-29 5:33 UTC (permalink / raw) To: Bernt Hansen; +Cc: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> wrote: > Bernt Hansen <bernt@norang.ca> wrote: > > > Nick Dokos <nicholas.dokos@hp.com> writes: > > > > > Bernt Hansen <bernt@norang.ca> wrote: > > > > ... > > >> > > >> So to 'fix' this issue I customized the face and set Foreground to > > >> 'Firebrick' (red) which I think is what it used to look like. Should > > >> this face not have some default colouring defined? or are we supposed to > > >> customize it. That just jumped out at me as different from the default > > >> behaviour we used to have -- and is what prompted this thread. > > >> > > > > > > It *is* initialized: > > > > > > ,---- > > > | (defface org-meta-line > > > | (org-compatible-face 'font-lock-comment-face nil) <-------- > > > | "Face for meta lines startin with \"#+\"." > > > | :group 'org-faces > > > | :version "22.1") > > > `---- > > > > > > It should look like a comment - but you may have defined the face > > > somehow and the macrology might be incapable of redefining it. Have you > > > tried restarting emacs? > > > > Yes - I started a minimal emacs session to isolate the commit where it > > turns black. > > There seems to be an initialization problem of some sort: in my > currently running session I evaluate the following two forms and get the > results shown: > > ,---- > | (get 'org-meta-line 'face-defface-spec) > | ((t :inherit font-lock-comment-face)) > | > | (symbol-plist 'org-meta-line) > | (face 102 face-defface-spec ((t :inherit font-lock-comment-face)) > | face-documentation "Face for meta lines startin with \"#+\"." custom-version "22.1") > `---- > > This instance of emacs was created by the Gnome session manager. If I > start another instance by clicking on the Emacs icon/menu item/etc. I > get the same behavior. > > But if I open an xterm (or start a shell in emacs) and start another > instance from the command line, I get the following: > > ,---- > | (get 'org-meta-line 'face-defface-spec) > | nil > | > | (symbol-plist 'org-meta-line) > | (face 101 face-defface-spec nil > | face-documentation "Face for meta lines startin with \"#+\"." custom-version "22.1") > `---- > > I don't know what causes this difference in behavior. > Well, duh: because of my PATH, I was getting emacs 22 from the command line, but emacs 23 from the panel/menu - no wonder there is a difference. OTOH, this was stupidity with a purpose :-) The upshot is that org-compatible-face does not deal with emacs 22 gracefully, since the first two clauses of the cond fail there and so it takes the default branch; but since specs is nil in the call, the function returns nil. Bernt, you are on emacs 22, correct? One of the emacs-major-version vs. 22 comparisons should probably include equality (from the description, I suspect the first one): ,---- | (defun org-compatible-face (inherits specs) | "Make a compatible face specification. | If INHERITS is an existing face and if the Emacs version supports it, | just inherit the face. If not, use SPECS to define the face. | XEmacs and Emacs 21 do not know about the `min-colors' attribute. | For them we convert a (min-colors 8) entry to a `tty' entry and move it | to the top of the list. The `min-colors' attribute will be removed from | any other entries, and any resulting duplicates will be removed entirely." | (cond | ((and inherits (facep inherits) | (not (featurep 'xemacs)) (> emacs-major-version 22)) | ; ^ | ; ^--- this should probably be >= | | ;; In Emacs 23, we use inheritance where possible. | ;; We only do this in Emacs 23, because only there the outline | ;; faces have been changed to the original org-mode-level-faces. | (list (list t :inherit inherits))) | ((or (featurep 'xemacs) (< emacs-major-version 22)) | ;; These do not understand the `min-colors' attribute. | (let (r e a) | (while (setq e (pop specs)) | (cond | ((memq (car e) '(t default)) (push e r)) | ((setq a (member '(min-colors 8) (car e))) | (nconc r (list (cons (cons '(type tty) (delq (car a) (car e))) | (cdr e))))) | ((setq a (assq 'min-colors (car e))) | (setq e (cons (delq a (car e)) (cdr e))) | (or (assoc (car e) r) (push e r))) | (t (or (assoc (car e) r) (push e r))))) | (nreverse r))) | (t specs))) `---- Thanks, Nick ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-29 5:33 ` Nick Dokos @ 2009-05-29 7:40 ` Carsten Dominik 2009-05-29 11:35 ` Bernt Hansen 2009-05-29 14:20 ` Nick Dokos 2009-05-29 11:14 ` Bernt Hansen 1 sibling, 2 replies; 13+ messages in thread From: Carsten Dominik @ 2009-05-29 7:40 UTC (permalink / raw) To: nicholas.dokos; +Cc: Bernt Hansen, emacs-orgmode On May 29, 2009, at 7:33 AM, Nick Dokos wrote: > Well, duh: because of my PATH, I was getting emacs 22 from the > command line, > but emacs 23 from the panel/menu - no wonder there is a difference. > > OTOH, this was stupidity with a purpose :-) The upshot is that > org-compatible-face does not deal with emacs 22 gracefully, since the > first two clauses of the cond fail there and so it takes the default > branch; but since specs is nil in the call, the function returns > nil. Hi Nick, thank you once again for the fast and excellent analysis of this bug - this might have taken me a lot of time to figure out. I have pushed a fix for this problem that at least does help on Emacs 22 - it will not work correctly under XEmacs. There will be a fix for XEmacs as well, but I need to think more about how to adress this. Thanks. - Carsten ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-29 7:40 ` Carsten Dominik @ 2009-05-29 11:35 ` Bernt Hansen 2009-05-29 14:20 ` Nick Dokos 1 sibling, 0 replies; 13+ messages in thread From: Bernt Hansen @ 2009-05-29 11:35 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Carsten Dominik <carsten.dominik@gmail.com> writes: > Hi Nick, > > thank you once again for the fast and excellent analysis of this > bug - this might have taken me a lot of time to figure out. > > I have pushed a fix for this problem that at least does help on > Emacs 22 - it will not work correctly under XEmacs. There will > be a fix for XEmacs as well, but I need to think more about how > to adress this. > > Thanks. This both. This fixes the problem I was seeing. I've removed my face customization again and I'm back to the default settings. Regards, Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-29 7:40 ` Carsten Dominik 2009-05-29 11:35 ` Bernt Hansen @ 2009-05-29 14:20 ` Nick Dokos 1 sibling, 0 replies; 13+ messages in thread From: Nick Dokos @ 2009-05-29 14:20 UTC (permalink / raw) To: Carsten Dominik; +Cc: emacs-orgmode Carsten Dominik <carsten.dominik@gmail.com> wrote: > thank you once again for the fast and excellent analysis of this > bug - this might have taken me a lot of time to figure out. > Glad to help. Nick ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-29 5:33 ` Nick Dokos 2009-05-29 7:40 ` Carsten Dominik @ 2009-05-29 11:14 ` Bernt Hansen 1 sibling, 0 replies; 13+ messages in thread From: Bernt Hansen @ 2009-05-29 11:14 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode Nick Dokos <nicholas.dokos@hp.com> writes: > > Well, duh: because of my PATH, I was getting emacs 22 from the command line, > but emacs 23 from the panel/menu - no wonder there is a difference. > > OTOH, this was stupidity with a purpose :-) The upshot is that > org-compatible-face does not deal with emacs 22 gracefully, since the > first two clauses of the cond fail there and so it takes the default > branch; but since specs is nil in the call, the function returns > nil. > > Bernt, you are on emacs 22, correct? > Yes I'm on emacs 22 (Debian) GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-11-09 on raven, modified by Debian Thanks for figuring this out :) -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: BUG-#+ Fontification 2009-05-28 22:34 ` Nick Dokos 2009-05-28 22:59 ` Bernt Hansen @ 2009-05-28 23:01 ` Bernt Hansen 1 sibling, 0 replies; 13+ messages in thread From: Bernt Hansen @ 2009-05-28 23:01 UTC (permalink / raw) To: nicholas.dokos; +Cc: emacs-orgmode, Carsten Dominik Nick Dokos <nicholas.dokos@hp.com> writes: > It *is* initialized: > > ,---- > | (defface org-meta-line > | (org-compatible-face 'font-lock-comment-face nil) <-------- > | "Face for meta lines startin with \"#+\"." > | :group 'org-faces > | :version "22.1") > `---- > > It should look like a comment - but you may have defined the face > somehow and the macrology might be incapable of redefining it. Have you > tried restarting emacs? Btw this is the first time I've every messed with face colouring in emacs. I've always just used the default settings before since they were fine. -Bernt ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-05-29 14:22 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-05-28 20:28 BUG-#+ Fontification Bernt Hansen 2009-05-28 21:43 ` Carsten Dominik 2009-05-28 21:47 ` Bernt Hansen 2009-05-28 21:48 ` Bernt Hansen 2009-05-28 22:10 ` Bernt Hansen 2009-05-28 22:34 ` Nick Dokos 2009-05-28 22:59 ` Bernt Hansen [not found] ` <8298.1243566088@gamaville.dokosmarshall.org> 2009-05-29 5:33 ` Nick Dokos 2009-05-29 7:40 ` Carsten Dominik 2009-05-29 11:35 ` Bernt Hansen 2009-05-29 14:20 ` Nick Dokos 2009-05-29 11:14 ` Bernt Hansen 2009-05-28 23:01 ` Bernt Hansen
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.