From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Emacs standards with regions Date: Mon, 24 Nov 2008 16:03:46 +0100 Organization: A noiseless patient Spider Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227541358 19439 80.91.229.12 (24 Nov 2008 15:42:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Nov 2008 15:42:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 24 16:43:41 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L4dar-0002Y5-07 for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Nov 2008 16:43:21 +0100 Original-Received: from localhost ([127.0.0.1]:41544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4dZh-0008Ci-OY for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Nov 2008 10:42:09 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!npeer-ng1.kpn.DE!newsfeed.straub-nv.de!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: news.motzarella.org U2FsdGVkX1/PUlLzHBNIdJ0wKYIBlJC1oTG8E/Ypii1XNdRmv/QX2jwM7RlmN14eWrsFzhBbmHUp9oQIh6y6ib+x6wt/y5fsp0jS5mULHhYgvVya5CYlfXjf1tnczJ4ESGKAxbw9URKRulH3IyT2Sw== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Mon, 24 Nov 2008 15:04:28 +0000 (UTC) X-Auth-Sender: U2FsdGVkX187tmCm8qIvWjXIHEwYU4xik/7zR+QetIygqiGhzuuLWQ== Cancel-Lock: sha1:GOqkdfyet3/iMMyKnyGcmZ0TkjU= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:164724 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60055 Archived-At: 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