From unknown Thu Sep 11 09:18:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13412: 24.2; find-tag-regexp fails to find any next matches when multiple files are indexed Resent-From: Sarah Weissman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Jan 2013 05:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 13412@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13578831361497 (code B ref -1); Fri, 11 Jan 2013 05:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jan 2013 05:45:36 +0000 Received: from localhost ([127.0.0.1]:54965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtXQt-0000O5-RP for submit@debbugs.gnu.org; Fri, 11 Jan 2013 00:45:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37390) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtWMl-0007DR-WF for submit@debbugs.gnu.org; Thu, 10 Jan 2013 23:37:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtWMZ-000191-BV for submit@debbugs.gnu.org; Thu, 10 Jan 2013 23:37:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:39422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtWMZ-00018r-0o for submit@debbugs.gnu.org; Thu, 10 Jan 2013 23:37:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtWMV-0008Vt-NO for bug-gnu-emacs@gnu.org; Thu, 10 Jan 2013 23:37:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtWMR-00017o-B2 for bug-gnu-emacs@gnu.org; Thu, 10 Jan 2013 23:36:59 -0500 Received: from mail-oa0-f47.google.com ([209.85.219.47]:55828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtWMR-00017X-6G for bug-gnu-emacs@gnu.org; Thu, 10 Jan 2013 23:36:55 -0500 Received: by mail-oa0-f47.google.com with SMTP id h1so1392877oag.20 for ; Thu, 10 Jan 2013 20:36:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=BVc8t4E4KPirswi1cr7+HCmopdFE376VG9OosuvgJP4=; b=gytYSgBm5HlwwaDlEM1A2dgOIideFI397jDGodXwhvQoe4VDOFpJ7Cn1hR+s28k+7W +HELPl9D9MP55CtRsoJiYOcVzY9Vm4kqtIABVSIoFWfqsWnf33krctOcMZ3KaAM5chWa Han20lkzb50f7rXKtl+CKKASidmzUnnYE3lFXIOZE7rs0Z0jkYts4Txi7zsHnfUVM7Ko KSFfyuF1BCK8i89I+W8MTPqKvBVs7m3Ett6oLw9fqKfE66PzAGScdwp+QIsOOJN5aqAP no0gbIafKyOwO09O8GnXy9zcOXA590KIlXB6jxFmF45kJ5gz2p1q7u8fV0wVJgY2mNna qupw== MIME-Version: 1.0 Received: by 10.60.12.99 with SMTP id x3mr45449083oeb.71.1357879013963; Thu, 10 Jan 2013 20:36:53 -0800 (PST) Received: by 10.76.90.198 with HTTP; Thu, 10 Jan 2013 20:36:53 -0800 (PST) Date: Thu, 10 Jan 2013 23:36:53 -0500 Message-ID: From: Sarah Weissman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Mailman-Approved-At: Fri, 11 Jan 2013 00:45:34 -0500 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.1 (------) find-tag-regexp finds the first match, but not subsequent ones. Here's a simple formula to produce this bug: In a new directory create files empty.el and test.el where empty.el is empty and test.el contains the following 5 defuns: (defun my-find ()) (defun my-find1 ()) (defun my-find2 ()) (defun my-find3 ()) (defun my-find4 ()) Create a tags table for test.el and empty.el: M-x compile RET etags *.el RET Visit tags table: M-x visit-tags-table RET RET Call find-tag-regexp: C-M-. my-find RET Repeat find-tag-regexp: C-u C-M-. The first find-tag-regexp finds the first defun, but subsequent calls report "No more tags matching my-find" even though there should be more matches. Note: *Bug occurs whether empty.el is empty or not. *If you remove empty.el and recompile tags on only one file the bug goes aw= ay. *Evaluating (list-tags "") makes the bug go away. For reference, the TAGS file that is produced looks like this: =0C^L test.el,109 (defun my-find ^?2,1 (defun my-find1 ^?4,21 (defun my-find2 ^?6,42 (defun my-find3 ^?8,63 (defun my-find4 ^?10,84 =0C^L empty.el,0 In GNU Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-08-27 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1187 Configured using: `configure '--host=3Dx86_64-apple-darwin' '--build=3Di686-apple-darwin' '--with-ns' 'build_alias=3Di686-apple-darwin' 'host_alias=3Dx86_64-apple-darwin' 'CC=3Dgcc -mmacosx-version-min=3D10.5'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x c o m p i l e e t a g s SPC * . e l M-x v i i s i TAB t - t a g TAB T A G S C-M-. m y - f i n d C-u C-M-. C-u C-M-. C-g C-M-. C-g x f i n d - t a g - r e g TAB C-a C-k C-g x s h e l l l s C-x C-f t e s t . e l C-p C-n C-p C-SPC C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n M-w M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. (No files need saving) Compilation finished Making completion list... Starting a new list of tags tables Mark set byte-code: No more tags matching my-find [2 times] Quit [3 times] Mark activated Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils etags help-mode easymenu view shell pcomplete compile comint regexp-opt ansi-color ring kfl-project kfl-mode time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From unknown Thu Sep 11 09:18:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#13412: 24.2; find-tag-regexp fails to find any next matches when multiple files are indexed Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jan 2013 21:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sarah Weissman Cc: 13412@debbugs.gnu.org Received: via spool by 13412-submit@debbugs.gnu.org id=B13412.135837154125515 (code B ref 13412); Wed, 16 Jan 2013 21:26:02 +0000 Received: (at 13412) by debbugs.gnu.org; 16 Jan 2013 21:25:41 +0000 Received: from localhost ([127.0.0.1]:35714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvaUP-0006dS-Bl for submit@debbugs.gnu.org; Wed, 16 Jan 2013 16:25:41 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:35751) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TvaUL-0006dJ-W0 for 13412@debbugs.gnu.org; Wed, 16 Jan 2013 16:25:39 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TvaTj-00070h-AS; Wed, 16 Jan 2013 16:24:59 -0500 From: Glenn Morris References: X-Spook: spy Etacs brigand president government Vickie Weaver X-Ran: *y#Q6lX+uCxrI&\a7h^ax5*6,OmXmhy1(L4[\_1fO@XUVpibzW=<%`qQ]_i\SqP/dYy{r4 X-Hue: red X-Attribution: GM Date: Wed, 16 Jan 2013 16:24:58 -0500 In-Reply-To: (Sarah Weissman's message of "Thu, 10 Jan 2013 23:36:53 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) 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 (------) Sarah Weissman wrote: > find-tag-regexp finds the first match, but not subsequent ones. Thanks for the report. Works in 22.3, broken in 23.1 on. Bisected to r88247. Fixed by: *** lisp/progmodes/etags.el 2013-01-03 02:54:10 +0000 --- lisp/progmodes/etags.el 2013-01-16 21:02:21 +0000 *************** *** 335,346 **** (save-excursion (tags-verify-table (buffer-file-name table-buffer)))) (with-current-buffer table-buffer (if (tags-included-tables) ;; Insert the included tables into the list we ;; are processing. (setcdr tables (nconc (mapcar 'tags-expand-table-name (tags-included-tables)) ! (cdr tables))))) ;; This table is not in core yet. Insert a placeholder ;; saying we must read it into core to check for included ;; tables before searching the next table in the list. --- 335,349 ---- (save-excursion (tags-verify-table (buffer-file-name table-buffer)))) (with-current-buffer table-buffer + ;; Needed so long as etags-tags-included-tables + ;; does not save-excursion. + (save-excursion (if (tags-included-tables) ;; Insert the included tables into the list we ;; are processing. (setcdr tables (nconc (mapcar 'tags-expand-table-name (tags-included-tables)) ! (cdr tables)))))) ;; This table is not in core yet. Insert a placeholder ;; saying we must read it into core to check for included ;; tables before searching the next table in the list. *************** *** 1547,1552 **** --- 1550,1556 ---- files))) (nreverse files))) + ;; FIXME? Should this save-excursion? (defun etags-tags-included-tables () ; Doc string? (let ((files nil) beg) From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 16 21:09:17 2013 Received: (at control) by debbugs.gnu.org; 17 Jan 2013 02:09:17 +0000 Received: from localhost ([127.0.0.1]:35875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tveuq-00073H-My for submit@debbugs.gnu.org; Wed, 16 Jan 2013 21:09:16 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:40988) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tveup-00073B-Fp for control@debbugs.gnu.org; Wed, 16 Jan 2013 21:09:15 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TveuD-0003yw-08 for control@debbugs.gnu.org; Wed, 16 Jan 2013 21:08:37 -0500 Date: Wed, 16 Jan 2013 21:08:37 -0500 Message-Id: Subject: control message for bug 13412 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control 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: -4.2 (----) close 13412 24.2.93