From mboxrd@z Thu Jan 1 00:00:00 1970 From: Renato Ferreira Subject: [PATCH] org.el (org-todo): Respect state argument when called from elisp Date: Fri, 16 Aug 2019 11:44:38 -0300 Message-ID: <87imqxywno.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:54718) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hydrG-0002kX-0N for emacs-orgmode@gnu.org; Fri, 16 Aug 2019 11:09:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hydrF-0001NX-1J for emacs-orgmode@gnu.org; Fri, 16 Aug 2019 11:09:37 -0400 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:33744) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hydrE-0001MC-TW for emacs-orgmode@gnu.org; Fri, 16 Aug 2019 11:09:36 -0400 Received: by mail-qt1-x841.google.com with SMTP id v38so6473855qtb.0 for ; Fri, 16 Aug 2019 08:09:36 -0700 (PDT) Received: from note (179-96-155-209.life.com.br. [179.96.155.209]) by smtp.gmail.com with ESMTPSA id l80sm3105415qke.24.2019.08.16.08.09.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Aug 2019 08:09:34 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode (org-todo): Fast selection should only be shown if a state argument was not used * list/org.el (org-todo): Respect argument when called from elisp when calling from elisp (such as in `org-clock-in'). TINYCHANGE --- lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 2451273e0..1b91adc18 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10100,9 +10100,6 @@ When called through ELisp, arg is also interpreted in the following way: (length tail) 2) org-todo-keywords-1) (org-last org-todo-keywords-1)))) - ((and org-todo-key-trigger org-use-fast-todo-selection) - ;; Use fast selection. - (org-fast-todo-selection this)) (arg ;; User or caller requests a specific state. (cond @@ -10121,7 +10118,9 @@ When called through ELisp, arg is also interpreted in the following way: (user-error "State `%s' not valid in this file" arg)) ((nth (1- (prefix-numeric-value arg)) org-todo-keywords-1)))) + ((and org-todo-key-trigger org-use-fast-todo-selection) + ;; Use fast selection. + (org-fast-todo-selection this)) ((null member) (or head (car org-todo-keywords-1))) ((equal this final-done-word) nil) ;-> make empty ((null tail) nil) ;-> first entry -- 2.22.1 Message-ID: <87lfvtywo4.fsf@gmail.com>