From: Jean Louis <bugs@gnu.support>
To: Eduardo Ochs <eduardoochs@gmail.com>
Cc: Christopher Dimech <dimech@gmx.com>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: How users start programming in Emacs Lisp...
Date: Sun, 30 May 2021 10:05:01 +0300 [thread overview]
Message-ID: <YLM5HcfAkCGn3AkN@protected.localdomain> (raw)
In-Reply-To: <CADs++6j9sSeJM5hSxwLMRhf5tce+EuyAcXUY9hrmEm58J9sCsQ@mail.gmail.com>
* Eduardo Ochs <eduardoochs@gmail.com> [2021-05-30 07:33]:
> Hi, just a curiosity...
>
> why do you prefer to use scratch buffers for elisp code instead of
> using (semi-scratch?) files in which we record all our experiments?
I use *scratch* buffer long time. It is for things that need not be
saved. There is `persistent-scratch' library loaded that does save it
over the sessions. However, whatever I write there is not of
importance if it is lost.
And temporary buffers I use because I don't want to save such. That is
where I evaluate and test things that don't belong to any file neither
should be saved. Bufffer could be saved though if necessary.
> In the tutorials of eev I try to convince the new users to treat their
> notes and scratch code as "field notes", and save everything they
> can... one of my arguments is this:
Then it is not temporary any more, not scratch any more. Not something
being free to forget it and drop it. Temporary buffer is just a more
static version of IELM, or more expanded version of M-: so things in
M-: evaluation I also don't save; with the difference that scratch
buffer is separated from other buffers, it will not work with buffer
variables, and in my case I never need such.
Example text in Emacs Lisp scratch that still hangs there is the stuff
with Fortran discussion where some testing of outline-minor-mode was required:
```
outline-regexp ⇒ "[*\f]+"
(setq outline-regexp "[!\f]+")
outline-heading-alist ⇒ nil
(setq outline-heading-alist '(("!" . 1) ("!!" . 2) ("!!!" . 3)))
! ! Something
Program
nOK
!!! Somethingp
! Something
More
Something
```
that stuff I would not save. The point learned is that there are
variables to be set for outline-minor-mode for it to make it work. I
don't need to know which variables, I will find them in future by
inspecting {C-h v outline TAB} list of variables or by
{M-x customize-group RET outlines RET}
> Learning eev is also like learning to use paper notebooks. It is
> much easier to understand the notes and ideas what we wrote
> ourselves in our notebooks than to understand what other people
> wrote in their notebooks...
That is right. I like any guidances related to notes, you remember
that I switched from Org and file system based editing to mostly
database backed column's value editing so it is always relevant to
me. `eev' can be used there I guess.
> when we go back to what _we_ wrote we are able to reconnect with
> what we were thinking, even when our notes are quite terse because
> we did not write down all details - and we can't do that with other
> people's notes.
That is right. What is interesting in my system is that I have:
- dates that are relevant to creation of a node (which can be of any type);
- dates relevant to modification of a node;
- which user in collaboration created it, or modified it;
- any access and additional actions on a single node/document are
recorded, for example change of a name from Johnny to John would be
recorded by its date/time and by user name;
- any activation of a node/document, like opening of a hyperlink is
recorded too, automatically; if user did read the note, or modified
the node/document, or opened up the document is recorded;
- and so on; that all works without disturbance for user;
Then the whol track or history can be played back, it is possible to
find out:
- which people or participants where assigned to tasks or documents at
specific times, dates in past;
- which stuff was researched back in time;
- related to which groups, companies, organizations, people, projects,
etc.
Those are not main feautures, just side effects.
Some of such features are within these Hyperscope ring functions:
;;;; ↝ HYPERSCOPE RING FUNCTIONS
Here is the variable initialization defined by fetching information
from a database:
(defvar hyperscope-ring-current
(rcd-sql-first "SELECT hyperscopering_id FROM hyperscopering ORDER BY hyperscopering_id DESC LIMIT 1" hs-db)
"Hyperscope's current ring item.")
The "ring" remains in the database and can be stored in a variable,
but it is persistent along sessions.
(defvar hyperscope-ring
(rcd-sql-list "SELECT hyperscopering_hyperdocument FROM hyperscopering ORDER BY hyperscopering_id DESC" hs-db)
"Hyperscope ring uses RCD utilities function
`next-circular-list-item'")
However it is not yet upgraded for multiple users, as then I just need
to add the columns like `usercreated' and `usermodified' so that ring
becomes collaborative:
hyperscopering_id | integer |
hyperscopering_datecreated | timestamp without time zone |
hyperscopering_datemodified | timestamp without time zone |
hyperscopering_usercreated | text |
hyperscopering_usermodified | text |
hyperscopering_hyperdocument | integer |
hyperscopering_description | text |
Then instead of this function:
(defvar hyperscope-ring-current
(rcd-sql-first "SELECT hyperscopering_id FROM hyperscopering WHERE ORDER BY hyperscopering_id DESC LIMIT 1" hs-db)
"Hyperscope's current ring item.")
I would need to use this one:
(defvar hyperscope-ring-current
(rcd-sql-first "SELECT hyperscopering_id FROM hyperscopering WHERE hyperscopering_usercreated = current_user ORDER BY hyperscopering_id DESC LIMIT 1" hs-db)
"Hyperscope's current ring item.")
As that one would choose only those items related to current user of
the database. Thus multiple users can contribute documents where all
things get tracked.
Choosing the last item accessed or activated is easy:
(defun hyperscope-ring-last ()
(rcd-sql-first "SELECT hyperscopering_hyperdocument FROM hyperscopering WHERE hyperscopering_usercreated = current_user ORDER BY hyperscopering_id DESC LIMIT 1" hs-db))
Updating new items is just calling the function, while ignoring
duplicates (who knows maybe duplicates are also important):
(defun hyperscope-ring (id)
"Setup Hyperscope ring"
(let ((last (hyperscope-ring-last)))
(cond ((null last) (hyperscope-ring-update id))
((= last id) (ignore))
(t (hyperscope-ring-update id)))))
And here is how somebody is recording everything within Memacs:
Memacs
https://github.com/novoid/Memacs
> (From:)
> http://angg.twu.net/eev-intros/find-here-links-intro.html
> (find-here-links-intro)
>
> Grepping and `C-s'-ing our own notes is easy, and most of the time we
> can read - and reuse - what we wrote.
Often I am re-using notes, or duplicating it to have a new version,
single click, and then editing new version. Unless those are some
disposable notes.
Then again I have a `hyperscope-capture-buffer' function where
whatever I write in other buffer is captured in the dynamic knowledge
repository. Then such function leaves a link like this one, as if I
placed the "stamp" in the email, I can quicker find some important
email captured as a note: (hyperscope 38116)
Description of such note is:
* Captured Buffer Text
Buffer name: mutt-protected-1001-4182-5758066564440477891
Buffer file: /home/data1/protected/tmp/mutt-protected-1001-4182-5758066564440477891
Time captured: 2021-05-30-09:34:13
Why would anybody "capture" one's own buffer? Well, why not, it can be
single key, some text that can be re-used for later or re-ordered for
articles. The difference is that "grep" need not be used but full text
search and results for searching "eev" appear almost instantly. A node
can be related to Eduardo Ochs and later the notes related to single
person can be listed.
A classic file system allows user tags and group tags, but nothing
about relations to other people, groups, organizations, various
activities or businesses.
> By the way (for Christopher): eev has a hands-on elisp tutorial. It's
> here:
>
> http://angg.twu.net/eev-intros/find-elisp-intro.html
> (find-elisp-intro)
Hyperlink generation functions are useful. I don't know if I can use
such to enter URL into the database for example, you tell me.
You have PDF link generation functions. But is it generic that I could
connect it to something else? For example to invoke a key, capture the
PDF URL or URL or file system location (also link) and return it as
link which can be then entered in the database. Or is it hard coded?
And finally why not integrate the database in your system, it would
help greatly. Install this module:
emacs-libpq @ Github
https://github.com/anse1/emacs-libpq
Then install this package:
RCD Database Basics
https://hyperscope.link/3/7/4/9/3/RCD-Database-Basics-37493.html
Then use M-x cf-sql-table to design your own first SQL table.
Integrate eev with permanent database backed information.
--
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 7:05 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 [this message]
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YLM5HcfAkCGn3AkN@protected.localdomain \
--to=bugs@gnu.support \
--cc=dimech@gmx.com \
--cc=eduardoochs@gmail.com \
--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.
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).