From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: FW: commands to select things of different kinds Date: Sun, 09 Mar 2008 23:32:14 -0400 Message-ID: References: <001c01c88204$f5891160$0600a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205119949 29516 80.91.229.12 (10 Mar 2008 03:32:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Mar 2008 03:32:29 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 10 04:32:56 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JYYkx-0006O3-Ft for ged-emacs-devel@m.gmane.org; Mon, 10 Mar 2008 04:32:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYYkP-0004ez-5Y for ged-emacs-devel@m.gmane.org; Sun, 09 Mar 2008 23:32:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JYYkK-0004by-9y for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:32:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JYYkJ-0004aa-HR for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:32:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JYYkJ-0004aM-CQ for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:32:15 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JYYkJ-0000RM-B2 for emacs-devel@gnu.org; Sun, 09 Mar 2008 23:32:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgCAFJI1EfO+J2CdGdsb2JhbACQfQEwgRqWAIEH X-IronPort-AV: E=Sophos;i="4.25,472,1199682000"; d="scan'208";a="15776320" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 09 Mar 2008 23:32:14 -0400 Original-Received: from pastel.home ([206.248.157.130]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id QGQ59014; Sun, 09 Mar 2008 23:32:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 499FD805A; Sun, 9 Mar 2008 23:32:14 -0400 (EDT) In-Reply-To: <001c01c88204$f5891160$0600a8c0@us.oracle.com> (Drew Adams's message of "Sun, 9 Mar 2008 08:45:18 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91990 Archived-At: > Resending, at Richard's request. Could you digest it into a single thread of text. The current mess of forward and backward quoting is just unreadable. Stefan >> -----Original Message----- >> From: Richard Stallman Sent: Wednesday, July 18, 2007 1:54 PM >> To: Drew Adams >> >> Not really; haven't thought much about it. As I said, >> I've been using >> `C-M-SPC' for `mark-thing' (stealing from `mark-sexp') >> and `M-@' for >> `cycle-thing-region' (stealing from `mark-word'). >> >> Those might be a good replacement, because I would expect people don't >> use those two bindings very much. But we have to ask people first. >> -----Original Message----- >> From: Drew Adams Sent: Tuesday, July 17, 2007 9:52 PM >> To: rms@gnu.org >> >> > > If the region is not yet active, then you are prompted (with >> > > completion) for the type of thing to select. The default type >> > > is `sexp'. >> > >> > For the first such thing, the region is not active, so you >> > are prompted. For subsequent (successive) things, there is >> > no prompt - the same type is used as the last. When you are >> > prompted, `sexp' is the default type. >> > >> > I see. Maybe it is a good idea. If people like it, we can >> install it >> > in Emacs. >> > >> > Do you have suggested bindings for these two commands? >> >> Not really; haven't thought much about it. As I said, I've >> been using `C-M-SPC' for `mark-thing' (stealing from >> `mark-sexp') and `M-@' for `cycle-thing-region' (stealing >> from `mark-word'). But, as I also said, I'm not suggesting >> changing those bindings for Emacs. >> >> I think these commands are mainly useful for Transient Mark >> mode, if that helps. Perhaps there are some bindings that >> normally make less sense in t-m mode, which could therefore >> be recuperated. I don't know. >> -----Original Message----- >> From: Drew Adams Sent: Monday, July 16, 2007 12:17 AM >> To: Emacs-Devel >> >> Any interest in these commands? They let you select (that is, >> mark) various >> things at or near point. They are most useful in Transient >> Mark mode - they >> act differently depending on whether the mark is active. >> >> * `mark-thing' selects successive things, starting at point. >> The mark is put >> at the same place that command 'forward-'thing would put it >> (using the same >> prefix argument). If the region is not yet active, then you >> are prompted >> (with completion) for the type of thing to select. The default type is >> `sexp'. >> >> * `cycle-thing-region' selects one thing at or near point >> (just the thing, >> not from point through the thing, even if the thing is not exactly at >> point). Repeat it to cycle among the thing types - one thing >> of the current >> type is selected at each invocation. The default order of >> types is `word', >> `sexp', `list', `line', `sentence', `paragraph', `page', >> `defun', `number', >> `form'. That order is customizable, and a major mode could >> also change it to >> put the most commonly used types first. >> >> I bind `mark-thing' to `C-M-SPC' as a replacement for `mark-sexp'. >> >> I bind `cycle-thing-region' to `M-@' as a replacement for >> `mark-word'. (By >> default, it does what `mark-word' does without a prefix arg. Unlike, >> `mark-thing', however, `cycle-thing-region' does not accept a >> prefix arg.) >> >> I don't propose these bindings for Emacs generally, but if you use >> transient-mark mode you might want to give them a try. >> >> To select successive things in transient-mark mode, you can use >> `cycle-thing-region' as an alternative to completion for >> choosing the thing >> type for `mark-thing' - but you need to use `C-x C-x' between >> the two. That >> is, you can use 'M-@ C-x C-x C-M-SPC' to select successive >> words, 'M-@ M-@ >> C-x C-x C-M-SPC' for successive symbols, and so on. >> >> The code is attached.