From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69983: Use category for display-buffer-alist Date: Tue, 09 Apr 2024 10:09:37 +0300 Message-ID: <86v84rvwpa.fsf@gnu.org> References: <86h6gv7e0z.fsf@mail.linkov.net> <3e7b8e64-0a5f-4888-a443-9c69a5fffd98@gmx.at> <86wmpdu0fa.fsf@mail.linkov.net> <86h6gf69jd.fsf@mail.linkov.net> <86sezyjpsn.fsf@mail.linkov.net> <86a5m3jboy.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="566"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, 69983@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 09 09:10:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ru5ck-000AVp-E3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Apr 2024 09:10:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ru5cF-0002Hg-Se; Tue, 09 Apr 2024 03:09:59 -0400 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 1ru5cD-0002HE-SF for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 03:09:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ru5cD-0005GJ-Jg for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 03:09:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ru5cL-0003vr-23 for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 03:10:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Apr 2024 07:10:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69983 X-GNU-PR-Package: emacs Original-Received: via spool by 69983-submit@debbugs.gnu.org id=B69983.171264659915050 (code B ref 69983); Tue, 09 Apr 2024 07:10:04 +0000 Original-Received: (at 69983) by debbugs.gnu.org; 9 Apr 2024 07:09:59 +0000 Original-Received: from localhost ([127.0.0.1]:48141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ru5cE-0003uf-Fj for submit@debbugs.gnu.org; Tue, 09 Apr 2024 03:09:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ru5c9-0003tB-Oz for 69983@debbugs.gnu.org; Tue, 09 Apr 2024 03:09:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ru5bv-0005Ez-U2; Tue, 09 Apr 2024 03:09:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KSK36AjfRK459SE38rdBwc9p8vwtM0fn1WXtv32jTH4=; b=iyCeSlxilij1 3L/jh9WwCcZkgz4XaGznq5m7f/Sdks5lU1JSt32DCQRiW20UYG9yQlPxdH8fQxny1lOUZcIwqr5BO OKvUpU9Hz4hTQc+Wlg/ckj/1r/MqKUb0m3nxqPUtgq1Q/UVgcdLy6AakTYaa9pBFsfQh7DJmYW/iW jmRNNIzvVla6HQzM6KuDvIhMarAa05qyCE0y5NoV7BykLzovo6ExwTuLtDbdfw1B4+YAg6xVnyDLZ uRiByRrZ/vN0b0BlekxkjHxc/I6X4ECjkgXFtq7Wn1T2YZAbXcW00y35dkOp6t+qJidMyGMTjW6Ge fzZFCG3gh8ZuFK5SxXRaRg==; In-Reply-To: <86a5m3jboy.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 09 Apr 2024 09:30:31 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282973 Archived-At: > Cc: 69983@debbugs.gnu.org > From: Juri Linkov > Date: Tue, 09 Apr 2024 09:30:31 +0300 > > >>> One problem is that I can't find an alist item to limit > >>> the window height, i.e. can't find window-max-height > >>> that would be like window-min-height, but to set a max height. > >>> Could you suggest such an alist item? > >> > >> The intention was to have such behavior: > >> 1. after the first call that adds 1 line to the output buffer, > >> resize the displayed buffer to 1 line height; > >> 2. after the second call grow the output window height to 2 lines, > >> it seems fit-window-to-buffer should do this; > >> 3. after 10th call limit the window height to 10 lines only, > >> so later calls should not increase the output window height > >> more than 10 lines. > > > > You mean that when a 'window-height' action alist entry is provided that > > specifies 'fit-window-to-buffer' as 'window-height' value, we should > > pass it the value of any 'window-max-height' entry present as MAX-HEIGHT > > argument here > > > > ((functionp height) > > (ignore-errors (funcall height window)) > > > > and probably do the same for all the other arguments of > > 'fit-window-to-buffer'? > > Probably we can't change the existing arguments to not break > backward-compatibility. But this is fine since still can use > the explicit function call: > > diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el > index 8b43c6a8726..75b519067ac 100644 > --- a/lisp/emacs-lisp/warnings.el > +++ b/lisp/emacs-lisp/warnings.el > @@ -362,7 +362,12 @@ display-warning Why does adding a new feature require changes in existing features, let alone such basic features as warnings.el? Can't we introduce the category and leave warnings.el, flymake.el, and others alone? I don't want to make unsolicited changes in those other places, because that runs the risk of disturbing people's arrangements of windows and their habits as to where the various windows pop up.