Authentication-Results: mail-b.sr.ht; dkim=pass header.d=protesilaos.com header.i=@protesilaos.com Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mail-b.sr.ht (Postfix) with ESMTPS id 4CEA711F2AF for <~protesilaos/denote@lists.sr.ht>; Wed, 26 Oct 2022 03:04:09 +0000 (UTC) Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id D748BE0002; Wed, 26 Oct 2022 03:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1666753448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bgNQyqZN/frCQuebkEhu7aiQRW4V5FIOO6wkBftzLWA=; b=VJbX7opdMuwAAnCLDuO8eINRExsJW8TK6Pi6SH0hK5Rwc80wFSJWftVrKTUezWQmproI0F ug8VQNC24BSqR+R9ye4dTMxZtqenldYBVJTrjFPRo4u61HLvAWqM9y2rSUXWBcWVi2t6s9 oUEQbTWBfo37S8LCUqW+Y1UAxSEer8AVcB7X2RLnVaxsmAi2vxwtMhfruAeWNSyBFPqF64 x+9cqPD/peNrbXY/9Mk9T0SqkWhtzFpoAVPhVPw2YwM20sxSswqHZ5Ou4QZb+J9XGPBYpo dDf7oHUgCKmTu/yWYv/oCOcR6fD5Pm7fEDKKMlLEauDPgegFePzGWtYaeyiwiw== From: Protesilaos Stavrou To: Noboru Ota , ~protesilaos/denote@lists.sr.ht Subject: Re: [PATCH] Display context of identifier in backlinks buffer with xref In-Reply-To: <86r0yvzm12.fsf@nobiot.com> References: <86r0yvzm12.fsf@nobiot.com> Date: Wed, 26 Oct 2022 06:04:04 +0300 Message-ID: <87o7tzl1zv.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: text/plain > From: Noboru Ota > Date: Tue, 25 Oct 2022 22:27:37 +0200 > > Hi Prot, Good day Noboru, > I am sending another idea. This patch is also related to the > discussion I have seen in another thread: > > Show some context in the Backlinksbuffer > https://lists.sr.ht/~protesilaos/denote/%3C74322f7a-f3a3-b115-ffa6-aad237f8f765%40eh-is.de%3E#%3C87czaz21zy.fsf@protesilaos.com%3E > > You may considered this change to be too large a change to consider, or goes > against the simplicity and contained scope of Denote's design philosophy. In > this case, there is no issue on my end; I will understand and respect your > approach. I would like to show a possibility for a discussion. I installed your patch and pushed it to the main branch as commit fcefc1d. Thank you! I now need to update the manual accordingly. Regarding the scope: I think your change here improves the interface of what we had available. That is fine. > To facilitate the conversation, I'm also attaching some screen shots > to show what the result of the changes will look like. Note that I > have completely personalized the file naming schema to my own one but > the functionality is unchanged (except for this patch). You will see > that in the screen shots. I have also added the following minor modes > to the backlinks-mode: > > (add-hook 'denote-backlinks-mode-hook #'olivetti-mode) > (add-hook 'denote-backlinks-mode-hook #'outline-minor-mode) I like it! I now wonder if we should update the user option 'denote-link-backlinks-display-buffer-action' to make it easier for the user to display the buffer in a side window. I say we keep the default of showing it below the current window, just so we do not disrupt too many established patterns at once. * * * Some comments about the patch: 1. Yes, I like the option to re-use the backlinks buffer. This can probably be combined with the aforementioned display buffer action to make the buffer dedicated to its window. 2. I am not familiar with xref--xref-buffer-mode, though deriving the 'denote-backlinks-mode' from it feels wrong because it is a private form. Is this change away from special-mode necessary? Do we have another option? 3. We need to find a workaround for 'xref--apply-truncation' so that we can continue to depend on Emacs 27.2. 4. Perhaps we can prettify the backlinks' buffer further by adding more space and/or faces to it. All the best, Prot -- Protesilaos Stavrou https://protesilaos.com