all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: RE: bind commands that change buffer contents to `undefined' when read-only?
Date: Sun, 23 Sep 2007 13:42:51 -0700	[thread overview]
Message-ID: <BNELLINCGFJLDJIKDGACMEAECDAA.drew.adams@oracle.com> (raw)
In-Reply-To: <jwv8x6x1car.fsf-monnier+emacs@gnu.org>

> In any case I don't like much this idea of adding explicit `undefined'
> bindings, just in order to get a "undefined" message rather than
> a "buffer is read-only" error.
>
> So maybe a better direction is to change the toplevel so that using
> a command with a "*" (or a call to barf-if-buffer-read-only) in its
> interactive spec when the buffer is read-only will signal
> "undefined" rather than signalling the error.  And similarly C-h k
> may give information such as "the global binding is foo but is of
> no use in this buffer because it's read-only".

Sounds OK to me at first, but:

1. We would need to make sure that all such bases were covered. `C-h k' is
one thing; `C-h b' might be another; the read-only error text is another;
and there are perhaps others.

2. It doesn't really help users see that such keys are, in effect, available
for binding in such read-only contexts. That was a main motivation behind my
proposal. A user might check `C-h b' in Dired, for example, and s?he would
see what? A long message explaining what you suggested, for each such key?
Is it as clear to read something like that as it is to read `undefined'? I
don't think so. And we might end up complicating the code that way, having
different kinds of such messages for different contexts (error message, `C-h
b' binding list, `C-h k', and so on).

I don't think you have given any reason _why_ you "don't like much this
idea"; you've just stated a preference. What are the disadvantages you see
to this idea? Deciding on a good way to handle this should involve weighing
the pros & cons.

  reply	other threads:[~2007-09-23 20:42 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-22  1:18 TAB for non-editing modes Dan Nicolaescu
2007-09-22  8:22 ` Lennart Borgman (gmail)
2007-09-25 20:29   ` S-SPC for non-editing modes (was: TAB for non-editing modes) Juri Linkov
2007-09-25 21:14     ` Drew Adams
2007-09-25 21:59       ` S-SPC for non-editing modes Juri Linkov
2007-09-25 22:12         ` Drew Adams
2007-09-25 22:09       ` S-SPC for non-editing modes (was: TAB for non-editing modes) Andreas Schwab
2007-09-22 15:47 ` TAB for non-editing modes Richard Stallman
2007-09-22 16:35   ` Dan Nicolaescu
2007-09-22 19:01     ` Drew Adams
2007-09-22 21:23       ` Lennart Borgman (gmail)
2007-09-22 21:40         ` Drew Adams
2007-09-22 21:51       ` Dan Nicolaescu
2007-09-22 22:16         ` bind commands that change buffer contents to `undefined' when read-only? Drew Adams
2007-09-23  0:37           ` bind commands that change buffer contents to `undefined' whenread-only? Drew Adams
2007-09-23  1:20             ` bind commands that change buffer contents to `undefined'whenread-only? Drew Adams
2007-09-23  1:49               ` Stefan Monnier
2007-09-23  2:18                 ` bind commands that change buffer contents to `undefined' when read-only? Drew Adams
2007-09-23 18:16                   ` Stefan Monnier
2007-09-23 20:42                     ` Drew Adams [this message]
2007-09-24  1:25                       ` Stefan Monnier
2007-09-24  2:02                         ` Drew Adams
2007-09-24 15:24                       ` Davis Herring
2007-09-24 16:12                         ` Drew Adams
2007-09-24 17:38                           ` Davis Herring
2007-09-24 21:49                             ` Drew Adams
2007-09-24 18:14                           ` Stefan Monnier
2007-09-25 10:44                             ` Richard Stallman
2007-09-25 18:00                               ` bind commands that change buffer contents to `undefined' whenread-only? Drew Adams
2007-09-24 18:19                     ` bind commands that change buffer contents to `undefined' when read-only? Richard Stallman
2007-09-25 14:15                       ` Stefan Monnier
2007-09-22 22:44         ` TAB for non-editing modes Drew Adams
2007-09-23 14:48           ` Bastien
2007-09-23 23:59           ` Juri Linkov
2007-09-23 15:05       ` Richard Stallman
2007-09-23 16:43         ` Drew Adams
2007-09-24  0:11           ` Johan Bockgård
2007-09-24  0:33             ` Drew Adams
2007-09-24  0:46               ` Johan Bockgård
2007-09-23 15:04     ` Richard Stallman
2007-09-24  0:56       ` Dan Nicolaescu
2007-09-24 18:20         ` Richard Stallman

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=BNELLINCGFJLDJIKDGACMEAECDAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.