From: Juri Linkov Date: Wed, 24 Jul 2019 23:21:28 +0000 (+0300) Subject: * lisp/vc/vc.el (vc-log-search): Fix docstring (bug#36644). X-Git-Tag: emacs-27.0.90~1817^2~135 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8a5a1bebfa95bf50ef390e4b101f1cfe8046d565;p=emacs.git * lisp/vc/vc.el (vc-log-search): Fix docstring (bug#36644). * lisp/vc/vc-git.el (vc-git-log-search): Add docstring. --- diff --git a/etc/NEWS b/etc/NEWS index 08f0e654f7f..c1cc216659e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -703,8 +703,8 @@ buffers will delete the marked files (or if no files are marked, the file under point). This command does not notify the VC backend, and is mostly useful for unregistered files. -*** New command 'vc-log-search' asks for a pattern string, searches -it in the revision log, and displays matched log entries in the +*** New command 'vc-log-search' asks for a pattern, searches it +in the revision log, and displays matched log entries in the log buffer. For example, 'M-x vc-log-search RET bug#36644 RET' displays all entries whose log messages match the bug number. With a prefix argument asks for a command, so for example, diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index d4833d86ac4..9715aea1fdc 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -74,6 +74,9 @@ ;; - steal-lock (file &optional revision) NOT NEEDED ;; HISTORY FUNCTIONS ;; * print-log (files buffer &optional shortlog start-revision limit) OK +;; * log-outgoing (buffer remote-location) OK +;; * log-incoming (buffer remote-location) OK +;; - log-search (buffer pattern) OK ;; - log-view-mode () OK ;; - show-log-entry (revision) OK ;; - comment-history (file) ?? @@ -1074,6 +1077,13 @@ If LIMIT is a revision string, use it as an end-revision." remote-location)))) (defun vc-git-log-search (buffer pattern) + "Search the log of changes for PATTERN and output results into BUFFER. + +PATTERN is a basic regular expression by default in Git. + +Display all entries that match log messages in long format. +With a prefix argument, ask for a command to run that will output +log entries." (let ((args `("log" "--no-color" "-i" ,(format "--grep=%s" (or pattern ""))))) (when current-prefix-arg diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index a68beb5e505..4cac1539289 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -339,7 +339,7 @@ ;; ;; - log-search (pattern) ;; -;; Search for string PATTERN in the revision log. +;; Search for PATTERN in the revision log. ;; ;; - log-view-mode () ;; @@ -2532,7 +2532,12 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION." ;;;###autoload (defun vc-log-search (pattern) - "Search a log of changes for PATTERN string. + "Search the log of changes for PATTERN. + +PATTERN is usually interpreted as a regular expression. However, its +exact semantics is up to the backend's log search command; some can +only match fixed strings. + Display all entries that match log messages in long format. With a prefix argument, ask for a command to run that will output log entries."