2

I'm trying to modify some face attributes in the buffer that appears when the org-agenda command is called. This buffer displays *Agenda Commands* and Fundamental (mode) in the mode line. I've tried modifying fundamental-mode face attributes but to no avail. Also, I can't seem to run the what-cursor-position function (i.e., C-u C-x =) like I normally would to find out more information regarding buffer properties--any one keystroke closes this buffer.

What properties is this buffer calling on?

  • 1
    Type M-x find-function RET org-agenda-get-restriction-and-command RET after first having loaded the org-agenda.el library. The text-properties are hard-coded. You can use the same type of procedure as in a recent thread of yours -- e.g., (require 'org-agenda) (defun org-agenda-get-restriction-and-command (prefix-descriptions) . . . ) to modify the substantive components of the function (if you so choose). Alternatively, you can adjust the faces globally or buffer locally for the faces currently being used by said function -- same methods as indicated in the recent thread of yours. – lawlist Jun 8 '15 at 20:32
  • That's just what I needed. Thanks, @lawlist! – kgo Jun 8 '15 at 20:39
  • @lawlist: Please post it as an answer. OP: if this answer is satisfactory, please consider accepting it (once posted), so that the question no longer appears in the list of unanswered questions. – Drew Jun 8 '15 at 22:13
  • M-x find-face-definition org-agenda-anything – Jordon Biondo Jun 9 '15 at 13:53
1

The primary function responsible for creating the *Agenda Commands* buffer is located within the org-agenda.el library, and is called org-agenda-get-restriction-and-command. The function at issue can be found in the source code by typing M-x find-function RET org-agenda-get-restriction-and-command RET after first having loaded the org-agenda.el library -- e.g., M-x eval-expression RET (require 'org-agenda) RET. The text-properties for the faces are hard-coded.

If the original poster decides to modify the function directly, the function can be copied and pasted to the .emacs file with a preceding require statement for the library where the original function is located. Although the internal workings of the function may be modified by the original poster, the original function will maintain its original name -- e.g., (require 'org-agenda) (defun org-agenda-get-restriction-and-command (prefix-descriptions) . . . ).

Options include, but are not limited to, hard-coding different faces defined by the original poster, changing the global settings for the existing faces used by the function, or including code to use the existing faces on a buffer-local basis (with different attributes) with something like face-remap-add-relative, the documentation for which is at the following link: http://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Remapping.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.