From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Bad moves with xref-find-definitions Date: Thu, 23 Apr 2015 17:07:44 +0200 Message-ID: <87h9s6c27z.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429801711 25723 80.91.229.3 (23 Apr 2015 15:08:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Apr 2015 15:08:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 23 17:08:23 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YlIjm-0007wX-5H for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2015 17:08:22 +0200 Original-Received: from localhost ([::1]:40757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlIjl-0004cN-GM for ged-emacs-devel@m.gmane.org; Thu, 23 Apr 2015 11:08:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlIjh-0004c7-60 for emacs-devel@gnu.org; Thu, 23 Apr 2015 11:08:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlIjd-0002ZR-0t for emacs-devel@gnu.org; Thu, 23 Apr 2015 11:08:17 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:50334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlIjc-0002Yz-QT for emacs-devel@gnu.org; Thu, 23 Apr 2015 11:08:12 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YlIjY-0007iX-Pv for emacs-devel@gnu.org; Thu, 23 Apr 2015 17:08:08 +0200 Original-Received: from dhcp-077-251-128-242.chello.nl ([77.251.128.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Apr 2015 17:08:08 +0200 Original-Received: from spinuvit by dhcp-077-251-128-242.chello.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Apr 2015 17:08:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 58 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dhcp-077-251-128-242.chello.nl User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:pIqAb/YnysXZY7OJAZeC3+lvfEE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185817 Archived-At: Hi All, There has been a breaking change in UI with respect to find definition functionality. I am all for generic interface but IMO there is no reason to break standard Emacs interaction mechanism in favor for some not that well thought UI borrowed from SLIME. These are the issues with the new interface: 1) `find-tag` (previously bound to M-.) was prompting for a symbol before jumping to the definition. The symbol at point was the default. On the expense of one additional RET this was very convenient because it leaves the possibility to jump to a different symbol and also saves you from useless navigation to a symbol when symbol is not directly under the cursor. The desired symbol might not be visible, or even present in current buffer. Now, "xref-find-definitions" encourages you to navigate to a symbol by disrupting the flow twice. Once, when you navigate to a symbol, and often for the second time when you need to go back to the editing after you saw the definition. This just fosters a bad habit of tracking what you read with a cursor. It just cannot be right. Needless to say that most other functionality in Emacs does ask for completion before performing an action (documentation, find-file etc). Having an option to *not* navigate to symbol is very useful and Emacs was recognizing this need all this time. Why would you change this now? 2) I haven't investigated the API thoroughly so I might be misinterpreting this one. Etags is still very useful even with dynamic languages. For example the language tool might not load all the files in current project/directory, or you might intentionally keep some code in non-project directories. You might also define your tags for a bunch of other related projects which you want to access from the current project. Now, when "M-." is gone, if the language re-defines `xref-find-function` how do I access tags? Do I need to bind a new global key for `find-tag` command? 3) C-u xref-find-definitions places symbol at point as the initial input which forces you to delete it. It's rather annoying. There has been a lengthy discussion on Cider issue tracker to change the behavior borrowed from SLIME into standard emacs UI [1][2]. Once that was changed, emacs itself seems to move into wrong ways. Vitalie [1] https://github.com/clojure-emacs/cider/issues/699#start-of-content [2] https://github.com/clojure-emacs/cider/issues/1014#start-of-content