GNU bug report logs - #29321
Isearch hit count

Previous Next

Package: emacs;

Reported by: charles <at> aurox.ch (Charles A. Roelli)

Date: Thu, 16 Nov 2017 19:28:02 UTC

Severity: wishlist

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #89 received at 29321 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Live System User <nyc4bos <at> aol.com>
Cc: 29321 <at> debbugs.gnu.org
Subject: Re: bug#29321: Isearch hit count
Date: Sun, 04 Nov 2018 02:11:35 +0200
>   Lets say there are 100 matches.  I search through them and wind
>   up at 42/100.  I stop seaching and do something else.  I decide
>   I want to go back to my previous search.  It would be very handy
>   to have a command to do "goto match 42" or "goto match 67" or
>   "goto match last-match" .e.g. go directly to 100/100 (since 100
>   is the last found numbered match reported by isearch) and I would
>   then see the 100th match highlighted and the indicator displaying
>   "100/100".

Regarding going to the last match, maybe simpler would be to have
these commands?

(defun isearch-beginning-of-buffer ()
  "Go to the first occurrence of the current match.
Move isearch point to the beginning of the buffer and repeat the search."
  (interactive)
  (goto-char (point-min))
  (isearch-repeat-forward))

(define-key isearch-mode-map "\M-s\M-<" 'isearch-beginning-of-buffer)

(defun isearch-end-of-buffer ()
  "Go to the last occurrence of the current match.
Move isearch point to the end of the buffer and repeat the search."
  (interactive)
  (goto-char (point-max))
  (isearch-repeat-backward))

(define-key isearch-mode-map "\M-s\M->" 'isearch-end-of-buffer)

where in isearch-mode 'M-s M-<' will jump to the first match,
and 'M-s M->' will jump to the last match.




This bug report was last modified 6 years and 241 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.