emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'di


From: Juri Linkov
Subject: Re: master 18b680cfd1: Fix bug#52467 by adding a new custom variable 'display-comint-buffer-action'
Date: Thu, 06 Jan 2022 21:52:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> IIRC I once used the term 'label' for it.  It vanished soon.
>
> After trying to implement this idea I immediately started to dislike it
> for technical reasons ('pop-to-buffer-same-window' never had an ACTION
> argument so I had to invent some clumsy extra argument to make things
> work).  I attach the diffs in case we still want to implement something
> the like.

So in addition to

  (pop-to-buffer "*shell*" '(nil . ((label . *shell*))))

it will also allow

  (pop-to-buffer "*shell*" nil nil '*shell*)

and

  (pop-to-buffer-same-window "*shell*" nil '*shell*)

?

> Otherwise, I think that harm has been done - 'pop-to-buffer-same-window'
> was invented as stand-in for 'switch-to-buffer' and should never have
> replaced 'pop-to-buffer' - but I missed that back then so I'm not in a
> good position to ask for reverting that change now.

Indeed, it's just

  (defun pop-to-buffer-same-window (buffer &optional norecord)
    (pop-to-buffer buffer display-buffer--same-window-action norecord))

> Sam's patch, although it does not restore the previous behavior, still
> looks like the least obtrusive solution in this regard.  It's partially
> a misnomer - to my knowledge at least 'eshell' has no connection to
> "comint" - so we apparently cannot put 'display-comint-buffer-action'
> into comint.el where it would belong.  Yet I'd tend to keep it, after
> applying Morgan's fix from Bug#52878, obviously.

For consistency with 'pop-to-buffer-same-window', shouldn't then
new 'display-comint-buffer-action' have a similar function:

  (defun pop-to-comint-buffer (buffer &optional norecord)
    (pop-to-buffer buffer display-comint-buffer-action norecord))

?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]