From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#28439: suggestion: support case-independent xref-find-definitions prompt TAB Date: Tue, 19 Sep 2017 03:55:34 +0300 Message-ID: References: <201709122237.v8CMb6w0029533@psr.com> <83r2vaobtn.fsf@gnu.org> <9b90e72d-e07b-a519-6693-c22c8722d83b@yandex.ru> <83377pnrin.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1505782594 1168 195.159.176.226 (19 Sep 2017 00:56:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2017 00:56:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 Cc: wbe@psr.com, 28439@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 19 02:56:27 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du6pt-0008Li-HE for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Sep 2017 02:56:25 +0200 Original-Received: from localhost ([::1]:39537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du6q0-0005mO-V4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Sep 2017 20:56:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du6pa-0005Zq-4J for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du6pW-0000w7-S1 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:56:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38361) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1du6pW-0000vv-OE for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1du6pW-0001yN-H0 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Sep 2017 00:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28439 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: wbe@psr.com, bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15057825527567 (code B ref -1); Tue, 19 Sep 2017 00:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Sep 2017 00:55:52 +0000 Original-Received: from localhost ([127.0.0.1]:47042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du6pL-0001xz-Th for submit@debbugs.gnu.org; Mon, 18 Sep 2017 20:55:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du6pK-0001xl-Dn for submit@debbugs.gnu.org; Mon, 18 Sep 2017 20:55:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du6pE-0000iX-7G for submit@debbugs.gnu.org; Mon, 18 Sep 2017 20:55:45 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45309) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1du6pE-0000iN-2m for submit@debbugs.gnu.org; Mon, 18 Sep 2017 20:55:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1du6pB-0005OX-5Z for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:55:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1du6p8-0000e6-29 for bug-gnu-emacs@gnu.org; Mon, 18 Sep 2017 20:55:41 -0400 Original-Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:33870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1du6p7-0000dH-KS; Mon, 18 Sep 2017 20:55:37 -0400 Original-Received: by mail-lf0-x244.google.com with SMTP id h80so1133663lfe.1; Mon, 18 Sep 2017 17:55:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0aQYMFxebWb1Nyul0tW7CGcKKQe9z79ZJFJsUkS8Dj0=; b=lzHvw8/RNegW+/VJFZW+1KYjTsV2voGFP/9rqBkGfYLytWk1HhI52xBwydGdUftzFH Sj1MXfAcESA/Y5WYSWS8R6WB/LceeB03hdZkgwhQVAjDzCQP0+9HdLZJM/jNqzjiko9O Q/IYhwrEeedF3jDILgid6krYAEdg5Y6DHX2YVYsgj16y+vonEoR7qTuvXHcm10uxWiry qO91aOcGUrlFCuNQzzjLZfbIhDZ4Hoc5uu9PLYOXMn9OCAojRzSQPy9mP4mSoq5YkFnj OKlBTVcmwpFOAd6/WaoZYeP6bnet/uY+EKDsEqGutaqebHuq+bIXBolWCijqkleKpWH/ zUWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0aQYMFxebWb1Nyul0tW7CGcKKQe9z79ZJFJsUkS8Dj0=; b=AjJJMat8OHqsWoEK7mqa9/QVMQt5Lyo8ZptCnw1MjFZqFQTdBM+gsa31TLgYNJYeD6 hqz/gJWXLLQyNzv8ZnFSRrodA+e8VGGPwuxnLF5n3FIpemnmRaYWnafFE4iHVLzQwZni G3yTwK9AIToDmmxrMyNBZKFY19ZmCOdWyZ9EtH5ozclexK5bvzQyMRwZNotTWyJhLWoN VD346WoeUqdfZwCyj19k9BVlfkHtToM/HxFtGJ8Rg4+tuHLTbfI6ndi4HYykeFHUed57 EsvPPehD2kiKx+1w3/OApDAFBeniTnJbU663FHKpT94vVbynPytQ7Y7GRnHWNC0pXCP4 1wJA== X-Gm-Message-State: AHPjjUiOxzogPLDNtlWd2LLr4tNWSMVDOOnJCYX5pjWlAloWxK6taKuW ri8AUrdM2fPuE2yCXtE= X-Google-Smtp-Source: AOwi7QBQPLtTGSKY8O8bgprAcU4J0YCKkoloxJqSvb87odpwFxqn3h8/Man7Ki0VYcdYqu4rQJYD0g== X-Received: by 10.46.18.141 with SMTP id 13mr14873107ljs.16.1505782535862; Mon, 18 Sep 2017 17:55:35 -0700 (PDT) Original-Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id u10sm2104985lju.84.2017.09.18.17.55.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 17:55:35 -0700 (PDT) In-Reply-To: <83377pnrin.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137098 Archived-At: On 9/14/17 8:01 PM, Eli Zaretskii wrote: >> Sorry, what don't we want to follow the value of completion-ignore-case? > > Because it has a much broader effect. I guessed so. But do you have a particular problem in mind? > And because the issue here is > inconsistency between completion and actual matching in > xref-find-definitions. They should be consistent, IMO. I think I agree, because xref--read-identifier calls completing-read with nil require-match argument (so we can't rely on the completion table to correct the input), but your patch doesn't fix the inconsistency. It only moves the identifier read toward the case-fold-search default. >> The fact that we have the option tags-case-fold-search (used in >> find-tag-tag, among other places) probably means that some users prefer >> not to ignore case. > > Then maybe an alternative is to make tags-case-fold-search nil by > default? Or make xref--read-identifier be case-insensitive if > case-fold-search is non-nil? The other way around: etags--xref-find-definitions can bind tags-case-fold-search to the value of completion-ignore-case. Or whichever xref-specific variable we add. We'd also need to add case-insensitive search support to elisp--xref-find-definitions, I suppose. So far, find-function-search-for-symbol always performs case-sensitive search. It's rarely a problem, though, because Elisp uses capital letters very infrequently. >> Maybe we could add a similar xref-specific option on top, but I'm not >> sure why completion-ignore-case is not good enough. >> >> We could change its default to t, though. > > Emacs-wide? Or just when completing on identifiers? Either is fine, as far as I'm concerned.