From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Al Haji-Ali Newsgroups: gmane.emacs.bugs Subject: bug#71386: 29.1; Frame is auto-deleted even when it has multiple tabs Date: Tue, 18 Jun 2024 20:04:45 +0100 Message-ID: References: <868qzehxie.fsf@mail.linkov.net> <86msnu9fhg.fsf@gnu.org> <86zfruc7qh.fsf@mail.linkov.net> <86ikyi9e2l.fsf@gnu.org> <86o78ac6ny.fsf@mail.linkov.net> <0ab646c8-ff46-4c27-acbf-b5f4b8ab06fd@gmx.at> <86frtkeyzo.fsf@mail.linkov.net> <811654d9-bde2-4ba5-bbeb-15db0d7dcf00@gmx.at> <86r0d1iaxc.fsf@mail.linkov.net> <8634pfe735.fsf@mail.linkov.net> <2b0260af-82f1-4c08-9d15-dd4f3f40d13d@gmx.at> <86frtdtlns.fsf@mail.linkov.net> <87b7ee75-7c63-42ac-8551-c0d20a46ea43@gmx.at> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21132"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 71386@debbugs.gnu.org To: martin rudalics , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 18 21:08:14 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 1sJeBi-0005LY-BK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jun 2024 21:08:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJeBW-00069S-K4; Tue, 18 Jun 2024 15:08:02 -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 1sJeBU-00068f-OI for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 15:08:00 -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 1sJeBT-00051k-TG for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 15:08:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJeBW-0002Qi-D0 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 15:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Al Haji-Ali Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2024 19:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71386 X-GNU-PR-Package: emacs Original-Received: via spool by 71386-submit@debbugs.gnu.org id=B71386.17187376569297 (code B ref 71386); Tue, 18 Jun 2024 19:08:02 +0000 Original-Received: (at 71386) by debbugs.gnu.org; 18 Jun 2024 19:07:36 +0000 Original-Received: from localhost ([127.0.0.1]:48875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJeB5-0002Pt-Mu for submit@debbugs.gnu.org; Tue, 18 Jun 2024 15:07:35 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:52487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJeB3-0002Pa-NH for 71386@debbugs.gnu.org; Tue, 18 Jun 2024 15:07:34 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4230366ad7bso52756555e9.1 for <71386@debbugs.gnu.org>; Tue, 18 Jun 2024 12:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718737585; x=1719342385; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=92i5ueeWV1DxtSn/aL00+0PPzTCPJEHQjWZ45MtumOg=; b=JfSRyACv/CxKx94rb0JfKUnWgduJrpqRYxFpXsspKCINLZn3O6VfPnrUDX3LkdS30+ qna3XrtLrf35zAuSlTly3kTmrLT3jvhxgd+T8H0n9WRkpPrjMqFwpwtXd2jTvACzDXek uE/2kgwrjolit4IEgZT1DMT8GVPiGmP62c3foUrfXsxvHpkNU4o9esP42ZKOAdaPfssO 5hOqutvzDrqMfxvAS/fLrun1Y7ytiyu4iszCKTtVQCCeR35UaIPDrFvUZzL65RtRyunl MGgT8cXc0eywrxc+Hudd/82E0HNx99IqtFZNzjH0N2Bua+Ptedsuood9fVGCUizSpxPm 1UDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718737585; x=1719342385; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=92i5ueeWV1DxtSn/aL00+0PPzTCPJEHQjWZ45MtumOg=; b=IyduPL3MrTdaSYM5szDl3CeoCeCUc8CcJEroZ5rxfIw6b1/mkJjP4dJ5Mso/WI/8Xt vJtDGu4RXUyjrHFPnJVyJ1ws+m930nq9D124w20V5ysRhgfHaZsPbbBy45jK7CxPDAEv mcGtweOcWgnNnOSMTGXq2tkonfZ0GIIccJhgQlibjHOndwYAnhdjLZiVEu/4Q8hSnHjo yLq0CaU4EBpmUy6JMgUZvsoOwi6FkSs/Mau1YB32gpEIcxBOuM/vTWSIKRbIvw+KGgOV 9yaFQxcVz1S62AAsZLvaVtsguWdSu/g0fo63R4ssp3IPmojn+dBWtMBLgfEUPyFDN5Iw GzQA== X-Forwarded-Encrypted: i=1; AJvYcCX6g2vrip7QPPljwrrmnpbRZzknbklufygKk7qFbe11J15ae6j5RULzLx9KoEkHgJdShJDtkZIrLBCb6wY33rOUCy1fzvY= X-Gm-Message-State: AOJu0YzZLpdcuQu3nfX1AmRDbvgfn/OTodteSAsYIChmM04NQMCp1o5m gW/7BCZ65/HG2KdjdObSbmj5GbN5Wz77qFzyr8GST/Rdwr1gS3GoOHwsNw== X-Google-Smtp-Source: AGHT+IHnnHIJc/Y/BDzmcwsBLZ5ayMOuyzSZk4/KEEcnR897vYG3c/iYo+LNgl9tc6sVpPXK5OAbcw== X-Received: by 2002:adf:e84e:0:b0:361:78c8:2eb6 with SMTP id ffacd0b85a97d-363175b904emr404337f8f.25.1718737584607; Tue, 18 Jun 2024 12:06:24 -0700 (PDT) Original-Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422870e986asm239050695e9.27.2024.06.18.12.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jun 2024 12:06:24 -0700 (PDT) In-Reply-To: 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:287451 Archived-At: On 18/06/2024, martin rudalics wrote: > We've been discussing changes to 'switch-to-prev-buffer' in Bug#69993 > but ended up in disagreement on what to do. Juri then implemented a > purely tab-bar based method. For my Emacs I use an option that allows > it to switch to buffers that have been already displayed at least once > only and am quite happy with it (I've never managed to derive a suitable > regexp for all buffers I never want to switch to). I see. The change you suggested is definitely needed in any case and would address the main issue in this bug report (frame being deleted and losing tab configuration). I would just suggest that `window-deletable-functions` be renamed to `window-deletable-predicates` or `window-deletable-p-functions` (as Juri suggested in his very first patch) to emphasize that these should be side-effect-free predicates. I guess the code that Juri originally suggested for tab-bar can also be used with `window-deletable-functions`. ,---- | (defun tab-bar-window-delete-frame-p (window kill) | "Prevent deletion of WINDOW and its frame when it contains tabs. | Used in `'window-deletable-functions'." | (and tab-bar-mode (> (length (funcall tab-bar-tabs-function frame)) 1))) | | (add-hook 'window-deletable-functions #'tab-bar-window-delete-frame-p) `---- I'll check Bug#69993 and try to figure out how to close the tab when it has a single dedicated window from `switch-to-prev-buffer`, or maybe Juri has some ideas? -- Al