emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/isearch-mb b156934274 3/3: Convert README to org format


From: ELPA Syncer
Subject: [elpa] externals/isearch-mb b156934274 3/3: Convert README to org format
Date: Fri, 28 Jan 2022 04:57:57 -0500 (EST)

branch: externals/isearch-mb
commit b156934274215a5f87ff5248cd5f0ee723a6189f
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>

    Convert README to org format
---
 README.md  | 141 -------------------------------------------------------------
 README.org | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+), 141 deletions(-)

diff --git a/README.md b/README.md
deleted file mode 100644
index 211d8e7a4d..0000000000
--- a/README.md
+++ /dev/null
@@ -1,141 +0,0 @@
-isearch-mb
-==========
-
-<a href="http://elpa.gnu.org/packages/isearch-mb.html";><img alt="GNU ELPA" 
src="https://elpa.gnu.org/packages/isearch-mb.svg"/></a>
-
-This Emacs package provides an alternative isearch UI based on the
-minibuffer.  This allows editing the search string in arbitrary ways
-without any special maneuver; unlike standard isearch, cursor motion
-commands do not end the search.  Moreover, the search status
-information in the echo area and some keybindings are slightly
-simplified.
-
-isearch-mb is part of [GNU ELPA] and can be installed with `M-x
-package-install RET isearch-mb RET`.  To activate it, type `M-x
-isearch-mb-mode RET`.
-
-Keybindings
------------
-
-During a search, `isearch-mb-minibuffer-map` is active.  By default,
-it includes the following commands:
-
-- <kbd>C-s</kbd>, <kbd>↓</kbd>: `isearch-repeat-forward`
-- <kbd>C-r</kbd>, <kbd>↑</kbd>: `isearch-repeat-backward`
-- <kbd>M-<</kbd>: `isearch-beginning-of-buffer`
-- <kbd>M-></kbd>: `isearch-end-of-buffer`
-- <kbd>M-%</kbd>: `isearch-query-replace`
-- <kbd>C-M-%</kbd>: `isearch-query-replace-regexp`
-- <kbd>M-s</kbd> prefix: similar to standard isearch
-
-Everything else works as in a plain minibuffer.  For instance,
-<kbd>RET</kbd> ends the search normally and <kbd>C-g</kbd> cancels it.
-
-Some customization ideas
-------------------------
-
-isearch provides a myriad of customization options, and most of them
-make just as much sense when using isearch-mb.  The following are some
-uncontroversial improvements of the defaults:
-
-``` elisp
-(setq-default
- ;; Match count next to the minibuffer prompt
- isearch-lazy-count t
- ;; Don't be stingy with history; default is to keep just 16 entries
- search-ring-max 200
- regexp-search-ring-max 200)
-```
-
-Note that since isearch-mb relies on a regular minibuffer, you can use
-you favorite tool to browse the history of previous search strings
-(say, the `consult-history` command from the excellent [Consult]
-package).
-
-Using regexp search by default is a popular option as well:
-
-```elisp
-(global-set-key (kbd "C-s") 'isearch-forward-regexp)
-(global-set-key (kbd "C-r") 'isearch-backward-regexp)
-```
-
-For a Swiper-style fuzzy search, where spaces match any sequence of
-characters in a line, use the settings below.  You can still toggle
-strict whitespace matching with <kbd>M-s SPC</kbd> during a search.
-
-``` elisp
-(setq-default
- isearch-regexp-lax-whitespace t
- search-whitespace-regexp ".*?")
-```
-
-Interaction with other isearch extensions
------------------------------------------
-
-Some third-party isearch extensions require a bit of configuration in
-order to work with isearch-mb.  There are three cases to consider:
-
-- **Commands that start a search** in a special state shouldn't
-  require extra configuration.  This includes PDF Tools, Embark, etc.
-
-- **Commands that operate during a search session** should be added to
-  the list `isearch-mb--with-buffer`.  Examples of this case are
-  [`loccur-isearch`][loccur] and [`consult-isearch`][consult].
-
-  ``` elisp
-  (add-to-list 'isearch-mb--with-buffer #'loccur-isearch)
-  (define-key isearch-mb-minibuffer-map (kbd "C-o") #'loccur-isearch)
-
-  (add-to-list 'isearch-mb--with-buffer #'consult-isearch)
-  (define-key isearch-mb-minibuffer-map (kbd "M-r") #'consult-isearch)
-  ```
-
-  Most isearch commands that are not made available by default in
-  isearch-mb can also be used in this fashion:
-
-  ``` elisp
-  (add-to-list 'isearch-mb--with-buffer #'isearch-yank-word)
-  (define-key isearch-mb-minibuffer-map (kbd "M-s C-w") #'isearch-yank-word)
-  ```
-
-- **Commands that end the isearch session** should be added to the
-  list `isearch-mb--after-exit`.  Examples of this case are
-  [`anzu-isearch-query-replace`][anzu] and [`consult-line`][consult]:
-
-  ``` elisp
-  (add-to-list 'isearch-mb--after-exit #'anzu-isearch-query-replace)
-  (define-key isearch-mb-minibuffer-map (kbd "M-%") 
'anzu-isearch-query-replace)
-
-  (add-to-list 'isearch-mb--after-exit #'consult-line)
-  (define-key isearch-mb-minibuffer-map (kbd "M-s l") 'consult-line)
-  ```
-
-  Making motion commands quit the search as in standard isearch is out
-  of the scope of this package, but you can define your own commands
-  to emulate that effect.  Here is one possibility:
-
-  ```elisp
-  (defun move-end-of-line-maybe-ending-isearch (arg)
-  "End search and move to end of line, but only if already at the end of the 
minibuffer."
-    (interactive "p")
-    (if (eobp)
-        (isearch-mb--after-exit
-         (lambda ()
-           (move-end-of-line arg)
-           (isearch-done)))
-      (move-end-of-line arg)))
-
-  (define-key isearch-mb-minibuffer-map (kbd "C-e") 
'move-end-of-line-maybe-ending-isearch)
-  ```
-
-Contributing
-------------
-
-Discussions, suggestions and code contributions are welcome!  Since
-this package is part of GNU ELPA, nontrivial contributions (above 15
-lines of code) require a copyright assignment to the FSF.
-
-[GNU ELPA]: https://elpa.gnu.org/packages/isearch-mb.html
-[consult]: https://github.com/minad/consult
-[loccur]: https://github.com/fourier/loccur#isearch-integration
-[anzu]: https://github.com/emacsorphanage/anzu
diff --git a/README.org b/README.org
new file mode 100644
index 0000000000..b3eb319ca1
--- /dev/null
+++ b/README.org
@@ -0,0 +1,131 @@
+#+title: isearch-mb --- Control isearch from the minibuffer
+
+#+html: <a href="http://elpa.gnu.org/packages/isearch-mb.html";><img alt="GNU 
ELPA" src="https://elpa.gnu.org/packages/isearch-mb.svg"/></a>
+
+This Emacs package provides an alternative isearch UI based on the
+minibuffer. This allows editing the search string in arbitrary ways
+without any special maneuver; unlike standard isearch, cursor motion
+commands do not end the search. Moreover, the search status
+information in the echo area and some keybindings are slightly
+simplified.
+
+isearch-mb is part of [[https://elpa.gnu.org/packages/isearch-mb.html][GNU 
ELPA]] and can be installed with =M-x
+package-install RET isearch-mb RET=. To activate it, type =M-x
+isearch-mb-mode RET=.
+
+* Keybindings
+
+During a search, =isearch-mb-minibuffer-map= is active. By default, it
+includes the following commands:
+
+- =C-s=, =↓=: =isearch-repeat-forward=
+- =C-r=, =↑=: =isearch-repeat-backward=
+- =M-<=: =isearch-beginning-of-buffer=
+- =M->=: =isearch-end-of-buffer=
+- =M-%=: =isearch-query-replace=
+- =C-M-%=: =isearch-query-replace-regexp=
+- =M-s= prefix: similar to standard isearch
+
+Everything else works as in a plain minibuffer. For instance, =RET=
+ends the search normally and =C-g= cancels it.
+
+* Some customization ideas
+
+isearch provides a myriad of customization options, and most of them
+make just as much sense when using isearch-mb. The following are some
+uncontroversial improvements of the defaults:
+
+#+begin_example emacs-lisp
+  (setq-default
+   ;; Match count next to the minibuffer prompt
+   isearch-lazy-count t
+   ;; Don't be stingy with history; default is to keep just 16 entries
+   search-ring-max 200
+   regexp-search-ring-max 200)
+#+end_example
+
+Note that since isearch-mb relies on a regular minibuffer, you can use
+you favorite tool to browse the history of previous search strings
+(say, the =consult-history= command from the excellent 
[[https://github.com/minad/consult][Consult]]
+package).
+
+Using regexp search by default is a popular option as well:
+
+#+begin_example emacs-lisp
+  (global-set-key (kbd "C-s") 'isearch-forward-regexp)
+  (global-set-key (kbd "C-r") 'isearch-backward-regexp)
+#+end_example
+
+For a Swiper-style fuzzy search, where spaces match any sequence of
+characters in a line, use the settings below. You can still toggle
+strict whitespace matching with M-s SPC during a search.
+
+#+begin_example emacs-lisp
+  (setq-default
+   isearch-regexp-lax-whitespace t
+   search-whitespace-regexp ".*?")
+#+end_example
+
+* Interaction with other isearch extensions
+
+Some third-party isearch extensions require a bit of configuration in
+order to work with isearch-mb. There are three cases to consider:
+
+- *Commands that start a search* in a special state shouldn't require
+  extra configuration. This includes PDF Tools, Embark, etc.
+
+- *Commands that operate during a search session* should be added to
+  the list =isearch-mb--with-buffer=. Examples of this case are
+  [[https://github.com/fourier/loccur#isearch-integration][=loccur-isearch=]] 
and [[https://github.com/minad/consult][=consult-isearch=]].
+
+  #+begin_example emacs-lisp
+    (add-to-list 'isearch-mb--with-buffer #'loccur-isearch)
+    (define-key isearch-mb-minibuffer-map (kbd "C-o") #'loccur-isearch)
+
+    (add-to-list 'isearch-mb--with-buffer #'consult-isearch)
+    (define-key isearch-mb-minibuffer-map (kbd "M-r") #'consult-isearch)
+  #+end_example
+
+  Most isearch commands that are not made available by default in
+  isearch-mb can also be used in this fashion:
+
+  #+begin_example emacs-lisp
+    (add-to-list 'isearch-mb--with-buffer #'isearch-yank-word)
+    (define-key isearch-mb-minibuffer-map (kbd "M-s C-w") #'isearch-yank-word)
+  #+end_example
+
+- *Commands that end the isearch session* should be added to the list
+  =isearch-mb--after-exit=. Examples of this case are
+  [[https://github.com/emacsorphanage/anzu][=anzu-isearch-query-replace=]] and 
[[https://github.com/minad/consult][=consult-line=]]:
+
+  #+begin_example emacs-lisp
+    (add-to-list 'isearch-mb--after-exit #'anzu-isearch-query-replace)
+    (define-key isearch-mb-minibuffer-map (kbd "M-%") 
'anzu-isearch-query-replace)
+
+    (add-to-list 'isearch-mb--after-exit #'consult-line)
+    (define-key isearch-mb-minibuffer-map (kbd "M-s l") 'consult-line)
+  #+end_example
+
+  Making motion commands quit the search as in standard isearch is out
+  of the scope of this package, but you can define your own commands
+  to emulate that effect. Here is one possibility:
+
+  #+begin_example emacs-lisp
+    (defun move-end-of-line-maybe-ending-isearch (arg)
+    "End search and move to end of line, but only if already at the end of the 
minibuffer."
+      (interactive "p")
+      (if (eobp)
+          (isearch-mb--after-exit
+           (lambda ()
+             (move-end-of-line arg)
+             (isearch-done)))
+        (move-end-of-line arg)))
+
+    (define-key isearch-mb-minibuffer-map (kbd "C-e") 
'move-end-of-line-maybe-ending-isearch)
+  #+end_example
+
+* Contributing
+
+Discussions, suggestions and code contributions are welcome! Since
+this package is part of GNU ELPA, nontrivial contributions (above 15
+lines of code) require a copyright assignment to the FSF.



reply via email to

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