From: Jambunathan K <kjambunathan@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: 14405@debbugs.gnu.org
Subject: bug#14405: 24.3.50; read-regexp-defaults-function
Date: Fri, 27 Dec 2013 10:52:31 +0530 [thread overview]
Message-ID: <87y536dg14.fsf@gmail.com> (raw)
In-Reply-To: <87y538hdm9.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 25 Dec 2013 22:56:30 +0200")
Juri Linkov <juri@jurta.org> writes:
>> I depend on occur and rgrep. For occur, I want the symbol delimiters.
>> For rgrep, a mere tag at point will do. If one were to use multi-occur
>> from Buffer menu mode, a symbol match doesn't make sense.
>
> You can use `this-command' for different defaults of different commands
> in a customized function like you wrote in the docstring that is
> still preserved in `read-regexp-defaults-function'.
For the benefit of googler out there.
(setq read-regexp-defaults-function
(lambda nil
(pcase this-command
(`rgrep (find-tag-default-as-regexp))
(_ (find-tag-default-as-symbol-regexp)))))
It would be a good idea to choose a different name for
find-tag-default-*? The function retrieves the tag-at-point but doesn't
find it (as in M-.). So "find" is misleading.
prev parent reply other threads:[~2013-12-27 5:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 23:51 bug#14405: 24.3.50; read-regexp-defaults-function Juri Linkov
2013-05-15 22:58 ` Juri Linkov
2013-05-18 23:28 ` Juri Linkov
[not found] ` <87mwjvwb1u.fsf@mail.jurta.org>
2013-12-21 2:39 ` Jambunathan K
2013-12-21 21:25 ` Juri Linkov
2013-12-21 22:28 ` Jambunathan K
2013-12-22 21:39 ` Juri Linkov
2013-12-23 2:38 ` Jambunathan K
2013-12-24 18:25 ` Jambunathan K
2013-12-25 20:56 ` Juri Linkov
2013-12-27 5:22 ` Jambunathan K [this message]
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=87y536dg14.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=14405@debbugs.gnu.org \
--cc=juri@jurta.org \
/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.