From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: Re: How users start programming in Emacs Lisp...
Date: Mon, 31 May 2021 01:27:26 +0300 [thread overview]
Message-ID: <YLQRTtQVtl4paHi2@protected.localdomain> (raw)
In-Reply-To: <87sg24ggxt.fsf@zoho.eu>
* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-05-30 22:31]:
> What is this SQL thing I keep hear about BTW, you send it to/from
> Emacs and get the data neatly or what does it do and what databases
> do you use it with?
I am sure you know it. SQL https://en.wikipedia.org/wiki/SQL
> You keep track of all the weaponry you have at home? :)
>
> Well, actually, if I had enough I would now that I say it.
> Bad example.
>
> Is relational algebra the base for SQL?
You have got it right.
Relational algebra - Wikipedia
https://en.wikipedia.org/wiki/Relational_algebra
Though I know nothing about it... but I should.
SQL database spare programming time and effort.
Compared to Org, the file `org-agenda.el' is full of features and
handles all kinds of things. It is however slow and has several keys
that handle its incapacities, such as sticky views or stuck
projects. And it distorts the users' view of what agenda really is, as
it is not just "agenda", rather a menu of search functions, for
example it encompasses the function `org-search-view'. The function
`org-agenda' should be renamed to something else, as the true agenda
is just the `org-agenda-list', but users will not be warned.
With the SQL, as when objects are in the database, the 415 kilobytes
org-agenda.el or at least we can say several kilobytes of spaghetti
Emacs Lisp code is replaced with the SQL query and report function:
(defun hyperscope-hyperdocuments-agenda ()
(interactive)
(rcd-speak "Hyperscope agenda")
(let ((sql "SELECT DISTINCT timestamps_hlinks, timestamptypes_name,
to_char(timestamps_timestamp::date, 'Day'), timestamps_timestamp::date,
hyobjects_name, actionstatuses_name
FROM hyobjects, timestamps, timestamptypes, actionstatuses
WHERE hyobjects_id = timestamps_hlinks
AND timestamptypes_id = timestamps_timestamptypes
AND timestamptypes_inagenda IS TRUE
AND actionstatuses_id = hyobjects_actionstatuses
AND actionstatuses_actionstatustypes != 3
ORDER BY timestamps_timestamp DESC")
(highlights (append '("ACTION") (hyperscope-timestamp-list t))))
(rcd-db-sql-report "Hyperscope Agenda" sql [("ID" 5 t) ("Type" 10 t) ("Day" 9 t) ("Timestamp" 10 t) ("Hyperdocument" 55) ("Action" 10 t)] "hyobjects" '("Timestamp" . t) 'hyperscope-hyperdocuments-agenda highlights)))
Comparison
==========
Try reading function `org-agenda' and `org-agenda-list' and compare
to the SQL above.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2021-05-30 22:27 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-29 20:08 Fortran Topics (outline-minor-mode, require, fixed format) ludvig-faddeev
2021-05-29 20:14 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 20:48 ` Jean Louis
2021-05-29 21:26 ` Christopher Dimech
2021-05-29 21:56 ` Jean Louis
2021-05-29 22:07 ` Christopher Dimech
2021-05-29 22:37 ` How users start programming in Emacs Lisp Jean Louis
2021-05-30 1:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 2:11 ` Christopher Dimech
2021-05-30 4:32 ` Eduardo Ochs
2021-05-30 7:05 ` Jean Louis
2021-05-30 7:51 ` Eduardo Ochs
2021-05-30 8:31 ` Jean Louis
2021-05-30 19:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:27 ` Jean Louis [this message]
2021-05-30 22:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:52 ` Jean Louis
2021-05-30 11:43 ` Arthur Miller
2021-05-30 12:08 ` Christopher Dimech
2021-05-30 19:35 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 21:54 ` Jean Louis
2021-05-30 22:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:38 ` Jean Louis
2021-05-30 22:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:56 ` Jean Louis
2021-05-30 23:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 23:35 ` Jean Louis
2021-05-31 0:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-01 14:09 ` Arthur Miller
2021-06-01 21:09 ` Christopher Dimech
2021-06-01 21:54 ` Christopher Dimech
2021-05-30 14:44 ` Tomas Hlavaty
2021-05-30 15:23 ` Eduardo Ochs
2021-05-30 19:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 19:59 ` Eduardo Ochs
2021-05-31 17:59 ` Tomas Hlavaty
2021-05-30 19:37 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-01 10:29 ` Arthur Miller
2021-06-01 11:40 ` Eduardo Ochs
2021-06-01 16:30 ` Jean Louis
2021-06-02 0:54 ` Eduardo Ochs
2021-06-02 3:43 ` Jean Louis
2021-05-30 15:35 ` Eduardo Ochs
2021-05-30 19:42 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-01 10:23 ` Arthur Miller
2021-05-30 19:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-06-01 10:22 ` Arthur Miller
2021-06-01 10:30 ` Christopher Dimech
2021-05-30 19:23 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 21:33 ` Jean Louis
2021-05-30 21:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:05 ` Jean Louis
2021-05-30 22:16 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:41 ` Jean Louis
2021-05-30 22:49 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 23:01 ` Jean Louis
2021-05-30 23:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 23:36 ` Jean Louis
2021-05-31 0:25 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-31 0:34 ` Eduardo Ochs
2021-05-31 8:09 ` Jean Louis
2021-05-30 22:49 ` Tomas Hlavaty
2021-05-30 22:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 22:50 ` Jean Louis
2021-05-30 22:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-30 23:25 ` Jean Louis
2021-05-30 5:46 ` Jean Louis
2021-05-30 10:32 ` Christopher Dimech
2021-05-30 10:35 ` Jean Louis
2021-05-30 11:08 ` Christopher Dimech
2021-05-30 11:19 ` Jean Louis
2021-05-30 13:55 ` Christopher Dimech
2021-05-30 15:54 ` Jean Louis
2021-05-30 17:22 ` Christopher Dimech
2021-05-30 18:57 ` Jean Louis
2021-05-30 19:48 ` Jean Louis
2021-05-31 20:30 ` Christopher Dimech
2021-05-31 21:53 ` Jean Louis
2021-05-29 20:36 ` Fortran Topics (outline-minor-mode, require, fixed format) Jean Louis
2021-05-29 20:51 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 21:00 ` Jean Louis
2021-05-29 21:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-29 22:00 ` Jean Louis
2021-05-30 2:04 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-30 2:06 ` Stefan Monnier via Users list for the GNU Emacs text editor
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YLQRTtQVtl4paHi2@protected.localdomain \
--to=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.