From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Fixing numerous `message' bugs.. Date: Tue, 11 Dec 2007 00:02:14 +0100 Message-ID: <85sl2am9vt.fsf@lola.goethe.zz> References: <87myso8yrs.fsf@marie.gnufans.net> <87ve7b4xt6.fsf@marie.gnufans.net> <85abonpxnw.fsf@lola.goethe.zz> <85fxyel8o8.fsf@lola.goethe.zz> <87hciugzal.fsf@marie.gnufans.net> <87ir36o3as.fsf@marie.gnufans.net> <475D7F91.80503@gnu.org> <877ijmmkuq.fsf@marie.gnufans.net> <87aboijnqn.fsf@marie.gnufans.net> <85aboint7d.fsf@lola.goethe.zz> <87mysirwyr.fsf@marie.gnufans.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197328066 4799 80.91.229.12 (10 Dec 2007 23:07:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2007 23:07:46 +0000 (UTC) Cc: Andreas Schwab , Jason Rumney , Richard Stallman , emacs-devel@gnu.org To: Dave Goel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 11 00:07:55 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J1rj5-0006rC-Tu for ged-emacs-devel@m.gmane.org; Tue, 11 Dec 2007 00:07:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1rio-0003u9-68 for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 18:07:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1rhv-0003Y7-Vc for emacs-devel@gnu.org; Mon, 10 Dec 2007 18:06:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1rhv-0003Xg-6o for emacs-devel@gnu.org; Mon, 10 Dec 2007 18:06:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1rhu-0003Xb-T8 for emacs-devel@gnu.org; Mon, 10 Dec 2007 18:06:38 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1rhu-0006v9-JW for emacs-devel@gnu.org; Mon, 10 Dec 2007 18:06:38 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1rho-0004YK-C2; Mon, 10 Dec 2007 18:06:32 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 1882A1C4CE33; Tue, 11 Dec 2007 00:02:14 +0100 (CET) In-Reply-To: <87mysirwyr.fsf@marie.gnufans.net> (Dave Goel's message of "Mon, 10 Dec 2007 17:44:44 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:84993 Archived-At: Dave Goel writes: >> (message "%s" (or x "")) >> >> will work instead of the proposed (message t x) > > (a) This looks like a neat "trick", but is confusing code. Code > should be readable and as manifest as possible, and not rely on such > "hidden" tricks. On the obfuscation scale, this is far worse than > something as innocuous as (or foo (error bar)), and note that some > authors even oppose that.. > > (b) This code also relies on an undocumented feature of `message' - that > "" as the first argument makes it behave almost the same as if the > argument were nil. Undocumented? If the first argument is nil or the empty string, the function clears any existing message; this lets the minibuffer contents show. See also `current-message'. It is not the first argument, though, that is "" here. > (c) Also note that (message "") is not exactly the same as (message > nil), because they return different values. > >> and considering that it rarely occurs (I think I should have got >> most cases), > > Most, but not all. Which one is missing? Note that you still have to hunt all of them down. >> I don't think it is really worth the trouble. > > Hm, but where is the trouble? This is a backward-compatible change. But it is a surprising one, inconsistent with `format'. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum