emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find-file and backward-kill-word


From: David Kastrup
Subject: Re: find-file and backward-kill-word
Date: Tue, 12 Oct 2004 10:31:41 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Luc Teirlinck <address@hidden> writes:

> Reinhard Kotucha wrote:
>
>    When I run find-file I get a prompt like this:
>
>    Find file: /tmp/reinhard/
>
>    I can edit everything on the right to the space after the colon.  For
>    instance, beginning-of-line moves the cursor to the first slash.
>
>    So far so good.  But if I then run the command backward-kill-word
>    (M-DEL), the cursor moves to the "f" of the word "file" and I get the
>    message
>
>    Text is read-only: #<buffer  *Minibuf-1*>
>
> That is not a bug.

It is also not pretty.

> You are right after the prompt: `Find file: '.  `backward-kill-word'
> kills the preceding word, in this case `file: '.  Of course, `file:
> ' is read-only, so it can not be deleted.  But it is copied to the
> kill ring, which in certain situations could be useful.  The cursor
> moves to the `f' to allow a following `backward-kill-word' to
> prepend `Find ' to the kill-ring entry, which would then be `Find
> file: '.
>
> See `(emacs)Killing' for details.

Perhaps we should not move the cursor when "killing" readonly
material?  It would have the disadvantage that using kill-word three
times will not copy three words into the kill buffer, but I don't
think that killing readonly text is used so often that we need to
provide this sort of "convenience".  If we signal an error, I don't
think we should really move point, either.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

[Prev in Thread] Current Thread [Next in Thread]