unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Richard Riley <rileyrgdev@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Emacs standards with regions
Date: Mon, 24 Nov 2008 16:03:46 +0100	[thread overview]
Message-ID: <ggefps$lmv$1@news.motzarella.org> (raw)


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


             reply	other threads:[~2008-11-24 15:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 15:03 Richard Riley [this message]
2008-11-24 16:46 ` Emacs standards with regions 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

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='ggefps$lmv$1@news.motzarella.org' \
    --to=rileyrgdev@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).