From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How do I highlight word at point? Date: Sun, 19 Oct 2008 16:35:38 -0700 Message-ID: <005d01c93243$648671e0$0200a8c0@us.oracle.com> References: <1224382569.209484@nntp.acecape.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224491698 10085 80.91.229.12 (20 Oct 2008 08:34:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2008 08:34:58 +0000 (UTC) To: "'Wei Weng'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 20 10:36:00 2008 connect(): Connection refused 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 1Krhpg-0006mg-F8 for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Oct 2008 01:37:12 +0200 Original-Received: from localhost ([127.0.0.1]:50259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krhob-00060k-8l for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Oct 2008 19:36:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Krhnz-0005qi-Im for help-gnu-emacs@gnu.org; Sun, 19 Oct 2008 19:35:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Krhnx-0005pX-Ln for help-gnu-emacs@gnu.org; Sun, 19 Oct 2008 19:35:27 -0400 Original-Received: from [199.232.76.173] (port=55689 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Krhnx-0005pM-6H for help-gnu-emacs@gnu.org; Sun, 19 Oct 2008 19:35:25 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]:28732) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Krhnw-0002xC-EW for help-gnu-emacs@gnu.org; Sun, 19 Oct 2008 19:35:24 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m9JNZKMQ025339; Sun, 19 Oct 2008 18:35:20 -0500 Original-Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m9JNZIij019138; Sun, 19 Oct 2008 17:35:19 -0600 Original-Received: from dradamslap1 (/24.23.165.218) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 19 Oct 2008 23:35:18 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1224382569.209484@nntp.acecape.com> Thread-Index: AckxlBoglj4WFRySQmWqGC8YRnWowgApY3Ww X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:58939 Archived-At: > The title pretty much said it. :) Not really. What do you mean by "highlight"? Most replies so far have assumed that you mean just select the word (region highlighting). If you mean instead that you want to change the foreground or background color or something else about the appearance of the word using a text property or an overlay, then there are many ways to do that. These alternatives might help: 1. Select the current word (or whatever you want to highlight). For example, command `select-thing-near-point' in `thing-cmds.el' will do that. (I bind that command to `M-@'.) Then hit `C-mouse-2' to get the `Text Properties' menu. Then do one of the following: a. Choose anything in the `Face', `Foreground', or `Background' submenus. Example: `Other' (or `M-o o') lets you specify a face to use. b. If you use libraries `facemenu+.el' and `highlight.el', then choose anything in the `Highlight' submenu. Example: `Highlight Region/Buffer'. (I bind that command to `C-x C-y'.) 2. If you use `facemenu+.el' and `highlight.el', then you can alternatively use command `hlt-highlighter' (or `Text Properties > Highlight > Highlighter Pen') and then drag the mouse like a highlighter pen. (I bind that command to `C-x mouse-2'.) There are other commands in these libraries that will also let you highlight a word (or whatever). * http://www.emacswiki.org/cgi-bin/wiki/FaceMenuPlus - facemenu+.el * http://www.emacswiki.org/emacs/HighLight - highlight.el * http://www.emacswiki.org/emacs/ThingAtPointCommands - thing-cmds.el See also nodes `Editing Format Info' and `Format Faces' in the Emacs menu - it describes the vanilla `Text Properties' menu (e.g. 1a, above, but not 1b or 2). See also http://www.emacswiki.org/emacs/HighlightTemporarily for related possibilities. HTH. Next time, please try to be more specific in your request - "highlight word at point" can mean several different things in Emacs. The more specific you are, the better the help you will get and the less likely the thread will wander off topic.