From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 09:20:52 2024 Received: (at submit) by debbugs.gnu.org; 29 Jul 2024 13:20:52 +0000 Received: from localhost ([127.0.0.1]:45122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYQJ2-0003dx-8Q for submit@debbugs.gnu.org; Mon, 29 Jul 2024 09:20:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:39732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYQIz-0003do-UT for submit@debbugs.gnu.org; Mon, 29 Jul 2024 09:20:51 -0400 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 1sYQIm-00057h-Rj for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 09:20:36 -0400 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYQIk-000256-Lu for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2024 09:20:36 -0400 Received: by mail-vs1-xe2f.google.com with SMTP id ada2fe7eead31-4929d6429c2so460098137.3 for ; Mon, 29 Jul 2024 06:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722259231; x=1722864031; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=kEvClszz8nVDVlnE6B3pXNtzuv5dS9PlMAFD15hMEkQ=; b=c0hilPnJrwPK5lW69lDrL85ln+qSf8tF8Hc2d42Ui3qQdy4uBPDPSO3/XXUojrk94G iYMqY1Jd9YYAN85rapJmFysd+y5WuKJbwjvesI05qjacn0qbYJRyDjP63brOq5sslAAm KRMV3aS48f+msSMmb3rUi4Vn7IAO1uFj4/MgW/svFSQgHaRY2Wx1HUn1lxrK6oPMnLsk U6fsElPq6ACJDWgDolmUENvEUM4/2skzfMczh+SUdhVoasKLE402xNE5kE5uxRVwCnAf gEJTcOv9vwn+KPWOLuQJHnrqMCIdhjJI6AL7nTN/BZDMRiZ/LkYTPJn5C0Tl3FrDJ5QL tq6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722259231; x=1722864031; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kEvClszz8nVDVlnE6B3pXNtzuv5dS9PlMAFD15hMEkQ=; b=gybpdommh1p48VOtsinDwiYPuKar4kimrQEkj10DMJHOl2LY717kNIzlEtLrGI8je9 L8tBwRjpUb471SXaZZF6pNnggzx2wH4apqu7rFRBw5VziUBwit8dXYoMhTIDEzZXCe0y IcYj3+WOWSqzveOw/HzkCNSJPct6dfY3JRXLNhDCascdp0pxSZ+winNqs30AMX6R7LD4 lTtiI9J+06ISAyPxwR4GhI0ICTJIGxn4YBk8cwk+039RX+YQ74I2SRnlvlvJ3rkrTwtu wB8e8J65/mgBK/SszIQTvdTy47mlZ2XGsdeVtHH7ZpbZUpXiC0yqP8eFs2gHDN4blivT TGwQ== X-Gm-Message-State: AOJu0Yyk0eo8ZYcw17YBpJwtzLPP3iml2G0BQCNzn0MnDCe/ofvj/MNg PMewda8L1y+s5Lb8A37OUK0BpN3/fzINMB5W1YH8mRYLX1CEkVnGHLA6rFdpe3IqD/bESqGJmy5 4DDJqFHaX0fIjRWtmbJraP828cY/L72Gt X-Google-Smtp-Source: AGHT+IEX7VEr4uWlPcZc5CoNOdINe1MX4imRAo3gQjo0RKT+mH++1OZVJ0U2GZvajV31PHHvem2CbmIxcwEWvZG7lJo= X-Received: by 2002:a05:6102:5112:b0:493:b52f:ecb6 with SMTP id ada2fe7eead31-493fa456e88mr4060897137.20.1722259230661; Mon, 29 Jul 2024 06:20:30 -0700 (PDT) MIME-Version: 1.0 From: Ship Mints Date: Mon, 29 Jul 2024 09:20:19 -0400 Message-ID: Subject: Small tab-bar-move-tab-to-group bug fix To: bug-gnu-emacs@gnu.org, Juri Linkov Content-Type: multipart/alternative; boundary="000000000000a7a5a4061e62b91a" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=shipmints@gmail.com; helo=mail-vs1-xe2f.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, HTML_MESSAGE=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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000a7a5a4061e62b91a Content-Type: text/plain; charset="UTF-8" This corrects for the condition where a tab, among its set of tabs which all share the same group (nil or otherwise), is changed to a new group that doesn't yet exist. The current behavior is to leave that tab where it is within the "old group" but this is counter to the goal of keeping group-related tabs "together." The correction I've made is simply to move that newly grouped tab to the end. I've tested this and been using a patched form for a while to no ill effect. (defun tab-bar-move-tab-to-group (&optional tab) ... * (pos (if beg* (cond ;; Don't move tab when it's already inside group bounds ((and len (>= tab-index beg) (<= tab-index (+ beg len))) nil) ;; Move tab from the right to the group end ((and len (> tab-index (+ beg len))) (+ beg len 1)) ;; Move tab from the left to the group beginning ((< tab-index beg) beg)) * -1))) ; Move to the end* ... Much obliged, Stephane --000000000000a7a5a4061e62b91a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This corrects for the condition where a tab, among its = set of tabs which all share the same group (nil or otherwise), is changed t= o a new group that doesn't yet exist. The current behavior is to leave = that tab where it is within the "old group" but this is counter t= o the goal of keeping group-related tabs "together." The correcti= on I've made is simply to move that new= ly grouped tab to the end. I've tested this and been using a patched fo= rm for a while to=C2=A0no=C2=A0ill effect.

(defun tab-bar-move-tab= -to-group (&optional tab)
...
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(pos (if beg
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cond
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Don't move tab when it's a= lready inside group bounds
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0((and len (>=3D tab-index beg) (<=3D tab-index (+ be= g len))) nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0;; Move tab from the right to the group end
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((and len (> tab-index (+ beg l= en))) (+ beg len 1))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0;; Move tab from the left to the group beginning
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((< tab-index beg) b= eg))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -1))) ; Move to the e= nd
...

Much obliged,

Stephane
--000000000000a7a5a4061e62b91a-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 14:18:29 2024 Received: (at 72352) by debbugs.gnu.org; 29 Jul 2024 18:18:29 +0000 Received: from localhost ([127.0.0.1]:46309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYUx2-00030C-Qv for submit@debbugs.gnu.org; Mon, 29 Jul 2024 14:18:29 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:42785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYUwz-0002zv-Sb; Mon, 29 Jul 2024 14:18:26 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id D9FB8C0004; Mon, 29 Jul 2024 18:17:45 +0000 (UTC) From: Juri Linkov To: Ship Mints Subject: Re: bug#72352: Small tab-bar-move-tab-to-group bug fix In-Reply-To: (Ship Mints's message of "Mon, 29 Jul 2024 09:20:19 -0400") Organization: LINKOV.NET References: Date: Mon, 29 Jul 2024 21:16:44 +0300 Message-ID: <867cd4t65v.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72352 Cc: 72352@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 72352 30.0.60 thanks > This corrects for the condition where a tab, among its set of tabs which > all share the same group (nil or otherwise), is changed to a new group that > doesn't yet exist. The current behavior is to leave that tab where it is > within the "old group" but this is counter to the goal of keeping > group-related tabs "together." The correction I've made is simply to move > that newly grouped tab to the end. I've tested this and been using a > patched form for a while to no ill effect. Thanks for the fix, now pushed to emacs-30. From unknown Fri Jun 20 18:22:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Aug 2024 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator