all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Jacobson <jidanni@dman.ddts.net>
Subject: decriminalize C-k in read-only buffers!
Date: Thu, 17 Apr 2003 09:14:06 +0800	[thread overview]
Message-ID: <878yuavsbl.fsf_-_@jidanni.org> (raw)
In-Reply-To: 200304141404.30501.bruce@zefamily.org

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

  reply	other threads:[~2003-04-17  1:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <73388857A695D31197EF00508B08F2980A00EEEC@ntmsg0131.corpmail.telstra.com.au>
     [not found] ` <87znn8tdn5.fsf@pfaff.Stanford.EDU>
2003-04-03 20:04   ` C-k and scolding Dan Jacobson
2003-04-04  0:18     ` Ben Pfaff
2003-04-14 21:04     ` Bruce Kroeze
2003-04-17  1:14       ` Dan Jacobson [this message]
     [not found] <mailman.4771.1050547363.21513.bug-gnu-emacs@gnu.org>
2003-04-17  2:59 ` decriminalize C-k in read-only buffers! David Kastrup
2003-04-18 22:09   ` Dan Jacobson
     [not found]   ` <mailman.4920.1050711088.21513.bug-gnu-emacs@gnu.org>
2003-04-21 15:54     ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878yuavsbl.fsf_-_@jidanni.org \
    --to=jidanni@dman.ddts.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.