From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#10726: 24.0.93; `find-file-noselect': why should it interrogate the user? Date: Sat, 4 Feb 2012 11:25:15 -0800 Message-ID: <012A5E800AD44CC090696172BAD6F5A3@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328383591 17665 80.91.229.3 (4 Feb 2012 19:26:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Feb 2012 19:26:31 +0000 (UTC) To: 10726@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 04 20:26:30 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtlFk-0002p4-4K for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 20:26:28 +0100 Original-Received: from localhost ([::1]:55585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtlFj-00058H-NN for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Feb 2012 14:26:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtlFg-000580-24 for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:26:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtlFe-0003sN-Tp for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:26:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtlFe-0003sJ-NJ for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:26:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RtlGI-0000GG-9k for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Feb 2012 19:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10726 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.1328383579951 (code B ref -1); Sat, 04 Feb 2012 19:27:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Feb 2012 19:26:19 +0000 Original-Received: from localhost ([127.0.0.1]:54578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtlFa-0000FI-P6 for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:26:19 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35340) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtlFY-0000F5-17 for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:26:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtlEn-0003pS-N7 for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:25:30 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:59348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtlEn-0003pO-Lc for submit@debbugs.gnu.org; Sat, 04 Feb 2012 14:25:29 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtlEj-00056m-A1 for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:25:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtlEi-0003oc-6b for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:25:25 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:51053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtlEi-0003oS-15 for bug-gnu-emacs@gnu.org; Sat, 04 Feb 2012 14:25:24 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q14JPMWd025273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 4 Feb 2012 19:25:22 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q14JPLgv029242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 4 Feb 2012 19:25:21 GMT Original-Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q14JPLtx013919 for ; Sat, 4 Feb 2012 13:25:21 -0600 Original-Received: from dradamslap1 (/10.159.50.114) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 04 Feb 2012 11:25:21 -0800 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: Aczjcrip6U4nYW8TR72J0ibNbdvPyA== X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4F2D8622.00CC,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org 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 Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56487 Archived-At: I'm evaluating some Lisp code I'm testing. It is non-interactive code. I invoke it using `M-:', which I've bound to `pp-eval-expression'. I first visit a read-only file. Then I change the file (using `dired-do-chmod') to writable. Then I use `M-:' to eval a sexp that does `find-file-noselect'. Even though the code was not invoked interactively (`M-:' should not be counted as interactive here), I got this interactive dialog from `find-file-noselect': "File foobar.toto is writable on disk. Change buffer mode? " When this happened I was quite surprised, and I had almost no idea what was going on. I did not know how to answer the question posed. The question did not even tell me which buffer it proposed changing the mode of. This interrogation does not seem right. When evaluating code this way (and for other non-interacive evaluations) the user might have no idea even that a file is being visited by the code. After all, this is `find-file-noselect', not `find-file'. Why should `find-file-noselect' interact with the user directly using _any_ dialog? I can see why some particular code that _invokes_ `find-file-noselect' might choose to ask the user a question. And I can see why `find-file-noselect' itself might raise an error in some situations. But I do not see why `find-file-noselect' should ever interrogate the user. I do see that `find-file-noselect' has been posing questions to the user since Day One. But I do not see why that is appropriate. I would think that this function should be only for Lisp code to work on a file in a buffer. We could conceivably pass `find-file-noselect' a new optional argument that would indicate whether `find-file-noselect' should question the user to find out more information that might help the function do its job, and if not just punt (e.g. raise an error) if it cannot proceed normally. But why should it systematically do such interactive stuff? When a user gets such a question in the context of `find-file-noselect' being invoked by `find-file' or some other _command_, the questioning is understandable - I've never been shocked by it in such a context. But in this case I was surprised and perplexed. In GNU Emacs 24.0.93.1 (i386-mingw-nt5.1.2600) of 2012-01-29 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include --ldflags -LD:/devel/emacs/libs/gnutls-3.0.9/lib'