From: Xah <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: (insert ...) won't respect delete-selection-mode
Date: Thu, 9 Oct 2008 14:27:36 -0700 (PDT) [thread overview]
Message-ID: <a56f931b-2458-4b11-a269-7ca4322f04b7@t39g2000prh.googlegroups.com> (raw)
In-Reply-To: mailman.621.1223502455.25473.help-gnu-emacs@gnu.org
In this thread:
«(insert ...) won't respect delete-selection-mode Options»
«(put 'insert-date 'delete-selection t)»
«The command also needs to be activated with keyboard. M-x does not do
it.»
«Doesn't this look like a delicate problem? Maybe a bug?»
I reported this to FSF.
http://groups.google.com/group/gnu.emacs.bug/browse_frm/thread/ba8ab4a5223591b7
Richard M Stallman wrote:
«It's intentional. This feature implements expectations that users
have for single-character editing operations in other editors, where
those commands don't have names and there's nothing like M-x. So
there's no reason why M-x should delete the region. It is better for
M-x just to call the function.»
Xah Lee wrote:
«Interesting point.
For elisp programers who wish to write extentions where the command's
behaviors change depending on whether user has delete-selection-mode
on, what should they do? Check for mark-active and delete-selection-
mode before any call to the insert function?
also, the current behavior seems to introduce a complexity, where
command behaves differently depending on whether it is invoked by a
keybinding or by M-x.
»
Richard wrote:
«If you really want to make behavior depend on those variables, you
need to check them. Whether you check them before or after calling
`insert' is up to you.
But that seems like a strange thing to do.»
Doh! I failed humanity.
Xah
∑ http://xahlee.org/
☄
prev parent reply other threads:[~2008-10-09 21:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 19:11 (insert ...) won't respect delete-selection-mode Xah
2008-10-07 19:57 ` Drew Adams
[not found] ` <mailman.495.1223409434.25473.help-gnu-emacs@gnu.org>
2008-10-07 21:08 ` Chetan
2008-10-08 7:20 ` Xah
2008-10-08 10:04 ` Andreas Politz
2008-10-08 16:48 ` Xah
2008-10-08 21:09 ` Andreas Politz
2008-10-08 21:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.621.1223502455.25473.help-gnu-emacs@gnu.org>
2008-10-09 21:27 ` Xah [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a56f931b-2458-4b11-a269-7ca4322f04b7@t39g2000prh.googlegroups.com \
--to=xahlee@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).