I'm trying to use a fixed width font when in org-mode
's column view (I use variable width font otherwise). Customizing the org-column
face attribute doesn't seem to do it. How can I get this to work?
There's some related discussion out there (referenced in Org-mode FAQs), but it doesn't seem to help my situation. I'm thinking this excerpt from the documentation is the key, but I'm not sure how.
Face: org-column (sample) (customize this face)
Documentation: Face for column display of entry properties. This is actually only part of the face definition for the text in column view. The following faces apply, with this priority.
The color of the reference face. This is normally the level fact that is used in the outline. In agenda-mode, it will be the face of the first character in the line. The color is explicitly retained to make sure that the column line still looks a bit like the structure line it is masking.
The `org-column' face.
The remaining properties of the reference face.
Since column view works by putting overlays with a display property over individual characters in the buffer, the face of the underlining character (this might for example be the a TODO keyword) might still shine through in some properties. So when your column view looks funny, with "random" colors, weight, strike-through, try to explicitly set the properties in the `org-column' face. For example, set :underline to nil, or the :slant to `normal'.
Under XEmacs, the rules are simpler, because the XEmacs version of column view defines special faces for each outline level. See the file `org-colview-xemacs.el' in Org's contrib/ directory for details.
Defined in `org-faces.el'.
Family: Lucida Console Foundry: unspecified Width: unspecified Height: 120 Weight: normal Slant: normal Foreground: unspecified DistantForeground: unspecified Background: grey90 Underline: nil Overline: unspecified Strike-through: nil Box: unspecified Inverse: unspecified Stipple: unspecified Font: unspecified Fontset: unspecified Inherit: unspecified
If it helps, I'm running Emacs 24.5 windows version on Mac OS X.
EDIT
When I call the function that has the default keybinding C-u C-x =
(I don't know the function's name) with my point in the org-column
view region I get the following (excerpt):
There is an overlay here:
From 24 to 25
display [Show] face ((:foreground unspecified) (:height 120 :family >"Helvetica") org-agenda-column-dateline org-agenda-date-today) keymap [Show] line-prefix "" org-columns-format "%-70.70s | " org-columns-key "ITEM" org-columns-pom nil org-columns-value "Saturday 6 June 2015" org-columns-value-modified "Saturday 6 June 2015" wrap-prefix ""
Where does emacs invoke this overlay? It looks like it's calling the Helvetica font family in the face
--this is precisely what I'm trying to prevent. I believe this is what is overruling the Lucida Console family that I defined for the org-column
face (above).
org-agenda-mode-hook
withface-remap-add-relative
: emacs.stackexchange.com/a/7283/2287 And, you'll need to add some conditions if you only want it to apply to certain org-agenda buffers (but not all). Here is another example using a hook for an unrelated mode: stackoverflow.com/a/28008006/2112489(add-hook 'org-agenda-mode-hook ...)
) to call an interactive function to edit thebuffer-face-mode-face
variable. For specific characteristics of a mode (e.g.,'org-table
), I use(set-face-attribute 'org-table nil :foreground ...)
. For the issue at hand, I edited my original post to help clarify my question. I think the 'overlay' emacs adds is my problem and I'd like to find out how to edit that.C-u C-x =
-- that will to you what faces, text properties and overlays are present. You can then proceed to alter those characteristics as you desire. The aforementioned keyboard shortcut is running the functionwhat-cursor-position
-- the prefix argument causes additional details to be displayed. You may also want to consider looking at the'default
face for the entire buffer.'default
face is being used here and the function responsible for that behavior isorg-columns-display-here
. If you decide that this is the case, then consider creating a new function with the exact same name and modifying it to suit your needs -- you will want to precede your new function with the same name by arequire
statement so that you can redefine it -- i.e.,(require 'org-colview) (defun org-columns-display-here (&optional props dateline) . . .
:)