From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Helpful in Emacs? Date: Fri, 10 Sep 2021 01:55:08 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22245"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: me@wilfred.me.uk, Stefan Kangas , Emacs developers To: Arthur Miller , =?UTF-8?Q?Daniel_Mart=c3=adn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 10 00:59:12 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mOT0g-0005UY-Hr for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Sep 2021 00:59:10 +0200 Original-Received: from localhost ([::1]:42542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOT0f-0000v2-Hv for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Sep 2021 18:59:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOSwt-0007op-TM for emacs-devel@gnu.org; Thu, 09 Sep 2021 18:55:16 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:35544) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOSws-0003SC-75 for emacs-devel@gnu.org; Thu, 09 Sep 2021 18:55:15 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id z9-20020a7bc149000000b002e8861aff59so97823wmi.0 for ; Thu, 09 Sep 2021 15:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=x/JO5jlYHTUnvsifkF2uCSO5/Xmlkb/Lq6ZYMo25TkA=; b=kPOUf1MztfvV6ILu+zvrQqL0MQxkIQ/j8zNuiiikMAXSqTq3G8bZV1VOLxE7WOgWOT mLPbqLM5j2etnlUkyaNpigRkAK7p6Kb+JvwbSSuFFdt0Pd9tmvdstMr3777YMSY1UxY9 b+ZUfdLWhd1rld3okPkZpCYb/cf3A5faY8LaG0hNYMwFWB2L0jktt6sk2lkpdXHnX7w0 oEUe7PLIMbaDTWh7KC/299lCWGES7LUgyCdroCNzNyjgAONLw3CoIMrXfdgR5rmQAs6b V3eOiLZws5VjELoM2sydmL4ZI6hjW/+Ue7GJ2LOy9KClBRl3HBV6tj166Ww/KlU8o22q VtjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=x/JO5jlYHTUnvsifkF2uCSO5/Xmlkb/Lq6ZYMo25TkA=; b=wqGq8+9y8UJpos3GyLaPT7iO0imdey42c6qFWOX2H/f78Bx3u5rm/OPmDOkmYQanba oO6kmJFgxFTJLf5L7H/K6LwiqbmvwqPG/NTGoTksZSKWvsrcv7On5VCG/TrpOj8Pi9ef NnSpn8G2ChhUUgJ0Fu6oIhlZtlUMq8CLBt4xoJdrXmfAmALoAXjmFExjuzzkTWDAYV2n 3wlneiPduDpnlAjSkQSvFI0A9T5d46dAX0iyXgY7IvfnNQMNn2NcG0Y+sAFr6cCqkMlu 8AbxdqFyeMwJ1d89z8cuYy6cSNCk88bzntha+L7Gb8Ytgbre1+TbVViujbBLz72gIaTx LixQ== X-Gm-Message-State: AOAM5310s8l8j5iuMb42UUE6ckxJRamlkMBkxgl8N+k/sjSaX9pRYuj4 BzpxYqgiwnEOZW4Uy1r8FiQApT3MXLo= X-Google-Smtp-Source: ABdhPJyCHEe4STAMvU4nTHzDvVgRJRkql9NK+Wx23/Kl52gVwgFgxRm6Lpk8HEEbFW+czvd/wuOZmA== X-Received: by 2002:a7b:c751:: with SMTP id w17mr5460331wmk.162.1631228111201; Thu, 09 Sep 2021 15:55:11 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id f1sm1397656wri.43.2021.09.09.15.55.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 15:55:10 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=raaahh@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-1.975, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274477 Archived-At: On 09.09.2021 23:23, Arthur Miller wrote: > What do you need to build xref backend you mention? As mentioned on elisp-refs > gh page: > > "xref-find-references: This command is included in Emacs 25.1, but it's based on > a text search. It is confused by comments and strings, and cannot distinguish > between functions and variables." > > Would rebuilding this command to use read instead of text search do the thing? You can easily plug another search implementation in xref-find-references. You can even make summaries multiline (though that would feel weird to me). But is elisp-refs that much better at searching? Distinguishing variables from functions sounds nice, but then you might want to rename the function -- and you'll probably want to rename the variable with the same name as well. Same about comments: if elisp-refs skips comments altogether (rather than smartly parsing references inside), you might miss some references to your function when doing a rename. I also wonder how it compares in performance.