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: [NonGNU ELPA] New package: eldoc-diffstat Date: Sun, 15 Dec 2024 00:38:01 +0000 Message-ID: References: <87y10osimb.fsf@jklaehn.de> <87r06b72oe.fsf@gnu.org> <87cyhuaqun.fsf@jklaehn.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37508"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tassilo Horn , emacs-devel@gnu.org, Philip Kaludercic To: =?UTF-8?Q?Johann_Kl=C3=A4hn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 15 01:39:02 2024 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 1tMcey-0009Xn-T1 for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Dec 2024 01:39:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMceF-0003by-CZ; Sat, 14 Dec 2024 19:38:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tMce9-0003be-HA for emacs-devel@gnu.org; Sat, 14 Dec 2024 19:38:09 -0500 Original-Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMce4-0006Yu-JP; Sat, 14 Dec 2024 19:38:09 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5d0d32cd31aso3549292a12.0; Sat, 14 Dec 2024 16:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734223082; x=1734827882; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=A3bGagKiY4YzeXPZXatp1BE+gLnhtvih4459IWFrXuc=; b=jopNbw/zXGeWKjCozbka+bH4dmMtLf+K9BuPciTu6ekQnvNDgDIVau6q+Dp9fHHISC /hRhHB7Iio9cC8HD6s/l3UiHkm6FRBrYFnewN7Fu8n2WeyeDk0lKas5sUwLBZrkRmauP 2KHkisAeRcr3cMOvTf3ntyRPFaPa8DckqlDyclV4aAJAWXx7sUFByEzdbxRE9pfZVr2S /GZl75CGU8JiZnwrQd0dpV1dk3VkrtcnAuH9KoqifDMIngHM7XPHjwfIBljVp1OwgfPx 4k6g+Z4HN4gAXTI9xotB+/fnFqMx5vAWMjeNGy6boB3y38+o6kmOcrtf4H2jog26CXNl zoOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734223082; x=1734827882; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=A3bGagKiY4YzeXPZXatp1BE+gLnhtvih4459IWFrXuc=; b=TL0HmmsT93PUnA3ps+EySKr4VLP15wXXWjF7AEXcitiCI48iWJ3aLlJfPWhVrjPB99 aX67timXV6LGzfUrQ2ARx6R3gzQIM7JPkfov+7+0YAZJYmfGdN9TqdKsB/fNUDpjkoW/ ehhVnZW0E1diGkIpEt4lMyimGjEJQ9xdOvOL+IQ8UzVC2ry4/kjTR3ldLMFYzQ+sgh1w 4q9jAX4cT61j14D29vteT3BL+cDYOxzsb/V4WaaGyH7fpwUkhgzZ5qF1+43uxu/y0iso +OY+yto8oepGzoTp1dBBoLmdCuxe9wF174L+xsJ7fydSQpvv6EwDSgGVtpG2sdU/P37p lfQw== X-Forwarded-Encrypted: i=1; AJvYcCVbqwHucphzuBd/XOwCKZCptlkmksQn9s11RCC6/tVFDuO5sJ9IhoN+SpTc/wrqFP8SYJZJ+90gTvRVWA==@gnu.org X-Gm-Message-State: AOJu0YzRr6qdgle1LD5wb4TV4Qq/cXMTNhiF6o+oTdHw27YMZhsOJfmd /G5GnOcGE6x5vhr6CTzlmGYs9QvVVnK4C7l54kGf6FfAXzKmH5gQX1P1BbQaknJeSBswtOSrimq hV9dThEiT4pQ9/rGbptmjfxkO4xk= X-Gm-Gg: ASbGncuchCaDSUnxd+5ueeFPHIvhhtoosJuFu+vxIHKm30PjcVbISgxsPyWEd/PCTRU iz2aMxQTBczPmyYm5q2monry4GHswlFpvq7yD8T0= X-Google-Smtp-Source: AGHT+IHQST1ecrnSjXNB7+IDHbS0WO8zDy3/oLuH5pqjBJAma23C6BK5XI3rbblRepMjQQEJNygFzQtQVa4pZ9EvOyc= X-Received: by 2002:a05:6402:4584:b0:5d0:ea4f:972f with SMTP id 4fb4d7f45d1cf-5d63c318beemr16873781a12.8.1734223082201; Sat, 14 Dec 2024 16:38:02 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 15 Dec 2024 00:38:01 +0000 In-Reply-To: <87cyhuaqun.fsf@jklaehn.de> Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=stefankangas@gmail.com; helo=mail-ed1-x534.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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326508 Archived-At: Johann Kl=C3=A4hn writes: >> When the mode is toggled on, it could detect automatically that it's in >> a magit buffer, and do the `eldoc-add-command` setup for users >> automatically. > > I decided to unconditionally add these commands when the package is > loaded, since this (a) only has to be run once and (b) does not have an > effect unless eldoc is used in a magit buffer. And in the latter case > the user will likely want these as triggers anyways. This is minor, but we usually recommend against changing behavior from merely loading a file (as that can happen from merely saying `C-h f`), so I'd move this to when the mode is loaded. >> - Caching the results for the current buffer to get instant results > > Do you mean eagerly compute diffstat? Or just remember it indefinitely > after the first lookup of a commit? I was thinking of computing it eagerly. Either or should work, but keeping it indefinitely might lead to its own issues, for example you might want to eventually prune the list of commits for which you saved the diffstat, and so on.