From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix display-buffer-use-some-window to honor reusable-frames Date: Sat, 28 Jan 2023 14:04:44 -0500 Message-ID: References: <834jsccepb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37766"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org, larsi@gnus.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 28 20:05:42 2023 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 1pLqWD-0009Wi-J0 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Jan 2023 20:05:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLqVZ-0007ur-Qv; Sat, 28 Jan 2023 14:05:02 -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 1pLqVY-0007ui-BS for emacs-devel@gnu.org; Sat, 28 Jan 2023 14:05:00 -0500 Original-Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pLqVV-0006Kc-9X; Sat, 28 Jan 2023 14:04:59 -0500 Original-Received: by mail-yb1-xb36.google.com with SMTP id u72so9748145ybi.7; Sat, 28 Jan 2023 11:04:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=A1LUZ0/bVdM2brXuIAbM3xE6h2DQhRUE6Tst8d/V+kc=; b=IriGth9noWUZYu9GtTCyefQgeQTOi8GxTft/8bHA2yIEXH1fuwv5dSq4Sp2qqls9nu 4IM6oVRocroJ0Tsq8cUx3J2QvLMsiwAcu/afNg+YxKGidU1lE99y6N6svSohb/XUKB6o vYGrRAAHTvmHCcwb5m9fmwBO+dq9AuUox7sxl7ygcQitE/78+vrP500e3bOLgWjN0t3L /HmfFjy4h/CoK8GrwbZxDbZ/l4VUJd9mLitsqtr+b0B7yyjl8CMMlGql+seLC6FUlO2f En/tDh0hSNseTIiZCFxoPN0Wze8pdk3SkBF7278AVW0+2HbGSNN6BraNbVj9qfODFIa+ gXbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=A1LUZ0/bVdM2brXuIAbM3xE6h2DQhRUE6Tst8d/V+kc=; b=kt72eWy9nNUIJK/+cf8KKzOkBGXSQlFH3tTJZZL08oC1GubqRV8LrF9GFVFaKIjOfc CbUqZ2aQbWkI3l16NHKp2WtwuIZuFS6L7DFbrVi2vATNPwqP05qiAf6BZg9TjjR1YYP9 gKczJINMrJqPzrNsmDi22Wzat63VUsMkhIpNZ8ajETkvNj35XDdTSE/xG6kzVBzI4yns 6JrvQpxa+Op3nA9LfE8Ukkmox9YiqWSkavDoqs55/m746wIb5lC5bv8QNKeWrQLEvuT+ WNbtMjL2JFT9EkSceINTr+W2pLe2P+aghJ4P/7tonIzO8B6CU6s4UfoVwGSZ17q9+840 UPsQ== X-Gm-Message-State: AFqh2krF2qZ9uHdH599pS13+MGlBDN0/cwV8I+Dqx/nnfBLNhyYchD8q 9z3CvKPkE7CFFEMh/rMypir0f9dvqPVM0mRJaLE= X-Google-Smtp-Source: AMrXdXvbHe5fn+THoXd7deazDVWhGiS7bWYvxoxmTJzX2mmZBkbmHs2yQ5z4OVpN/DD/ceVZ5NROa/hU5FV+rQlMoMM= X-Received: by 2002:a25:dd44:0:b0:797:1fb4:22c8 with SMTP id u65-20020a25dd44000000b007971fb422c8mr3898650ybg.62.1674932695461; Sat, 28 Jan 2023 11:04:55 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b36; envelope-from=tgbugs@gmail.com; helo=mail-yb1-xb36.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:302729 Archived-At: > A few words about Tom's patch: 'display-buffer-use-some-window' must not > pop up a new window. It's doc-string clearly says to "Display BUFFER in > an existing window." Please don't ever try to change that. Also, it > should not care about 'reusable-frames'. The latter is about reusing a > window that already shows BUFFER and other action functions might be > affected badly if 'display-buffer-use-some-window' tried to handle this > too. Finally, 'display-buffer-no-window' has no place in another action > function. It is strictly reserved to callers and users. Thank you for the clarification. I tried to figure out what the right thing to do was based on the docstrings, but missed a few critical points. I think the right solution in this context is to not call 'display-buffer-use-some-window' in 'display-buffer-use-least-recent-window' and instead to implement the behavior inside dbulrw itself. With regard to the other issues about multiple frames, I was able to get the behavior I wanted, or rather prevent the behavior I didn't want by making dbulrw honor a reusable-frames setting so that it doesn't leak out to other windows. I'm not going to wade into the question of whether the resolution and tracking of least recently used is happening correctly, I just need it to stop reusing windows in other frames. Will send another patch along.