bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40401: 28.0.50; M-x landmark not exists, while described in manual


From: Juri Linkov
Subject: bug#40401: 28.0.50; M-x landmark not exists, while described in manual
Date: Sun, 05 Apr 2020 02:56:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> Ah, you removed it in Emacs 26 actually (I didn't find the commit before
> because I did a git message search for 'landmark' but you put 'Landmark'
> in the commit message.  I should add --regexp-ignore-case to log search
> commands).

Currently I'm working on making hi-lock case-insensitive in bug#40337,
and would be interested in ensuring git search case-insensitive as well.
When I tried to run

  M-x vc-log-search RET landmark

it found that commit with upper-case 'Landmark' using the command:

  git --no-pager log --no-color -i --grep=landmark .

I wonder if this -i (--regexp-ignore-case) here should use the same
logic as in many other search commands:

  (if (and case-fold-search search-upper-case)
      (isearch-no-upper-case-p regexp t)
    case-fold-search)

so if there are no upper-case letters, then vc-log-search is case-insensitive,
otherwise with upper-case letters case-sensitive?

BTW, I use the following nice customization that highlights all found
occurrences in the log:

  ;; Highlight found occurrences in *vc-search-log* output buffer of 
vc-log-search.
  ;; Warning: uses Emacs regexps to highlight Git regexp - their syntax might 
differ!
  (advice-add 'vc-git-log-search :after
              (lambda (buffer pattern)
                (with-current-buffer buffer
                  (vc-run-delayed
                    (highlight-regexp pattern 'hi-yellow)))))

and with fixes from bug#40337 it highlighted even 'Landmark'.

What I don't know is how to make this feature generally useful.
Maybe by adding a new customizable option for vc-git-log-search
that when non-nil will highlight the results?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]