emacs-devel
[Top][All Lists]
Advanced

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

Re: `*' interactive spec in some text-killing functions


From: David Kastrup
Subject: Re: `*' interactive spec in some text-killing functions
Date: Thu, 28 Jun 2007 16:30:40 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

"Juanma Barranquero" <address@hidden> writes:

> On 6/28/07, Stefan Monnier <address@hidden> wrote:
>
>> The result is not irrelevant because you may do C-x C-q afterwards.
>
> Yes, and David (before embarking on a crusade to convince me of what
> do I find confusing, or why I shouldn't) already pointed out an
> example of how switching to overwrite in a read-only buffer can
> sometimes be useful. I don't know how common is, but it is certainly
> useful.

I have about 20 times asked what purpose a warning should achieve when
overwrite-mode is changed in readonly buffers.  What action should it
prevent?

Why do you ignore every request to explain how the warning can be
useful, and how it would be related to toggling overwrite-mode?

>> But maybe a little warning reminding the user that the buffer is
>> not yet writable could be added.
>
> Well, thanks! That was exactly my point: that it could warn "Buffer
> is read-only".

Why warn about a read-only buffer when toggling overwrite-mode?  There
is no connection whatsoever with overwrite-mode: the same operations
will lead to errors (not catastrophes or lost work or whatever)
regardless of the setting of overwrite-mode.

>> It doesn't seem tremendously useful, tho: she'll figure it out soon
>> enough.
>
> Agreed: it's not tremendously useful, not even very useful; just
> nice to some people, newbies perhaps.

But why?  What information _relevant_ to overwrite-mode is conveyed?
What information that is not much better conveyed by an actual error
_when_ the error condition happens?

> That's why I've been using the PgUp example: the warning about
> "Beginning of buffer" is not very useful,

It is not a warning, it is an error: Emacs can't do the requested job.
A warning would be "Warning: you are close to the top of the buffer.
Pressing PgUp again would cause an error beep".  And this warning
would actually be _connected_ with scroll-down, as opposed to the
proposed write-only warning for the entirely unrelated overwrite-mode.

> but it can be helpful to a newbie that suddenly doesn't understand
> why the buffer is not scrolling.

It is an error, not a warning.  Emacs does not do the job that is
asked from it and aborts any keyboard macro.

> David and others have reminded me a couple times or four that the
> read-only status is visible on the modeline.

I have never ever reminded you of that a single time, nor did anybody
else as far as I can see.

> And it is: `--' turns into `%%', or `-*' to `-%'. Not the most
> conspicuous of clues, if you're new to Emacs, I think.

I think Andreas was talking about the "Ovwrt" tag in the modeline
rather.

I don't think that the "Buffer is readonly: #<buffer myreadonlyfile>"
message is unconspicous, and it will be there with a beep in case you
do something which actually is _relevant_.

-- 
David Kastrup




reply via email to

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