From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Notion of previous buffer Date: Sat, 07 Jan 2023 20:14:03 +0300 Message-ID: <58917e45a00e0d2d161f1987a5be0d7c.support1@rcdrun.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6972"; mail-complaints-to="usenet@ciao.gmane.io" To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 07 18:16:29 2023 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 1pECo0-0001Ya-Ow for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Jan 2023 18:16:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pECnL-0005S2-3l; Sat, 07 Jan 2023 12:15:48 -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 1pECnG-0005Q0-TT for help-gnu-emacs@gnu.org; Sat, 07 Jan 2023 12:15:43 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pECnE-0006EX-Ga for help-gnu-emacs@gnu.org; Sat, 07 Jan 2023 12:15:42 -0500 Original-Received: from localhost ([::ffff:197.239.14.179]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D5E.0000000063B9A8B1.000024F3; Sat, 07 Jan 2023 10:15:29 -0700 Received-SPF: pass client-ip=217.170.207.13; envelope-from=support1@rcdrun.com; helo=stw1.rcdrun.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142142 Archived-At: After slight inspection of (previous-buffer) and running function in newly invoked buffers, it seem I can use the function to detect from which buffer was new buffer invoked. Something like this may tell me which are previous buffers: (window-prev-buffers (window-normalize-window nil t)) Though by "previous" it is meant the buffer which was visited before the current buffer. I need little different situation as to go to the invoking buffer, rather then to buffer that was visited before visiting the current buffer. Invoking buffer is from where user generated or entered in new buffer. Maybe somebody knows if this notion to be able to return to invoking buffer already exists in Emacs packages? Then if it does not exist, I wish to create that feature by defining the permanent buffer local variable: (defvar-local rcd-invoking-buffer nil "Name of the invoking buffer.") (put 'rcd-invoking-buffer 'permanent-local t) and then by invoking generating new buffer, I setup variable `rcd-invoking-buffer' so to remember it and make customized `quit-window' function to make sure to return to invoking buffer. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/