From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Switching buffers from babel snippets Date: Sat, 14 Jan 2017 19:17:08 +0000 Message-ID: <87ziit1mff.fsf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSTpE-000831-6b for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 14:17:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSTpA-0002OE-T6 for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 14:17:16 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:36533) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cSTpA-0002NS-ME for emacs-orgmode@gnu.org; Sat, 14 Jan 2017 14:17:12 -0500 Received: by mail-wm0-x22a.google.com with SMTP id c85so107420134wmi.1 for ; Sat, 14 Jan 2017 11:17:12 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w197sm14799766wmd.11.2017.01.14.11.17.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jan 2017 11:17:09 -0800 (PST) Received: from zen (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTPS id 5F7683E0133 for ; Sat, 14 Jan 2017 19:17:08 +0000 (GMT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi, I've trying to further automate my maintainer tasks by moving things into babel snippets. I have one to find a cover letter and edit the file: #+name: edit-cover-letter #+begin_src emacs-lisp :var cover=create-qemu-pull[0] (find-file (expand-file-name (concat default-directory (car cover)))) (mail-mode) #+end_src However when I run the code although the file is loaded and in the right mode I never see the buffer come up and have to switch to it manually. I expect this is because the code is running under some sort of safe-excursion. Is there anyway to pass a final buffer back to org-mode after the code is run and switch to it? -- Alex Bennée