From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: akrl Newsgroups: gmane.emacs.help Subject: Re: question about buffer mechanism Date: Thu, 23 Aug 2018 08:49:41 +0000 Organization: SDF Public Access UNIX System, Est. 1987 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535014408 29626 195.159.176.226 (23 Aug 2018 08:53:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2018 08:53:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 23 10:53:24 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fslMq-0007bb-3M for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Aug 2018 10:53:24 +0200 Original-Received: from localhost ([::1]:35221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fslOw-0004lm-MI for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Aug 2018 04:55:34 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin3!goblin.stu.neva.ru!odin.sdf-eu.org!.POSTED.iceland.sdf.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Injection-Info: odin.sdf-eu.org; posting-host="iceland.sdf.org:205.166.94.5"; logging-data="10603"; mail-complaints-to="usenet@odin.sdf-eu.org" Cancel-Lock: sha1:kCXJeixJdJDifrjbK6eLcQOYplg= Original-Xref: usenet.stanford.edu gnu.emacs.help:223591 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117716 Archived-At: Stefan Monnier writes: > The "current buffer" can be *any* buffer; it's a global variable that > refers to one of the buffers and that variable can be changed with > `set-buffer`. Despite appearances, it is not directly related to which > buffer is displayed on screen. > > org-open-at-point changes the buffer displayed on screen, but it happens > to do so while preserving the "current buffer", so when the function > returns, the current buffer is still the buffer in which you found the > link rather than the new buffer that is now displayed in its place. > > As soon as the current *command* ends, the current buffer will be re-set > by the command loop to point to the buffer of the currently selected > window, i.e. the buffer which the user thinks of as "current" (in this > case, the new buffer containing the target of the link). > > > Stefan Hi Stefan, thanks this really helped me to understand how it works and to solve my problem. Bests Andrea -- akrl@sdf.org