[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cycle Org Shift Select
From: |
Noam Postavsky |
Subject: |
Re: Cycle Org Shift Select |
Date: |
Mon, 9 Nov 2020 14:12:43 -0500 |
On Fri, 6 Nov 2020 at 10:23, Christopher Dimech <dimech@gmx.com> wrote:
> I am a little concerned that (nconc Shftsel Shftsel) will continually
> append, rather than just cycle through the list.
I don't understand what you mean by "continually append", but your
code will never reach `always' because you have `nil' again after `t'.
It should be enough to just put `nil' after `always':
(defun Org-Shftsel-Cycle ()
;; Switches between options to org-support-shift-select
(interactive)
(setq org-support-shift-select
(cadr (memq org-support-shift-select '(nil t always nil)))))
You could also use a circular list which saves a cons cell (i.e.,
point back to the first `nil', instead of having an "extra" one at the
end):
'#1=(nil t always . #1#)
- Cycle Org Shift Select, Christopher Dimech, 2020/11/06
- Re: Cycle Org Shift Select,
Noam Postavsky <=
- Re: Cycle Org Shift Select, Michael Heerdegen, 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, Noam Postavsky, 2020/11/09
- Re: Cycle Org Shift Select, Michael Heerdegen, 2020/11/09
- Re: Cycle Org Shift Select, Noam Postavsky, 2020/11/09
- 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, Christopher Dimech, 2020/11/09
- Re: Cycle Org Shift Select, Noam Postavsky, 2020/11/09