From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: 4 minor suggestions for files.el Date: Tue, 15 Apr 2003 21:14:15 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <841y03shdk.fsf@lucy.is.informatik.uni-duisburg.de> References: <200304142022.h3EKMHRu026814@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050434464 9402 80.91.224.249 (15 Apr 2003 19:21:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2003 19:21:04 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 15 21:21:01 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 195VzJ-0002R7-00 for ; Tue, 15 Apr 2003 21:21:01 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 195W1I-00042U-00 for ; Tue, 15 Apr 2003 21:23:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 195Vx6-0002Xr-00 for emacs-devel@quimby.gnus.org; Tue, 15 Apr 2003 15:18:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 195Vwe-0001ht-00 for emacs-devel@gnu.org; Tue, 15 Apr 2003 15:18:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 195Vw4-00014c-00 for emacs-devel@gnu.org; Tue, 15 Apr 2003 15:17:43 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 195Vvq-0000qj-00 for emacs-devel@gnu.org; Tue, 15 Apr 2003 15:17:26 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 195VuK-00023L-00 for ; Tue, 15 Apr 2003 21:15:52 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 195Vu8-00022n-00 for ; Tue, 15 Apr 2003 21:15:40 +0200 Original-Lines: 53 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:mZxHjiIie6+P/ILo2wqQFFUuUpI= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13245 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13245 I somehow don't really feel qualified to comment, but I'll try my best, anyway. "Stefan Monnier" writes: > 1 - Don't allow viewing non-existent files. The interactive spec already > ensures that's the case, but it doesn't work when the function > is called from dired or somesuch (the file might have existed > when the dired buffer was created). Nice. > 2 - Prompt the user when trying to open a very large file. My Emacs crawls > to a near halt when I try to open a 16MB file, so if I ever try to > open such a file, I'd rather be warned. Maybe add a group and a type to the defcustom. Otherwise, me likee. > 3 - Don't catch errors to turn them into messages when debug-on-error > is set to t. I wish I could solve it more generically. I wonder what happens with debug-on-signal? If that catches the errors, then maybe your change isn't necessary. If that does not catch the errors, you might extend your code to check debug-on-signal, as well. As a different approach, maybe it is useful to somehow make condition-case easier to debug? For example, one could design a "debugging mode" which turns on debug-on-error, perhaps debug-on-signal, and also does something special so that condition-case invokes the debugger in case an error happened. > 4 - Don't ask for confirmation when the user has just gone through the > trouble of typing the whole M-x revert-buffer RET thing. Good idea, but will it work if the user binds it to C-c RET, say? (I know, that's not allowed, but perhaps they chose C-c f RET.) > 5 - Don't junk the buffer-undo-list when reverting while preserving modes. > This is convenient with things like auto-revert or VC, especially > combined with the undo-in-region feature. It does require changes > in the C code for insert-file-contents as well, since it > currently always junks the undo list. These changes aren't > included here, but they are not needed for the code to work > as well as before. Nice. -- file-error; Data: (Opening input file no such file or directory ~/.signature)