From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2013 07:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15641@debbugs.gnu.org Cc: Stefan Monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.138208166511908 (code B ref -1); Fri, 18 Oct 2013 07:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2013 07:34:25 +0000 Received: from localhost ([127.0.0.1]:56375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VX4Zj-00035z-UI for submit@debbugs.gnu.org; Fri, 18 Oct 2013 03:34:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36322) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VX4Zg-00035i-KM for submit@debbugs.gnu.org; Fri, 18 Oct 2013 03:34:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VX4ZS-0000jm-R1 for submit@debbugs.gnu.org; Fri, 18 Oct 2013 03:34:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX4ZS-0000jf-Nd for submit@debbugs.gnu.org; Fri, 18 Oct 2013 03:34:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX4ZK-0007Ez-87 for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 03:34:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VX4ZB-0000f7-RD for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 03:33:58 -0400 Received: from mail-pb0-x232.google.com ([2607:f8b0:400e:c01::232]:48713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX4ZB-0000ez-GD for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2013 03:33:49 -0400 Received: by mail-pb0-f50.google.com with SMTP id uo15so2025145pbc.23 for ; Fri, 18 Oct 2013 00:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=QBOgVIZkMu8SXnt72D8qCFMhz2PTPg2XZf7KAA0voc0=; b=VSQEz4GdFrZHEIjQgWKO2cxSwWMe6Xu7STb+gHW8nPBY/NfukA43eFkC1/kuXdDe95 B9tz+S3jR84rBlQhfG+uL5Tge4L3PTUoI9n4CYtaym7KFuW4fuunscxsRrtk2ZHM6gqP wlDNL+yP6v1yKIfKadH7xkVJODQVRxDYEyz7FcvlGIXXuEd1MGaON4ZyPnmzHTtqLBwl G6K7KiUT/urLNLpbE7PJfl822T8qSkeUrq/+A601upHz0Cl8XC+WxCA743Rm5a8eCtG+ yAej1GaUAaO3sK7jcq3FKxwcs/dj3VV0VviENb3KOKGGrcE/Ieghjvkq0UkqbyFr3teY m5cg== X-Received: by 10.68.135.132 with SMTP id ps4mr1576479pbb.171.1382081627513; Fri, 18 Oct 2013 00:33:47 -0700 (PDT) Received: from localhost ([61.149.217.126]) by mx.google.com with ESMTPSA id pu5sm2176067pac.21.2013.10.18.00.33.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Oct 2013 00:33:46 -0700 (PDT) From: Leo Liu Date: Fri, 18 Oct 2013 15:33:41 +0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain I think we should just make M-. work on elisp-related places such as lisp-interaction-mode, emacs-lisp-mode, eval-expression and even help-mode. I haven't added the key binding but the function is as in the patch. Comments? --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: find-func.diff === modified file 'lisp/emacs-lisp/find-func.el' --- lisp/emacs-lisp/find-func.el 2013-01-01 09:11:05 +0000 +++ lisp/emacs-lisp/find-func.el 2013-10-18 07:26:27 +0000 @@ -1,4 +1,4 @@ -;;; find-func.el --- find the definition of the Emacs Lisp function near point +;;; find-func.el --- find the definition of the Emacs Lisp function near point -*- lexical-binding: t; -*- ;; Copyright (C) 1997, 1999, 2001-2013 Free Software Foundation, Inc. @@ -138,8 +138,10 @@ (defun find-library-suffixes () (let ((suffixes nil)) - (dolist (suffix (get-load-suffixes) (nreverse suffixes)) - (unless (string-match "elc" suffix) (push suffix suffixes))))) + (dolist (suffix (get-load-suffixes) ) + (unless (string-match "elc" suffix) + (push suffix suffixes))) + (nreverse suffixes))) (defun find-library--load-name (library) (let ((name library)) @@ -392,12 +394,11 @@ Set mark before moving, if the buffer already existed." (let* ((orig-point (point)) - (orig-buf (window-buffer)) - (orig-buffers (buffer-list)) - (buffer-point (save-excursion - (find-definition-noselect symbol type))) - (new-buf (car buffer-point)) - (new-point (cdr buffer-point))) + (orig-buffers (buffer-list)) + (buffer-point (save-excursion + (find-definition-noselect symbol type))) + (new-buf (car buffer-point)) + (new-point (cdr buffer-point))) (when buffer-point (when (memq new-buf orig-buffers) (push-mark orig-point)) @@ -490,16 +491,16 @@ (defun find-definition-noselect (symbol type &optional file) "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL. If the definition can't be found in the buffer, return (BUFFER). -TYPE says what type of definition: nil for a function, `defvar' for a -variable, `defface' for a face. This function does not switch to the -buffer nor display it. +TYPE says what type of definition: nil or `defun' for a function, +`defvar' for a variable, `defface' for a face. This function +does not switch to the buffer nor display it. The library where SYMBOL is defined is searched for in FILE or `find-function-source-path', if non-nil, otherwise in `load-path'." (cond ((not symbol) (error "You didn't specify a symbol")) - ((null type) + ((memq type '(nil defun)) (find-function-noselect symbol)) ((eq type 'defvar) (find-variable-noselect symbol file)) @@ -579,6 +580,44 @@ (define-key ctl-x-4-map "V" 'find-variable-other-window) (define-key ctl-x-5-map "V" 'find-variable-other-frame)) +;;;###autoload +(defun find-definition (symbol &optional type) + (interactive + (let* ((default (or (intern-soft (thing-at-point 'symbol)) + (function-called-at-point))) + (symbol (intern-soft + (completing-read + (format (if default "Find symbol (default %s): " + "Find symbol: ") default) + obarray + (lambda (s) (or (fboundp s) (boundp s) (facep s))) + t nil nil default))) + (types (delq nil (list (and (fboundp symbol) 'defun) + (and (boundp symbol) 'defvar) + (and (facep symbol) 'defface))))) + (list symbol (if (<= (length types) 1) + (car types) + (intern-soft + (completing-read "Type: " + (mapcar #'symbol-name types) nil t)))))) + (eval-and-compile (require 'etags)) + (let ((def (save-excursion (find-definition-noselect symbol type)))) + (cond + ((not (car def)) + (user-error "No definition found for `%s'" symbol)) + ((and (not (numberp (cdr def))) + (with-current-buffer (car def) + (buffer-narrowed-p)) + (yes-or-no-p + (format "Definition not in accessible portion of buffer %s. Widen? " + (buffer-name (car def))))) + (with-current-buffer (car def) + (widen)) + (find-definition symbol type)) + (t (ring-insert find-tag-marker-ring (point-marker)) + (switch-to-buffer (car def)) + (and (cdr def) (goto-char (cdr def))))))) + (provide 'find-func) ;;; find-func.el ends here --=-=-=-- From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2013 12:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 15641@debbugs.gnu.org Received: via spool by 15641-submit@debbugs.gnu.org id=B15641.138210112415330 (code B ref 15641); Fri, 18 Oct 2013 12:59:02 +0000 Received: (at 15641) by debbugs.gnu.org; 18 Oct 2013 12:58:44 +0000 Received: from localhost ([127.0.0.1]:56639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VX9da-0003zB-UA for submit@debbugs.gnu.org; Fri, 18 Oct 2013 08:58:43 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:62364) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VX9dW-0003yr-EG for 15641@debbugs.gnu.org; Fri, 18 Oct 2013 08:58:39 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+J2C/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFHO+J2C/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35798045" Received: from 206-248-157-130.dsl.teksavvy.com (HELO pastel.home) ([206.248.157.130]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Oct 2013 08:58:32 -0400 Received: by pastel.home (Postfix, from userid 20848) id E1715611E3; Fri, 18 Oct 2013 08:58:31 -0400 (EDT) From: Stefan Monnier Message-ID: References: Date: Fri, 18 Oct 2013 08:58:31 -0400 In-Reply-To: (Leo Liu's message of "Fri, 18 Oct 2013 15:33:41 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I think we should just make M-. work on elisp-related places such as > lisp-interaction-mode, emacs-lisp-mode, eval-expression and even > help-mode. Right: M-. should not be bound to an command specific to etags but to a command which delegates the work to a find-tag-function (whose default can then be to use etags). Of course, find-tag-function should do "as little as possible": find the corresponding place and return it. The generic part of the code will take care of displaying the buffer, selecting it, remembering the previous position, etc... so we don't need a pop-tag-mark-function. Stefan From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. Resent-From: Josh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2013 19:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: Leo Liu , 15641@debbugs.gnu.org Received: via spool by 15641-submit@debbugs.gnu.org id=B15641.138212292027298 (code B ref 15641); Fri, 18 Oct 2013 19:02:02 +0000 Received: (at 15641) by debbugs.gnu.org; 18 Oct 2013 19:02:00 +0000 Received: from localhost ([127.0.0.1]:57207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXFJ9-00076D-DO for submit@debbugs.gnu.org; Fri, 18 Oct 2013 15:01:59 -0400 Received: from mail-qe0-f48.google.com ([209.85.128.48]:59887) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXFJ6-00075y-Os for 15641@debbugs.gnu.org; Fri, 18 Oct 2013 15:01:57 -0400 Received: by mail-qe0-f48.google.com with SMTP id d4so2192576qej.35 for <15641@debbugs.gnu.org>; Fri, 18 Oct 2013 12:01:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=QLIFpZWrATRefxAgK7j1BANCaj5lOP29X7nNhfYm62Y=; b=Pm0km0xZwyn9maiQKPy90tD8CZ36dJKTAEP0r8UvBvKxuRBSeZx4Evoh/y8+t4Yfuk 22EJBWkNp6bQOQLxCFCyInlVJtshLfILGe1x0oVB+NbiqlARBB17HsuM0P2qxtxsW0Lg RLFDutZBi40xz34REf1/WCeo8KpjYrsWQaqZRaYl2dr5v/OpR5qZQWSkuEySbqf4Vedr gtgRzuls21WW4SQEOoE3hD1aUt1X2K5L5hGv7xM1kHabx6HGeA7U9cH5Z8SDCpVq3Wfd PF13LOUQBV16zTYWipuqaS2dA5riB2g22BCnv/bBxipDbTNAUSkC4NMkT+WXGx3Yumdy X/hA== X-Gm-Message-State: ALoCoQkrM+xXsmsKx6MR7r3PRLxx8F9ew1DaunHKl0HBGvupyI9dsgqLwImNG57XQ/nTR3hYFKfM X-Received: by 10.224.67.3 with SMTP id p3mr6626894qai.98.1382122911174; Fri, 18 Oct 2013 12:01:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.38.162 with HTTP; Fri, 18 Oct 2013 12:01:21 -0700 (PDT) In-Reply-To: References: From: Josh Date: Fri, 18 Oct 2013 12:01:21 -0700 X-Google-Sender-Auth: y17Ce9d8rUShjIf29aMzUxQbA24 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Oct 18, 2013 at 5:58 AM, Stefan Monnier wrote: >> I think we should just make M-. work on elisp-related places such as >> lisp-interaction-mode, emacs-lisp-mode, eval-expression and even >> help-mode. > > Right: M-. should not be bound to an command specific to etags but to > a command which delegates the work to a find-tag-function (whose > default can then be to use etags). > > Of course, find-tag-function should do "as little as possible": find the > corresponding place and return it. The generic part of the code will > take care of displaying the buffer, selecting it, remembering the > previous position, etc... so we don't need a pop-tag-mark-function. If you haven't already done so, it might be worth taking a look at elisp-slime-nav-mode[0], which implements something similar to your patch in a minor mode. Its author appears to have signed copyright papers as well. I'm in agreement with Stefan's inclination to make the entry points to this functionality sufficiently generic that they can be tagging system agnostic. If we start down that path for M-. it seems wise to consider and specify user interfaces to all of the related functionality (e.g. as described here[1]) at the same time in order to provide a single coherent set of commands and key bindings for navigating source trees, regardless of whether the navigation in any particular context is facilitated by etags, GNU Global, nrepl, or other means. [0] https://github.com/purcell/elisp-slime-nav [1] http://www.emacswiki.org/emacs/EmacsTags#toc1 Josh From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2013 20:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: Leo Liu , 15641@debbugs.gnu.org Received: via spool by 15641-submit@debbugs.gnu.org id=B15641.1382126590601 (code B ref 15641); Fri, 18 Oct 2013 20:04:01 +0000 Received: (at 15641) by debbugs.gnu.org; 18 Oct 2013 20:03:10 +0000 Received: from localhost ([127.0.0.1]:57236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXGGL-00009c-4A for submit@debbugs.gnu.org; Fri, 18 Oct 2013 16:03:09 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:48632) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXGGI-000091-Bc for 15641@debbugs.gnu.org; Fri, 18 Oct 2013 16:03:07 -0400 Received: by mail-lb0-f172.google.com with SMTP id c11so3036363lbj.31 for <15641@debbugs.gnu.org>; Fri, 18 Oct 2013 13:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=vLUbCne0L0M9xyLpIT9AdCLwU5yztj8FHdHGJX4ybh4=; b=D7XXrvM4AtPeVPtqgq7qEhXdSXCl2CSUI2rqkd+l8mcsuUArzE0ePYvWJuwKiZcLPz 0/doeHBuCjPNAm2NCSfByxNkGICpunD08BI7aVkWLvskRoP2IYr0RP+vjJWOP1gdI7AY A8EAlGgwSMCda0238R/SEChqb33hLCOSfb0jeSa1ZAxU7rF+yYyvKuEBnsxdSUk5sBCa QNeaj6KtsioRYk8GXgEbgvpbTa3MzCNY10dx/nZUKFi5dCSlx+ZrNrpIppbZHkey2htd F1jFTpYGcX3BPHd/x8ASCQ/afwS6LdED6+qaqxllFAOvWDK/kjmiqGsuQ//FNbG7gWoK MLLA== X-Received: by 10.152.21.34 with SMTP id s2mr58055lae.55.1382126579843; Fri, 18 Oct 2013 13:02:59 -0700 (PDT) Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id k6sm2978640lae.9.2013.10.18.13.02.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 18 Oct 2013 13:02:59 -0700 (PDT) From: Dmitry Gutov References: Date: Sat, 19 Oct 2013 00:02:54 +0400 In-Reply-To: (Stefan Monnier's message of "Fri, 18 Oct 2013 08:58:31 -0400") Message-ID: <874n8ebb4h.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Stefan Monnier writes: > Of course, find-tag-function should do "as little as possible": find the > corresponding place and return it. `lisp--company-location' looks like a decent candidate, for Elisp. > The generic part of the code will > take care of displaying the buffer, selecting it, remembering the > previous position, etc... so we don't need a pop-tag-mark-function. Should we also have a tags-loop-continue-function (or next-file-function)? Mostly for consistency, it's not as useful in Elisp, but it could allow the user to jump between different things with the same name: functions, variables, faces, features. From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. References: In-Reply-To: Resent-From: Barry OReilly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2013 22:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 15641@debbugs.gnu.org Received: via spool by 15641-submit@debbugs.gnu.org id=B15641.138213658016631 (code B ref 15641); Fri, 18 Oct 2013 22:50:02 +0000 Received: (at 15641) by debbugs.gnu.org; 18 Oct 2013 22:49:40 +0000 Received: from localhost ([127.0.0.1]:57326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXIrT-0004KA-Cu for submit@debbugs.gnu.org; Fri, 18 Oct 2013 18:49:39 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:63287) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXIrP-0004Ju-Sp for 15641@debbugs.gnu.org; Fri, 18 Oct 2013 18:49:36 -0400 Received: by mail-wg0-f49.google.com with SMTP id x12so4496919wgg.16 for <15641@debbugs.gnu.org>; Fri, 18 Oct 2013 15:49:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=hwnkAp/wH1SLscnsa9BBd1fHG3wPV0aEnxhgCK4Zbxo=; b=zvM7VwDEe2GLVf9L7jQtuwcEU436Xmh5gvW+4E449Q32CEZSt9xOrbtdE8EzRRrbdS o5yoDbSNXM6PG75Lg05ppPEOyisK00TmlK1L6G6PtBInhOv00UqZqPSgswQOOYQoKKLe /9y5oLEUpWtelFlB8G1wDlMoY6GAxkUfg1uay8ZLjkY1ubLN9FUC7fhErqWK/ePLi06D IY9WLWrneOxIsdPj2X3GgMwZZ6faAGyqh2RPhIFdJaQCMLgDneP5OtEJjzY6T5T5cPbp Aturc3RjF6VyWPUpU2GjXYKnaOevK5+CKOMCThPG63yM86mAzEJZ3cDP/QlbF4P9yXnq +HYQ== MIME-Version: 1.0 X-Received: by 10.180.100.33 with SMTP id ev1mr1268715wib.18.1382136569799; Fri, 18 Oct 2013 15:49:29 -0700 (PDT) Received: by 10.194.17.72 with HTTP; Fri, 18 Oct 2013 15:49:29 -0700 (PDT) Date: Fri, 18 Oct 2013 18:49:29 -0400 Message-ID: From: Barry OReilly Content-Type: multipart/alternative; boundary=f46d04440266462c4e04e90bbf0d X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --f46d04440266462c4e04e90bbf0d Content-Type: text/plain; charset=ISO-8859-1 This would be very nice improvement. When I'm editing C or C++, I usually try semantic-ia-fast-jump first, which can fail to find the tag for a variety of reasions. I use etags as my fallback, sometimes with a few iterations with prefix-arg because of etags false results. I've missed the fact that I can't pop positions with Semantic. In practice I end up using Evil's C-o command for the same buffer or buffer-menu if Semantic took me to a different buffer. Currently semantic-ia-fast-jump doesn't prompt for the tag to find, as etags' find-tag does. This is nicer in Semantic's case, so I think the minibuffer prompting should be specific to etags and not a part of the generic interface. Currently find-tag takes TAGNAME while semantic-ia-fast-jump takes PT, so their interfaces need to be consolidated. PT is more basic since the TAGNAME etags offers as default is derived from what's at point. --f46d04440266462c4e04e90bbf0d Content-Type: text/html; charset=ISO-8859-1
This would be very nice improvement. When I'm editing C or C++, I
usually try semantic-ia-fast-jump first, which can fail to find the
tag for a variety of reasions. I use etags as my fallback, sometimes
with a few iterations with prefix-arg because of etags false results.

I've missed the fact that I can't pop positions with Semantic. In
practice I end up using Evil's C-o command for the same buffer or
buffer-menu if Semantic took me to a different buffer.

Currently semantic-ia-fast-jump doesn't prompt for the tag to find, as
etags' find-tag does. This is nicer in Semantic's case, so I think the
minibuffer prompting should be specific to etags and not a part of the
generic interface.

Currently find-tag takes TAGNAME while semantic-ia-fast-jump takes PT,
so their interfaces need to be consolidated. PT is more basic since
the TAGNAME etags offers as default is derived from what's at point.

--f46d04440266462c4e04e90bbf0d-- From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2013 01:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Dmitry Gutov Cc: Leo Liu , 15641@debbugs.gnu.org Received: via spool by 15641-submit@debbugs.gnu.org id=B15641.138214567231489 (code B ref 15641); Sat, 19 Oct 2013 01:22:01 +0000 Received: (at 15641) by debbugs.gnu.org; 19 Oct 2013 01:21:12 +0000 Received: from localhost ([127.0.0.1]:57436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXLE8-0008Bo-9b for submit@debbugs.gnu.org; Fri, 18 Oct 2013 21:21:12 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23264) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VXLE6-0008Ba-Ie for 15641@debbugs.gnu.org; Fri, 18 Oct 2013 21:21:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd+GD/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFLd+GD/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="35853915" Received: from 75-119-225-131.dsl.teksavvy.com (HELO pastel.home) ([75.119.225.131]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Oct 2013 21:21:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id B62D0610B6; Fri, 18 Oct 2013 21:21:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <874n8ebb4h.fsf@yandex.ru> Date: Fri, 18 Oct 2013 21:21:04 -0400 In-Reply-To: <874n8ebb4h.fsf@yandex.ru> (Dmitry Gutov's message of "Sat, 19 Oct 2013 00:02:54 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Should we also have a tags-loop-continue-function (or > next-file-function)? Or some other way to get the same result (e.g. an additional argument to find-tag-function), yes. Stefan From unknown Fri Aug 22 01:03:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15641: 24.3; [PATCH] Add find-definition for M-. Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Nov 2017 00:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15641 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: Stefan Monnier , 15641@debbugs.gnu.org Received: via spool by 15641-submit@debbugs.gnu.org id=B15641.151001599214944 (code B ref 15641); Tue, 07 Nov 2017 00:54:02 +0000 Received: (at 15641) by debbugs.gnu.org; 7 Nov 2017 00:53:12 +0000 Received: from localhost ([127.0.0.1]:54936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBs8e-0003sr-BW for submit@debbugs.gnu.org; Mon, 06 Nov 2017 19:53:12 -0500 Received: from mail-io0-f180.google.com ([209.85.223.180]:49404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBs8c-0003sW-PL; Mon, 06 Nov 2017 19:53:11 -0500 Received: by mail-io0-f180.google.com with SMTP id n137so373727iod.6; Mon, 06 Nov 2017 16:53:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KRfX3lioYpAtWmZLhTb7sGtkVyyguFV0XXNaHp3TJwY=; b=Cu+ld00LDwzqsBZ9xCy7MUlJDfFOK//0DKCxyarQWveMm+l4+5HcQtkFwzdZeBR30Q E1W5/CdE1f313soLgZCw8lvXltCNqUidK4/XVbRdPecj/vR/Jmp660nekobQdIMTQ/gP ON9eLa6+t/GWZfTcUOz1ENVfVuR2UwFb19Tkweo0tV93bPeH43S/oNSSLzHgO2DGiJgj SU0zqEzdmmCjKAoNSm62KxpRrBKj8CeqSC51zhSwaJKkTCGNpjvA0lgmjDrTzF+WKSJa m8pA0QtclEa09M+31ORcuXJ8Cd1RQYgg0SGc9Gfa17gbVWnnbuUSYy/alQoY4YrQlo/D R/Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=KRfX3lioYpAtWmZLhTb7sGtkVyyguFV0XXNaHp3TJwY=; b=Ls8NxwN7TZknN/CtIhNEh4UMm+whdU3fHNVAMMSleBKwEaNs/4iBtYRCruhMhMeoWC vEhG4id4821U8tVGG/OdOjY98wOfiOuBCZ2WGuJKBGduNzfoUA1C9ySNGgvTc4zFtSyA 9gxDuoJd0Gyi00g8MKeGIbM07jwJGCfzFRhUonGYuqg+f/GxQWf6HenFY+59Mv3hKdFN iGj90Zi1BvIx3PPGga2QblVJe+QgDmb1Vn5k0EcXJblCQiiXSvr/9mhhuC3KK1HsW94w V1JnZzdModMlDh/LS+Htf6si9jB0VPaHnPficCHWyYI4pqtFqxfhqgj2tbqonmCpuGcN CnHw== X-Gm-Message-State: AJaThX6hW0hc4/Do/VDJHBFN8COxTIJZmgewAR2bh9tSi2NOBh0jM0Us vzLDa8+cAqP6HFVxiIE3igesqw== X-Google-Smtp-Source: ABhQp+RiYzY1JkSQSicloY2OO50zHrtPKDFjwk21aZIeW+D6JDmv++vzpfJURiT/OcDCSGXFNtddzg== X-Received: by 10.107.32.199 with SMTP id g190mr21584367iog.217.1510015984971; Mon, 06 Nov 2017 16:53:04 -0800 (PST) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e142sm148004ite.28.2017.11.06.16.53.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2017 16:53:04 -0800 (PST) From: Noam Postavsky References: Date: Mon, 06 Nov 2017 19:53:03 -0500 In-Reply-To: (Leo Liu's message of "Fri, 18 Oct 2013 15:33:41 +0800") Message-ID: <87r2ta6hao.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) close 15641 25.1 quit Leo Liu writes: > I think we should just make M-. work on elisp-related places such as > lisp-interaction-mode, emacs-lisp-mode, eval-expression and even > help-mode. I believe we now have xref-find-definitions which does this.