From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: [PATCH] org.el (org-todo): Respect state argument when called from elisp Date: Fri, 16 Aug 2019 18:41:07 -0400 Message-ID: <87ef1k4tto.fsf@kyleam.com> References: <87imqxywno.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42112) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hykuL-0004aS-Rv for emacs-orgmode@gnu.org; Fri, 16 Aug 2019 18:41:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hykuK-00062m-CD for emacs-orgmode@gnu.org; Fri, 16 Aug 2019 18:41:17 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:56828) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hykuK-00061W-1z for emacs-orgmode@gnu.org; Fri, 16 Aug 2019 18:41:16 -0400 In-Reply-To: <87imqxywno.fsf@gmail.com> 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: Renato Ferreira , emacs-orgmode Renato Ferreira writes: > (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'). Thanks for the patch! I hit this earlier today but hadn't yet looked into it. Testing this out, it fixes the issue introduced by f1c030bed (Prefix argument to `org-todo' forces stage change logging, 2019-08-14), while keeping the intended C-u behavior change from that patch. > @@ -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 This patch didn't apply for me, and the hunk counts look off. It should be -10121,6, no? Anyway, I've adjusted it so that it applies and pushed it to master. (I made a typo fix and a few small tweaks to your commit message.) -- Kyle