[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unintended consequences of removing org-speed-commands-user
From: |
dal-blazej |
Subject: |
Re: Unintended consequences of removing org-speed-commands-user |
Date: |
Sun, 28 Nov 2021 13:15:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) |
Hi,
If you want to insert a new element in the list after a particular
element, you could do :
#+begin_src emacs-lisp
(let ((bk (cdr (member '("Agenda Views etc") org-speed-commands))))
(setf (cdr (member '("Agenda Views etc") org-speed-commands))
(cons '("@" . my-foobarized-speed-command) bk)))
#+end_src
Use append to insert a list of new elements instead of one.
Also simply add a new list at the end, use append :
#+begin_src emacs-lisp :results code
(setq org-speed-commands
(append org-speed-commands '(("my foo commands!")
("@" . my-foobarized-speed-command)
("&" . my-barfooized-speed-command))))
#+end_src
However if you define many new commands, simply redefining the whole
list is simpler ;)