From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: Re: Switch buffers without modifying the buffer list ordering? Date: Fri, 25 Mar 2022 15:25:53 -0700 Message-ID: References: <874k5kncd8.fsf@gmail.com> <87fsp2zmc9.fsf@laposte.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18599"; mail-complaints-to="usenet@ciao.gmane.io" To: Kevin Vigouroux , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 25 23:26:36 2022 Return-path: Envelope-to: geh-help-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 1nXsOB-0004cL-SL for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Mar 2022 23:26:35 +0100 Original-Received: from localhost ([::1]:53744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXsOA-0001KS-Ih for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 25 Mar 2022 18:26:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXsNc-0001KI-Ez for help-gnu-emacs@gnu.org; Fri, 25 Mar 2022 18:26:03 -0400 Original-Received: from [2607:f8b0:4864:20::233] (port=42559 helo=mail-oi1-x233.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXsNa-0005He-1s for help-gnu-emacs@gnu.org; Fri, 25 Mar 2022 18:26:00 -0400 Original-Received: by mail-oi1-x233.google.com with SMTP id q189so9666348oia.9 for ; Fri, 25 Mar 2022 15:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=fAahHQMFKEXynu/u26hkK2Kkfl/IDdwf2rHN5T1+Roo=; b=NVEKsUiQH42RQRqP0ZPVtjHWYGfXbAbnVjFMmf1Qxxp3UqEnSpjw6RKL+aRqqU+rtd qHHB6Tcm8uWrvDqV9Kmc8w7QQp2F+wYbjVhercH2xyEuCug+7UPstNDx60BEx6G9vXr6 PZAgRkav95Oc3nwN92udPopxfp7AQ0qnGyC2d0suuQ/4XVhgmd3ZLaoVHBJxGgrcEHeH kVDG6kXCEYRuMFo6Isvxz9S4pLGLyt69+o7FnK3irddElgdooHWlUxHddoSkl2XA+MUE Gs4D1e7i2MeLtl0BcYmqL8q62VxgBxzNqVNCmRRVKDojGJl6bFu1QkE2jqZuJ/c0hGHl 2ZTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=fAahHQMFKEXynu/u26hkK2Kkfl/IDdwf2rHN5T1+Roo=; b=8RSBAUWkWxSjTtvvVWG1IaWRndjWpvxYqFX4ohlLeuRUMH9+TMVDmn5ZJPscjuTC8s 0dHc/r8ss++kWNUKio7IpPIsRIp1nAtX0mSxUXGT0zgkFGlRwYlh2ER+vLn5uwcyl/dW KuH+n6MVxDYJNlfCzQDxY2u6Wt7/TFLge+rFlZjY3f4DlVx7Oyfv26JsXGH+NEknqWvh oErdANHhmUDNEeRbstWTHag7TVybGLC5itts2R50IU2IVkdDu3TDXLCoumWAo/xOQ4lQ GmEAocWARUxNudE/D4tr1zDRSJ0hIopurxgSPwTPkpR20oas1oO96G2rugvwJLkD7h2G Alxg== X-Gm-Message-State: AOAM533tW4oM1xFwWDk25zHpd8BpJwGLxsJvAOdIBBCnNIBe8hE4oEXH LDO41W0QMm6U/wnvLTkLpG5+kurVN0B+FBRDfnw= X-Google-Smtp-Source: ABdhPJwnSLTe64YSh8zZbUyS4+A/DaTqJ/SHGMe5oeE8WkalEzwt5t7v+J3rx9l5koFWxsKwHUAAIIVqMwRtMW9tLZA= X-Received: by 2002:a54:4714:0:b0:2ec:f566:8da5 with SMTP id k20-20020a544714000000b002ecf5668da5mr10789576oik.97.1648247154759; Fri, 25 Mar 2022 15:25:54 -0700 (PDT) Original-Received: by 2002:ac9:1483:0:b0:417:eb23:f055 with HTTP; Fri, 25 Mar 2022 15:25:53 -0700 (PDT) In-Reply-To: <87fsp2zmc9.fsf@laposte.net> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::233 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=samologist@gmail.com; helo=mail-oi1-x233.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136759 Archived-At: fwiw i also have similar issues as i have f keys bound to next and prev buffers and want things like recent stuff nearby. others know more, but i think the buffer list is only partly under user control. if you go through contortions like a loop or somthing it might be possible to do anything you want with it, but that's more of a workaround than an actual control of it. to address your subject header q, windows and buffers are different. but ime various operations can change the buffer list unexpectedly, as evidenced by familairity with it used in a use case where you use next and prev a lot. switching windows might be one of them. also a lot of commands do bury-buffer. i have noticed tht a strange operation that seems outwardly like it should maybe be a noop someties fixes the problem of a buffer "disappearing" from the buffer list [i.e. going to someplace that is not nearby wrt next and prev]. i have also noticed that emacs treats buffers differently in the buffer list if they have different names. i am not sure about leading spc buffers, but *buffers* are definitely treated differently. i think they can disappear more. i have resorted to doing the seeming noop in defadvice and in ariosu places just to guard superstitiously against the disappearing buffer problem. idk if tht problem is related to yours, but it probably is. here it is (switch-to-buffer (current-buffer)) On 2/1/22, Kevin Vigouroux via Users list for the GNU Emacs text editor wrote: > `buffer-list' displays the buffers in a specific order: the buffer in > the selected window is displayed first. > > I don=E2=80=99t really understand how it works, but we can see that the b= uffer > appears at the end of the list when we select another window before > evaluating the expression `(buffer-list)'. > -- > Best regards, > Kevin Vigouroux > > --=20 The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com