GNU bug report logs - #74361
[PATCH] New option xref-navigation-display-window-action

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dmitry <at> gutov.dev>

Date: Thu, 14 Nov 2024 22:30:02 UTC

Severity: wishlist

Tags: patch

Fixed in version 31.1

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: Dmitry Gutov <dmitry <at> gutov.dev>, 74361 <at> debbugs.gnu.org
Subject: bug#74361: [PATCH] New option xref-navigation-display-window-action
Date: Sun, 24 Nov 2024 09:59:03 +0100
> This is a nice feature.  But please use a different name
> since the 'category' alist entry is reserved exclusively
> to match display-buffer calls in user's configuration
> in the user option 'display-buffer-alist'.
> When using the same name for different purposes
> then the users won't be able to match by category
> and not to reuse the same window.

This is over my head: How can a (category . foo) entry make sense if it
is not initially set up by the 'foo' package?  As a user I might not
have the slightest idea of categories.  I'd proceed as follows:

- Package 'foo' designates a 'display-buffer' call as something
  pertaining to 'foo-some' by adding a (category . foo-some) alist entry
  and facultatively providing one or a couple of suitable action
  functions.

- A knowledgeable user can override the suggestion of 'foo' by putting
  into 'display-buffer-alist' a (category . foo-some) condition (so
  'buffer-match-p' will handle it) with an appropriate ACTION.

- 'display-buffer' has to

  - respect the user customization if there is one (and it's not
    overridden by the caller),

  - tries any action function provided by the caller,

  - automagically tries to do something reasonable by finding a window
    that already has an association with 'foo-some'.

Am I wrong about this concept?

martin




This bug report was last modified 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.