From unknown Sat Aug 16 18:20:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58866 <58866@debbugs.gnu.org> To: bug#58866 <58866@debbugs.gnu.org> Subject: Status: tab-line tab order is not preserved by desktop when customizing tab-line-tabs-function Reply-To: bug#58866 <58866@debbugs.gnu.org> Date: Sun, 17 Aug 2025 01:20:47 +0000 retitle 58866 tab-line tab order is not preserved by desktop when customizi= ng tab-line-tabs-function reassign 58866 emacs submitter 58866 Jo=C3=A3o Guerra severity 58866 normal tag 58866 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 09:07:09 2022 Received: (at submit) by debbugs.gnu.org; 29 Oct 2022 13:07:09 +0000 Received: from localhost ([127.0.0.1]:35141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oolYL-0000K0-Gu for submit@debbugs.gnu.org; Sat, 29 Oct 2022 09:07:09 -0400 Received: from lists.gnu.org ([209.51.188.17]:33188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oolYH-0000Jp-LY for submit@debbugs.gnu.org; Sat, 29 Oct 2022 09:07:07 -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 1oolYH-0002Q7-GX for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 09:07:05 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oolYG-0000F8-3z for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 09:07:05 -0400 Received: by mail-pj1-x1029.google.com with SMTP id d13-20020a17090a3b0d00b00213519dfe4aso6742370pjc.2 for ; Sat, 29 Oct 2022 06:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=a/yI31bidOjdAQGTUE7g/CgjrIBvFguGRhHq++jlCTw=; b=ET0hdqHhPW/3qDOT0lhZRVDCROlqhb4tqI0pFHmKvcfQRuBz6FYyXRY4qg6rmSrHSi 06tOeLrb45ezecfs5IX5DBcjSQDue3zm5Rhcv5MWWCoB4biIuQ/Kr+D7WvmE9R+9s0JJ AMuw10V0jhfzJtc6q2cffc8W58K10Xa+OnCCDbPcQWkHIzRnP3K/Vk9KHZQU2SVFDdzx CjxadGbQ1vhkMA23MwMeGVwF1ggBnM45Ew0eQ64MM31t9d2+zsIMFWFvwnHf+ppIW0T9 K+1YhzxAL40l49Jmm0681XdEvuX26s+JGmkEX9x42xtjpU7tIWa5p9Q2qm1CSFbT7sLT klLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=a/yI31bidOjdAQGTUE7g/CgjrIBvFguGRhHq++jlCTw=; b=B2TOQuGCexbz+XkXZpQ3UMsRNrZju2V6x1AeVBG/dtA1vgX1Kc5PsGOzSYCg4UIdrO +zzfztEAiPnY61qYXNabjJfFmX+b4qZ5yPlAGIXfnF0W/1cqN8X4VoVwHq1iWobv3H2p bBS8JxYPqV30xpw7RNYkcqT282vaGcXX7bXt+NIA7PwjiuvKXZvTlU4YTsOVXdeaF2qf ipzNn643m5Mtzgy1BBVfUcwDWNeMFmvFzRLoAE+DtzP17i1EIGvmKZGMvaDl5oIWUpog fg8A63v6SJrPFslOO09y+wv4cF3zc9zDSp0WiLVmgwK5fRWtJrZ1AcUkCRtAjVpKCHL8 c0yA== X-Gm-Message-State: ACrzQf05CfR9y+bRvfAzjTV9rdBd3Z3KspMOYz+RLQ/6XNRMXMqEMFBx 7bqMunyt+MHcE0qcP0QO0zsvPjM/picPNryyCZ6eWszo02M= X-Google-Smtp-Source: AMsMyM4a5ms/Zxiai5JGpmbc0ksHPaY7egpK/DP7T8Q/rHPuWf8SpN8hIEZR/wD/eg0xZOeUcijciGEzwdc7gLhC6IE= X-Received: by 2002:a17:902:ecd0:b0:187:791:ae9f with SMTP id a16-20020a170902ecd000b001870791ae9fmr2358384plh.32.1667048821670; Sat, 29 Oct 2022 06:07:01 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?Sm/Do28gR3VlcnJh?= Date: Sat, 29 Oct 2022 15:06:24 +0200 Message-ID: Subject: tab-line tab order is not preserved by desktop when customizing tab-line-tabs-function To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=joca.bt@gmail.com; helo=mail-pj1-x1029.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-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 (--) desktop is restoring the tab-line tab order on application reload when using the default tab-line-tabs-function. When using a custom tab-line-tabs-function the order is not being preserved. (I suspect it could be due to how I want my tabs to behave.) Example: (let ((old-tabs nil)) (defun tl-tabs () (let ((new-tabs (seq-filter (lambda (buffer) (or (eq buffer (current-buffer)) (buffer-file-name buffer))) (buffer-list)))) (setq old-tabs (append (seq-intersection old-tabs new-tabs) (seq-difference new-tabs old-tabs)))))) (setq tab-line-tabs-function #'tl-tabs) This makes the tab-line show all file visiting buffers in all windows + the current window buffer, preserving their order. Is desktop supposed to preserve the tab order for user customizations? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 13:57:08 2022 Received: (at 58866) by debbugs.gnu.org; 29 Oct 2022 17:57:08 +0000 Received: from localhost ([127.0.0.1]:36558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooq4x-0001qN-Lz for submit@debbugs.gnu.org; Sat, 29 Oct 2022 13:57:07 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:57941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooq4o-0001pJ-IA; Sat, 29 Oct 2022 13:57:00 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id DB6B1FF805; Sat, 29 Oct 2022 17:56:50 +0000 (UTC) From: Juri Linkov To: =?iso-8859-1?Q?Jo=E3o?= Guerra Subject: Re: bug#58866: tab-line tab order is not preserved by desktop when customizing tab-line-tabs-function In-Reply-To: (=?iso-8859-1?Q?=22Jo=E3o?= Guerra"'s message of "Sat, 29 Oct 2022 15:06:24 +0200") Organization: LINKOV.NET References: Date: Sat, 29 Oct 2022 20:48:34 +0300 Message-ID: <86y1syedid.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58866 Cc: 58866@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 (-) tags 58866 notabug close 58866 29.0.50 thanks > desktop is restoring the tab-line tab order on application reload when > using the default tab-line-tabs-function. When using a custom > tab-line-tabs-function the order is not being preserved. (I suspect it > could be due to how I want my tabs to behave.) > > Is desktop supposed to preserve the tab order for user customizations? Desktop preserves the window buffer order, so the order for the default tab-line-tabs-function is preserved in consequence. Since you customized tab-line-tabs-function to another order in 'old-tabs', you need also to save your variable 'old-tabs' in your desktop. Please look in desktop.el what hooks can you use to serialize your variable with buffer objects to save it with buffer names as strings. From unknown Sat Aug 16 18:20:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 27 Nov 2022 12:24:07 +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