From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: decriminalize C-k in read-only buffers! Date: Thu, 17 Apr 2003 09:14:06 +0800 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <878yuavsbl.fsf_-_@jidanni.org> References: <73388857A695D31197EF00508B08F2980A00EEEC@ntmsg0131.corpmail.telstra.com.au> <87znn8tdn5.fsf@pfaff.Stanford.EDU> <87u1dgjb6h.fsf@jidanni.org> <200304141404.30501.bruce@zefamily.org> Reply-To: Dan Jacobson NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050547377 8576 80.91.224.249 (17 Apr 2003 02:42:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2003 02:42:57 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 17 04:42:55 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 195zM6-0002CI-00 for ; Thu, 17 Apr 2003 04:42:30 +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 195zMM-0006rQ-06 for gnu-bug-gnu-emacs@m.gmane.org; Wed, 16 Apr 2003 22:42:47 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 195zMC-0006R6-00 for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2003 22:42:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 195zM4-0006H8-00 for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2003 22:42:28 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 195zM3-0006FW-00 for bug-gnu-emacs@gnu.org; Wed, 16 Apr 2003 22:42:28 -0400 Original-Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 195zK9-00026v-00 for ; Thu, 17 Apr 2003 04:40:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 195zBx-0001g6-00 for ; Thu, 17 Apr 2003 04:32:01 +0200 Original-Lines: 26 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4824 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4824 "C-k runs the command kill-line ... If the buffer is read-only, Emacs will beep and refrain from deleting the line, but put the line in the kill ring anyway. This means that you can use this command to copy text from a read-only buffer." OK, but what if we're bored with S/M and want to turn the little tingle off? (You see, mother has wired the bell to electrodes on my head to teach me proper computing and not wake her up.) Bruce suggests: B> (defun copy-to-eol (&optional where) B> "Copy to the end of the line containing point." B> (interactive "d") B> (save-excursion B> (let ((beg (point))) B> (end-of-line) B> (copy-region-as-kill beg (point))) B> (end-of-line)) B> (message "copied to eol")) OK, but wait, original kill-line with the flashes/beeps moves the cursor down upon repetition, nifty. Yours just stays there... Maybe we should just push for a variable to decriminalize [no flashing] C-k when the buffer is readonly. With maybe a message, in the minibuffer, if the user prefers.