From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ADkuFupZvl+HIgAA0tVLHw (envelope-from ) for ; Wed, 25 Nov 2020 13:19:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iNgFEupZvl/pbwAAbx9fmQ (envelope-from ) for ; Wed, 25 Nov 2020 13:19:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B08029402B0 for ; Wed, 25 Nov 2020 13:19:37 +0000 (UTC) Received: from localhost ([::1]:45406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khuhs-0000cU-Fh for larch@yhetil.org; Wed, 25 Nov 2020 08:19:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khue0-0007eG-I9 for emacs-orgmode@gnu.org; Wed, 25 Nov 2020 08:15:36 -0500 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:39615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khudy-0005Fp-15 for emacs-orgmode@gnu.org; Wed, 25 Nov 2020 08:15:36 -0500 Received: by mail-pg1-x532.google.com with SMTP id f17so2422530pge.6 for ; Wed, 25 Nov 2020 05:15:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=xbeYZlepaEgQEDP0qqmSOlngHkficp62kKcknXm/on0=; b=U+WfTnELQMKfO7DCLbp9je+P7GV6rcNsAcTdo3Vx4u4GYikTVQe/4645AtrKaaSzQi inxXaGDdJ5x3tRYQ5onRq5jQU1ZH6MtCtn7b1tVvsdizzy8jc1o08AOoeu09wHFobac5 mr+6PK1heMYwd4DK+qltkmRLUbi9sXtof4ReSLzm1XdK8BVZsdm1xVw4smrv8eivLrxp jBZ4wTscnd8EvJudUMwywCxVEoDVo23O5GS5C0uGg5Jq8TPLEAeVbktj8X9D1Z6Xf4X8 ts/V9d+hR4HNoTpjIxJfPmeMWiG6XNqHUe9K+y6nu4ECS/HERpnulmnkAgmd1SGcKl8e 3IGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=xbeYZlepaEgQEDP0qqmSOlngHkficp62kKcknXm/on0=; b=QwTUhfD1VXrETbm1DoHNfa755amB9lWdqouGvG6pxmWd+CkBIVMXGpCi9R6ETukGk2 2POgqsCebdMR9CTovzhsSUFcHP+NGjGIYY66aFIrftRwrdUTZmznxpclv9OLmzFiYzd5 z/eY6uwBPFUsauYb1j7ZhaRJdGNob+m3S7LmEgvoKx6fF9t/FXdAhlOIlqNypLfIMOeh vJNqCshy728um3ipWEUC9tVUSXFYlvyS8cBJ1s01zZ86AfmzuI5prV+3Jbad9h454f/i eFCXTOj7cKx/1TSPGGzkd/qxDJDP2wh5nujdMHUJIilBO57lutmCTHEYeC6MU6VxMT1q R2GA== X-Gm-Message-State: AOAM531w0cW5pIe73Vsr41WH6lYrtcLd2VttGCT0kB6/+J7A4QqD86K0 gUq5rFPGk0+s7b/n6a7mWo8= X-Google-Smtp-Source: ABdhPJymAoMRXT0wVmIY6ASRRp++NAaXJxq8x3+3IFGEa/zy2bklaahdPoRyNSyq0aemp1/9leURvw== X-Received: by 2002:a17:90b:3610:: with SMTP id ml16mr4182014pjb.119.1606310132652; Wed, 25 Nov 2020 05:15:32 -0800 (PST) Received: from localhost ([23.27.206.160]) by smtp.gmail.com with ESMTPSA id j16sm2317252pgl.50.2020.11.25.05.13.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Nov 2020 05:15:31 -0800 (PST) From: Ihor Radchenko To: Jean Louis , Texas Cyberthal , "emacs-orgmode@gnu.org" Subject: Re: One vs many directories In-Reply-To: References: <87mtz84om9.fsf@localhost> <87ft4zhyuo.fsf@disroot.org> Date: Wed, 25 Nov 2020 21:12:37 +0800 Message-ID: <87a6v5bmwq.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=yantar92@gmail.com; helo=mail-pg1-x532.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=U+WfTnEL; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: cPINQ97DCurN > ... It does > evaluates and I get the result in the message buffer, but it does not > expands in the Org buffer. It is expected behaviour. According to the docstring of org-sbe, it only returns the value, but does not actually change buffer. If you want to replace the RESULTS, you need to use the following: # Local Variables: # eval: (let ((pos (org-babel-find-named-block "stages"))) (when pos (save-excursion (org-with-point-at pos (org-babel-execute-src-block))))) # End: Best, Ihor Jean Louis writes: > * Eric S Fraga [2020-11-24 12:46]: >> On Tuesday, 24 Nov 2020 at 12:00, Jean Louis wrote: >> > Can I automated the execution of Babel code upon opening of the Org >> > file? >> >> You can, by using file local variables. For instance, for some files, I >> do this: >> >> #+begin_src org >> ,* local variables :noexport: >> # Local Variables: >> # eval: (org-sbe "startup") >> # End: >> #+end_src > > I have got it to work as I had to name the source block. It does > evaluates and I get the result in the message buffer, but it does not > expands in the Org buffer. That is what I wish to find out how. > > ** Stages > #+NAME: stages > #+BEGIN_SRC sql :engine postgresql :exports results :results replace > SELECT 1 AS table; > #+END_SRC > > # Local Variables: > # eval: (org-sbe "stages") > # End: