GNU bug report logs - #37820
25.2; xref using etags incorrect case fold during completion

Previous Next

Package: emacs;

Reported by: Radey Shouman <shouman <at> comcast.net>

Date: Sat, 19 Oct 2019 04:54:04 UTC

Severity: normal

Found in version 25.2

Done: Dmitry Gutov <dgutov <at> yandex.ru>

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 37820 in the body.
You can then email your comments to 37820 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#37820; Package emacs. (Sat, 19 Oct 2019 04:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Radey Shouman <shouman <at> comcast.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Oct 2019 04:54:04 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: bug-gnu-emacs <at> gnu.org
Cc: shouman <at> comcast.net
Subject: 25.2; xref using etags incorrect case fold during completion
Date: Fri, 18 Oct 2019 20:13:31 -0400
[etags.diff (text/plain, inline)]
*** etags.el.dist	2017-06-24 18:03:59.000000000 -0400
--- etags.el	2019-10-18 19:50:39.334796361 -0400
***************
*** 777,790 ****
  
  ;;;###autoload
  (defun tags-lazy-completion-table ()
!   (let ((buf (current-buffer)))
      (lambda (string pred action)
        (with-current-buffer buf
          (save-excursion
            ;; If we need to ask for the tag table, allow that.
            (let ((enable-recursive-minibuffers t))
              (visit-tags-table-buffer))
!           (complete-with-action action (tags-completion-table) string pred))))))
  
  ;;;###autoload (defun tags-completion-at-point-function ()
  ;;;###autoload   (if (or tags-table-list tags-file-name)
--- 777,794 ----
  
  ;;;###autoload
  (defun tags-lazy-completion-table ()
!   (let ((buf (current-buffer))
!         (fold (if (memq tags-case-fold-search '(t nil))
! 				      tags-case-fold-search
! 				    case-fold-search)))
      (lambda (string pred action)
        (with-current-buffer buf
          (save-excursion
            ;; If we need to ask for the tag table, allow that.
            (let ((enable-recursive-minibuffers t))
              (visit-tags-table-buffer))
!           (let ((completion-ignore-case fold))
!             (complete-with-action action (tags-completion-table) string pred)))))))
  
  ;;;###autoload (defun tags-completion-at-point-function ()
  ;;;###autoload   (if (or tags-table-list tags-file-name)
***************
*** 796,805 ****
    "Using tags, return a completion table for the text around point.
  If no tags table is loaded, do nothing and return nil."
    (when (or tags-table-list tags-file-name)
!     (let ((completion-ignore-case (if (memq tags-case-fold-search '(t nil))
! 				      tags-case-fold-search
! 				    case-fold-search))
! 	  (pattern (find-tag--default))
  	  beg)
        (when pattern
  	(save-excursion
--- 800,806 ----
    "Using tags, return a completion table for the text around point.
  If no tags table is loaded, do nothing and return nil."
    (when (or tags-table-list tags-file-name)
!     (let ((pattern (find-tag--default))
  	  beg)
        (when pattern
  	(save-excursion
***************
*** 813,822 ****
  
  (defun find-tag-tag (string)
    "Read a tag name, with defaulting and completion."
!   (let* ((completion-ignore-case (if (memq tags-case-fold-search '(t nil))
! 				     tags-case-fold-search
! 				   case-fold-search))
! 	 (default (find-tag--default))
  	 (spec (completing-read (if default
  				    (format "%s (default %s): "
  					    (substring string 0 (string-match "[ :]+\\'" string))
--- 814,820 ----
  
  (defun find-tag-tag (string)
    "Read a tag name, with defaulting and completion."
!   (let* ((default (find-tag--default))
  	 (spec (completing-read (if default
  				    (format "%s (default %s): "
  					    (substring string 0 (string-match "[ :]+\\'" string))
[Message part 2 (text/plain, inline)]
 
In order to reproduce the bug, set tags-case-fold-search to t,
completion-ignore-case to nil, and visit a tags table.  Type M-. and
enter a prefix for a symbol in the tags table, but with differing case,
then type <tab>.

For example, if the tags table contains the symbol "Abc", type "a".

completion-ignore-case will be set to nil in the *Completions* buffer,
and all relevant symbols will not be shown.  In the example, "Abc" will
not be displayed.

I have attached a patch to etags.el that, as far as I can tell, fixes
the bug.


In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-07, modified by Debian built on binet
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Debian GNU/Linux 10 (buster)

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-NE1ko4/emacs25-25.2+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

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

Major mode: Help

Minor modes in effect:
  shell-dirtrack-mode: t
  display-time-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
You can run the command ‘browse-url’ with C-c b
Quit
Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %; q to quit; ? for help.
Type C-x 1 to remove help window.  
Mark saved where search started
m is undefined
Type "q" in help window to restore its previous buffer.
Quit
C-h C-g is undefined


Load-path shadows:
/usr/local/share/emacs/site-lisp/my-run-scheme hides /usr/local/share/emacs/site-lisp/splash-site-lisp/my-run-scheme
/usr/local/share/emacs/site-lisp/noah-friedman/vm-vcard hides /usr/local/share/emacs/site-lisp/vm/vm-vcard
/usr/local/share/emacs/site-lisp/noah-friedman/vcard hides /usr/local/share/emacs/site-lisp/vm/vcard
/usr/local/share/emacs/site-lisp/vm-8.1.1/vm-load hides /usr/local/share/emacs/site-lisp/vm-8.1.2/vm-load
/usr/local/share/emacs/site-lisp/vm/vm-macro hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-macro
/usr/local/share/emacs/site-lisp/vm/vm-folder hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-folder
/usr/local/share/emacs/site-lisp/vm/vm-edit hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-edit
/usr/local/share/emacs/site-lisp/vm/vm-mark hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-mark
/usr/local/share/emacs/site-lisp/vm/vm-page hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-page
/usr/local/share/emacs/site-lisp/vm/vm-w3 hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-w3
/usr/local/share/emacs/site-lisp/vm/vm-message hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-message
/usr/local/share/emacs/site-lisp/vm/vm-vars hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-vars
/usr/local/share/emacs/site-lisp/noah-friedman/vm-vcard hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-vcard
/usr/local/share/emacs/site-lisp/vm/vm-minibuf hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-minibuf
/usr/local/share/emacs/site-lisp/vm/vm-autoloads hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-autoloads
/usr/local/share/emacs/site-lisp/noah-friedman/vcard hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vcard
/usr/local/share/emacs/site-lisp/vm/vm-pine hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-pine
/usr/local/share/emacs/site-lisp/vm/u-vm-color hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/u-vm-color
/usr/local/share/emacs/site-lisp/vm/vm-mouse hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-mouse
/usr/local/share/emacs/site-lisp/vm/vm-toolbar hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-toolbar
/usr/local/share/emacs/site-lisp/vm/vm-avirtual hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-avirtual
/usr/local/share/emacs/site-lisp/vm/vm-undo hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-undo
/usr/local/share/emacs/site-lisp/vm/vm-crypto hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-crypto
/usr/local/share/emacs/site-lisp/vm/vm-ps-print hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-ps-print
/usr/local/share/emacs/site-lisp/vm/vm-save hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-save
/usr/local/share/emacs/site-lisp/vm/vm-serial hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-serial
/usr/local/share/emacs/site-lisp/vm/vm-search hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-search
/usr/local/share/emacs/site-lisp/vm/vm-message-history hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-message-history
/usr/local/share/emacs/site-lisp/vm/vm-misc hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-misc
/usr/local/share/emacs/site-lisp/vm/vm-motion hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-motion
/usr/local/share/emacs/site-lisp/vm/vm-mime hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-mime
/usr/local/share/emacs/site-lisp/vm/vm-grepmail hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-grepmail
/usr/local/share/emacs/site-lisp/vm/vm-reply hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-reply
/usr/local/share/emacs/site-lisp/vm/vm-summary-faces hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-summary-faces
/usr/local/share/emacs/site-lisp/vm/vm-menu hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-menu
/usr/local/share/emacs/site-lisp/vm/tapestry hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/tapestry
/usr/local/share/emacs/site-lisp/vm/vm-thread hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-thread
/usr/local/share/emacs/site-lisp/vm/vm-rfaddons hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-rfaddons
/usr/local/share/emacs/site-lisp/vm/vm-summary hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-summary
/usr/local/share/emacs/site-lisp/vm/vm-w3m hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-w3m
/usr/local/share/emacs/site-lisp/vm/vm-window hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-window
/usr/local/share/emacs/site-lisp/vm/vm-delete hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-delete
/usr/local/share/emacs/site-lisp/vm/vm-pcrisis hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-pcrisis
/usr/local/share/emacs/site-lisp/vm/vm-imap hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-imap
/usr/local/share/emacs/site-lisp/vm/vm-user hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-user
/usr/local/share/emacs/site-lisp/vm/vm hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm
/usr/local/share/emacs/site-lisp/vm/vm-pgg hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-pgg
/usr/local/share/emacs/site-lisp/vm/vm-autoload hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-autoload
/usr/local/share/emacs/site-lisp/vm/vm-sort hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-sort
/usr/local/share/emacs/site-lisp/vm/vm-biff hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-biff
/usr/local/share/emacs/site-lisp/vm/vm-license hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-license
/usr/local/share/emacs/site-lisp/vm/vm-version hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-version
/usr/local/share/emacs/site-lisp/vm/vm-virtual hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-virtual
/usr/local/share/emacs/site-lisp/vm/vm-startup hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-startup
/usr/local/share/emacs/site-lisp/vm/vm-digest hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-digest
/usr/local/share/emacs/site-lisp/vm/vm-pop hides /usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-pop
/usr/local/share/emacs/site-lisp/vm-8.1.1/contrib/org-vm hides /usr/local/share/emacs/site-lisp/vm-8.1.2/contrib/org-vm
/usr/local/share/emacs/site-lisp/vm-8.1.1/contrib/vm-blueman hides /usr/local/share/emacs/site-lisp/vm-8.1.2/contrib/vm-blueman
/usr/local/share/emacs/site-lisp/vm-8.1.1/contrib/vm-bogofilter hides /usr/local/share/emacs/site-lisp/vm-8.1.2/contrib/vm-bogofilter
/usr/local/share/emacs/site-lisp/vm-8.1.1/contrib/vm-mime-display-internal-application hides /usr/local/share/emacs/site-lisp/vm-8.1.2/contrib/vm-mime-display-internal-application
/usr/local/share/emacs/site-lisp/vm/vm-macro hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-macro
/usr/local/share/emacs/site-lisp/vm/vm-folder hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-folder
/usr/local/share/emacs/site-lisp/vm/vm-edit hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-edit
/usr/local/share/emacs/site-lisp/vm/vm-mark hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-mark
/usr/local/share/emacs/site-lisp/vm/vm-page hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-page
/usr/local/share/emacs/site-lisp/vm/vm-w3 hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-w3
/usr/local/share/emacs/site-lisp/vm/vm-message hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-message
/usr/local/share/emacs/site-lisp/vm/vm-vars hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-vars
/usr/local/share/emacs/site-lisp/noah-friedman/vm-vcard hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-vcard
/usr/local/share/emacs/site-lisp/vm/vm-minibuf hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-minibuf
/usr/local/share/emacs/site-lisp/vm/vm-autoloads hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-autoloads
/usr/local/share/emacs/site-lisp/noah-friedman/vcard hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vcard
/usr/local/share/emacs/site-lisp/vm/vm-pine hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-pine
/usr/local/share/emacs/site-lisp/vm/u-vm-color hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/u-vm-color
/usr/local/share/emacs/site-lisp/vm/vm-mouse hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-mouse
/usr/local/share/emacs/site-lisp/vm/vm-toolbar hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-toolbar
/usr/local/share/emacs/site-lisp/vm/vm-avirtual hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-avirtual
/usr/local/share/emacs/site-lisp/vm/vm-undo hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-undo
/usr/local/share/emacs/site-lisp/vm/vm-crypto hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-crypto
/usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-cus-load hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-cus-load
/usr/local/share/emacs/site-lisp/vm/vm-ps-print hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-ps-print
/usr/local/share/emacs/site-lisp/vm/vm-save hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-save
/usr/local/share/emacs/site-lisp/vm/vm-serial hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-serial
/usr/local/share/emacs/site-lisp/vm/vm-search hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-search
/usr/local/share/emacs/site-lisp/vm/vm-message-history hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-message-history
/usr/local/share/emacs/site-lisp/vm/vm-misc hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-misc
/usr/local/share/emacs/site-lisp/vm/vm-motion hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-motion
/usr/local/share/emacs/site-lisp/vm/vm-mime hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-mime
/usr/local/share/emacs/site-lisp/vm/vm-grepmail hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-grepmail
/usr/local/share/emacs/site-lisp/vm/vm-reply hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-reply
/usr/local/share/emacs/site-lisp/vm/vm-summary-faces hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-summary-faces
/usr/local/share/emacs/site-lisp/vm/vm-menu hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-menu
/usr/local/share/emacs/site-lisp/vm/tapestry hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/tapestry
/usr/local/share/emacs/site-lisp/vm/vm-thread hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-thread
/usr/local/share/emacs/site-lisp/vm/vm-rfaddons hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-rfaddons
/usr/local/share/emacs/site-lisp/vm/vm-summary hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-summary
/usr/local/share/emacs/site-lisp/vm/vm-w3m hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-w3m
/usr/local/share/emacs/site-lisp/vm/vm-window hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-window
/usr/local/share/emacs/site-lisp/vm/vm-delete hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-delete
/usr/local/share/emacs/site-lisp/vm/vm-pcrisis hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-pcrisis
/usr/local/share/emacs/site-lisp/vm/vm-imap hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-imap
/usr/local/share/emacs/site-lisp/vm/vm-user hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-user
/usr/local/share/emacs/site-lisp/vm/vm hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm
/usr/local/share/emacs/site-lisp/vm/vm-pgg hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-pgg
/usr/local/share/emacs/site-lisp/vm/vm-autoload hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-autoload
/usr/local/share/emacs/site-lisp/vm/vm-sort hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-sort
/usr/local/share/emacs/site-lisp/vm/vm-biff hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-biff
/usr/local/share/emacs/site-lisp/vm/vm-license hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-license
/usr/local/share/emacs/site-lisp/vm/vm-version hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-version
/usr/local/share/emacs/site-lisp/vm/vm-virtual hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-virtual
/usr/local/share/emacs/site-lisp/vm/vm-startup hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-startup
/usr/local/share/emacs/site-lisp/vm/vm-digest hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-digest
/usr/local/share/emacs/site-lisp/vm/vm-pop hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-pop
/usr/local/share/emacs/site-lisp/vm-8.1.1/lisp/vm-build hides /usr/local/share/emacs/site-lisp/vm-8.1.2/lisp/vm-build
/usr/share/emacs/25.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/local/share/emacs/site-lisp/pcomplete-1.1.7/pcmpl-rpm hides /usr/share/emacs/25.2/lisp/pcmpl-rpm
/usr/local/share/emacs/site-lisp/pcomplete-1.1.7/pcmpl-cvs hides /usr/share/emacs/25.2/lisp/pcmpl-cvs
/usr/local/share/emacs/site-lisp/pcomplete-1.1.7/pcomplete hides /usr/share/emacs/25.2/lisp/pcomplete
/usr/local/share/emacs/site-lisp/pcomplete-1.1.7/pcmpl-unix hides /usr/share/emacs/25.2/lisp/pcmpl-unix
/usr/local/share/emacs/site-lisp/noah-friedman/type-break hides /usr/share/emacs/25.2/lisp/type-break
/usr/local/share/emacs/site-lisp/pcomplete-1.1.7/pcmpl-gnu hides /usr/share/emacs/25.2/lisp/pcmpl-gnu
/usr/local/share/emacs/site-lisp/pcomplete-1.1.7/pcmpl-linux hides /usr/share/emacs/25.2/lisp/pcmpl-linux
/usr/local/share/emacs/site-lisp/noah-friedman/whitespace hides /usr/share/emacs/25.2/lisp/whitespace
/usr/local/share/emacs/site-lisp/t-mouse hides /usr/share/emacs/25.2/lisp/t-mouse
/usr/local/share/emacs/site-lisp/pcl-cvs-2.9.9/cvs-status hides /usr/share/emacs/25.2/lisp/vc/cvs-status
/usr/local/share/emacs/site-lisp/diff-mode hides /usr/share/emacs/25.2/lisp/vc/diff-mode
/usr/local/share/emacs/site-lisp/splash-site-lisp/verilog-mode hides /usr/share/emacs/25.2/lisp/progmodes/verilog-mode
/usr/local/share/emacs/site-lisp/noah-friedman/rlogin hides /usr/share/emacs/25.2/lisp/net/rlogin
/usr/share/emacs25/site-lisp/latex-cjk-thai/thai-word hides /usr/share/emacs/25.2/lisp/language/thai-word
/usr/local/share/emacs/site-lisp/noah-friedman/eldoc hides /usr/share/emacs/25.2/lisp/emacs-lisp/eldoc
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-help hides /usr/share/emacs/25.2/lisp/calc/calc-help
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-macs hides /usr/share/emacs/25.2/lisp/calc/calc-macs
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-stuff hides /usr/share/emacs/25.2/lisp/calc/calc-stuff
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-bin hides /usr/share/emacs/25.2/lisp/calc/calc-bin
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-funcs hides /usr/share/emacs/25.2/lisp/calc/calc-funcs
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-frac hides /usr/share/emacs/25.2/lisp/calc/calc-frac
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-incom hides /usr/share/emacs/25.2/lisp/calc/calc-incom
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-store hides /usr/share/emacs/25.2/lisp/calc/calc-store
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-vec hides /usr/share/emacs/25.2/lisp/calc/calc-vec
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-rules hides /usr/share/emacs/25.2/lisp/calc/calc-rules
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-embed hides /usr/share/emacs/25.2/lisp/calc/calc-embed
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-poly hides /usr/share/emacs/25.2/lisp/calc/calc-poly
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-math hides /usr/share/emacs/25.2/lisp/calc/calc-math
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-misc hides /usr/share/emacs/25.2/lisp/calc/calc-misc
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-units hides /usr/share/emacs/25.2/lisp/calc/calc-units
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-alg hides /usr/share/emacs/25.2/lisp/calc/calc-alg
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-aent hides /usr/share/emacs/25.2/lisp/calc/calc-aent
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-lang hides /usr/share/emacs/25.2/lisp/calc/calc-lang
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-graph hides /usr/share/emacs/25.2/lisp/calc/calc-graph
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-mode hides /usr/share/emacs/25.2/lisp/calc/calc-mode
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-arith hides /usr/share/emacs/25.2/lisp/calc/calc-arith
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-cplx hides /usr/share/emacs/25.2/lisp/calc/calc-cplx
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-trail hides /usr/share/emacs/25.2/lisp/calc/calc-trail
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-ext hides /usr/share/emacs/25.2/lisp/calc/calc-ext
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-rewr hides /usr/share/emacs/25.2/lisp/calc/calc-rewr
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-stat hides /usr/share/emacs/25.2/lisp/calc/calc-stat
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-prog hides /usr/share/emacs/25.2/lisp/calc/calc-prog
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-comb hides /usr/share/emacs/25.2/lisp/calc/calc-comb
/usr/local/share/emacs/site-lisp/calc-2.02f/calc hides /usr/share/emacs/25.2/lisp/calc/calc
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-undo hides /usr/share/emacs/25.2/lisp/calc/calc-undo
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-fin hides /usr/share/emacs/25.2/lisp/calc/calc-fin
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-sel hides /usr/share/emacs/25.2/lisp/calc/calc-sel
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-map hides /usr/share/emacs/25.2/lisp/calc/calc-map
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-keypd hides /usr/share/emacs/25.2/lisp/calc/calc-keypd
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-yank hides /usr/share/emacs/25.2/lisp/calc/calc-yank
/usr/local/share/emacs/site-lisp/calc-2.02f/calc-forms hides /usr/share/emacs/25.2/lisp/calc/calc-forms

Features:
(shadow sort mail-extr browse-url info emacsbug message format-spec
rfc822 mml mml-sec password-cache epg gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils eieio-opt
speedbar sb-image ezimage dframe find-func derived apropos warnings
compile find-dired misearch multi-isearch dired-aux dired cus-edit
wid-edit etags xref cl-seq project eieio eieio-core cl-macs cus-start
cus-load thingatpt help-fns shell pcomplete paredit edmacro kmacro
scheme finder-inf package epg-config seq byte-opt gv bytecomp
byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib server
time ange-ftp comint ansi-color paren jka-compr browse-url-mozilla
xcscope ring easymenu time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame 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 charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 167293 16795)
 (symbols 48 26842 0)
 (miscs 40 207 571)
 (strings 32 39758 7207)
 (string-bytes 1 1121069)
 (vectors 16 21355)
 (vector-slots 8 537787 6222)
 (floats 8 303 293)
 (intervals 56 1924 47)
 (buffers 976 36))

-- 



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sat, 19 Oct 2019 06:55:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Radey Shouman <shouman <at> comcast.net>
Cc: 37820 <at> debbugs.gnu.org
Subject: Re: bug#37820: 25.2;
 xref using etags incorrect case fold during completion
Date: Sat, 19 Oct 2019 09:53:59 +0300
> Date: Fri, 18 Oct 2019 20:13:31 -0400
> From: Radey Shouman <shouman <at> comcast.net>
> Cc: shouman <at> comcast.net
> 
> In order to reproduce the bug, set tags-case-fold-search to t,
> completion-ignore-case to nil

Isn't that a contradiction of sorts?  How can we know which of these
two should have precedence?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sat, 19 Oct 2019 07:15:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>, Radey Shouman <shouman <at> comcast.net>
Cc: 37820 <at> debbugs.gnu.org
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sat, 19 Oct 2019 10:14:37 +0300
On 19.10.2019 9:53, Eli Zaretskii wrote:
> Isn't that a contradiction of sorts?  How can we know which of these
> two should have precedence?

I think completion-ignore-case should have precedence in this example 
because the user called an xref command.

Whether tags are used, or something else, is an implementation detail. 
Behavior should be as similar as possible.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sat, 19 Oct 2019 18:28:02 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37820 <at> debbugs.gnu.org, Radey Shouman <shouman <at> comcast.net>
Subject: Re: bug#37820: 25.2;
 xref using etags incorrect case fold during completion
Date: Sat, 19 Oct 2019 13:34:10 -0400
Eli Zaretskii writes:
 > > Date: Fri, 18 Oct 2019 20:13:31 -0400
 > > From: Radey Shouman <shouman <at> comcast.net>
 > > Cc: shouman <at> comcast.net
 > > 
 > > In order to reproduce the bug, set tags-case-fold-search to t,
 > > completion-ignore-case to nil
 > 
 > Isn't that a contradiction of sorts?  How can we know which of these
 > two should have precedence?

I would expect that you would follow the precedent of find-tag, which
uses tags-case-fold-search and case-fold-search to determine whether
a tags search is case-sensitive or not.

Whether case should be folded during completion seems dependent on the
application; I have never been tempted to change the default value of
completion-ignore-case -- the note on that variable was included because
setting it to non-nil would prevent observing the bug.  From a quick look
at the lisp directory completion-ignore-case is typically used by binding
it during a completion.

The info file says:

     You can control the case-sensitivity of tags search commands by
     customizing the value of the variable ‘tags-case-fold-search’.  The
     default is to use the same setting as the value of ‘case-fold-search’
     (*note Search Case::).

I found it surprising that completion would not follow the tags search
itself in folding case, as I have become used to this useful behavior
over many years of using find-tag.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sat, 19 Oct 2019 18:28:02 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37820 <at> debbugs.gnu.org,
 Radey Shouman <shouman <at> comcast.net>
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sat, 19 Oct 2019 13:40:15 -0400
Dmitry Gutov writes:
 > On 19.10.2019 9:53, Eli Zaretskii wrote:
 > > Isn't that a contradiction of sorts?  How can we know which of these
 > > two should have precedence?
 > 
 > I think completion-ignore-case should have precedence in this example 
 > because the user called an xref command.
 > 
 > Whether tags are used, or something else, is an implementation detail. 
 > Behavior should be as similar as possible.

I doubt that many users actually set the default value of
completion-ignore-case, it is normally used by binding it during a
completion according to the need of the particular application.

Tags search behavior should follow the documentation and many years of
precedent, regardless of whether xref is the front end.  Case folding
during tags search completion, or any other search completion should
be consistent with the search itself.

If you are proposing to add a variable to control case-folding during all xref
searches, analogous to tags-case-fold-search, then I agree.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sat, 19 Oct 2019 21:08:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Radey Shouman <shouman <at> comcast.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 37820 <at> debbugs.gnu.org
Subject: RE: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sat, 19 Oct 2019 21:07:04 +0000 (UTC)
> I would expect that you would follow the precedent
> of find-tag, which uses tags-case-fold-search and
> case-fold-search to determine whether a tags search
> is case-sensitive or not.
... 
> I found it surprising that completion would not
> follow the tags search itself in folding case, as I
> have become used to this useful behavior over many
> years of using find-tag.

+1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sun, 20 Oct 2019 16:20:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sun, 20 Oct 2019 19:19:21 +0300
On 19.10.2019 20:34, Radey Shouman wrote:
> I found it surprising that completion would not follow the tags search
> itself in folding case, as I have become used to this useful behavior
> over many years of using find-tag.

You are not calling a tags search command, though. You are calling a 
backend-agnostic command. Maybe there are inconsistencies there, but I 
think they should be resolved in favor of general variables.

In any case, is there a particular reason you customize these vars like 
that?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 25 Oct 2019 14:00:02 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 37820 <at> debbugs.gnu.org, Radey Shouman <shouman <at> comcast.net>
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Fri, 25 Oct 2019 09:59:27 -0400
Dmitry Gutov writes:
>On 19.10.2019 20:34, Radey Shouman wrote:
>> I found it surprising that completion would not follow the tags search
>> itself in folding case, as I have become used to this useful behavior
>> over many years of using find-tag.

>You are not calling a tags search command, though. You are calling a
>backend-agnostic command. Maybe there are inconsistencies there, but I
>think they should be resolved in favor of general variables.

>In any case, is there a particular reason you customize these vars like
>that?

Please copy me on any messages to which you expect a response.
I have not subscribed to the mailing list.

The only variable I customize is tags-case-fold-search, I leave
completion-ignore-case with the default value.  I heartily regret
even mentioning the latter variable, it is a red herring.

There are at least two reasons to change tags-case-fold-search:

1) Some programming languages are not case sensitive in normal use,
eg Common Lisp, Fortran, Cobol, R[45]RS Scheme ...  For these languages
case-insensitive search should be the default.

2) For many code bases the rules of CamelCasing are so vague, or their
observance so lax, that it's hard to predict what the capitalization
of an identifier will be.  It's useful in these cases to use
completion that is not case sensitive.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Wed, 25 Dec 2019 00:46:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Radey Shouman <shouman <at> comcast.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37820 <at> debbugs.gnu.org
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Wed, 25 Dec 2019 02:45:24 +0200
Hi Radey,

sorry for the late reply.

On 25.10.2019 16:59, Radey Shouman wrote:
> Please copy me on any messages to which you expect a response.
> I have not subscribed to the mailing list.

Sure. That's the default etiquette here anyway.

> The only variable I customize is tags-case-fold-search, I leave
> completion-ignore-case with the default value.  I heartily regret
> even mentioning the latter variable, it is a red herring.

Don't regret it because it's entirely pertinent.

So, do we really have meaningful scenarios where the user will want 
tags-case-fold-search set to t while completion-ignore-case *should* 
remain nil?

I suppose we could add a new method to xref backends just for that, but 
we shouldn't do that without understanding the use cases. Like, why/how 
other backends would choose to return different values.

> There are at least two reasons to change tags-case-fold-search:
> 
> 1) Some programming languages are not case sensitive in normal use,
> eg Common Lisp, Fortran, Cobol, R[45]RS Scheme ...  For these languages
> case-insensitive search should be the default.

How does using one or the other variable help with that distinction?

When someone uses tags, they often use them with a multitude of 
languages. Whether you employ tags-case-fold-search, or an xref-specific 
variable Eli suggested to add, that would affect all languages anyway, 
right?

> 2) For many code bases the rules of CamelCasing are so vague, or their
> observance so lax, that it's hard to predict what the capitalization
> of an identifier will be.  It's useful in these cases to use
> completion that is not case sensitive.

We can make completion-ignore-case a safe local variable, so that you 
can set it in dir-locals depending on the code base.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Thu, 26 Dec 2019 20:57:02 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37820 <at> debbugs.gnu.org,
 Radey Shouman <shouman <at> comcast.net>
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Thu, 26 Dec 2019 15:56:07 -0500
Dmitry Gutov writes:
 > Hi Radey,
 > 
 > sorry for the late reply.

Not at all.

 > On 25.10.2019 16:59, Radey Shouman wrote:
 > > The only variable I customize is tags-case-fold-search, I leave
 > > completion-ignore-case with the default value.  I heartily regret
 > > even mentioning the latter variable, it is a red herring.
 > 
 > Don't regret it because it's entirely pertinent.
 > 
 > So, do we really have meaningful scenarios where the user will want 
 > tags-case-fold-search set to t while completion-ignore-case *should* 
 > remain nil?

No.  I believe that completion-ignore-case should always be bound to
the value of tags-case-fold-search when doing a tags completion.  If
this is not so then completion is not consistent with the tags search,
which is the bug in question.

 > I suppose we could add a new method to xref backends just for that, but 
 > we shouldn't do that without understanding the use cases. Like, why/how 
 > other backends would choose to return different values.
 > 
 > > There are at least two reasons to change tags-case-fold-search:
 > > 
 > > 1) Some programming languages are not case sensitive in normal use,
 > > eg Common Lisp, Fortran, Cobol, R[45]RS Scheme ...  For these languages
 > > case-insensitive search should be the default.
 > 
 > How does using one or the other variable help with that distinction?

From what I could see searching the lisp tree, tags-case-fold-search
is intended for user customization of tags search (and partly carried
over to xref).  completion-ignore-case is used for dynamic control of
completion, and is not a sensible variable for user customization.

 > When someone uses tags, they often use them with a multitude of 
 > languages. Whether you employ tags-case-fold-search, or an xref-specific 
 > variable Eli suggested to add, that would affect all languages anyway, 
 > right?

Yes.  It is possible to mix languages even in a single tags table.
Personal preference also plays a role.

 > > 2) For many code bases the rules of CamelCasing are so vague, or their
 > > observance so lax, that it's hard to predict what the capitalization
 > > of an identifier will be.  It's useful in these cases to use
 > > completion that is not case sensitive.
 > 
 > We can make completion-ignore-case a safe local variable, so that you 
 > can set it in dir-locals depending on the code base.

I'm not sure that's useful, because the default value of
completion-ignore-case is hardly ever used.  For example, even
if ignoring case for tags searches, one would probably not want to
ignore case when completing input for describe-key.

On the other hand, it might well be useful to make
tags-case-fold-search or any xref replacement a safe local variable.

BTW, how might one find the list of safe local variables?

-- 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 17 Jan 2020 01:16:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Radey Shouman <shouman <at> comcast.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37820 <at> debbugs.gnu.org
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Fri, 17 Jan 2020 04:15:07 +0300
[Message part 1 (text/plain, inline)]
On 26.12.2019 23:56, Radey Shouman wrote:
> Dmitry Gutov writes:
>   > Hi Radey,
>   >
>   > sorry for the late reply.
> 
> Not at all.

And once again. Upon some consideration, I have settled on the most 
backward-compatible option, I think.

> No.  I believe that completion-ignore-case should always be bound to
> the value of tags-case-fold-search when doing a tags completion.  If
> this is not so then completion is not consistent with the tags search,
> which is the bug in question.

Yes, OK. See the attached patch.

The alternative would be to create a new user option local to the xref 
package that would affect both identifier completion and search, but a) 
that will likely be an incompatible change unless tags-case-fold-search 
becomes an obsolete-alias, b) it seems unrealistic to have all backends 
adhere to it anyway.

So let's ask the backends instead.

> On the other hand, it might well be useful to make
> tags-case-fold-search or any xref replacement a safe local variable.

Yes. The patch also does that.

> BTW, how might one find the list of safe local variables?

Well, um. You can evaluate this expression:

(seq-filter
 (lambda (s) (get (intern-soft s) 'safe-local-variable))
 (all-completions "" obarray))

Eli, is this patch okay for emacs-27?

On the one hand, the issue seems minor-ish.

On the other, it's a backward compatibility problem. And the patch must 
be pretty safe because it's basically additive: the only real change is 
to xref--read-identifier, and it calls 
xref-backend-identifier-completion-ignore-case which will default to the 
current behavior for all backends except etags.
[xref-backend-identifier-completion-ignore-case.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 17 Jan 2020 08:29:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 37820 <at> debbugs.gnu.org, shouman <at> comcast.net
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Fri, 17 Jan 2020 10:28:23 +0200
> Cc: 37820 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Fri, 17 Jan 2020 04:15:07 +0300
> 
> Eli, is this patch okay for emacs-27?
> 
> On the one hand, the issue seems minor-ish.
> 
> On the other, it's a backward compatibility problem. And the patch must 
> be pretty safe because it's basically additive: the only real change is 
> to xref--read-identifier, and it calls 
> xref-backend-identifier-completion-ignore-case which will default to the 
> current behavior for all backends except etags.

Can you tell what is the difference in user-facing behavior due to
this change?  I'm not sure I understand that looking at the patch.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 17 Jan 2020 12:50:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37820 <at> debbugs.gnu.org, shouman <at> comcast.net
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Fri, 17 Jan 2020 15:49:29 +0300
On 17.01.2020 11:28, Eli Zaretskii wrote:
> Can you tell what is the difference in user-facing behavior due to
> this change?  I'm not sure I understand that looking at the patch.

Identifier completion in xref-find-definitions (C-u M-. TAB TAB), when 
the etags backend is in use, will honor the value of tags-case-fold-search.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 17 Jan 2020 13:40:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 37820 <at> debbugs.gnu.org, shouman <at> comcast.net
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Fri, 17 Jan 2020 15:39:23 +0200
> Cc: shouman <at> comcast.net, 37820 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Fri, 17 Jan 2020 15:49:29 +0300
> 
> On 17.01.2020 11:28, Eli Zaretskii wrote:
> > Can you tell what is the difference in user-facing behavior due to
> > this change?  I'm not sure I understand that looking at the patch.
> 
> Identifier completion in xref-find-definitions (C-u M-. TAB TAB), when 
> the etags backend is in use, will honor the value of tags-case-fold-search.

Thanks.  This probably warrants to be mentioned in NEWS, but other
than that I'm okay with installing this on the release branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 17 Jan 2020 15:35:01 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37820 <at> debbugs.gnu.org, shouman <at> comcast.net
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Fri, 17 Jan 2020 10:34:03 -0500
Dmitry Gutov writes:
 > On 17.01.2020 11:28, Eli Zaretskii wrote:
 > > Can you tell what is the difference in user-facing behavior due to
 > > this change?  I'm not sure I understand that looking at the patch.
 > 
 > Identifier completion in xref-find-definitions (C-u M-. TAB TAB), when 
 > the etags backend is in use, will honor the value of tags-case-fold-search.

I haven't looked at the patch yet, but I can describe the desired
change in user-facing behavior with an example:

Suppose tags-case-fold-search is true in a buffer with a tags table
containing the symbol "CamelCase".

The key sequence M.camelcase will find the definition of CamelCase.
On the other hand, with the current behavior, the key sequence M.cTAB
will show a completion buffer that does not contain "CamelCase".

With a proper fix, the completion buffer will include "CamelCase".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Fri, 17 Jan 2020 21:29:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Radey Shouman <shouman <at> comcast.net>
Cc: 37820 <at> debbugs.gnu.org
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sat, 18 Jan 2020 00:28:19 +0300
On 17.01.2020 18:34, Radey Shouman wrote:

> I haven't looked at the patch yet, but I can describe the desired
> change in user-facing behavior with an example:
> 
> Suppose tags-case-fold-search is true in a buffer with a tags table
> containing the symbol "CamelCase".
> 
> The key sequence M.camelcase will find the definition of CamelCase.
> On the other hand, with the current behavior, the key sequence M.cTAB
> will show a completion buffer that does not contain "CamelCase".
> 
> With a proper fix, the completion buffer will include "CamelCase".

Thank you. It would help if you actually test the patch as well.

Or simply a new snapshot of emacs-27.




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Fri, 17 Jan 2020 21:30:02 GMT) Full text and rfc822 format available.

Notification sent to Radey Shouman <shouman <at> comcast.net>:
bug acknowledged by developer. (Fri, 17 Jan 2020 21:30:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37820-done <at> debbugs.gnu.org, shouman <at> comcast.net
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sat, 18 Jan 2020 00:29:13 +0300
On 17.01.2020 16:39, Eli Zaretskii wrote:
> Thanks.  This probably warrants to be mentioned in NEWS, but other
> than that I'm okay with installing this on the release branch.

Pushed in commit e898442 (forgot to reference the bug number in the 
commit message, sorry).

NEWS entry included.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37820; Package emacs. (Sat, 18 Jan 2020 22:34:01 GMT) Full text and rfc822 format available.

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

From: Radey Shouman <shouman <at> comcast.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 37820 <at> debbugs.gnu.org, Radey Shouman <shouman <at> comcast.net>
Subject: Re: bug#37820: 25.2; xref using etags incorrect case fold during
 completion
Date: Sat, 18 Jan 2020 17:33:30 -0500
Dmitry Gutov writes:
 > On 17.01.2020 18:34, Radey Shouman wrote:
 > 
 > > I haven't looked at the patch yet, but I can describe the desired
 > > change in user-facing behavior with an example:
 > > 
 > > Suppose tags-case-fold-search is true in a buffer with a tags table
 > > containing the symbol "CamelCase".
 > > 
 > > The key sequence M.camelcase will find the definition of CamelCase.
 > > On the other hand, with the current behavior, the key sequence M.cTAB
 > > will show a completion buffer that does not contain "CamelCase".
 > > 
 > > With a proper fix, the completion buffer will include "CamelCase".
 > 
 > Thank you. It would help if you actually test the patch as well.

I have tried it, and it does work.  Thank you.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Feb 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 61 days ago.

Previous Next


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