emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: David Masterson <dsmasterson@gmail.com>
Cc: rswgnu@gmail.com, Samuel Wales <samologist@gmail.com>,
	emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Org and Hyperbole
Date: Tue, 11 Oct 2022 02:04:21 +0300	[thread overview]
Message-ID: <Y0Sk9ewGHRxzbzZ3@protected.localdomain> (raw)
In-Reply-To: <SJ0PR03MB545596463251ED302053C1A0A2209@SJ0PR03MB5455.namprd03.prod.outlook.com>

* David Masterson <dsmasterson@gmail.com> [2022-10-10 19:55]:
> Jean Louis <bugs@gnu.support> writes:
> 
> > * Robert Weiner <rsw@gnu.org> [2022-10-09 00:06]:
> >> There are many reasons for this including limits in many
> >> organizations of the file types that may be transferred through
> >> common protocols and the difficulty of maintaining relational
> >> database or structured file type schemas across time.
> >
> > I can't see how relational database is more difficult to maintain then
> > for example Emacs itself. Emacs is master of difficulties for computer
> > user. For example I have not touched configuration files for
> > PostgreSQL since years, if not decades. I start wondering why.
> 
> The issue here is distribution.  Databases tend to be centralized and
> heavy weight.

What does it mean centralized in this context? Majority of Relational
databases that I know have built-in collaboration features so that
people may access them from any part of the world; many have
replication features. I am not sure if "centralization" even fit into
the context.

> Here, we're simply looking for a standard way to capture an image
> (or more) with a task/note and tranport it back to your main Org
> file (a la Org Mobile or ...).  Org is lightweight in this area
> which is good and bad.

Regarding sizes:
================

$ du -skh .emacs.d/elpa/org-20201216/
11M	.emacs.d/elpa/org-20201216/

Database like   : sqlite3
Installed Size  : 7.55 MiB

Reference:

Relational database - Wikipedia:
https://en.wikipedia.org/wiki/Relational_database

You have misconception of what is lightweight or what is not or what
is difficult, I guess it comes simply from not trying it out. 

There is no "standard" way of taking notes, especially not in Org,
neither in Emacs environment, or generally for people.

Creating tables is pretty, new Emacs development has got SQLite built in:

(defun my-create-table-notes ()
      (rcd-sqlite "CREATE TABLE notes (
                      notes_id INTEGER NOT NULL PRIMARY KEY,
                      notes_datecreated TEXT NOT NULL DEFAULT (datetime()),
                      notes_datemodified TEXT NOT NULL DEFAULT (datetime()),
                      notes_name TEXT NOT NULL DEFAULT '>>>EDIT<<<',
                      notes_type INTEGER NOT NULL REFERENCES notetypes DEFAULT 1,
                      notes_text TEXT)"
		  rcd-people-sqlite-db))

Making a function to add a note is easy:

(defun rcd-db-table-sqlite-notes-insert-new-row ()
  "Add new note."
  (interactive)
  (let* ((name (read-string "Note name: "))
	 (prompt (format "Description about `%s': " name))
	 (note (string-edit "" "" 'ignore))
	 (sql (format "INSERT INTO notes (notes_name, notes_text)
                        VALUES (%s, %s) RETURNING notes_id"
		      (rcd-sqlite-escape-string name)
		      (rcd-sqlite-escape-string note)))
	 (id (rcd-sqlite-first sql rcd-people-sqlite-db)))
    id))

(defalias 'notes-add 'rcd-db-table-sqlite-notes-insert-new-row)

Viewing, listing, getting it back, making agendas, all that works
with so much less coding, works, less errors, and more speed.

Exporting to Org is easy:

(insert "\n\n"
	(rcd-sqlite-first "SELECT group_concat('** ' || notes_name || '\n\n' || notes_text,'\n\n') 
                           FROM notes 
                           ORDER BY notes_datecreated" rcd-people-sqlite-db))

** Something

My note #1

** My other heading

My note #2

** Something I knew before

My note #3

1

As Org users already wish and want to have structured properties,
tags, headings, links, tables, then it is right way to think that
with Emacs 29 and SQLite built-in, many things will become
easier.

Let us say keeping list of information such as accounting,
expenses, invoices, tasks, notes, etc. for any type of
information database has no ambiguity about structured
information, errors are minimized, programming efforts minimized. 

Pitfall would be that we would not have much discussion like now,
as with less bugs, there is less talk.

Imagine Org heading like this:

* My heading
  :PROPERTIES:
  :DB-ENTRY: :my-remote-host:my-database:my-org-table:id:1234
  :END:

Then imagine a pre-processor before saving the file or a hook for
saving Org file. Each time that file is saved, the heading entry could
be updated on remote host, database, table with ID 1234.  It could be
distributed, assigned, sent, easier shared, because data is
better estructured,

Or it could be updated in a local database.

Or it could be used to keep any kind information related to Org
heading. That is glue between the text file and well structured and
non ambiguous database.

If Org has mechanism to parse links in a file, a save hook could parse
them and store in database table for backlinks. 

Sometimes URL change, imagine Org link like: dbid:1234 that remains
immutable and which fetches the underlying dynamically updated URL.

If some Org headings are stored in the database, they may be updated
in Org file automatically.

Linking to Org headings could become so much more deterministic, as
one would link to unique ID in the database, no matter how heading is
named or where is it stored.

Collaboration door is open with networked databases. Concurrent access
to Org headings, links, contacts, becomes possible. Wide range of
options.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/


  reply	other threads:[~2022-10-10 23:41 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  1:45 Org and Hyperbole Robert Weiner
2022-06-24  1:56 ` Robert Weiner
2022-06-24  4:32   ` Samuel Wales
2022-06-24  5:34     ` Robert Weiner
2022-06-24 10:55       ` indieterminacy
2022-06-24 12:51         ` Robert Weiner
2022-10-08 20:26           ` Robert Weiner
2022-10-10  4:02             ` indieterminacy
2022-09-27 13:59       ` Jean Louis
2022-10-04  6:10         ` Robert Weiner
2022-10-04 18:05           ` David Masterson
2022-10-07 19:52             ` Jean Louis
2022-10-08 21:05               ` Robert Weiner
2022-10-09  9:54                 ` Jean Louis
2022-10-10 16:44                   ` David Masterson
2022-10-10 23:04                     ` Jean Louis [this message]
2022-10-11  0:21                       ` David Masterson
2022-10-07 22:57             ` Jean Louis
2022-10-10 16:50               ` David Masterson
2022-10-10 23:07                 ` Jean Louis
2022-10-08 20:53             ` Robert Weiner
2022-10-09 11:16               ` Jean Louis
2022-10-10 16:52               ` David Masterson
2022-10-07 22:18           ` Jean Louis
2022-09-27 13:52     ` Jean Louis
2022-06-24  2:13 ` Eduardo Ochs
2022-06-24  2:20   ` Robert Weiner
2022-06-24  2:14 ` Robert Weiner
2022-06-24  6:29 ` Tim Cross
2022-06-24 12:44   ` Robert Weiner
2022-06-24 13:52 ` Juan Manuel Macías
2022-06-24 22:06   ` Robert Weiner
2022-06-25 14:32     ` Juan Manuel Macías
2022-06-25 20:35       ` Robert Weiner
2022-10-08 20:34       ` Robert Weiner
2022-10-08 21:43         ` Juan Manuel Macías
2022-06-24 17:57 ` João Pedro
2022-06-25  1:32   ` Robert Weiner
2022-07-02  4:41     ` Samuel Wales
2022-07-02  4:49       ` Ihor Radchenko
2022-07-02  4:57         ` Samuel Wales
2022-07-02  5:12           ` Ihor Radchenko
2022-07-02 21:38             ` Samuel Wales
2022-07-07 12:18     ` Max Brieiev
2022-07-07 12:27       ` Ihor Radchenko
2022-07-16 23:16         ` Robert Weiner
2022-07-16 23:17           ` Robert Weiner
2022-06-25 19:07 ` David Masterson
2022-06-25 20:49   ` Robert Weiner
2022-06-25 21:18     ` David Masterson
2022-10-08 19:44       ` Robert Weiner
2022-09-27 14:06     ` Jean Louis
2022-10-04  6:11       ` Robert Weiner
2022-10-07 22:04         ` Jean Louis
2023-03-02 22:50           ` bug#58371: " Bob Weiner
2023-03-12 22:20           ` Mats Lidell
2022-06-26  6:37 ` Siva Swaminathan
2022-06-26  7:24   ` tomas
2022-06-26 20:03     ` David Masterson
2022-06-26 20:27       ` indieterminacy
2022-06-26 20:51         ` Robert Weiner
2022-06-27 23:16           ` David Masterson
2022-06-26 20:27   ` Robert Weiner
2022-10-08 19:52   ` Robert Weiner
2022-07-04 10:43 ` Fraga, Eric
2022-07-04 11:01   ` Ihor Radchenko
2022-07-04 11:08     ` Fraga, Eric
2022-07-04 11:09   ` Tim Cross
2022-07-04 14:20     ` Fraga, Eric
2022-07-04 16:56       ` Robert Weiner
2022-07-06 16:58         ` Fraga, Eric
2022-07-07  2:33           ` Robert Weiner
2022-07-07 10:46             ` Fraga, Eric
2022-10-08 20:01               ` Robert Weiner
  -- strict thread matches above, loose matches on Subject: below --
2022-10-09  9:12 Payas Relekar
2022-10-04  6:46 Payas Relekar
2022-10-07 22:44 ` Jean Louis
2022-10-08  0:45   ` Hendursaga
2022-10-08  1:05     ` Jean Louis
2022-10-08 17:04       ` Robert Weiner
2022-10-08 20:48 ` Robert Weiner
2022-06-22 19:57 linux_hpc_akr
2022-06-23  6:47 ` Bill Burdick
2022-06-23  6:53   ` Bill Burdick
2022-06-20 14:03 Juan Manuel Macías
2022-06-20 15:26 ` Russell Adams
2022-06-20 16:57   ` Eduardo Ochs
2022-06-20 23:28     ` Juan Manuel Macías
2022-06-20 23:37   ` Tim Cross
2022-09-27 13:06     ` Jean Louis
2022-09-27 15:08       ` Russell Adams
2022-10-08 17:26         ` Robert Weiner
2022-09-27 13:18     ` Jean Louis
2022-06-22 15:13   ` Russell Adams
2022-06-22 17:36     ` Bill Burdick
2022-06-22 18:05       ` David Masterson
2022-06-22 19:03         ` Bill Burdick
2022-06-23  3:46           ` David Masterson
2022-06-20 15:56 ` Uwe Brauer
2022-06-20 16:09 ` Bill Burdick
2022-06-20 16:24 ` indieterminacy
2022-06-22 14:48   ` Juan Manuel Macías
2022-09-27 13:26   ` Jean Louis
2022-06-21  3:08 ` David Masterson
2022-06-22 10:37   ` Juan Manuel Macías
2022-06-22 14:35     ` Bill Burdick
2022-06-22 19:23       ` David Masterson
2022-06-22 19:26         ` Bill Burdick
2022-06-22 19:55           ` Bill Burdick
2022-06-23 18:48       ` Eduardo Ochs
2022-06-22 19:17     ` David Masterson
2022-06-23  1:12     ` Samuel Wales
2022-06-23  4:04       ` David Masterson
2022-06-23  5:22         ` indieterminacy
2022-06-23 15:38           ` Samuel Banya
2022-06-23 23:30           ` Samuel Wales
2022-06-23 23:36             ` Samuel Wales
2022-06-24  5:50               ` indieterminacy
2022-09-27 13:33       ` Jean Louis
2022-10-07 20:34       ` 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=Y0Sk9ewGHRxzbzZ3@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=dsmasterson@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rswgnu@gmail.com \
    --cc=samologist@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).