From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: grep-at-point Date: Wed, 11 Jan 2017 12:15:43 -0800 Message-ID: References: <20170111094846.122e7235@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484167471 10564 195.159.176.226 (11 Jan 2017 20:44:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2017 20:44:31 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 11 21:44:26 2017 Return-path: Envelope-to: geh-help-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 1cRPko-0001hh-5E for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 21:44:18 +0100 Original-Received: from localhost ([::1]:56969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRPks-0005na-FB for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 15:44:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRPJV-00028g-VP for help-gnu-emacs@gnu.org; Wed, 11 Jan 2017 15:16:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRPJV-0007F0-6O for help-gnu-emacs@gnu.org; Wed, 11 Jan 2017 15:16:05 -0500 Original-Received: from mail-qt0-x231.google.com ([2607:f8b0:400d:c0d::231]:36643) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRPJV-0007Eu-21 for help-gnu-emacs@gnu.org; Wed, 11 Jan 2017 15:16:05 -0500 Original-Received: by mail-qt0-x231.google.com with SMTP id k15so436113223qtg.3 for ; Wed, 11 Jan 2017 12:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=wUNZ9rD91mARNp4JtaigbKC++4WUA4NBL2A42xUzG+k=; b=shcjUBcmNGc4eIbqRxZE8fdyGA/cfcik3DpYPaEORjvlvjX59SOgNB5LSw40S6tdw4 WxgnA14DsUNqYaigfAUGNQY2W6vgUPaDa+v1n8uz6izBJa66zJZcEY5+ycsGhuwCVOwg S2r0YROIT3El3DpDhFndaraZ98gmJR94Fxo62oBa7LfztQoxI+acqzs1Qmhtih3SpKnb k7nIBqKVQ/++s/7XSYW8U/bqlnc+SQEJ2etaPHXptgQxMMG2bGfMckI7F20m4b6yeDoP 6f3X2zeKyrv3HDhUCTqwwqwAHyN/XTljgI2VQ8ucLm8hAPVaOZurdvoYNRlA3+5bYsLU GjWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wUNZ9rD91mARNp4JtaigbKC++4WUA4NBL2A42xUzG+k=; b=Ry5w/c/dJFL2+ouwK/DnThandyel6c7+kyTEeX/V/WsHnL0AHhudoot/mmk4aZFyaN sNFVmTGRn51UfTwwKQHOZJfAkBJorrkXvR1zAYhFvPfMGxAqNJPchqVZtPgsDrsPIngA LFPFgiho98xbZEb9diT9j1zW4vy8QJsTd6en+1Fwsi70vlUZOhoNhbH9ZthIy9pw8J4j +NREKAi65AlR6ij0id8WWChtiBxvrld7lpF4Iq0YL27GWne1AC+D5skEvhfbpAGlGiyS yW1tWlxMBw2UGsgf20gCopERzQTh0Q540OSnZTQplx25RAKFhXJVAwq08xreHTtzP8XB F52w== X-Gm-Message-State: AIkVDXLGxKf/lnJQuJfozdKjU/N4Z+3tFMRaWQc58C87SJOTvsBN2grXkSTrI386j0+GgLEJxBDvt+K6SNJcfw== X-Received: by 10.200.57.199 with SMTP id v65mr9392339qte.13.1484165764128; Wed, 11 Jan 2017 12:16:04 -0800 (PST) Original-Received: by 10.237.56.138 with HTTP; Wed, 11 Jan 2017 12:15:43 -0800 (PST) In-Reply-To: <20170111094846.122e7235@gauss> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112092 Archived-At: Joe Riel wrote: > Before writing one, is there an elisp function > that returns a buffer of links to file locations > where the elisp symbol at point is used? > > I'm only concerned with the files in the current directory. > Am currently using M-x grep. Maybe all I really need > is a grep-at-point function, which greps for the symbol at point. Sounds like `xref-find-references' (bound to M-? by default) might be what you're looking for. It was introduced in Emacs 25. M-? runs the command xref-find-references (found in global-map), which is an interactive autoloaded compiled Lisp function in =E2=80=98xref.el=E2=80=99. It is bound to M-?. (xref-find-references IDENTIFIER) Find references to the identifier at point. With prefix argument, prompt for the identifier.