From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Knighten Newsgroups: gmane.emacs.help Subject: Re: highlight select whole word when in the middle shortcut Date: Wed, 12 May 2010 00:02:30 -0700 Organization: I need to put my ORGANIZATION here. Message-ID: <86ljbpvbzt.fsf@zeus.knighten.org> References: <8481edba-6131-49c8-9d6c-7b9cb1b8fd9f@q16g2000yqq.googlegroups.com> <4bb9e7f7$0$280$14726298@news.sunsite.dk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291945197 5977 80.91.229.12 (10 Dec 2010 01:39:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 01:39:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 10 02:39:52 2010 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.69) (envelope-from ) id 1PQrxf-0004PR-Uy for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Dec 2010 02:39:52 +0100 Original-Received: from localhost ([127.0.0.1]:36898 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQrxf-00044x-3R for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 20:39:51 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 12 May 2010 02:02:30 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:gvHyzQGpIBsAae6ZGCIjJY45VD0= Original-Lines: 32 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-jdqfqwQrTU5FYXFhIxGTsIs2qQ0mrIODYEvKmGqBA/fs+2eTmtYW/XG8uG2NoVMP+R5P+UsDQol2+q4!ZgvjAhk+1PpGS3UUXvnFP0te8/psUlHYDQvfc3nqkFFdVA7Mue8begfe Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Original-Xref: usenet.stanford.edu gnu.emacs.help:178144 X-Mailman-Approved-At: Thu, 09 Dec 2010 20:23:31 -0500 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:77144 Archived-At: Kevin Rodgers writes: > Colin S. Miller wrote: >> mouezapeter wrote: >>> Hi, >>> If I am in the middle of the word "deduction", is there a shortcut to >>> highlight,select the hole word ? >> >> Hi, >> If you are using a GUI, then double-click on the word to select it. >> Otherwise, add this to your .emacs, restart, and then press C-x w >> >> HTH, >> Colin S. Miller >> >> (defun select-word-at-point () >> (interactive) >> (let ((p (bounds-of-thing-at-point 'word))) >> (set-mark (car p)) >> (exchange-point-and-mark) >> (set-mark (cdr p)) >> )) >> >> (global-set-key '[(control x) (w)] 'select-word-at-point) > > M-x mark-word That just marks to the end of the word. -- Robert L. Knighten RLK@knighten.org