unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* dired-do-kill-lines: no undo
@ 2005-07-14  3:43 Dan Jacobson
  2005-07-15 21:09 ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Jacobson @ 2005-07-14  3:43 UTC (permalink / raw)


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 ".").

P.S., by the way, (find-alternate-file ".") does nothing if already
looking at ".", a problem that has existed from the earliest days.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: dired-do-kill-lines: no undo
  2005-07-14  3:43 dired-do-kill-lines: no undo Dan Jacobson
@ 2005-07-15 21:09 ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2005-07-15 21:09 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-15 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-14  3:43 dired-do-kill-lines: no undo Dan Jacobson
2005-07-15 21:09 ` Kevin Rodgers

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).