GNU bug report logs - #63939
28.2; xref-find-references-and-replace (xref-1.6.3)

Previous Next

Package: emacs;

Reported by: Aidan Hall <aidan.hall202 <at> gmail.com>

Date: Wed, 7 Jun 2023 01:52:03 UTC

Severity: normal

Found in version 28.2

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63939 in the body.
You can then email your comments to 63939 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#63939; Package emacs. (Wed, 07 Jun 2023 01:52:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aidan Hall <aidan.hall202 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 07 Jun 2023 01:52:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aidan Hall <aidan.hall202 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.2; xref-find-references-and-replace (xref-1.6.3)
Date: Tue, 06 Jun 2023 20:40:07 +0100
xref-find-references-and-replace uses query-replace-read-args to read
the identifier to replace, but I think it would make more sense for it
to use xref--read-identifier for consistency with the other xref
commands.


In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6)
 of 2023-01-03 built on 2
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Arch Linux

Configured using:
 'configure --with-x-toolkit=gtk3 --with-native-compilation
 --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd
 --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
 -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  corfu-popupinfo-mode: t
  save-place-mode: t
  savehist-mode: t
  recentf-mode: t
  global-display-fill-column-indicator-mode: t
  display-fill-column-indicator-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  auto-insert-mode: t
  repeat-mode: t
  pdf-occur-global-minor-mode: t
  TeX-PDF-mode: t
  vertico-mouse-mode: t
  vertico-mode: t
  which-key-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  evil-commentary-mode: t
  global-evil-matchit-mode: t
  evil-matchit-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  global-auto-revert-mode: t
  csv-field-index-mode: t
  sly-symbol-completion-mode: t
  global-evil-collection-unimpaired-mode: t
  evil-collection-unimpaired-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  windmove-mode: t
  override-global-mode: t
  global-goto-address-mode: t
  goto-address-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/aidan/.emacs.d/elpa/use-package-2.4.5/bind-key hides /home/aidan/.emacs.d/elpa/bind-key-2.4.1/bind-key
/home/aidan/.emacs.d/elpa/cmake-mode-20230422.828/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/home/aidan/.emacs.d/elpa/jsonrpc-1.0.17/jsonrpc hides /usr/share/emacs/28.2/lisp/jsonrpc
/home/aidan/.emacs.d/elpa/transient-0.4.1/transient hides /usr/share/emacs/28.2/lisp/transient
/home/aidan/.emacs.d/elpa/project-0.9.8/project hides /usr/share/emacs/28.2/lisp/progmodes/project
/home/aidan/.emacs.d/elpa/xref-1.6.3/xref hides /usr/share/emacs/28.2/lisp/progmodes/xref
/home/aidan/.emacs.d/elpa/eldoc-1.14.0/eldoc hides /usr/share/emacs/28.2/lisp/emacs-lisp/eldoc

Features:
(shadow mail-extr emacsbug sendmail mule-util substitute autoload
evil-collection-tar-mode tar-mode flymake-cc bug-reference pulse
cl-print ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum
gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win
ol-docview evil-collection-doc-view doc-view ol-bibtex ol-bbdb ol-w3m
ol-doi org-link-doi mm-archive network-stream url-http url-gw url-cache
url-auth lisp-mnt evil-collection-markdown-mode markdown-mode misearch
multi-isearch evil-collection-vc-git vc-git dired-aux
semantic/symref/grep evil-collection-grep grep semantic/symref eieio-opt
evil-collection-shortdoc shortdoc time corfu-popupinfo
evil-collection-corfu corfu paredit rainbow-delimiters elec-pair
hideshow notifications init saveplace savehist recentf tree-widget
display-fill-column-indicator xterm-color socks gnutls nsm elpher
undo-tree queue evil-collection-flycheck flycheck skeleton autoinsert
tempo ffap find-file repeat-map-define repeat google-c-style pdf-occur
ibuf-ext evil-collection-ibuffer ibuffer ibuffer-loaddefs pdf-isearch
let-alist pdf-misc evil-collection-pdf pdf-history pdf-tools pdf-view
jka-compr pdf-cache pdf-info pdf-util pdf-macs mom-mode nroff-mode
evil-tex latex latex-flymake tex-ispell tex-style tex dbus texmathp
minimap elcord bindat svelte-mode emmet-mode cl evil-collection-custom
cus-edit cus-load css-mode evil-collection-eww eww xdg url-queue shr
kinsoku svg mm-url evil-collection-gnus gnus nnheader wid-edit
evil-collection-rjsx-mode rjsx-mode sgml-mode facemenu dom
evil-collection-js2-mode js2-mode evil-collection-typescript-mode
typescript-mode prettier-js js cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs org-export-conf
ob-haskell ob-awk ob-gnuplot ob-calc calc-store calc-trail ob-lisp
ob-python evil-collection-python python tramp-sh ob-lua ob-R ox-md
ox-beamer ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar org-agenda org-refile ox-html table ox-ascii ox-publish ox
org-element evil-collection-org org ob ob-tangle ob-ref ob-lob ob-table
org-macro org-footnote org-src ob-comint org-pcomplete org-list
org-faces org-entities org-version ob-emacs-lisp org-table org-keys
org-loaddefs evil-collection-calendar cal-menu calendar cal-loaddefs
avl-tree ol oc-basic bibtex oc ob-exp ob-core org-compat ob-eval
org-macs vertico-mouse evil-collection-vertico vertico icomplete
company-glsl glsl-mode evil-collection-company company tcl
evil-collection-which-key which-key evil-surround evil-commentary
evil-commentary-integration evil-matchit evil-matchit-evil-setup
evil-matchit-sdk evil-collection-consult consult ace-window avy vc
vc-dispatcher magit-bookmark evil-collection-magit magit-submodule
magit-obsolete magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func magit-diff
smerge-mode diff evil-collection-diff-mode diff-mode git-commit
evil-collection-log-edit log-edit message rmc puny rfc822 mml mml-sec
evil-collection-epa epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log magit-core magit-autorevert autorevert
magit-margin magit-transient magit-process with-editor server magit-mode
magit-git evil-collection-magit-section magit-section magit-utils crm
prolog align sql-indent sql plantuml-mode xml nasm-mode haskell-mode
haskell-cabal haskell-utils haskell-font-lock haskell-indentation
haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports
haskell-complete-module haskell-ghc-support evil-collection-outline
noutline outline dabbrev haskell-customize gnuplot csv-mode sort
evil-collection-sly sly sly-completion sly-buttons sly-messages
sly-common evil-collection-apropos apropos evil-collection-arc-mode
arc-mode archive-mode hyperspec geiser-guile info-look geiser-debug
geiser-repl geiser-image geiser-capf geiser-doc geiser-menu
geiser-autodoc geiser-edit etags fileloop geiser-completion geiser-eval
geiser-connection tq geiser-syntax evil-collection-scheme scheme
geiser-impl help-fns radix-tree geiser-log geiser-popup
evil-collection-view view geiser-custom geiser-base
evil-collection-geiser geiser eglot-java evil-collection-eglot eglot
external-completion jsonrpc evil-collection-xref xref
evil-collection-flymake flymake-proc flymake evil-collection-ert ert
ewoc evil-collection-debug debug backtrace filenotify
evil-collection-imenu imenu project evil-collection-vterm vterm
evil-collection-bookmark bookmark face-remap evil-collection-compile
compile text-property-search color evil-collection-term term disp-table
ehelp vterm-module term/xterm xterm evil-collection-docker docker
docker-context docker-volume docker-network docker-image
docker-container docker-faces docker-core docker-compose docker-process
docker-utils evil-collection-tablist tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic pp semantic/tag semantic/lex
semantic/fw cedet tramp tramp-loaddefs trampver tramp-integration
files-x tramp-compat parse-time iso8601 time-date ls-lisp docker-group
transient format-spec compat compat-29 dash aio generator s
dockerfile-mode evil-collection-sh-script sh-script smie executable
evil-collection-speedbar speedbar ezimage dframe dired-x delight
evil-collection-unimpaired evil-collection-tabulated-list
evil-collection-tab-bar evil-collection-simple evil-collection-replace
evil-collection-process-menu evil-collection-package-menu
evil-collection-info evil-collection-indent evil-collection-image
image-mode evil-collection-dired dired dired-loaddefs exif
evil-collection-help evil-collection-elisp-mode evil-collection-eldoc
evil-collection-comint calc-ext evil-collection-calc
evil-collection-buff-menu evil-collection annalist use-package-delight
evil evil-integration evil-maps evil-commands reveal flyspell ispell
evil-jumps evil-command-window evil-search evil-ex shell pcomplete
comint ansi-color evil-types evil-macros evil-repeat evil-states
evil-core comp comp-cstr warnings rx advice evil-common windmove calc
calc-loaddefs calc-macs rect evil-digraphs evil-vars ring mode-local
find-func cl-extra help-mode use-package-bind-key bind-key easy-mmode
use-package-ensure use-package-core edmacro kmacro goto-addr thingatpt
finder-inf modus-operandi-theme modus-themes pcase tex-site
sly-autoloads info package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 1335059 582740)
 (symbols 48 76332 17)
 (strings 32 330928 56882)
 (string-bytes 1 10489494)
 (vectors 16 142698)
 (vector-slots 8 3256915 547158)
 (floats 8 805 773)
 (intervals 56 23079 6447)
 (buffers 992 61))

-- 
Aidan Hall.
<https://argletrough.neocities.org/links.html>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63939; Package emacs. (Tue, 20 Jun 2023 02:38:02 GMT) Full text and rfc822 format available.

Message #8 received at 63939 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Aidan Hall <aidan.hall202 <at> gmail.com>, 63939 <at> debbugs.gnu.org
Subject: Re: bug#63939: 28.2; xref-find-references-and-replace (xref-1.6.3)
Date: Tue, 20 Jun 2023 05:37:24 +0300
On 06/06/2023 22:40, Aidan Hall wrote:
> xref-find-references-and-replace uses query-replace-read-args to read
> the identifier to replace, but I think it would make more sense for it
> to use xref--read-identifier for consistency with the other xref
> commands.

Does this help?

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 643eea1b0a3..3f75f8d7132 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1613,7 +1613,8 @@ xref-find-references
 (defun xref-find-references-and-replace (from to)
   "Replace all references to identifier FROM with TO."
   (interactive
-   (let* ((query-replace-read-from-default 'find-tag-default)
+   (let* ((query-replace-read-from-default
+           (lambda () (xref-backend-identifier-at-point 
(xref-find-backend))))
           (common
            (query-replace-read-args "Query replace identifier" nil)))
      (list (nth 0 common) (nth 1 common))))





Reply sent to Dmitry Gutov <dmitry <at> gutov.dev>:
You have taken responsibility. (Sat, 12 Aug 2023 00:41:02 GMT) Full text and rfc822 format available.

Notification sent to Aidan Hall <aidan.hall202 <at> gmail.com>:
bug acknowledged by developer. (Sat, 12 Aug 2023 00:41:02 GMT) Full text and rfc822 format available.

Message #13 received at 63939-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Aidan Hall <aidan.hall202 <at> gmail.com>, 63939-done <at> debbugs.gnu.org
Subject: Re: bug#63939: 28.2; xref-find-references-and-replace (xref-1.6.3)
Date: Sat, 12 Aug 2023 03:39:56 +0300
On 20/06/2023 05:37, Dmitry Gutov wrote:
> On 06/06/2023 22:40, Aidan Hall wrote:
>> xref-find-references-and-replace uses query-replace-read-args to read
>> the identifier to replace, but I think it would make more sense for it
>> to use xref--read-identifier for consistency with the other xref
>> commands.
> 
> Does this help?
> 
> diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
> index 643eea1b0a3..3f75f8d7132 100644
> --- a/lisp/progmodes/xref.el
> +++ b/lisp/progmodes/xref.el
> @@ -1613,7 +1613,8 @@ xref-find-references
>   (defun xref-find-references-and-replace (from to)
>     "Replace all references to identifier FROM with TO."
>     (interactive
> -   (let* ((query-replace-read-from-default 'find-tag-default)
> +   (let* ((query-replace-read-from-default
> +           (lambda () (xref-backend-identifier-at-point 
> (xref-find-backend))))
>             (common
>              (query-replace-read-args "Query replace identifier" nil)))
>        (list (nth 0 common) (nth 1 common))))

Now pushed to master.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 09 Sep 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 244 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.