4
votes
Advantages of setting variables with setq instead of custom.el?
Emacs 29 introduced a macro, setopt, for setting options outside of the customization interface. Like Drew explained, setq doesn't work right for options that use :set: for example try (setq show-...
3
votes
How to print and read a list to(from) a file?
(insert (format "%s" sample-list))
C-hf format tells you:
%s means produce [...] any object with ‘princ’.
%S means produce any object as an s-expression (using ‘prin1’).
See C-hig (elisp)...
1
vote
How do I get the name (string) of a compiled function?
Not sure when this became possible but there is now an built in emacs function to get the name of a compiled function called subr-name
This can be used for conditionals as OP was looking for. For ...
1
vote
display in the mode-line the number of characters in the selection
I ended up making my own function, I will leave it here in case anyone is interested in the future:
(defun mode-line-region-chars (prefix middle subfix)
(if (use-region-p)
(let ((characters (...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
elisp × 414elisp-macros × 24
functions × 23
org-mode × 18
hooks × 15
variables × 13
init-file × 12
files × 10
regular-expressions × 9
lexical-scoping × 9
key-bindings × 8
debugging × 8
string × 8
list × 7
text-properties × 7
quote × 7
symbols × 7
common-lisp × 7
buffers × 6
package × 6
window × 6
major-mode × 6
comment × 6
byte-compilation × 6
advice × 6