From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Patch upstream Git for Elisp diff hunk headings Date: Thu, 11 Feb 2021 20:15:34 +0100 Message-ID: <87im6yju09.fsf@telefonica.net> References: <87czx68y4i.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29138"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:54zdYW0OxnyXhAEXSpwAHH9hh1o= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 11 20:37:04 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 1lAHlv-0007Ug-H6 for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 20:37:03 +0100 Original-Received: from localhost ([::1]:34092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAHlu-0005J9-Ge for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 14:37:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAHRH-0000Q7-JA for emacs-devel@gnu.org; Thu, 11 Feb 2021 14:15:46 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:33032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAHRF-0003QI-Gz for emacs-devel@gnu.org; Thu, 11 Feb 2021 14:15:42 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lAHRC-0002Pl-KH for emacs-devel@gnu.org; Thu, 11 Feb 2021 20:15:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:264425 Archived-At: Adam Spiers writes: > git_config diff.elisp.xfuncname "^(\\(.*)$" > > Indeed this is what Prot initially suggested in his original blog post > which sparked this discussion: > > https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/ > > While of course no one is claiming that this is technically correct in > all cases, I don't think I can actually recall ever seeing a single > instance of a top-level form which *was* indented. So presumably it's > a good enough heuristic to be helpful in the vast majority of cases. > Or at least it's more likely to be right than a heuristic which > assumes that all top-level forms include "def" in the first symbol in > the form, since the latter obviously fails in many common scenarios > including the init files one mentioned above. > > Would be grateful to hear other views on this. Indeed, "^(\\(.*)$" is good enough IMHO, and I do not understand the advantages of the second variant that Prot mentioned on his blog.