From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: Cycle Org Shift Select Date: Mon, 9 Nov 2020 14:12:43 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9950"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 09 20:13:55 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcCbz-0002Vb-3Q for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Nov 2020 20:13:55 +0100 Original-Received: from localhost ([::1]:50720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcCby-0001T1-5l for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 09 Nov 2020 14:13:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcCb9-0001So-5w for help-gnu-emacs@gnu.org; Mon, 09 Nov 2020 14:13:03 -0500 Original-Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:44893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcCb7-0005mr-JA for help-gnu-emacs@gnu.org; Mon, 09 Nov 2020 14:13:02 -0500 Original-Received: by mail-oi1-x233.google.com with SMTP id t16so11371897oie.11 for ; Mon, 09 Nov 2020 11:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BN8d9kVmQpYrpALcSBQoT9CM/ccrvECT5LShc0t0TXI=; b=uEG52XUSx76Y8OXSfSZvBbaFFLdEj3evtU8YHgpoECG4Sb7YpG+UxLnx6qtH1p8Xe5 t4OBkEsBSPcgI9O666ajkbnjnLOSbTOQzw/L/9hTK/R1eYLclO2O007YZpTEkffkvFUM fZfQAHtTqtrLGq4FckWUQMYVCKSkvMMjeKhlZoJAJwvt0JO3X72tYGc4TfmYGfErP3RI H3Lpd0tqSB4+OEuXicneag7QSRdU0jNtB2OEJWiiTQLDj589PO+0FJd3iqAnV++4x0iH M9RRGVMy5xeZPt0IAZ2wIWMh8/TN8sUry/+dIrjMnkZkSznS36wU+dh8DHQyu2hCpI/I a1cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BN8d9kVmQpYrpALcSBQoT9CM/ccrvECT5LShc0t0TXI=; b=l+BYfTnZPTLiqEf5JdV+1A12332TcMTEuwMmD8dtP9zbyarbjcBtQsS5o2kokfx4bA nC5nlqbJAFNVxRgkvUsk+ua5xUNVb6qL4A3NDPJZ5af5jCycIDzww7vJnQxyWxN76BwY Ajae/fr+r3oo5ru1fK/gWfLuwiePkJUJsDF5nXDpmBumw8TzEknGsgYyyc7Eb4GJBGRv UpypUkQe5ezCGB0AFs5aLPRCN7mCCUF1Zo/oRcUEWISEHycoidLTNUP9aLN4kTJ+Vx2m gG6FfC9UZ+G1kO+70erWOy6LdGV5ZW9e/+GgMDoXrmSSI/5GssTQYf+1g+D++hd6zA2w Uyqg== X-Gm-Message-State: AOAM532WtAO5t0cAPuNfnLbDkG6CEqdPqPyse7Llr8gLtp3znB54rnqR nZtLb6w5j9YbmcJQucFQ9nRgId1t2e5as52sIuE= X-Google-Smtp-Source: ABdhPJwDmbWM9YpM/3YPnIKFwrC3QwlZlvUYBv4Ha60jpKEuuH435gR+QiWugtT9rRNmGQrvhCqrUN22sOJSCcGyqjk= X-Received: by 2002:aca:548e:: with SMTP id i136mr422320oib.177.1604949179700; Mon, 09 Nov 2020 11:12:59 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=npostavs@gmail.com; helo=mail-oi1-x233.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125139 Archived-At: On Fri, 6 Nov 2020 at 10:23, Christopher Dimech 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#)