all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: 11095@debbugs.gnu.org
Subject: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment?
Date: Fri, 12 Oct 2012 01:41:04 +0300	[thread overview]
Message-ID: <87zk3s1vjz.fsf@mail.jurta.org> (raw)
In-Reply-To: <87y5jcvjsx.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 12 Oct 2012 01:54:30 +0530")

> The patch allows highlighting of tag at point.  (Note that for all
> practical purposes, tag at point is the symbol at point.) See
> Part_I/Item-2 below for a usecase.
> [...]
> +	       (cond ((not tag) "")
> +		     ((eq tagf 'find-tag-default)
> +		      (format "\\_<%s\\_>" (regexp-quote tag)))
> [...]
>>    As a programmer, I use highlighting to trace variable dependencies
>>    within a function.  For example, in the example below, after
>>    highlighting the variables in __different__ faces, I will come to the
>>    conclusion that "a" depends on "d" and "tmp".
>>
>>      c = d;
>>      b = c + tmp;
>>      a = b;
>>
>>    And I use this very often to track variables and how they get their
>>    values from.
>>
>>    If I were to use the default Emacs provided behaviour then I would
>>    have to press M-n multiple times as I highlight more and more
>>    symbols. (Typically I have 3-5 symbols highlighted before I turn off
>>    highlighting.)

Would you agree that a better way to implement your proposal is to add a new
command to hi-lock.el with a name like `highlight-symbol'?  I mean there are
already such hi-lock commands as:

1. highlight-lines-matching-regexp (that corresponds to occur)
2. highlight-regexp (that corresponds to isearch-forward-regexp)
3. highlight-phrase (that corresponds to isearch-forward-word)

what is currently missing is this command:

4. highlight-symbol (that corresponds to isearch-forward-symbol)

Then both highlight-phrase and highlight-symbol could use internally
isearch functions that turn words and symbols into regexps
and that will do the right thing using search-upper-case and
search-whitespace-regexp.





  parent reply	other threads:[~2012-10-11 22:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26  6:46 bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Jambunathan K
2012-10-10 20:21 ` bug#11095: [PATCH] " Jambunathan K
2012-12-04 21:14   ` Stefan Monnier
2012-12-04 21:39     ` Drew Adams
2012-12-04 21:57       ` Stefan Monnier
2012-12-04 22:43         ` Drew Adams
2012-12-05  3:46           ` Stefan Monnier
2012-12-05 22:15             ` Jambunathan K
2012-12-06  1:14               ` Stefan Monnier
2012-12-06  5:06     ` Jambunathan K
2012-12-06 14:50       ` Jambunathan K
2012-12-06 19:16       ` Stefan Monnier
2012-12-06 19:36         ` Drew Adams
2012-12-06 21:26         ` Jambunathan K
2012-12-06 21:36           ` Stefan Monnier
2012-12-06 22:23             ` Jambunathan K
2012-12-07  4:07               ` Stefan Monnier
2012-12-07  4:46                 ` Jambunathan K
2012-12-07 16:55                   ` Stefan Monnier
2012-12-08 12:50                     ` Jambunathan K
2012-12-10  4:26                       ` Jambunathan K
2012-12-10 18:34                         ` Stefan Monnier
2012-12-10 20:37                           ` Jambunathan K
2012-12-10 21:27                             ` Stefan Monnier
2012-10-10 22:08 ` Jambunathan K
2012-10-11 20:24 ` Jambunathan K
2012-10-11 20:33   ` Jambunathan K
2012-10-11 22:41   ` Juri Linkov [this message]
2012-10-12  4:30     ` Jambunathan K
2012-10-13 16:10       ` Juri Linkov
2012-10-13 17:28         ` Jambunathan K
2012-10-12 16:17 ` Jambunathan K
2012-10-12 18:18 ` Jambunathan K
2012-10-12 19:32 ` bug#11095: [FINAL] " Jambunathan K

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zk3s1vjz.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=11095@debbugs.gnu.org \
    --cc=kjambunathan@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.