From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: C-x C-v considered harmful Date: Tue, 07 Jul 2009 02:49:00 +0300 Organization: JURTA Message-ID: <87vdm5xqpv.fsf@mail.jurta.org> References: <19020.2798.523236.406366@rgr.rgrjr.com> <72597301DECF498C8943373F597732A6@us.oracle.com> <19021.23100.86775.844823@rgr.rgrjr.com> <19022.27409.779079.636945@rgr.rgrjr.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246928417 12517 80.91.229.12 (7 Jul 2009 01:00:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jul 2009 01:00:17 +0000 (UTC) Cc: rogers-emacs@rgrjr.dyndns.org, Drew Adams , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 07 03:00:10 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MNz2W-0004Dc-7S for ged-emacs-devel@m.gmane.org; Tue, 07 Jul 2009 03:00:08 +0200 Original-Received: from localhost ([127.0.0.1]:54632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNz2V-0004T5-Oz for ged-emacs-devel@m.gmane.org; Mon, 06 Jul 2009 21:00:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNz1l-0004DP-96 for emacs-devel@gnu.org; Mon, 06 Jul 2009 20:59:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNz1g-0004AG-FR for emacs-devel@gnu.org; Mon, 06 Jul 2009 20:59:20 -0400 Original-Received: from [199.232.76.173] (port=39060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNz1g-0004AD-9Z for emacs-devel@gnu.org; Mon, 06 Jul 2009 20:59:16 -0400 Original-Received: from smtp-out2.starman.ee ([85.253.0.4]:49779 helo=mx2.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNz1c-0001IT-7R; Mon, 06 Jul 2009 20:59:12 -0400 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Original-Received: from mail.starman.ee (82.131.30.29.cable.starman.ee [82.131.30.29]) by mx2.starman.ee (Postfix) with ESMTP id D4C463F40A3; Tue, 7 Jul 2009 03:59:04 +0300 (EEST) In-Reply-To: (Richard Stallman's message of "Sat, 04 Jul 2009 20:05:47 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112114 Archived-At: > Fully half the reason I use `find-alternate-file' is to _kill_ the current > buffer (mistaken file visit or not). I use `C-x C-f' when I want to keep the > current buffer, and `C-x C-v' when I want to kill it. I wouldn't have thought I > was alone in that, but I'm beginning to get the impression that I might be. > > Of course, getting rid of the current buffer is why one uses it. The > question is whether it is sufficienty easier than C-x C-k RET and M-p > to justify giving it a key binding. I'd like to add one more use case of C-x C-v. I use ffap that allows C-x C-v to grab an absolute file name from the current buffer to the minibuffer. For example, one scenario is the following: M-x shell RET dpkg -L debian-package RET This command outputs a list of absolute file names in the *shell* buffer. C-p C-p C-p ... C-x C-v RET After moving point to the necessary absolute file name, C-x C-v puts the file name to the minibuffer and RET just visits it. I don't need to preserve the *shell* buffer after that. However, maybe I would tolerate an yes-no confirmation in the *shell* buffer since I more often use M-! for the same purposes. Of course, this raises a question whether an information's worth in the *shell* buffer is higher than in the *Shell Command Output* buffer and shouldn't killing the *Shell Command Output* buffer ask a confirmation as well? Then what about the Async shell command that runs a command in the background? Should C-x C-v ask a confirmation in the *Async Shell Command* buffer? Currently it simply kills the child process without a question. BTW, I am experiencing a higher risk of losing information with M-! more than with C-x C-v. M-! is difficult to type with one hand because the `1' key is located directly above the Shift key, so a combination with the Meta key often produces the wrong key M-1 (with Shift unpressed). Typing a shell command in a Dired buffer without paying attention to the screen results in a complete mess (since most Dired keybndings are just one letter) that needs to be analyzed afterwards to determine the damage (looking for files marked, copied, moved, deleted, etc.) -- Juri Linkov http://www.jurta.org/emacs/