From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH v2] org-sort: Read compare-func in interactive calls Date: Sun, 14 May 2017 18:51:03 +0200 Message-ID: <878tlzz8js.fsf@nicolasgoaziou.fr> References: <871srz5mbr.fsf@kyleam.com> <20170509194750.8974-1-kyle@kyleam.com> <87tw4r12ww.fsf@nicolasgoaziou.fr> <8737cax2tm.fsf@kyleam.com> <87h90q1rf6.fsf@nicolasgoaziou.fr> <87lgq0retg.fsf@kyleam.com> <87shk7zw08.fsf@nicolasgoaziou.fr> <87fug7r1qz.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9wje-0006De-9O for emacs-orgmode@gnu.org; Sun, 14 May 2017 12:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9wjb-0005LM-4H for emacs-orgmode@gnu.org; Sun, 14 May 2017 12:51:10 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59122) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d9wja-0005KR-V4 for emacs-orgmode@gnu.org; Sun, 14 May 2017 12:51:07 -0400 In-Reply-To: <87fug7r1qz.fsf@kyleam.com> (Kyle Meyer's message of "Sun, 14 May 2017 09:45:08 -0400") 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: Kyle Meyer Cc: Zhitao Gong , emacs-orgmode@gnu.org Kyle Meyer writes: > Won't using a numeric prefix argument change the behavior for both > interactive and Lisp calls? > > As examples, > > * M-1 M-x org-sort-list is currently interpreted as a non-nil value > for WITH-CASE. Instead, it would be indistinguishable from M-x > org-sort-list. > > * A Lisp caller can currently set WITH-CASE to any non-nil value. > Using (interactive "p") for WITH-CASE, how do we distinguish a > numeric argument passed for WITH-CASE from an interactive call? OK. It seems I was pretty much confused. > Using an additional argument whose only purpose is to serve as a > interactive flag, which is what called-interactively-p's docstring > suggests, avoids these issues. I'd rather avoid this. What about using (not (or executing-kbd-macro noninteractive)) then, and not touch to signature? Regards,