all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs standards with regions
@ 2008-11-24 15:03 Richard Riley
  2008-11-24 16:46 ` Xah Lee
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Richard Riley @ 2008-11-24 15:03 UTC (permalink / raw)
  To: help-gnu-emacs


Is there some reason that most emacs commands do not consider active
region when invoked? One of the biggest UI improvements (for me) would
be for interactive commands to default to the marked region.

e.g C-s  for isearch-forward

Hilite "word" and "word" is the default search term. Ditto for % (search
and replace). I just modified my py-execute-buffer for example to call
py-execute-region with the marked region rather than the entire buffer
if the region was active. Why have a seperate "execute-region" command?

The ignoring of the region in so many key commands makes we wonder if I
am missnig a default setting or if there was a decision not to use the
region.

e.g this Google search function I use defaults

,----
| (defun rgr/google-search-prompt()
|   (interactive)
|   (let* ((default (region-or-word-at-point))
| 	 (term (read-string (format "Google the web for the following phrase (%s): "
|                                     default))))
|     (message "term is %s. Length is %d" term (length term))
|     (rgr/google (if (zerop(length term)) default term))
|     ))
`----


Can anyone add to this?



-- 
 important and urgent problems of the technology of today are no longer the satisfactions of the primary needs or of archetypal wishes, but the reparation of the evils and damages by the technology of yesterday.  ~Dennis Gabor, Innovations:  Scientific, Technological and Social, 1970


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

end of thread, other threads:[~2008-11-26 14:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 15:03 Emacs standards with regions Richard Riley
2008-11-24 16:46 ` Xah Lee
2008-11-24 18:15   ` Xah Lee
2008-11-24 21:07     ` Eli Zaretskii
     [not found]     ` <mailman.1152.1227560873.26697.help-gnu-emacs@gnu.org>
2008-11-24 21:26       ` Richard Riley
2008-11-25  3:40     ` Jason Rumney
2008-11-25 10:16       ` Xah Lee
2008-11-25 15:55         ` Jason Rumney
2008-11-25 15:57           ` Richard Riley
2008-11-25 18:01             ` Reiner Steib
2008-11-25 20:31     ` Teemu Likonen
2008-11-25 20:47       ` Xah Lee
2008-11-25 23:55         ` Alan Mackenzie
2008-11-26  8:19 ` Andreas Röhler
     [not found] ` <mailman.1274.1227687564.26697.help-gnu-emacs@gnu.org>
2008-11-26 14:45   ` Xah Lee

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.