Questions tagged [keywords]
The keywords tag has no usage guidance.
Does `:` as the first character of a symbol name have a special meaning?
If I run (plist-get '(A 4 B 3) 'B) I get 3 as expected. I understand that I must quote B, otherwise (plist-get '(A 4 B 3) B) causes an error: elisp--eval-last-sexp: Symbol’s value as variable ...
How to check if a symbol is a keyword?
Values typically passed as property keys are typed symbol, eg: (type-of :test) => symbol However symbol type also covers t, nil end 'test. Is there a convenient way to check for a colon prefixed ...
What does “:” mean in elisp?
Does the : have a special meaning in Elisp? (define-minor-mode dap-mode "Global minor mode for DAP mode." :init-value nil :group 'dap-mode :...
What is the difference between Workflow states vs Types in org-mode?
In org-mode, what is the difference between TODO workflow states and TODO types? They looks and seems the same. Here's a simple workflow states: (setq org-todo-keywords '((sequence &...
Adding new keywords delimeters
I am new to the Emacs (Doom Emacs to be precise) scene, and recently I came up with a minor mode that could come in handy for me so I decided to implement it. To achieve the full functionality of my ...
Defining a function that takes keyword arguments and a variable number of positional ones
I want to define a function that takes both keyword arguments (as in &key) and a variable number of positional ones (&rest). They should be independent of each other, the keyword list should ...
How to use keyword symbols in Emacs Lisp?
According to Symbol Type A symbol whose name starts with a colon (‘:’) is called a keyword symbol. These symbols automatically act as constants, and are normally used only by comparing an unknown ...
How to raise an error when unrecogized keyword arguments are passed to a function?
With a function that uses keyword arguments using this style of function definition: (defun some-name (&rest kwargs) (plist-get kwargs 'example)) Is there a convenient way to ensure only ...
Inline elements of variable list value in rx() macro call [duplicate]
Is there a more compact way to make use of the rx macro in cases where we want to inline a list of strings from a variable? Such as (defconst c++20-new-keywords-list (list "char8_t" "import" ...
Loading new agenda keywords (org-todo-keywords) is broken for me - bug in Emacs?
Objective I decided to add custom agenda keywords (I'm still setting up the environment, don't have any agenda files yet) and I used this example code from some tutorial: (setq org-todo-keywords ...
Is there a canonical way to convert a keyword to a symbol with no :?
I want to convert keywords, e.g. :some-key to a plain symbol like some-key. I currently do this with: (intern-soft (substring (symbol-name :some-key) 1)) Is there a better way?
Use of keyword symbols in property lists
According to the Emacs Lisp manual http://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Type.html A symbol whose name starts with a colon (‘:’) is called a keyword symbol. These ...