From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Patch upstream Git for Elisp diff hunk headings Date: Thu, 11 Feb 2021 13:05:19 -0600 Message-ID: References: <87czx68y4i.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10506"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Adam Spiers , Protesilaos Stavrou Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 11 20:33:25 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 1lAHiP-0002eT-2P for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 20:33:25 +0100 Original-Received: from localhost ([::1]:53382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAHiN-0001Qj-Tu for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Feb 2021 14:33:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAHHO-0000tk-Gu for emacs-devel@gnu.org; Thu, 11 Feb 2021 14:05:30 -0500 Original-Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:35198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAHHK-0007Vj-Mw for emacs-devel@gnu.org; Thu, 11 Feb 2021 14:05:30 -0500 Original-Received: by mail-pj1-x1034.google.com with SMTP id e9so3962793pjj.0 for ; Thu, 11 Feb 2021 11:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=hA1mYOGxKMrrjo/qO5aznusLCZIM63QlzC9T/Oib6Pw=; b=RXA/uH3NgeMdkk0Sik8jHKnoly9vgDPMOga+UIbHi6ntzx3UgS2LffOVJ9xPRDXHlE F/1UeDKvBfBWQR+8fXwtLCgP2AJE8w9MpqC+DYAVLCDEd722ZSgk0WpGiGl+89k7uUn/ HYbgvPtknk+ro4Sx87osSir6UNBlQnI5tfoD4YYeLi9wcaYOSJPpTKNh4Nxu2mYmBVto 6VDhDUa3WYwkdG+8vbh1jxGfX6kW+9/krrz2nPv8Zq8iO92vXw9VyJ9243CyuR0xkYq/ ZcFYNk9tVC9yjt8TB5Y2l39m4bgyWdk8bsCbue0DRf3lcDOd5leigcKQmbv+CeoM66zg j8sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=hA1mYOGxKMrrjo/qO5aznusLCZIM63QlzC9T/Oib6Pw=; b=k3lqAAChJXhWoCRBt84Y19YnJ0D/dLcg3AYuD58kmb+Bc4+PEWV6BKbyKru6encqlG iL/7qAbcMYRodsq4Ak+g05qFOAoDbqw1ayI246RNAVfmX2S0gXa6NIQCSEt9GOYdSDkc u935TN0EM1TERHBCWW+EWfgG/zOZYrB2F7anTqRAyzojt8fApE9dOOei6MXT5IKZRMOm rSyg3N2mRuYUhbOcAyhralzpKCVw1SUTGqW9s8TT7x2F2QTj4Ze7Jv4klCe2skb1yw50 xvNblhrw3aPMq8fVig/TD4ENRtYkPjswIAEAizI4aesAeKfMH/vVy8NI9RPxYW5AKX+u pvrg== X-Gm-Message-State: AOAM531u8Yb3Vvu2C4218M56bYwTjHvQfwMyfREGyaIIkIxaSiRZWzwI xJgwjx+jr/FboagdMdzfqBv8/LTrqGeCQwUfBUQJNozn X-Google-Smtp-Source: ABdhPJzXL19Qd9/fZROkHUh93V2efpOhECx/aX889voCJ/DeyUNGYgY0a/sjKI8ElVK8nIulImJNNXqLL+ZKv7w3puI= X-Received: by 2002:a17:902:ea8a:b029:e2:1526:91ef with SMTP id x10-20020a170902ea8ab02900e2152691efmr8898977plb.41.1613070320391; Thu, 11 Feb 2021 11:05:20 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 11 Feb 2021 13:05:19 -0600 In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=stefankangas@gmail.com; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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:264423 Archived-At: Adam Spiers writes: > 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. (It also fails with `ert-deftest', and probably also other unit test frameworks in popular use.) I'd say go for it. The heuristics seems like a clear improvement and this feature would be appreciated. Thanks for working on this.