emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: "Quiliro Ordóñez" <quiliro@riseup.net>
Cc: "Sébastien Rey-Coyrehourcq"
	"Alan Schmitt" <alan.schmitt@polytechnique.org>,
	emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: SQLite for contacts and relations to Org - Re: contact management in emacs
Date: Sun, 9 Oct 2022 19:59:04 +0300	[thread overview]
Message-ID: <Y0L92HwD1vATHZrH@protected.localdomain> (raw)
In-Reply-To: <f9b0aa1f9a3f4f8b62157fc44d4e44f5@riseup.net>

* Quiliro Ordóñez <quiliro@riseup.net> [2022-10-09 18:22]:
> El 2022-10-09 05:40, Jean Louis escribió:
> > But I can as well edit my contacts by using external tools and
> > exchange information with other software.
> > 
> > Do you wish to share your contacts? That is easy, one can simple send
> > the full file to somebody.
> > 
> > By followed the thought patterns described one shall understand that
> > contacts may be separated from single mode (Org) and separated from
> > single software (Emacs) and that it will not minimize or limit you but
> > rather widen the capacities and usefulness for human.
> This is a great summary about the use of database to hold information. 
> But it requires experience configuring databases for end-users.

We speak of what? User experience? We are in Emacs environment, that
means you run your application either by using mouse click or by M-x
or key binding.

In the provided example you as user need nothing else but
that. Hypothetically basic actions are just add, modify, delete,
search for contacts. You do that by key binding in Emacs, or by mouse,
or by M-x

In the example provided user need do nothing but that. Even the file
can be automatically stored like in ~/.emacs.d/people.sqlite or
otherwise configured to be somewhere else.

How many options does Org have? The example I have provided may be
option free. 

There is nothing to do but to add, modify, delete, search for
contacts, export, and so on; all by using M-x, key binding or mouse.

> It could work if the database was set up by someone else or if the
> fields were easy to define by the end-user by some kind of
> interface.

I have actually shown to you how it works, so you have to imagine that
all that may be part of the package. Especially with SQLite databases
there is nothing to configure.

This is what defines where the database is:

(defcustom rcd-people-sqlite-file (concat (expand-file-name user-emacs-directory) "rcd-people.sqlite")
  "SQLite database file location."
  :type 'file
  :group 'rcd)

We evaluate it:

rcd-people-sqlite-file ⇒ "/home/data1/protected/.emacs.d/rcd-people.sqlite"

The above variable is part of the package. There is nothing for
user to think about it. There is nothing to configure but user
is free to customize it.

Fields or columns in preset database tables are designed by

It is not hard to have options to add column, delete column or
rename column. That is exactly what I am doing on the fly during
Emacs sessions.
> On the other hand, there is a movement to use plain text for everything.
> I know you disagree.

There are movements for each and everything. Why should I
disagree with movements, I let them be. 

What I do not agree is to claim strongly that it is useful to
keep plain text or clay tables with Cuneiform for every type of

> But here is some information about accounting
> this way: https://plaintextaccounting.org

The huge amount of work necessary to create plain text accounting
can't be compared to database work and efforts. I guess I have
implemented accounting with database about 4 times in my life
and I use it in various contexts. Standard accounting is simple.

Accounting types (pasted straight from Emacs view of database

 1          Asset
 2          Liability
 3          Equity
 4          Income
 5          Expenses

Sample account defined:
                             ID   1
                   Date created   "2022-02-27 18:36:28.690616"
                  Date modified   "2022-02-27 18:36:39.372512"
                   User created   "maddox"
                  User modified   "maddox"
                  Hyperdocument   "2022-02-27 Transactions for Joe Doe"
                   Account Type   "Asset"
                         Person   "Jean Louis"
                       Currency   "UGX - Ugandan shilling"
                           Name   "Jean Louis"
                    Description   nil
                           Code   nil

It belongs to Hyperdocument which has type of accounting. There
may be multiple companies, multiple accounting sets or parents
to which accounts belong. No need to open a "new file" for each
new company.

And then there is journal entry:

-[ RECORD 1 ]----------+-------------------------------------------------------------------
journal_id             | 4
journal_datecreated    | 2019-06-12 00:08:04.409559
journal_datemodified   | 
journal_usercreated    | maddox
journal_usermodified   | maddox
journal_cashentrytypes | 1
journal_code           | 
journal_description    | food
journal_debit          | 5
journal_credit         | 7
journal_amount         | 4000
journal_signature      | 
journal_date           | 2019-06-10

The entry debits account ID 5, credits account ID 7.

> I learned a lot of elisp by reading your long explanation about how to
> construct a contact database directly on Emacs 29 without adding
> anything else.  Thank you very much!

Well that is really good, thank you.


Take action in Free Software Foundation campaigns:

In support of Richard M. Stallman

  reply	other threads:[~2022-10-09 17:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27 11:08 contact management in emacs Alan Schmitt
2021-02-27 11:31 ` Martin Steffen
2021-02-27 13:20   ` andrés ramírez
2021-02-27 14:40     ` Eric S Fraga
2021-02-27 15:12       ` andrés ramírez
2021-02-28 10:21         ` Eric S Fraga
2021-02-27 15:14       ` Martin Steffen
2021-02-27 17:00   ` Dr. Arne Babenhauserheide
2021-02-27 16:53 ` Bob Newell
2021-02-28  9:06 ` Russell Adams
2021-02-28 11:09   ` Alan Schmitt
2021-03-03 14:40   ` TRS-80
2021-03-07 22:57   ` Jean Louis
2021-03-08 20:06     ` John Kitchin
2021-03-10  8:32       ` Jean Louis
2021-03-07 22:13 ` Jean Louis
2021-03-08  7:49   ` Alan Schmitt
2021-03-08  8:12     ` Jose E. Marchesi
2021-03-10  8:32       ` Jean Louis
2022-09-09 16:11 ` Sébastien Rey-Coyrehourcq
2022-09-10  5:46   ` Ihor Radchenko
2022-10-09 10:40   ` SQLite for contacts and relations to Org - " Jean Louis
2022-10-09 15:21     ` Quiliro Ordóñez
2022-10-09 16:59       ` Jean Louis [this message]
2022-10-09 19:09         ` Quiliro Ordóñez
2022-10-10  6:12           ` Jean Louis
2022-10-10 22:29             ` Robert Weiner
2022-10-10 23:32               ` Jean Louis
2022-10-11  3:20                 ` Robert Weiner
2022-10-11  5:54     ` Sébastien Rey-Coyrehourcq
2022-10-11 19:59       ` 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:

  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=Y0L92HwD1vATHZrH@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=quiliro@riseup.net \
    --cc=sebastien.rey-coyrehourcq@univ-rouen.fr \


* 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


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