bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43569: 28.0.50; Menu "Continue Tags Search" signals an error


From: Drew Adams
Subject: bug#43569: 28.0.50; Menu "Continue Tags Search" signals an error
Date: Tue, 22 Sep 2020 13:44:36 -0700 (PDT)

> >> I think "Continue Tags Search" should be disabled when it has no effect.
> >
> > I've done that now, in menu-bar+.el.  I use this, but
> > perhaps someone can let me know if it's not the right,
> > or best, condition to use.  (I use condition-case, not
> > ignore-errors, for compatibility with older Emacs.)
> >
> > :enable (not (condition-case nil
> >                  (tags-loop-eval tags-loop-scan)
> >                (error t)))
> 
> I tried this, but it doesn't enable "Continue Tags Search"
> after starting "Search Tagged Files...".  And I don't know
> what else could be checked.

I think the xref changes broke the use of the tags code.
You can use `M-x tags-loop-continue'.  I think that
:enable code should work - and it does work for Emacs < 27.

But you're right that it no longer works.  Looks like the
code for the tags-search feature was changed partially,
and stuff was declared obsolete (which shouldn't have been
done, IMO).

* Xref as an alternative is one thing - OK.
* Xref as the new default is another thing - OK, but not my
  preference.
* Xref stealing the same keys is yet another thing - Not OK, IMO.
* But declaring the tags functionality and code to be
  obsolete is KO, IMO.  Overzealous NIH'ism, I expect.

Users should have both tags and xref available, as equals.

Guess I'll have to :enable that menu item unconditionally
for Emacs 27 and later (and leave it conditional for
Emacs before the breakage):

(define-key menu-bar-search-tags-menu [tags-continue]
  '(menu-item "Continue Tags Search/Replace" tags-loop-continue
    :help "Continue last tags search or replace operation"
    :enable (or (> emacs-major-version 26)
                (not (condition-case nil
                         (tags-loop-eval tags-loop-scan)
                       (error t))))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]