unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13412: 24.2; find-tag-regexp fails to find any next matches when multiple files are indexed
@ 2013-01-11  4:36 Sarah Weissman
  2013-01-16 21:24 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Sarah Weissman @ 2013-01-11  4:36 UTC (permalink / raw)
  To: 13412

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 away.
*Evaluating (list-tags "") makes the bug go away.

For reference, the TAGS file that is produced looks like this:
\f^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
\f^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=x86_64-apple-darwin' '--build=i686-apple-darwin'
 '--with-ns' 'build_alias=i686-apple-darwin'
 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.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 <return> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> e t a g s SPC * . e l <return> M-x v i
i <backspace> s i TAB t - t a g TAB <return> T A G
S <return> C-M-. m y - f i n d <return> C-u C-M-. C-u
C-M-. C-g C-M-. C-g <escape> x f i n d - t a g - r
e g TAB C-a C-k <help-echo> <help-echo> C-g <escape>
x s h e l l <return> l s <return> C-x C-f t e s t .
e l <return> 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 <return>

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)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#13412: 24.2; find-tag-regexp fails to find any next matches when multiple files are indexed
  2013-01-11  4:36 bug#13412: 24.2; find-tag-regexp fails to find any next matches when multiple files are indexed Sarah Weissman
@ 2013-01-16 21:24 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2013-01-16 21:24 UTC (permalink / raw)
  To: Sarah Weissman; +Cc: 13412

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)






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-16 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-11  4:36 bug#13412: 24.2; find-tag-regexp fails to find any next matches when multiple files are indexed Sarah Weissman
2013-01-16 21:24 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).