[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Cycle Org Shift Select
From: |
Drew Adams |
Subject: |
RE: Cycle Org Shift Select |
Date: |
Tue, 10 Nov 2020 08:37:26 -0800 (PST) |
> (defun Org-Shftsel-Cycle ()
> (interactive)
> (setq org-support-shift-select
> (cadr (memq org-support-shift-select '(nil t always nil)))))
Elegant Lisp, IMO! A good idiom.
___
Slightly cuter: the last nil isn't needed, since (car nil) = nil.
(defvar toto nil)
(defun foo ()
(interactive)
(setq toto (cadr (memq toto '(nil t always))))
(message "NOW: %s" toto))
Of if you want to show also what'll come next:
(defun foo ()
(interactive)
(let ((xs '(nil t always))
next)
(setq toto (cadr (memq toto xs))
next (cadr (memq toto xs)))
(message "NOW: %s, NEXT: %s" toto next)))
- Re: Cycle Org Shift Select, (continued)
- Re: Cycle Org Shift Select, Christopher Dimech, 2020/11/09
- Re: Cycle Org Shift Select, Noam Postavsky, 2020/11/09
- Re: Cycle Org Shift Select, Michael Heerdegen, 2020/11/09
- Re: Cycle Org Shift Select, Christopher Dimech, 2020/11/09
- Re: Cycle Org Shift Select, Christopher Dimech, 2020/11/09
- Re: Cycle Org Shift Select, tomas, 2020/11/10
- Re: Cycle Org Shift Select, Christopher Dimech, 2020/11/10
- Re: Cycle Org Shift Select, Michael Heerdegen, 2020/11/10
RE: Cycle Org Shift Select,
Drew Adams <=
Re: Cycle Org Shift Select, Michael Heerdegen, 2020/11/09