emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Christopher Dimech <dimech@gmx.com>
Cc: tomas@tuxteam.de, emacs-orgmode@gnu.org,
	Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Emacs inserts hardwired org-agenda-files variable, overwriting user options
Date: Sun, 13 Dec 2020 23:28:42 +0300	[thread overview]
Message-ID: <X9Z5egMM0229Q9Zg@protected.rcdrun.com> (raw)
In-Reply-To: <trinity-af609855-e5b0-44db-aeaa-ebea2edc99ff-1607881766980@3c-app-mailcom-bs09>

* Christopher Dimech <dimech@gmx.com> [2020-12-13 20:49]:
> > Reference to manual:
> > (info "(org) TODO Items")
> >
> > And it is definitely not a "plain text". It is probably largest mode
> > for Emacs, a true and full application handling much more than plain
> > text. It has more than 129 Emacs Lisp files. Maybe in beginning it was
> > plain text, not any more now. Now it is a wannabe database.
> 
> In a way it is becoming the opposite of what Carsten was trying to do
> in the beginning.  And plain text is always portable.
> 
> We should not exclude the original intention and use, making it fully
> database.

It is already text type of a database with structured data built into
properties and tags, headings, body of headings, etc. Just that it is
scattered database of things that do not have well defined its own
place.

As I see it, one could keep Org file in the database and edit it on
the file system and that it all gets updated to the database. That way
it would become collaborative Org mode. It is easier than one can
imagine.

I was using simple function to update Org TODO tasks to database.

(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-1 heading body date)))

(defun hyperscope-capture-org-heading-as-note-for-person ()
  "Captures Org heading for a person 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)))
	 (contact (cf-search-id (read-from-minibuffer "Contact: " nil nil nil 'cf-search-history))))
    (hyperscope-add-note-to-set-1 heading body date)))

Similar functions could be used to to simply update the record in the
database. And all meta data of Org properties, tags, etc, all that
could be inserted into database.

Jean




  reply	other threads:[~2020-12-13 20:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 18:52 Emacs inserts hardwired org-agenda-files variable, overwriting user options daniela-spit
2020-11-29 20:07 ` Tom Gillespie
2020-11-29 20:19   ` daniela-spit
2020-11-29 21:01     ` Tom Gillespie
2020-11-29 21:02     ` Kyle Meyer
2020-11-29 22:08       ` daniela-spit
2020-12-11  3:59         ` TRS-80
2020-12-11  4:16           ` daniela-spit
2020-12-11  4:32           ` daniela-spit
2020-12-11  8:25             ` tomas
2020-12-11 13:47               ` daniela-spit
2020-12-11 13:59                 ` Detlef Steuer
2020-12-11 14:18                   ` daniela-spit
2020-12-11 14:23                   ` Christopher Dimech
2020-12-11 14:26                 ` Ihor Radchenko
2020-12-11 14:47                   ` daniela-spit
2020-12-12  2:35                   ` Jean Louis
2020-12-12  2:41                     ` daniela-spit
2020-12-13  5:19                       ` Jean Louis
2020-12-13  5:51                         ` daniela-spit
2020-12-13 13:19                           ` Jean Louis
2020-12-13 17:49                             ` Christopher Dimech
2020-12-13 20:28                               ` Jean Louis [this message]
2020-12-13  3:33                     ` TRS-80
2020-12-13  8:46                       ` Jean Louis
2020-12-13  9:28                         ` Ihor Radchenko
2020-12-13 17:31                           ` Jean Louis
2020-12-13 17:57                             ` Christopher Dimech
2020-12-13 17:59                             ` Christopher Dimech
2020-12-14 12:49                             ` Ihor Radchenko
2020-12-14 19:39                               ` Jean Louis
2020-12-11 14:43                 ` tomas
2020-12-11 14:54                   ` daniela-spit
2020-12-11 15:46                     ` tomas
2020-12-11 15:58                       ` daniela-spit
2020-12-11  6:25           ` Jean Louis
2020-11-29 20:15 ` Jean Louis
2020-11-29 20:46   ` daniela-spit
2020-11-29 20:58     ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9Z5egMM0229Q9Zg@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=dimech@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tomas@tuxteam.de \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).