From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: dired-do-kill-lines: no undo Date: Fri, 15 Jul 2005 15:09:21 -0600 Message-ID: References: <8764veoxwx.fsf@jidanni.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1121462865 4458 80.91.229.2 (15 Jul 2005 21:27:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2005 21:27:45 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 15 23:27:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DtXi0-0002at-CA for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Jul 2005 23:27:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DtXjn-0001xV-Sn for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Jul 2005 17:28:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DtXiL-0001Pf-4s for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2005 17:27:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DtXgG-0000n9-48 for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2005 17:25:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DtXgB-0000gS-TY for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2005 17:25:07 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DtXZx-0003Wc-PY for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2005 17:18:42 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DtXRS-0000MO-90 for bug-gnu-emacs@gnu.org; Fri, 15 Jul 2005 23:09:54 +0200 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jul 2005 23:09:54 +0200 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Jul 2005 23:09:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 64 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <8764veoxwx.fsf@jidanni.org> X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:12523 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:12523 Dan Jacobson wrote: > dired-do-kill-lines should mention in its docstring how to yank them > back or otherwise recover in any way from mistaken typing of this > command short of (find-alternate-file "."). The same way as in any other buffer: ,---- | C-x u runs the command dired-undo | which is an interactive compiled Lisp function in `dired'. | (dired-undo) | | Undo in a dired buffer. | This doesn't recover lost files, it just undoes changes in the buffer itself. | You can use it to recover marks, killed lines or subdirs. | In the latter case, you have to do M-x dired-build-subdir-alist to | parse the buffer again. `---- ,---- | g runs the command revert-buffer | which is an interactive compiled Lisp function in `files'. | (revert-buffer &optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES) | | Replace current buffer text with the text of the visited file on disk. | This undoes all changes since the file was visited or saved. | With a prefix argument, offer to revert from latest auto-save file, if | that is more recent than the visited file. | | This command also works for special buffers that contain text which | doesn't come from a file, but reflects some other data base instead: | for example, Dired buffers and buffer-list buffers. In these cases, | it reconstructs the buffer contents from the appropriate data base. | | When called from Lisp, the first argument is IGNORE-AUTO; only offer | to revert from the auto-save file when this is nil. Note that the | sense of this argument is the reverse of the prefix argument, for the | sake of backward compatibility. IGNORE-AUTO is optional, defaulting | to nil. | | Optional second argument NOCONFIRM means don't ask for confirmation at | all. (The local variable `revert-without-query', if non-nil, prevents | confirmation.) | | Optional third argument PRESERVE-MODES non-nil means don't alter | the files modes. Normally we reinitialize them using `normal-mode'. | | If the value of `revert-buffer-function' is non-nil, it is called to | do all the work for this command. Otherwise, the hooks | `before-revert-hook' and `after-revert-hook' are run at the beginning | and the end, and if `revert-buffer-insert-file-contents-function' is | non-nil, it is called instead of rereading visited file contents. `---- > P.S., by the way, (find-alternate-file ".") does nothing if already > looking at ".", a problem that has existed from the earliest days. I think that could be solved (and the same problem for `C-x C-v RET') by having dired-noselect call dired-revert when dired-noselect was called by find-alternate-file. -- Kevin Rodgers