unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* can a command specify overwrite selection behavior?
@ 2010-09-01  5:33 Xah Lee
  2010-09-01  8:11 ` Xah Lee
  0 siblings, 1 reply; 17+ messages in thread
From: Xah Lee @ 2010-09-01  5:33 UTC (permalink / raw)
  To: help-gnu-emacs

i have this code that inserts date.

(defun insert-date ()
  "Insert current date."
  (interactive)
  (insert (format-time-string "%Y-%m-%d"))
  )
(put 'insert-date 'delete-selection t)

the last line is to make sure that if i have a text selection, just
overwrite it.

but it doesn't work.

i wrote to FSF about it i think last year as a bug report, i think
Richard Stallman himself turned it down.

but in my daily use, this is quite annoying.

with i think recent interest in behavior of text selection, can this
be made to work?

thanks.

 Xah


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-12-28 14:18 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01  5:33 can a command specify overwrite selection behavior? Xah Lee
2010-09-01  8:11 ` Xah Lee
2010-12-10 23:37   ` Drew Adams
     [not found]   ` <mailman.4.1292024249.16140.help-gnu-emacs@gnu.org>
2010-12-12 15:16     ` Xah Lee
2010-12-13 17:16       ` Drew Adams
     [not found]       ` <mailman.1.1292262212.1009.help-gnu-emacs@gnu.org>
2010-12-22 14:49         ` Xah Lee
2010-12-22 17:12           ` Drew Adams
     [not found]           ` <mailman.0.1293037975.895.help-gnu-emacs@gnu.org>
2010-12-23  2:33             ` Xah Lee
2010-12-25  0:17             ` Ilya Zakharevich
2010-12-25 17:00               ` Drew Adams
     [not found]               ` <mailman.8.1293296501.5624.help-gnu-emacs@gnu.org>
2010-12-25 18:54                 ` Ilya Zakharevich
2010-12-26  0:32                   ` Drew Adams
2010-12-26  2:20                 ` Xah Lee
2010-12-26 16:19                   ` Drew Adams
2010-12-28  2:46                 ` Stefan Monnier
2010-12-28  5:34                   ` Drew Adams
2010-12-28 14:18                     ` Stefan Monnier

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).