From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: locate-library INTERACTIVE-CALL argument Date: Tue, 05 Aug 2003 16:35:49 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F303145.9060905@yahoo.com> References: <3F294B31.30800@yahoo.com> <3F2E855C.5040901@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1060123142 21019 80.91.224.253 (5 Aug 2003 22:39:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2003 22:39:02 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 06 00:39:21 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19kASe-0001Fu-01 for ; Wed, 06 Aug 2003 00:39:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19kAR6-0003Bl-JY for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Aug 2003 18:37:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19kAR3-0003Bf-Vv for bug-gnu-emacs@prep.ai.mit.edu; Tue, 05 Aug 2003 18:37:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19kAQX-00035E-Q2 for bug-gnu-emacs@prep.ai.mit.edu; Tue, 05 Aug 2003 18:37:41 -0400 Original-Received: from [216.168.1.22] (helo=trinity.supernews.net) by monty-python.gnu.org with esmtp (Exim 4.20) id 19kAQX-00034w-FK for bug-gnu-emacs@prep.ai.mit.edu; Tue, 05 Aug 2003 18:37:09 -0400 Original-Received: from mail.fu-berlin.de ([160.45.11.165]:40167 ident=root) by trinity.supernews.net with esmtp (Exim 4.20) id 19kAQW-0005Mk-VP for gnu-emacs-bug@moderators.isc.org; Tue, 05 Aug 2003 22:37:09 +0000 Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Wed, 6 Aug 2003 00:35:47 +0200 (MEST) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Wed, 6 Aug 2003 00:35:47 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 55 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: news.uni-berlin.de 1060122947 28294768 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5484 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5484 Richard Stallman wrote: > > Since the intent is to display the message > > when the command is called interactively, even when it is called via a > > keyboard macro, why not test for those conditions explicitly with > > interactive-p and executing-macro respectively? > > There is no way to do that and get the same condition. > (or (interactive-p) executing-macro) would be t > when called from Lisp code that was run by a keyboard macro. > > Perhaps there ought to be a way to use interactive-p to get > such a result. It could be a good feature. Do you mean adding an &optional KEYBOARD-MACROS-TOO argument, so it would return non-nil even when called while executing a keyboard macro? Or do you mean distinguishing different non-nil return values, e.g. call-interactively vs. execute-kbd-macro (instead of just t)? > But there may be a better feature. Ever since 1985 I had the idea > that maybe (interactive...) could be extended with a second argument > saying how to display the value. That would be complimentary with the > existing arg saying how to provide the arguments. That might be the > really clean way to do this job. I don't know what you mean. (interactive ...) returns a list of values, which are mapped to the lambda list symbols. Do you mean that it would accept an &optional KEYBOARD-MACROS-TOO argument, which would determine what interactive-p returns while executing a keyboard macro? If so, I think adding an &optional argument to interactive-p is cleaner, since it's "closer" to the desired effect than adding one to interactive. Maybe an example would be helpful. The question is, given a command foo that usually displays a message when called interactively, how to allow the Emacs Lisp programmer to control whether that messsage is displayed in these different contexts: 1. C-x ( ... M-x foo RET ... C-x ) should obviously display the message. 2. C-x ( ... M-: (foo ...) RET ... C-x ) should not. -- Kevin Rodgers