emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4 minor suggestions for files.el


From: Kai Großjohann
Subject: Re: 4 minor suggestions for files.el
Date: Tue, 15 Apr 2003 21:14:15 +0200
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux)

I somehow don't really feel qualified to comment, but I'll try my
best, anyway.

"Stefan Monnier" <monnier+gnu/address@hidden> 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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]