From unknown Tue Jun 17 20:19:10 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#5462 <5462@debbugs.gnu.org> To: bug#5462 <5462@debbugs.gnu.org> Subject: Status: 23.1; [patch] locate.el: defcustomizing *-hooks Reply-To: bug#5462 <5462@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:19:10 +0000 retitle 5462 23.1; [patch] locate.el: defcustomizing *-hooks reassign 5462 emacs submitter 5462 Eduard Wiebe severity 5462 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 24 07:39:13 2010 Received: (at submit) by debbugs.gnu.org; 24 Jan 2010 12:39:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZ1kG-0004IF-Fq for submit@debbugs.gnu.org; Sun, 24 Jan 2010 07:39:12 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZ1kE-0004IA-6l for submit@debbugs.gnu.org; Sun, 24 Jan 2010 07:39:10 -0500 Received: from mx10.gnu.org ([199.232.76.166]:39837) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZ1k9-0002GZ-3g for submit@debbugs.gnu.org; Sun, 24 Jan 2010 07:39:05 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NZ1k7-0005ax-FG for submit@debbugs.gnu.org; Sun, 24 Jan 2010 07:39:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:39109) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZ1k7-0005an-5s for submit@debbugs.gnu.org; Sun, 24 Jan 2010 07:39:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZ1k6-0001pX-JK for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2010 07:39:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZ1k1-0001oa-Rv for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2010 07:39:02 -0500 Received: from [199.232.76.173] (port=50783 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZ1k1-0001oX-No for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2010 07:38:57 -0500 Received: from wp093.webpack.hosteurope.de ([80.237.132.100]:54962) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZ1k1-0005a5-2n for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2010 07:38:57 -0500 Received: from g227117019.adsl.alicedsl.de ([92.227.117.19] helo=nirvana.pusto.de); authenticated by wp093.webpack.hosteurope.de running ExIM with esmtpsa (TLSv1:DES-CBC3-SHA:168) id 1NZ1jy-0003NX-5x; Sun, 24 Jan 2010 13:38:54 +0100 Received: from ew by nirvana.pusto.de with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NZ1jw-0005Jv-Op for bug-gnu-emacs@gnu.org; Sun, 24 Jan 2010 13:38:52 +0100 From: Eduard Wiebe To: bug-gnu-emacs@gnu.org Subject: 23.1; [patch] locate.el: defcustomizing *-hooks User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) Date: Sun, 24 Jan 2010 13:38:52 +0100 Message-ID: <86eilfllsz.fsf@nirvana.pusto.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-bounce-key: webpack.hosteurope.de;ew@pusto.de;1264336737;6669634a; X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.6 (------) --=-=-= Hello, How about this patch? --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=locate.chlog Content-Description: Changelog entry 2010-01-24 Eduard Wiebe * locate.el (locate-mode-hook, locate-post-command-hook): Use defcusom. (locate-with-filter): Remove `selective-display'. Simplify regexps `directory-listing-before-filename-regexp', and `dired-permission-flags-regexp'. --=-=-= My rational: Hook variables were't documented and uncustomizable. Dired regexps are to complex for plain locate output, this results in patial highlighting of file names in *Locate* buffer (e.g. first char is not highlighted under mouse). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=locate.diff Content-Description: locate.el patch diff --git a/lisp/locate.el b/lisp/locate.el index d0021df..f461db4 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -226,6 +226,16 @@ that is, with a prefix arg, you get the default behavior." :group 'locate :type 'boolean) +(defcustom locate-mode-hook nil + "Run at the end of `locate-mode'." + :group 'locate + :type 'hook) + +(defcustom locate-post-command-hook nil + "Hook run after each locate command is executed." + :group 'locate + :type 'hook) + ;; Functions (defun locate-default-make-command-line (search-string) @@ -300,8 +310,7 @@ ARG is the interactive prefix arg." (locate-cmd-args (cdr locate-cmd-list)) (run-locate-command (or (and arg (not locate-prompt-for-command)) - (and (not arg) locate-prompt-for-command))) - ) + (and (not arg) locate-prompt-for-command)))) ;; Find the Locate buffer (save-window-excursion @@ -310,7 +319,6 @@ ARG is the interactive prefix arg." (let ((inhibit-read-only t) (buffer-undo-list t)) (erase-buffer) - (setq locate-current-filter filter) (set (make-local-variable 'locate-local-search) search-string) (set (make-local-variable 'locate-local-filter) filter) @@ -320,19 +328,15 @@ ARG is the interactive prefix arg." (shell-command search-string locate-buffer-name) (apply 'call-process locate-cmd nil t nil locate-cmd-args)) - (and filter - (locate-filter-output filter)) - - (locate-do-setup search-string) - )) + (and filter (locate-filter-output filter)) + (locate-do-setup search-string))) + (and (not (string-equal (buffer-name) locate-buffer-name)) - (switch-to-buffer-other-window locate-buffer-name)) + (switch-to-buffer-other-window locate-buffer-name)) (run-hooks 'dired-mode-hook) (dired-next-line 3) ;move to first matching file. - (run-hooks 'locate-post-command-hook) - ) - ) + (run-hooks 'locate-post-command-hook))) ;;;###autoload (defun locate-with-filter (search-string filter &optional arg) @@ -464,8 +468,7 @@ do not work in subdirectories. (setq major-mode 'locate-mode mode-name "Locate" default-directory "/" - buffer-read-only t - selective-display t) + buffer-read-only t) (dired-alist-add-1 default-directory (point-min-marker)) (set (make-local-variable 'dired-directory) "/") (set (make-local-variable 'dired-subdir-switches) locate-ls-subdir-switches) @@ -473,18 +476,16 @@ do not work in subdirectories. (make-local-variable 'directory-listing-before-filename-regexp) ;; This should support both Unix and Windoze style names (setq directory-listing-before-filename-regexp - (concat "^." + (concat "^.\\(" (make-string (1- locate-filename-indentation) ?\s) - "\\(/\\|[A-Za-z]:\\)\\|" - (default-value 'directory-listing-before-filename-regexp))) + "\\)")) (make-local-variable 'dired-actual-switches) (setq dired-actual-switches "") (make-local-variable 'dired-permission-flags-regexp) (setq dired-permission-flags-regexp (concat "^.\\(" (make-string (1- locate-filename-indentation) ?\s) - "\\)\\|" - (default-value 'dired-permission-flags-regexp))) + "\\)")) (make-local-variable 'revert-buffer-function) (setq revert-buffer-function 'locate-update) (set (make-local-variable 'page-delimiter) "\n\n") @@ -523,9 +524,7 @@ do not work in subdirectories. (let ((locate-format-string " /:\n Matches for %s") (locate-regexp-match (concat " *Matches for \\(" (regexp-quote search-string) "\\)")) - (locate-format-args (list search-string)) - ) - + (locate-format-args (list search-string))) (and locate-fcodes-file (setq locate-format-string (concat locate-format-string " in %s") --=-=-= -- Booting /vmemacs.el... --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 28 14:39:49 2010 Received: (at 5462-done) by debbugs.gnu.org; 28 Nov 2010 19:39:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PMn6C-0005rp-Sg for submit@debbugs.gnu.org; Sun, 28 Nov 2010 14:39:49 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PMn6B-0005rb-GA; Sun, 28 Nov 2010 14:39:48 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LCM005001GZAE00@a-mtaout23.012.net.il>; Sun, 28 Nov 2010 21:44:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.63.39]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LCM004FX1HOXQ70@a-mtaout23.012.net.il>; Sun, 28 Nov 2010 21:44:13 +0200 (IST) Date: Sun, 28 Nov 2010 21:46:23 +0200 From: Eli Zaretskii Subject: Re: bug#7308: [patch] locate under windoze In-reply-to: <87bp5970hs.fsf@pusto.de> X-012-Sender: halo1@inter.net.il To: Eduard Wiebe Message-id: <83hbf19qpc.fsf@gnu.org> References: <87hbg3piit.fsf@pusto.de> <87d3qpytrx.fsf@pusto.de> <87wroiuvzy.fsf@pusto.de> <87mxpdkq68.fsf@stupidchicken.com> <8339r4exco.fsf@gnu.org> <87oc9sq2fv.fsf@pusto.de> <83tyjkd08a.fsf@gnu.org> <8739r4nu53.fsf@pusto.de> <83sjyn5bos.fsf@gnu.org> <87bp5970hs.fsf@pusto.de> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 5462-done Cc: 7308-done@debbugs.gnu.org, 5462-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii 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: -2.0 (--) > From: Eduard Wiebe > Date: Sun, 28 Nov 2010 19:43:11 +0100 > > Could you close Bug#5462 too, which adress the "same" issue. Done by this mail. From unknown Tue Jun 17 20:19:10 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 27 Dec 2010 12:24:04 +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