unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 36644@debbugs.gnu.org
Subject: bug#36644: Git log search
Date: Tue, 16 Jul 2019 23:15:32 +0300	[thread overview]
Message-ID: <87tvbliw37.fsf@mail.linkov.net> (raw)
In-Reply-To: <23ad9090-ebfc-4307-b41f-30f7c310d978@yandex.ru> (Dmitry Gutov's message of "Tue, 16 Jul 2019 17:25:39 +0300")

>>> Is pattern a regexp or a verbatim string? That should be documented.
>>
>> Fixed to use string.
>
> Since --grep expects a regexp, shouldn't PATTERN be passed through
> regexp-quote as well? Though it expects Emacs regexps, so it doesn't quote
> parens or pipes.

Should this still be used when the need is to pass regexps to the backend
search command verbatim?

>>> Git supports regexps, but maybe we should look at what other backends
>>> can support as well.
>>
>> It seems the most compatible type is string.
>
> OK, if that is your conclusion.

I'm still not sure.  Regexps are more useful.

>>> I wonder if the format of the output should be specified as well.
>>> E.g. by saying that it's the same as for print-log, long version.
>>
>> Fixed by saying it's long version.
>>
>> Should it support short format as well?
>
> I don't know. How would it be used?

Short format displays one line per entry and allows expanding
after pressing RET.  OTOH, when using long format we could highlight
all matches in log entries that will be immediately visible
after the command finishes (like in vc-git-grep output buffers).

However, when allowed to use regexp patterns, I don't know how to
highlight matches in git-log output buffer using Emacs regexps
when pattern uses e.g. Perl-compatible regexp allowed in git-log.

>> Should it have a key binding?
>>
>> For example, `vc-log-incoming' is bound to `C-x v I',
>> `vc-log-outgoing' is bound to key `C-x v O', so logically
>> `vc-log-search' would be bound to `C-x v s', but unfortunately
>> it's already taken by `vc-create-tag'.
>
> 'C-x v S', then?

This is good mnemonic keybinding.  The only doubt when adding a new
keybinding is to think if it could be more useful as a prefix key.
Maybe in this case upper-case shifted 'S' is not good as a prefix key.
Otherwise such prefix key could accommodate other vc search related
commands like grep vc files, etc.





  parent reply	other threads:[~2019-07-16 20:15 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13 22:27 bug#36644: Git log search Juri Linkov
2019-07-15 15:05 ` Dmitry Gutov
2019-07-15 22:27   ` Juri Linkov
2019-07-16 14:25     ` Dmitry Gutov
2019-07-16 14:44       ` Andreas Schwab
2019-07-16 15:08       ` Robert Pluim
2019-07-16 20:20         ` Juri Linkov
2019-07-16 22:31           ` Noam Postavsky
2019-07-18 22:35             ` Juri Linkov
2019-07-24 14:57             ` Dmitry Gutov
2019-07-16 20:15       ` Juri Linkov [this message]
2019-07-18 15:01         ` Dmitry Gutov
2019-07-18 15:12           ` Robert Pluim
2019-07-18 18:02             ` Dmitry Gutov
2019-07-18 18:11               ` Robert Pluim
2019-07-18 22:32               ` Juri Linkov
2019-07-24 15:10                 ` Dmitry Gutov
2019-07-24 15:46                   ` Robert Pluim
2019-07-24 15:53                     ` Dmitry Gutov
2019-07-24 16:13                       ` Eli Zaretskii
2019-07-25 12:36                         ` Dmitry Gutov
2019-07-25 13:08                           ` Eli Zaretskii
2019-07-25 13:20                             ` Dmitry Gutov
2019-07-25 13:37                             ` Robert Pluim
2019-07-25 19:00                             ` Juri Linkov
2019-07-25 18:55                           ` Juri Linkov
2019-07-25 21:26                             ` Dmitry Gutov
2019-07-25 21:38                               ` Juri Linkov
2019-07-24 16:13                       ` Robert Pluim
2019-07-24 17:04                         ` Eli Zaretskii
2019-07-24 23:22                           ` Juri Linkov
2019-07-25 12:44                             ` Dmitry Gutov
2019-07-25 18:50                               ` Juri Linkov
2019-07-25 19:19                                 ` Dmitry Gutov
2019-07-29 22:38                             ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87tvbliw37.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=36644@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).