From unknown Sun Jun 15 07:56:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14405 <14405@debbugs.gnu.org> To: bug#14405 <14405@debbugs.gnu.org> Subject: Status: 24.3.50; read-regexp-defaults-function Reply-To: bug#14405 <14405@debbugs.gnu.org> Date: Sun, 15 Jun 2025 14:56:11 +0000 retitle 14405 24.3.50; read-regexp-defaults-function reassign 14405 emacs submitter 14405 Juri Linkov severity 14405 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Tue May 14 20:01:48 2013 Received: (at submit) by debbugs.gnu.org; 15 May 2013 00:01:48 +0000 Received: from localhost ([127.0.0.1]:44828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcPAA-0001zg-Mc for submit@debbugs.gnu.org; Tue, 14 May 2013 20:01:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59911) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UcPA7-0001zD-HS for submit@debbugs.gnu.org; Tue, 14 May 2013 20:01:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcP9z-0004sA-5r for submit@debbugs.gnu.org; Tue, 14 May 2013 20:01:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcP9z-0004s6-3O for submit@debbugs.gnu.org; Tue, 14 May 2013 20:01:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcP9w-0006aI-EZ for bug-gnu-emacs@gnu.org; Tue, 14 May 2013 20:01:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcP9u-0004ra-Se for bug-gnu-emacs@gnu.org; Tue, 14 May 2013 20:01:32 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:46202 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcP9u-0004rW-KL for bug-gnu-emacs@gnu.org; Tue, 14 May 2013 20:01:30 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 2DE1E258B9E91C for ; Tue, 14 May 2013 17:01:27 -0700 (PDT) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: 24.3.50; read-regexp-defaults-function Organization: JURTA Date: Wed, 15 May 2013 02:51:20 +0300 Message-ID: <87ppwtw1zq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is a continuation from bug#13892 and bug#13687 closed and archived two months ago. As the unfinished discussion indicates there are pending enhancements to create a single option to define the same defaulting behavior for all regexp-reading commands and to group the existing defaults to separate functions that can be overridden by customizing that option. This is a preliminary implementation: === modified file 'lisp/replace.el' --- lisp/replace.el 2013-04-22 04:17:30 +0000 +++ lisp/replace.el 2013-05-14 23:50:29 +0000 @@ -580,6 +580,41 @@ (defvar regexp-history nil (defvar occur-collect-regexp-history '("\\1") "History of regexp for occur's collect operation") +(defcustom read-regexp-defaults-function nil + "Function that provides default regexp(s) for regexp reading commands. +This function should take no arguments and return one of nil, a +regexp or a list of regexps. The return value of this function is used +as DEFAULTS param of `read-regexp'. This function is called only during +interactive use. + +You can customize `read-regexp-defaults-function' to the value +`find-tag-default-as-regexp' to highlight a symbol at point." + :type '(choice + (const :tag "No default regexp reading function" nil) + (choice :tag "Function to provide default for read-regexp" + (function-item :tag "Tag at point" find-tag-default) + (function-item :tag "Symbol at point" find-tag-default-as-regexp) + (function-item :tag "Latest history" (lambda () (car regexp-history))) + function)) + :group 'matching + :version "24.4") + +(defun read-regexp-defaults () + (if (functionp read-regexp-defaults-function) + (funcall read-regexp-defaults-function))) + +(defun read-regexp-defaults-history () + "Return the latest regexp from `regexp-history'. +See `read-regexp-defaults-function' for details." + (or (read-regexp-defaults) + (car regexp-history))) + +(defun read-regexp-defaults-tag () + "Return the regexp that matches the default tag at point. +See `read-regexp-defaults-function' for details." + (or (read-regexp-defaults) + (find-tag-default-as-regexp))) + (defun read-regexp (prompt &optional defaults history) "Read and return a regular expression as a string. When PROMPT doesn't end with a colon and space, it adds a final \": \". @@ -636,7 +671,7 @@ (defun keep-lines-read-args (prompt) "Read arguments for `keep-lines' and friends. Prompt for a regexp with PROMPT. Value is a list, (REGEXP)." - (list (read-regexp prompt) nil nil t)) + (list (read-regexp prompt (read-regexp-defaults-history)) nil nil t)) (defun keep-lines (regexp &optional rstart rend interactive) "Delete all lines except those containing matches for REGEXP. @@ -1143,32 +1178,35 @@ (defcustom occur-excluded-properties :group 'matching :version "22.1") -(defvar occur-read-regexp-defaults-function - 'occur-read-regexp-defaults +(defun occur-read-regexp-defaults () "Function that provides default regexp(s) for occur commands. -This function should take no arguments and return one of nil, a +This function takes no arguments and returns one of nil, a regexp or a list of regexps for use with occur commands - `occur', `multi-occur' and `multi-occur-in-matching-buffers'. The return value of this function is used as DEFAULTS param of `read-regexp' while executing the occur command. This function is called only during interactive use. -For example, to check for occurrence of symbol at point use - - \(setq occur-read-regexp-defaults-function - 'find-tag-default-as-regexp\).") - -(defun occur-read-regexp-defaults () - "Return the latest regexp from `regexp-history'. -See `occur-read-regexp-defaults-function' for details." - (car regexp-history)) +You can customize `read-regexp-defaults-function' to the value +`find-tag-default-as-regexp' to highlight a symbol at point." + (read-regexp-defaults-history)) + +(defun occur-collect-read-regexp-defaults () + "Return the latest regexp from `occur-collect-regexp-history'. +This function is used to read a regexp to collect. +See `read-regexp-defaults-function' for details. + +You can customize `read-regexp-defaults-function' to the value +`find-tag-default-as-regexp' to highlight a symbol at point." + (or (read-regexp-defaults) + (car occur-collect-regexp-history))) (defun occur-read-primary-args () (let* ((perform-collect (consp current-prefix-arg)) (regexp (read-regexp (if perform-collect "Collect strings matching regexp" "List lines matching regexp") - (funcall occur-read-regexp-defaults-function)))) + (occur-read-regexp-defaults)))) (list regexp (if perform-collect ;; Perform collect operation @@ -1176,7 +1214,7 @@ (defun occur-read-primary-args () ;; No subexpression so collect the entire match. "\\&" ;; Get the regexp for collection pattern. - (let ((default (car occur-collect-regexp-history))) + (let ((default (occur-collect-read-regexp-defaults))) (read-regexp (format "Regexp to collect (default %s): " default) default 'occur-collect-regexp-history))) === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2013-04-22 04:17:30 +0000 +++ lisp/hi-lock.el 2013-05-14 23:50:37 +0000 @@ -279,26 +279,6 @@ (defvar hi-lock-map map) "Key map for hi-lock.") -(defvar hi-lock-read-regexp-defaults-function - 'hi-lock-read-regexp-defaults - "Function that provides default regexp(s) for highlighting commands. -This function should take no arguments and return one of nil, a -regexp or a list of regexps for use with highlighting commands - -`hi-lock-face-phrase-buffer', `hi-lock-line-face-buffer' and -`hi-lock-face-buffer'. The return value of this function is used -as DEFAULTS param of `read-regexp' while executing the -highlighting command. This function is called only during -interactive use. - -For example, to highlight at symbol at point use - - \(setq hi-lock-read-regexp-defaults-function - 'find-tag-default-as-regexp\) - -If you need different defaults for different highlighting -operations, use `this-command' to identify the command under -execution.") - ;; Visible Functions ;;;###autoload @@ -422,7 +402,7 @@ (defalias 'highlight-lines-matching-rege (defun hi-lock-line-face-buffer (regexp &optional face) "Set face of all lines containing a match of REGEXP to FACE. Interactively, prompt for REGEXP then FACE. Use -`hi-lock-read-regexp-defaults-function' to retrieve default +`hi-lock-read-regexp-defaults' to retrieve default value(s) of REGEXP. Use the global history list for FACE. Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, @@ -432,7 +412,7 @@ (defun hi-lock-line-face-buffer (regexp (list (hi-lock-regexp-okay (read-regexp "Regexp to highlight line" - (funcall hi-lock-read-regexp-defaults-function))) + (hi-lock-read-regexp-defaults))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -448,7 +428,7 @@ (defalias 'highlight-regexp 'hi-lock-fac (defun hi-lock-face-buffer (regexp &optional face) "Set face of each match of REGEXP to FACE. Interactively, prompt for REGEXP then FACE. Use -`hi-lock-read-regexp-defaults-function' to retrieve default +`hi-lock-read-regexp-defaults' to retrieve default value(s) REGEXP. Use the global history list for FACE. Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, @@ -458,7 +438,7 @@ (defun hi-lock-face-buffer (regexp &opti (list (hi-lock-regexp-okay (read-regexp "Regexp to highlight" - (funcall hi-lock-read-regexp-defaults-function))) + (hi-lock-read-regexp-defaults))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -470,7 +450,7 @@ (defalias 'highlight-phrase 'hi-lock-fac (defun hi-lock-face-phrase-buffer (regexp &optional face) "Set face of each match of phrase REGEXP to FACE. Interactively, prompt for REGEXP then FACE. Use -`hi-lock-read-regexp-defaults-function' to retrieve default +`hi-lock-read-regexp' to retrieve default value(s) of REGEXP. Use the global history list for FACE. When called interactively, replace whitespace in user provided regexp with arbitrary whitespace and make initial lower-case letters @@ -484,7 +464,7 @@ (defun hi-lock-face-phrase-buffer (regex (hi-lock-regexp-okay (hi-lock-process-phrase (read-regexp "Phrase to highlight" - (funcall hi-lock-read-regexp-defaults-function)))) + (hi-lock-read-regexp-defaults)))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -651,9 +631,22 @@ (defun hi-lock-regexp-okay (regexp) regexp)) (defun hi-lock-read-regexp-defaults () - "Return the latest regexp from `regexp-history'. -See `hi-lock-read-regexp-defaults-function' for details." - (car regexp-history)) + "Function that provides default regexp(s) for highlighting commands. +This function takes no arguments and returns one of nil, a +regexp or a list of regexps for use with highlighting commands - +`hi-lock-face-phrase-buffer', `hi-lock-line-face-buffer' and +`hi-lock-face-buffer'. The return value of this function is used +as DEFAULTS param of `read-regexp' while executing the +highlighting command. This function is called only during +interactive use. + +You can customize `read-regexp-defaults-function' to the value +`find-tag-default-as-regexp' to highlight a symbol at point. + +If you need different defaults for different highlighting +operations, redefine this function and use `this-command' +to identify the command under execution." + (read-regexp-defaults-history)) (defun hi-lock-read-face-name () "Return face for interactive highlighting. === modified file 'lisp/progmodes/grep.el' --- lisp/progmodes/grep.el 2013-02-12 07:57:04 +0000 +++ lisp/progmodes/grep.el 2013-05-14 23:50:07 +0000 @@ -829,9 +829,13 @@ (defun grep-expand-template (template &o "") t t command)))))) +(defun grep-read-regexp-defaults () + (or (read-regexp-defaults) + (grep-tag-default))) + (defun grep-read-regexp () "Read regexp arg for interactive grep." - (let ((default (grep-tag-default))) + (let ((default (grep-read-regexp-defaults))) (read-regexp (concat "Search for" (if (and default (> (length default) 0)) From debbugs-submit-bounces@debbugs.gnu.org Wed May 15 19:07:25 2013 Received: (at 14405) by debbugs.gnu.org; 15 May 2013 23:07:26 +0000 Received: from localhost ([127.0.0.1]:46585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uckn7-0004ze-HG for submit@debbugs.gnu.org; Wed, 15 May 2013 19:07:25 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:36347 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uckn3-0004zM-Gs for 14405@debbugs.gnu.org; Wed, 15 May 2013 19:07:23 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 8F279258B92943 for <14405@debbugs.gnu.org>; Wed, 15 May 2013 16:07:13 -0700 (PDT) From: Juri Linkov To: 14405@debbugs.gnu.org Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function Organization: JURTA References: <87ppwtw1zq.fsf@mail.jurta.org> Date: Thu, 16 May 2013 01:58:33 +0300 In-Reply-To: <87ppwtw1zq.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 15 May 2013 02:51:20 +0300") Message-ID: <87ehd7df52.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 14405 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > There are pending enhancements to create a single option to define > the same defaulting behavior for all regexp-reading commands > and to group the existing defaults to separate functions > that can be overridden by customizing that option. But note that the option `read-regexp-defaults-function' has limited usefulness. For example, in case when someone wants `M-x man' to provide the default value not an entry near point but the last element from the history, there is no way to do this by customizing a common option because `man' uses the specific variable `Man-topic-history'. I see the only way to customize this by using `advice' like: (advice-add 'Man-default-man-entry :override (lambda () (car Man-topic-history))) or even two default values (the last history and the original): (advice-add 'Man-default-man-entry :filter-return (lambda (r) (delq nil (list (car Man-topic-history) r)))) If advices are the preferable method of customization then the design goal would be to add more functions returning default values that users can customize using advices. For example, for `grep' there is already `grep-tag-default' that could be customized like: (advice-add 'grep-tag-default :override (lambda () (car grep-regexp-history))) as a better advice for http://stackoverflow.com/questions/15161592/make-emacs-rgrep-default-to-last-search-term-rather-than-word-at-point Other commands require adding more functions for advice-based customization like `occur-read-regexp-defaults' and `hi-lock-read-regexp-defaults'. From debbugs-submit-bounces@debbugs.gnu.org Sat May 18 19:33:44 2013 Received: (at 14405) by debbugs.gnu.org; 18 May 2013 23:33:44 +0000 Received: from localhost ([127.0.0.1]:50826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UdqdD-0003RB-AU for submit@debbugs.gnu.org; Sat, 18 May 2013 19:33:43 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:56600 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UdqdA-0003R3-W5 for 14405@debbugs.gnu.org; Sat, 18 May 2013 19:33:42 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B2C85258B9E91C for <14405@debbugs.gnu.org>; Sat, 18 May 2013 16:32:18 -0700 (PDT) From: Juri Linkov To: 14405@debbugs.gnu.org Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function Organization: JURTA References: <87ppwtw1zq.fsf@mail.jurta.org> Date: Sun, 19 May 2013 02:28:14 +0300 In-Reply-To: <87ppwtw1zq.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 15 May 2013 02:51:20 +0300") Message-ID: <87li7bswa9.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14405 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > +(defcustom read-regexp-defaults-function nil > + :type '(choice > + (const :tag "No default regexp reading function" nil) > + (choice :tag "Function to provide default for read-regexp" > + (function-item :tag "Tag at point" find-tag-default) > + (function-item :tag "Symbol at point" find-tag-default-as-regexp) > + (function-item :tag "Latest history" (lambda () (car regexp-history))) Actually there are two problems in this defcustom: 1. `find-tag-default' doesn't return a regexp. To fix this problem, we need two functions returning a regexp: as a non-symbol regexp and as a symbol regexp. I propose the following implementations: (defun find-tag-default-as-regexp () "Return regexp that matches the default tag at point." (let ((tag (funcall (or find-tag-default-function (get major-mode 'find-tag-default-function) 'find-tag-default)))) (if tag (regexp-quote tag)))) (defun find-tag-default-as-symbol-regexp () "Return regexp that matches the default tag at point as symbol." (let ((tag-regexp (find-tag-default-as-regexp))) (if (and tag-regexp (eq (or find-tag-default-function (get major-mode 'find-tag-default-function) 'find-tag-default) 'find-tag-default)) (format "\\_<%s\\_>" tag-regexp) tag-regexp))) 2. The second problem is that `(lambda () (car regexp-history))' can't be used in defcustom because many commands use history other than `regexp-history'. As a possible solution we could add a new special symbol `default-last-history' to handle it in `read-regexp' that has access to the actual value of the history variable in its arg `history' using `(symbol-value (or history 'regexp-history))' below: === modified file 'lisp/replace.el' --- lisp/replace.el 2013-03-24 21:47:52 +0000 +++ lisp/replace.el 2013-05-18 23:27:38 +0000 @@ -580,6 +580,24 @@ (defvar regexp-history nil (defvar occur-collect-regexp-history '("\\1") "History of regexp for occur's collect operation") +(defcustom read-regexp-defaults-function nil + "Function that provides default regexp(s) for regexp reading commands." + :type '(choice + (const :tag "No default regexp reading function" nil) + (const :tag "Latest history" default-last-history) + (function-item :tag "Tag at point" find-tag-default-as-regexp) + (function-item :tag "Symbol at point" find-tag-default-as-symbol-regexp) + (function :tag "Function to provide default for read-regexp")) + :group 'matching + :version "24.4") + (defun read-regexp (prompt &optional defaults history) "Read and return a regular expression as a string. When PROMPT doesn't end with a colon and space, it adds a final \": \". @@ -591,13 +609,23 @@ (defun read-regexp (prompt &optional def Optional arg HISTORY is a symbol to use for the history list. If HISTORY is nil, `regexp-history' is used." - (let* ((default (if (consp defaults) (car defaults) defaults)) + (let* ((defaults + (if (and defaults (symbolp defaults)) + (cond + ((eq (or read-regexp-defaults-function defaults) + 'default-last-history) + (car (symbol-value (or history 'regexp-history)))) + ((functionp (or read-regexp-defaults-function defaults)) + (funcall (or read-regexp-defaults-function defaults)))) + defaults)) + (default (if (consp defaults) (car defaults) defaults)) (suggestions (if (listp defaults) defaults (list defaults))) (suggestions (append suggestions (list (find-tag-default-as-regexp) + (find-tag-default-as-symbol-regexp) (car regexp-search-ring) (regexp-quote (or (car search-ring) "")) (car (symbol-value query-replace-from-history-variable))))) @@ -1143,9 +1170,9 @@ (defun occur-read-primary-args () (let* ((perform-collect (consp current-prefix-arg)) (regexp (read-regexp (if perform-collect "Collect strings matching regexp" "List lines matching regexp") - (funcall occur-read-regexp-defaults-function)))) + 'default-last-history))) (list regexp (if perform-collect ;; Perform collect operation === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2013-03-31 13:34:35 +0000 +++ lisp/hi-lock.el 2013-05-18 23:27:23 +0000 @@ -431,8 +411,7 @@ (defun hi-lock-line-face-buffer (regexp (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight line" - (funcall hi-lock-read-regexp-defaults-function))) + (read-regexp "Regexp to highlight line" 'default-last-history)) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -457,8 +436,7 @@ (defun hi-lock-face-buffer (regexp &opti (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight" - (funcall hi-lock-read-regexp-defaults-function))) + (read-regexp "Regexp to highlight" 'default-last-history)) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -483,8 +481,7 @@ (defun hi-lock-face-phrase-buffer (regex (list (hi-lock-regexp-okay (hi-lock-process-phrase - (read-regexp "Phrase to highlight" - (funcall hi-lock-read-regexp-defaults-function)))) + (read-regexp "Phrase to highlight" 'default-last-history))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-yellow)) (unless hi-lock-mode (hi-lock-mode 1)) === modified file 'lisp/progmodes/grep.el' --- lisp/progmodes/grep.el 2013-02-12 04:46:18 +0000 +++ lisp/progmodes/grep.el 2013-05-18 23:23:30 +0000 @@ -817,12 +831,7 @@ (defun grep-expand-template (template &o (defun grep-read-regexp () "Read regexp arg for interactive grep." - (let ((default (grep-tag-default))) - (read-regexp - (concat "Search for" - (if (and default (> (length default) 0)) - (format " (default \"%s\"): " default) ": ")) - default 'grep-regexp-history))) + (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history)) (defun grep-read-files (regexp) "Read files arg for interactive grep." From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 20 14:57:20 2013 Received: (at control) by debbugs.gnu.org; 20 Dec 2013 19:57:20 +0000 Received: from localhost ([127.0.0.1]:60471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu6CF-00053D-V2 for submit@debbugs.gnu.org; Fri, 20 Dec 2013 14:57:20 -0500 Received: from [69.163.184.122] (port=49725 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vu6CD-000535-M1 for control@debbugs.gnu.org; Fri, 20 Dec 2013 14:57:18 -0500 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 5787D3035C791D for ; Fri, 20 Dec 2013 11:57:16 -0800 (PST) From: Juri Linkov To: control@debbugs.gnu.org Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function Organization: JURTA References: <87ppwtw1zq.fsf@mail.jurta.org> Date: Fri, 20 Dec 2013 21:57:01 +0200 In-Reply-To: <87ppwtw1zq.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 15 May 2013 02:51:20 +0300") Message-ID: <87mwjvwb1u.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 14405 thanks [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 14405 thanks [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS close 14405 thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 21 02:20:47 2013 Received: (at 14405) by debbugs.gnu.org; 21 Dec 2013 07:20:47 +0000 Received: from localhost ([127.0.0.1]:60722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuGre-0002VF-0U for submit@debbugs.gnu.org; Sat, 21 Dec 2013 02:20:46 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:40990) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuCUW-0001FS-UP for 14405@debbugs.gnu.org; Fri, 20 Dec 2013 21:40:37 -0500 Received: by mail-pd0-f177.google.com with SMTP id q10so3198784pdj.8 for <14405@debbugs.gnu.org>; Fri, 20 Dec 2013 18:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=3CLPfjcKpgv6r/LA1Zs9lZclHCKTSdWPg83N9D0h0y4=; b=W46IyF+hlkKt9yHMDpkdOVO/7RaQLGzZEuLEPb3fQPU1YUQS7a7Com1ca5OM/q7Qg+ E8tAnSbB9cWpi6+rOZAZZ2DL3w6MDY31nzEjPWk+9HgP99p3aw9zPY3LTB4kTORfkoa6 /1RXSL/dP6uTrbrt5yRwUq2AMHOA/RH8b65uoH4WVW+xlJwzZazCNyu4mAAQ1aVgswnr AXlQ4Dp16X2oFNMU3H3QXg0733kWYA8kbLQ/H66hhz2WpvA0NZCNGvWX/+8sPHDTqCLw 5madkPtwDLskWHLYm4jYWAryU4gBYEvJKkLwAXdpLhKCcehgPTLVdl1GuSQX/6RvVhhl I93A== X-Received: by 10.66.118.71 with SMTP id kk7mr12487378pab.14.1387593636100; Fri, 20 Dec 2013 18:40:36 -0800 (PST) Received: from debian-6.05 ([115.242.163.220]) by mx.google.com with ESMTPSA id fk4sm22931557pab.23.2013.12.20.18.40.33 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 20 Dec 2013 18:40:35 -0800 (PST) From: Jambunathan K To: Juri Linkov Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> Date: Sat, 21 Dec 2013 08:09:45 +0530 In-Reply-To: <87mwjvwb1u.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 20 Dec 2013 21:57:01 +0200") Message-ID: <87a9fvexla.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14405 X-Mailman-Approved-At: Sat, 21 Dec 2013 02:20:43 -0500 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain My workflow is M-s o searches for symbol at point. Your recent commit revno: 115651 closed this behaviour for me. Just wanted to check whether you overlooked the following diff. The following works for me. (custom-set-variables '(read-regexp-defaults-function (quote find-tag-default-as-symbol-regexp))) --=-=-= Content-Type: text/x-diff Content-Disposition: inline === modified file 'lisp/replace.el' --- lisp/replace.el 2013-12-20 19:55:56 +0000 +++ lisp/replace.el 2013-12-21 02:17:41 +0000 @@ -1239,7 +1239,7 @@ which means to discard all text properti (regexp (read-regexp (if perform-collect "Collect strings matching regexp" "List lines matching regexp") - 'regexp-history-last))) + read-regexp-defaults-function))) (list regexp (if perform-collect ;; Perform collect operation --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 21 16:35:14 2013 Received: (at 14405) by debbugs.gnu.org; 21 Dec 2013 21:35:14 +0000 Received: from localhost ([127.0.0.1]:33695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuUCX-0005EB-OR for submit@debbugs.gnu.org; Sat, 21 Dec 2013 16:35:14 -0500 Received: from [69.163.184.122] (port=41191 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuUCT-0005Ds-9A for 14405@debbugs.gnu.org; Sat, 21 Dec 2013 16:35:10 -0500 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 662E132D717D4C; Sat, 21 Dec 2013 13:35:07 -0800 (PST) From: Juri Linkov To: Jambunathan K Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function Organization: JURTA References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> Date: Sat, 21 Dec 2013 23:25:41 +0200 In-Reply-To: <87a9fvexla.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 21 Dec 2013 08:09:45 +0530") Message-ID: <871u159aoq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > My workflow is M-s o searches for symbol at point. Your recent commit > revno: 115651 closed this behaviour for me. Just wanted to check > whether you overlooked the following diff. For historical reasons, `M-s o' provides the previous history element as the default. I had no intention to change this default (because I recall there were objections to changing the default behavior). So if you want `M-s o' to provide a symbol at point, you can customize `read-regexp-defaults-function' to `find-tag-default-as-symbol-regexp'. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 14405 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > My workflow is M-s o searches for symbol at point. Your recent commit > revno: 115651 closed this behaviour for me. Just wanted to check > whether you overlooked the following diff. For historical reasons, `M-s o' provides the previous history element as the default. I had no intention to change this default (because I recall there were objections to changing the default behavior). So if you want `M-s o' to provide a symbol at point, you can customize `read-regexp-defaults-function' to `find-tag-default-as-symbol-regexp'. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS > My workflow is M-s o searches for symbol at point. Your recent commit > revno: 115651 closed this behaviour for me. Just wanted to check > whether you overlooked the following diff. For historical reasons, `M-s o' provides the previous history element as the default. I had no intention to change this default (because I recall there were objections to changing the default behavior). So if you want `M-s o' to provide a symbol at point, you can customize `read-regexp-defaults-function' to `find-tag-default-as-symbol-regexp'. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 21 18:01:35 2013 Received: (at 14405) by debbugs.gnu.org; 21 Dec 2013 23:01:35 +0000 Received: from localhost ([127.0.0.1]:33735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuVY5-0007ss-MN for submit@debbugs.gnu.org; Sat, 21 Dec 2013 18:01:34 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:39639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuV41-0006x5-1w for 14405@debbugs.gnu.org; Sat, 21 Dec 2013 17:30:29 -0500 Received: by mail-pb0-f43.google.com with SMTP id rq2so3999706pbb.2 for <14405@debbugs.gnu.org>; Sat, 21 Dec 2013 14:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=xoKTY4JtUrqP/ui80R1yGGRm0VO4GG4DgN+jDVvVUC0=; b=mX13XuoUxNDuLGZZfud2647ZfuakTAsKxoXnh4wwLNwxBGWYBkD+PMNf0BVbODbnJM Dk017C7H/ud2Nn4zZxab677NN1LB8F4Lx8oEXSqdFLB0BplqsWtzF1hB2xcnwB7qBVRc 6UAlLRgzfUzu/XWR7hJn1wRjkHiHcvvoQIgHOdvrWJE8W263hQBKA4ED0nxx1TELpq5n X6Ys52I58lXt+mpSUcFvPlKpQUcpLQFIz6jy6Q5SvX7/l8cMO5TErBmdY2uQ4CMRCyui uVIGoSVaOg52UFVPLEeqcrIowbGQFifaC65qP4FyEmCsAXXvSgb07XqbAUFzKHd5yhUE hg6A== X-Received: by 10.66.13.138 with SMTP id h10mr52184pac.148.1387665028040; Sat, 21 Dec 2013 14:30:28 -0800 (PST) Received: from debian-6.05 ([101.63.209.184]) by mx.google.com with ESMTPSA id sg1sm23597027pbb.16.2013.12.21.14.30.25 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sat, 21 Dec 2013 14:30:27 -0800 (PST) From: Jambunathan K To: Juri Linkov Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> <871u159aoq.fsf@mail.jurta.org> Date: Sun, 22 Dec 2013 03:58:40 +0530 In-Reply-To: <871u159aoq.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 21 Dec 2013 23:25:41 +0200") Message-ID: <87vbyhltyf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14405 X-Mailman-Approved-At: Sat, 21 Dec 2013 18:01:31 -0500 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Juri Linkov writes: >> My workflow is M-s o searches for symbol at point. Your recent commit >> revno: 115651 closed this behaviour for me. Just wanted to check >> whether you overlooked the following diff. > > For historical reasons, `M-s o' provides the previous history element as > the default. I had no intention to change this default (because I recall > there were objections to changing the default behavior). So if you want > `M-s o' to provide a symbol at point, you can customize > `read-regexp-defaults-function' to `find-tag-default-as-symbol-regexp'. The diff attached with my mail indicates what the problem is. Please take a second look. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 16:49:33 2013 Received: (at 14405) by debbugs.gnu.org; 22 Dec 2013 21:49:33 +0000 Received: from localhost ([127.0.0.1]:34928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vuqtx-0002EE-5j for submit@debbugs.gnu.org; Sun, 22 Dec 2013 16:49:33 -0500 Received: from [69.163.184.122] (port=49531 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vuqtt-0002Dr-3U for 14405@debbugs.gnu.org; Sun, 22 Dec 2013 16:49:29 -0500 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 219E7301562F56; Sun, 22 Dec 2013 13:49:26 -0800 (PST) From: Juri Linkov To: Jambunathan K Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function Organization: JURTA References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> <871u159aoq.fsf@mail.jurta.org> <87vbyhltyf.fsf@gmail.com> Date: Sun, 22 Dec 2013 23:39:10 +0200 In-Reply-To: <87vbyhltyf.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 22 Dec 2013 03:58:40 +0530") Message-ID: <871u14egp5.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > The diff attached with my mail indicates what the problem is. Please > take a second look. Maybe I'm missing something, maybe you're missing something, but note that `read-regexp' already takes care about handling `read-regexp-defaults-function' whose non-nil value can override the default value in `occur-read-primary-args', so no more additional changes are needed. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 14405 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > The diff attached with my mail indicates what the problem is. Please > take a second look. Maybe I'm missing something, maybe you're missing something, but note that `read-regexp' already takes care about handling `read-regexp-defaults-function' whose non-nil value can override the default value in `occur-read-primary-args', so no more additional changes are needed. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS > The diff attached with my mail indicates what the problem is. Please > take a second look. Maybe I'm missing something, maybe you're missing something, but note that `read-regexp' already takes care about handling `read-regexp-defaults-function' whose non-nil value can override the default value in `occur-read-primary-args', so no more additional changes are needed. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 23 13:27:49 2013 Received: (at 14405) by debbugs.gnu.org; 23 Dec 2013 18:27:49 +0000 Received: from localhost ([127.0.0.1]:36293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvAEG-0000lU-Ua for submit@debbugs.gnu.org; Mon, 23 Dec 2013 13:27:49 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:48986) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VuvQq-0003DT-TI for 14405@debbugs.gnu.org; Sun, 22 Dec 2013 21:39:49 -0500 Received: by mail-pa0-f47.google.com with SMTP id kq14so4786842pab.34 for <14405@debbugs.gnu.org>; Sun, 22 Dec 2013 18:39:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=8eHiuZjbkBmtIZXwgydRtEV6ddUifD0JffRMYBWkTvA=; b=wJnKqMdhVnW9KAPvGlUVlA9kgkdy9EXbIVmDddbeg1tO2Ul5ELYsjUoh7z8Y5nch3N kxJxvBiD/+LzC8V/tL4qzRSKxrzONlkRxJ+Kq0x/Y+TRXz/+lFxQrsg5wWyJFdTXYz4a INs9RPc6Z/TTL9i7Pyt4XC0QZMAFWSSt7aGe4HqvEd3MXZ6GenAQRFRfRDwzuGtiiGhD xsfPMUqRqKoreMkgCUoaCa+k/vk7QvNCeONmamvkiWl2NTGNSZ5Kf0/DTvibsf02sCxF HtcV4lTXedql4ALEZIwFyh3PM5gExpO2fd0SRZ+aAdlhVPCdDAVmzSjSbLBaGKLIpx3g YLaw== X-Received: by 10.67.14.231 with SMTP id fj7mr22641256pad.115.1387766387394; Sun, 22 Dec 2013 18:39:47 -0800 (PST) Received: from debian-6.05 ([101.63.203.17]) by mx.google.com with ESMTPSA id ko10sm18054911pbd.38.2013.12.22.18.39.43 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 22 Dec 2013 18:39:46 -0800 (PST) From: Jambunathan K To: Juri Linkov Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> <871u159aoq.fsf@mail.jurta.org> <87vbyhltyf.fsf@gmail.com> <871u14egp5.fsf@mail.jurta.org> Date: Mon, 23 Dec 2013 08:08:22 +0530 In-Reply-To: <871u14egp5.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 22 Dec 2013 23:39:10 +0200") Message-ID: <87y53cuw9t.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14405 X-Mailman-Approved-At: Mon, 23 Dec 2013 13:27:48 -0500 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Juri Linkov writes: > so no more additional changes are needed True. Sorry, my error. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 24 13:53:56 2013 Received: (at 14405) by debbugs.gnu.org; 24 Dec 2013 18:53:56 +0000 Received: from localhost ([127.0.0.1]:39569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvX75-0001Ji-BZ for submit@debbugs.gnu.org; Tue, 24 Dec 2013 13:53:55 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:62534) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvWhm-0000Vi-L9 for 14405@debbugs.gnu.org; Tue, 24 Dec 2013 13:27:47 -0500 Received: by mail-pd0-f180.google.com with SMTP id q10so6562627pdj.39 for <14405@debbugs.gnu.org>; Tue, 24 Dec 2013 10:27:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=trsM5y6LV/OKFYiX0YRWoxfa9j4aBI1HC9nnQ1qeIHU=; b=rDSNlAC8/CD0Q8L3oH+RKXI4tZShpo+Z11GcaA4XKBAN47p8gGSzTzoxcQWczXKxON js9apJcKtp6jEl5ELy/WemjsWQ7Aqc83wuw2uveLpc/0xIVj+xejKAJye0n3xnNZce26 s8GLT4k5lSwdVlN9qoHFsmaI8Mi6OsullTmfjNgmoSfLn4O4dswQSQ8kbqeKzHp3hUST hEkTF5wm7VZFHKs2vgRyhdYNCSqnBzw1U+gYPp3vEzuFC543JilZxIyuMv4DtLklkrLp uEJQlmmRIxLcoNz4AaoN4vwiqiyy77IHoToYDW5JNiUwkMH8wknbr2BzNh3+tLMCJiIJ 1RDQ== X-Received: by 10.66.248.227 with SMTP id yp3mr33551348pac.116.1387909665663; Tue, 24 Dec 2013 10:27:45 -0800 (PST) Received: from debian-6.05 ([101.63.153.48]) by mx.google.com with ESMTPSA id dq3sm43300907pbc.35.2013.12.24.10.27.43 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 24 Dec 2013 10:27:44 -0800 (PST) From: Jambunathan K To: Juri Linkov Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> <871u159aoq.fsf@mail.jurta.org> <87vbyhltyf.fsf@gmail.com> <871u14egp5.fsf@mail.jurta.org> <87y53cuw9t.fsf@gmail.com> Date: Tue, 24 Dec 2013 23:55:26 +0530 In-Reply-To: <87y53cuw9t.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 23 Dec 2013 08:08:22 +0530") Message-ID: <87wqiuyull.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 14405 X-Mailman-Approved-At: Tue, 24 Dec 2013 13:53:54 -0500 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) I depend on occur and rgrep. For occur, I want the symbol delimiters. For rgrep, a mere tag at point will do. If one were to use multi-occur from Buffer menu mode, a symbol match doesn't make sense. Just a note. I can fix .el files locally. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 25 15:59:28 2013 Received: (at 14405) by debbugs.gnu.org; 25 Dec 2013 20:59:28 +0000 Received: from localhost ([127.0.0.1]:41948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvvY8-00071Y-6y for submit@debbugs.gnu.org; Wed, 25 Dec 2013 15:59:28 -0500 Received: from [69.163.184.122] (port=37241 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VvvY5-00071N-RH for 14405@debbugs.gnu.org; Wed, 25 Dec 2013 15:59:26 -0500 Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id D931934CB016B5; Wed, 25 Dec 2013 12:59:23 -0800 (PST) From: Juri Linkov To: Jambunathan K Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function Organization: JURTA References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> <871u159aoq.fsf@mail.jurta.org> <87vbyhltyf.fsf@gmail.com> <871u14egp5.fsf@mail.jurta.org> <87y53cuw9t.fsf@gmail.com> <87wqiuyull.fsf@gmail.com> Date: Wed, 25 Dec 2013 22:56:30 +0200 In-Reply-To: <87wqiuyull.fsf@gmail.com> (Jambunathan K.'s message of "Tue, 24 Dec 2013 23:55:26 +0530") Message-ID: <87y538hdm9.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I depend on occur and rgrep. For occur, I want the symbol delimiters. > For rgrep, a mere tag at point will do. If one were to use multi-occur > from Buffer menu mode, a symbol match doesn't make sense. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 14405 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > I depend on occur and rgrep. For occur, I want the symbol delimiters. > For rgrep, a mere tag at point will do. If one were to use multi-occur > from Buffer menu mode, a symbol match doesn't make sense. [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS > I depend on occur and rgrep. For occur, I want the symbol delimiters. > For rgrep, a mere tag at point will do. If one were to use multi-occur > from Buffer menu mode, a symbol match doesn't make sense. You can use `this-command' for different defaults of different commands in a customized function like you wrote in the docstring that is still preserved in `read-regexp-defaults-function'. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 14:28:54 2013 Received: (at 14405) by debbugs.gnu.org; 27 Dec 2013 19:28:54 +0000 Received: from localhost ([127.0.0.1]:46967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vwd5Z-0001Jl-Jo for submit@debbugs.gnu.org; Fri, 27 Dec 2013 14:28:54 -0500 Received: from mail-pb0-f53.google.com ([209.85.160.53]:51495) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VwPtX-0007mK-PU for 14405@debbugs.gnu.org; Fri, 27 Dec 2013 00:23:36 -0500 Received: by mail-pb0-f53.google.com with SMTP id ma3so8869593pbc.12 for <14405@debbugs.gnu.org>; Thu, 26 Dec 2013 21:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2imRgFMmsd3aGhO7vqiGAgvHfSOjaDLPMVbiabuyt3k=; b=nvf7D3Vn/wHSxHprxxZYbgCDRKSpfwEiNQ90gDlvQKLh3lha6R/Z9e0E+ule4j88uX SXXI4osSkP0i4f37tkHxI9qhUpk3JHLWdGuEUsZHagc7ScJ31QLZPOosPyMwagoGiBry aRQR3oP9C/dnYZrZl98JbLqrB64KqVRkzLapMQLmGlL7lYN6fcrCWfkzwESUoZq2+Wxu GODcKpgjCPi9CuHpnf5/H3qyHGoM2BipKYnt93UnQyirfbkn7SfAjCJkkiC5DlJjpodq OoV12rB7PDc2RrgoQ9XeFR7vVd/x8dtveBM+pdyv1u/ldwkhQoNkYFM3wmVzc6RFqTYz BggQ== X-Received: by 10.66.139.196 with SMTP id ra4mr49002202pab.103.1388121814852; Thu, 26 Dec 2013 21:23:34 -0800 (PST) Received: from debian-6.05 ([101.63.185.222]) by mx.google.com with ESMTPSA id qv8sm59098368pbc.31.2013.12.26.21.23.31 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 26 Dec 2013 21:23:33 -0800 (PST) From: Jambunathan K To: Juri Linkov Subject: Re: bug#14405: 24.3.50; read-regexp-defaults-function References: <87ppwtw1zq.fsf@mail.jurta.org> <87mwjvwb1u.fsf@mail.jurta.org> <87a9fvexla.fsf@gmail.com> <871u159aoq.fsf@mail.jurta.org> <87vbyhltyf.fsf@gmail.com> <871u14egp5.fsf@mail.jurta.org> <87y53cuw9t.fsf@gmail.com> <87wqiuyull.fsf@gmail.com> <87y538hdm9.fsf@mail.jurta.org> Date: Fri, 27 Dec 2013 10:52:31 +0530 In-Reply-To: <87y538hdm9.fsf@mail.jurta.org> (Juri Linkov's message of "Wed, 25 Dec 2013 22:56:30 +0200") Message-ID: <87y536dg14.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 14405 X-Mailman-Approved-At: Fri, 27 Dec 2013 14:28:52 -0500 Cc: 14405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Juri Linkov writes: >> I depend on occur and rgrep. For occur, I want the symbol delimiters. >> For rgrep, a mere tag at point will do. If one were to use multi-occur >> from Buffer menu mode, a symbol match doesn't make sense. > > You can use `this-command' for different defaults of different commands > in a customized function like you wrote in the docstring that is > still preserved in `read-regexp-defaults-function'. For the benefit of googler out there. (setq read-regexp-defaults-function (lambda nil (pcase this-command (`rgrep (find-tag-default-as-regexp)) (_ (find-tag-default-as-symbol-regexp))))) It would be a good idea to choose a different name for find-tag-default-*? The function retrieves the tag-at-point but doesn't find it (as in M-.). So "find" is misleading. From unknown Sun Jun 15 07:56:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 25 Jan 2014 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator