From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
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 UDp4Fnlevl8ZNQAA0tVLHw
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 25 Nov 2020 13:39:05 +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 oIaPEnlevl+BfwAAbx9fmQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 25 Nov 2020 13:39:05 +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 DBEB89403CA
	for <larch@yhetil.org>; Wed, 25 Nov 2020 13:39:04 +0000 (UTC)
Received: from localhost ([::1]:48060 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1khv0h-0005ky-EP
	for larch@yhetil.org; Wed, 25 Nov 2020 08:39:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:44958)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bugs@gnu.support>) id 1khuzc-0005hG-Ss
 for emacs-orgmode@gnu.org; Wed, 25 Nov 2020 08:37:56 -0500
Received: from static.rcdrun.com ([95.85.24.50]:57389)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <bugs@gnu.support>) id 1khuzb-0004i0-5G
 for emacs-orgmode@gnu.org; Wed, 25 Nov 2020 08:37:56 -0500
Received: from localhost ([::ffff:41.202.241.56])
 (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384)
 by static.rcdrun.com with ESMTPSA
 id 00000000002C000B.000000005FBE5E32.00007F79; Wed, 25 Nov 2020 13:37:53 +0000
Date: Wed, 25 Nov 2020 16:32:53 +0300
From: Jean Louis <bugs@gnu.support>
To: Ihor Radchenko <yantar92@gmail.com>
Subject: Re: One vs many directories
Message-ID: <X75dBVStclRZHmP5@protected.rcdrun.com>
References: <CAMUm493C_2QYVSDkt+NrcGKEkp4fS9UDuWVxoB9sNxuh0WTJkg@mail.gmail.com>
 <X7i1aZSHqt2kLT9G@protected.rcdrun.com>
 <CAMUm493_3aNOPr6BHv5GLCJaxGbxkX6c1Z12Nytf32sK_mT=fQ@mail.gmail.com>
 <87mtz84om9.fsf@localhost> <X7zLkuJMILANMxRv@protected.rcdrun.com>
 <87ft4zhyuo.fsf@disroot.org>
 <X75EBuUPk+6uwJiL@protected.rcdrun.com> <87a6v5bmwq.fsf@localhost>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In-Reply-To: <87a6v5bmwq.fsf@localhost>
User-Agent: Mutt/2.0 (3d08634) (2020-11-07)
Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support;
 helo=static.rcdrun.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Cc: Texas Cyberthal <texas.cyberthal@gmail.com>,
 "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
X-Scanner: ns3122888.ip-94-23-21.eu
Authentication-Results: aspmx1.migadu.com;
	dkim=none;
	dmarc=none;
	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: -0.51
X-TUID: jtQPIBRatBBM

* Ihor Radchenko <yantar92@gmail.com> [2020-11-25 16:16]:
> 
> > ... 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:

That works well, thank you for the tip.

Of course I will not be writing all that by hand, program would simply
invoke the creation and generation of Org file and write headings and
the local variables. Next time I open the Org file related to that
person I can see all the pending tasks or tasks done with hyperlinks
to their corresponding actual tracking places in the database.

I have already made the function to capture Org tasks into the
database, concept is here:

(defun hyperscope-capture-org-heading ()
  "Captures Org heading and stores it in the Hyperscope dynamic
  knowledge repository"
  (interactive)
  (let* ((body (org-copy-subtree nil nil nil t))
	 (body (pop kill-ring))
	 (body (org-no-properties body))
	 (heading (org-get-heading))
	 (created (org-property-values "CREATED"))
	 (date (if created (substring (car created) 1 11) nil))
	 (body (with-temp-buffer
		 (insert body)
		 (org-mode)
		 (org-back-to-heading)
		 (kill-line)
		 (delete-matching-lines ":PROPERTIES:")
		 (delete-matching-lines ":CREATED:")
		 (delete-matching-lines ":ID:")
		 (delete-matching-lines ":END:")
		 (buffer-string))))
    (hyperscope-add-note-to-set heading body date)))

So I am now transitioning all Org tasks into little bit different and
more streamlined system for me personally.

Nevertheless, when I use a browser I can still use org-capture and
later just parse all headings automatically and insert into the
database.