emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One vs many directories


From: Jean Louis
Subject: Re: One vs many directories
Date: Wed, 25 Nov 2020 16:32:53 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]