* decriminalize C-k in read-only buffers!
2003-04-14 21:04 ` Bruce Kroeze
@ 2003-04-17 1:14 ` Dan Jacobson
0 siblings, 0 replies; 4+ messages in thread
From: Dan Jacobson @ 2003-04-17 1:14 UTC (permalink / raw)
"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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: decriminalize C-k in read-only buffers!
[not found] <mailman.4771.1050547363.21513.bug-gnu-emacs@gnu.org>
@ 2003-04-17 2:59 ` David Kastrup
2003-04-18 22:09 ` Dan Jacobson
[not found] ` <mailman.4920.1050711088.21513.bug-gnu-emacs@gnu.org>
0 siblings, 2 replies; 4+ messages in thread
From: David Kastrup @ 2003-04-17 2:59 UTC (permalink / raw)
Dan Jacobson <jidanni@dman.ddts.net> writes:
> "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.)
[...]
> 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.
kill-read-only-ok's value is nil
*Non-nil means don't signal an error for killing read-only text.
You can customize this variable.
Defined in `simple'.
[back]
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: decriminalize C-k in read-only buffers!
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>
1 sibling, 0 replies; 4+ messages in thread
From: Dan Jacobson @ 2003-04-18 22:09 UTC (permalink / raw)
>>>>> "D" == David Kastrup <dak@gnu.org> writes:
D> Dan Jacobson <jidanni@dman.ddts.net> writes:
>> "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.)
D> [...]
>> 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.
D> kill-read-only-ok's value is nil
D> *Non-nil means don't signal an error for killing read-only text.
Oh great. Why don't they document it when one does C-h k C-k? That
way we wouldn't have wasted all this time and coding as you can see in
previous messages. Looking in Info "Other Kill Commands"
You can use kill commands in read-only buffers. They don't actually
change the buffer, and they beep to warn you of that, but they do copy
the text you tried to kill into the kill ring, so you can yank it into
other buffers. Most of the kill commands move point across the text
they copy in this way, so that successive kill commands build up a
single kill ring entry as usual.
we of course see no mention of it either. Oh look, it is mentioned in
"Deletion and Killing".
I just did C-h k C-w and see we are told to accept the beep and no
remedy is mentioned too...
Anyways, the emacs documenter was clearly sleeping on the job, talking
about beeps but not talking how to turn them off when there is a way
just for that purpose... causing me to appear clumsy and pompous yet again!
--
http://jidanni.org/ Taiwan(04)25854780
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: decriminalize C-k in read-only buffers!
[not found] ` <mailman.4920.1050711088.21513.bug-gnu-emacs@gnu.org>
@ 2003-04-21 15:54 ` Kevin Rodgers
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2003-04-21 15:54 UTC (permalink / raw)
Dan Jacobson wrote:
>>>>>>"D" == David Kastrup <dak@gnu.org> writes:
> D> kill-read-only-ok's value is nil
>
> D> *Non-nil means don't signal an error for killing read-only text.
...
> Anyways, the emacs documenter was clearly sleeping on the job, talking
> about beeps but not talking how to turn them off when there is a way
> just for that purpose... causing me to appear clumsy and pompous yet again!
No, it is the tone of your message that causes you to appear pompous. Why
don't you for once submit a patch instead of just complaining?
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-04-21 15:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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
[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-14 21:04 ` Bruce Kroeze
2003-04-17 1:14 ` decriminalize C-k in read-only buffers! Dan Jacobson
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).