all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Drew Adams <drew.adams@oracle.com>
Cc: GNU Emacs Help <help-gnu-emacs@gnu.org>
Subject: On Bookmarks+ package
Date: Thu, 16 Feb 2023 11:17:40 +0300	[thread overview]
Message-ID: <Y+3mpAtxGGZaVhFZ@protected.localdomain> (raw)
In-Reply-To: <SJ0PR10MB5488AB9E996E51E8A6B9203AF3A39@SJ0PR10MB5488.namprd10.prod.outlook.com>

I changed this to GNU Emacs Help, as not to spoil the subject of the
thread.

* Drew Adams <drew.adams@oracle.com> [2023-02-15 19:35]:
> Emacs bookmarks can "hold" anything you like.  For bookmarks that
> you want to persist, the "anything" needs to be persistable and
> readable.

I have 53111 elementary objects currently. While I call them
Hyperdocuments and elementary objects, you call it bookmarks. 

I was thinking bookmarks in Emacs are more narrowed types of
objects. And did not expand my personal use of them.

Do you think that bookmarks(+) with it's implementation could scale to
that number of objects without losing speed?

> But typically bookmarks don't "hold" much data.  Instead, they point
> to data that's available somewhere else (whether it's persisted or
> not at that "somewhere else").

These elementary objects my hold as much data, for example, LaTeX
processing generates various files (aux log pdf tex) which I really do
not like and do not want to think about it. By using LaTeX object in
the database program may decide internally where is the directory,
where is the file, it can generate it, and me as user do not think of
it. I only edit, and generate PDF. I can share the file with other
people without knowing where in file system it is.

If I would keep LaTeX object or LaTeX text in bookmark, I would not
know where it is stored really, it would be one file, but that file is
not protected from influences from file system, and then single
bookmark file would be bloated with hundreds or thousands of such
objects, and external access to such objects, beyond Emacs Lisp, would
not be possible. With the database it is easy, I can use external
scripts to insert or share any objects.

I find that you have perfected Bookmark+ and that I can re-use those
ideas including your way of doing things systematically, pedantically.

> There should be no inherent problem bookmarking a "non-file database
> entry".  You just have to decide what you need to put in the
> bookmark, to later get to it (e.g. restore it).

Exactly, I understand it, that is how it works here too. Though you
speak in terms of programming capability, not of something that is
already implemented.

> You can sort, edit, tag – whatever non-invokable bookmarks, i.e.,
> you can use bookmarks just to organize things.  (And you have
> bookmarks that are invokable only in certain contexts.)

Please let me know, do you dwell in Bookmarks?

That is what I do. My workspace is in Hyperscope and people. I have
dashboard, reminders, and often dwell, spend time in that
organization, finishing a document, sharing, editing, generated
mixed-object document, sharing it, like that. All time there.

Do you actually use your bookmarks?

How many times per day?

Here is how it works on my side, there are 215 elementary objects from
last week. In a way they are similar to bookmarks, though I did not
put much thinking into it. Is that how you spend time as well in your
bookmarks? 

┌────────────────────────────┬───────┐
│   Objects for last week    │ Count │
├────────────────────────────┼───────┤
│ Hyperscope, new objects    │   215 │
│ Hyperscope, objects sent   │    21 │
│ Hyperscope objects tagged  │   268 │
│ Hyperscope, people related │    25 │
│ Messages Sent              │   486 │
│ New People                 │    35 │
│ People, tagged             │   268 │
└────────────────────────────┴───────┘

> > I have it same, I can combine, or find interesection of elementary
> > objects, I can mark what I need or take all list of visible ones and
> > make new object contaning all those.
> 
> Bookmark tags are a good way to categorize things
> and access them by combinations of such categories.
> 
> https://www.emacswiki.org/emacs/BookmarkPlus#BookmarkTags

I understand tags, and I use them too, though in Hyperscope
system. Each elementary object may be tagged. There are types of tags
in my system, so there may be "subject tag" like "Computer tag", where
meanining need not be same to other tag of same name. By using
database, there is privilege that tags may be renamed, edited,
described, they are objects itself, not only a word.

,----
| * You can tag bookmarks, a la del.icio.us. In effect, bookmark tags
|  define bookmark sets. A bookmark can have any number of tags, and
|  multiple bookmarks can have the same tag. You can sort, show/hide, or
|  mark bookmarks based on their tags.
`----

That I understand. 

,----
| * Bookmark+ tags can be more than just names. They can be full-fledged
|   user-defined attributes, with EmacsLisp objects as their values.
`----

I understand that next level.

> Org mode, for example, lets you embed different kinds of things in
> an Org buffer/file.  You can tag them, link them, annotate them, and
> act on them in any number of ways.  A big difference here is that
> the info/data of the things, and the tags and links and
> annotations... are in the Org file, along with the other things and
> any "main" text.

Ok, that gives me idea that your bookmark+ bookmarks can also be
tasks, notes, right?

Then by using tags, or other associations, you could reconstruct whole
document, right?

> That has some advantages, no doubt.  But storing annotations, links,
> tags, actions, other metadata, ... separately (e.g. in a bookmark
> file) also has (different) advantages.

I find that later shall be on top level, on highest level, and former,
part of the later.

- instead of having Org as file, I find it more convenient, having Org
  as elementary object of a set 

- instead of having too many things in single Org object, I find it
  more convenient having separate objects and then combining them in a
  mixed-object document

- this way of thinking, and I am using it, also opens the opportunity
  of combining any markups together in a mixed-object document

More practical examples:

- task is written in Org format, 1
- but other task is written in Asciidoctor format, 2
- one is in txt2tags, 3
- there is list of equipment required for industry, 4
- there is HTML page, 5
- there is PDF to be shared with assigned people, 6

Then list of equipment (4) may be included in HTML page (5), but also
reused in the PDF (6) produced with primary markup being let us say
LaTeX, which contains tasks 1, 2 and 3, which will be all converted to
LaTeX.

Many systems like Org and LaTeX already have features to include other
files, just that such are not integrated or rather difficult to
implement.

For example, I cannot just list multiple Org files over different
directories in file system on single screen, mark intersection of them
and produce mixed-object document containing those files. I would need
to do it pretty manually and include files one by one in Org.

With bookmarks, or elementary objects, I could use tags, or various
intersections, mark some objects and with single key press produce the
mixed-object document.

> The implementation of bookmarks, as text files of Lisp code, is fine
> for many use cases.  It fits the use of any number of bookmark
> files, each of which is not gigantic.

Could they really work with 50000 objects? Did you ever test the speed
of accessing, using them?

> But yes, Someone (TM), sometime, will hopefully do things such as:
> 
> 1. Allow (also) for binary ("compiled") bookmark
>    formats (and thus files).

Is that for reasons of speed? Once below subject 2 is solved, speed is
also solved.

> 2. Allow storing and accessing bookmarks using
>    (multiple) databases.

By using PostgreSQL network database that is easy without
problems. Hyperscope can work with multiple databases. 

> > Even then, objects are saved in the database, and related to
> > planning, and represent themselves notes, tasks, not just
> > bookmarks pointing to notes and tasks, they are related to people,
> > can be shared and so I canot reuse your library, apart from
> > reusing ideas, food for thought.
> 
> Not clear to me.  Why would notes, etc., whether related to people
> or not, be something you can't leverage bookmarks for?  I don't
> doubt you're saying something true, but it's not clear to me what it
> is.

I asked you if that following is also possible with Bookmarks Plus:

- create bookmark, let us say "ABC"

- edit ABC as text, representing note, task

I understand that it can be done programmatically in future, but is it
already there maybe? I know annotations are there, so in the sense it
is very similar to my use cases.

> > > Bookmark+ adds over 70 types of bookmark. (You can see what they
> > > all are by invoking function ‘bmkp-types-alist’.)
> > 
> > But that does not seem to be the function, it is alist, but I do
> > not see 70 types.
> 
> No, it's a function, not a variable.  The function returns an alist
> of known types (their names) and the associated history list (for
> completion).  It's a function because which predefined types exist
> depends on your environment, e.g., on whether you have this or that
> other library, and on what Emacs release you have.

I cannot find it:

-*- mode: grep; default-directory: "~/.emacs.d/Drew Adams/" -*-
Grep started at Thu Feb 16 11:11:19

grep --color=auto -nH --null -e "defun bmkp-types-alist" *.el

Grep finished with no matches found at Thu Feb 16 11:11:20

When I load "bookmark+" I cannot find that function.

> What's important is that it's easy for you to define new types.  The
> predefined types are usable OOTB, for things like jumping to a
> bookmark of a given type, or choosing a navigation list of bookmarks
> of a given type.
> 
> FWIW, (bmkp-types-alist) shows this, for me:

(featurep 'bookmark+)
t

(bmkp-types-alist)
Debugger entered--Lisp error: (void-function bmkp-types-alist)
  (bmkp-types-alist)
  (progn (bmkp-types-alist))

I cannot find the function.

> > Can you save window configuration over session? I would like to do
> > that. That is not same as desktop which is slow and cannot narrow to
> > window configuration.
> 
> That's one of my wishes too.
> 
> Last time I checked, window configs are not Lisp
> readable.  I tried to get Emacs (Juanma, who did
> the desktop restore stuff) to raise window and
> frame configs to the level of Lisp-readable
> thingies (so persistable) - but to no avail.
> 
> See, e.g., bug #14964 (also #10348).
> 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=14964#11

Pity that data structure is not exposed to Emacs Lisp.

-- 
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:[~2023-02-16  8:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m1fsbakchr.fsf.ref@yahoo.es>
2023-02-12 17:41 ` A feature to go to last edit locations Daniel Martín
2023-02-12 17:52   ` Eli Zaretskii
2023-02-12 18:59     ` Daniel Martín
2023-02-12 19:26       ` Eli Zaretskii
2023-02-12 19:42         ` andrés ramírez
2023-02-12 22:19           ` Daniel Martín
2023-02-12 23:54             ` Dr. Arne Babenhauserheide
2023-02-13  7:50               ` Juri Linkov
2023-02-12 21:40         ` [External] : " Drew Adams
2023-02-13 20:28           ` Jean Louis
2023-02-12 18:07   ` Dmitry Gutov
2023-02-12 18:50     ` Daniel Martín
2023-02-12 18:52       ` Dmitry Gutov
2023-02-12 19:23         ` Daniel Martín
2023-02-13 19:28         ` Jean Louis
2023-02-13 19:24     ` Jean Louis
2023-02-13 19:41       ` Dmitry Gutov
2023-02-13 20:22         ` Dr. Arne Babenhauserheide
2023-02-13 20:56         ` Jean Louis
2023-02-14  3:25         ` Eli Zaretskii
2023-02-14  4:36           ` [External] : " Drew Adams
2023-02-14  4:56             ` Drew Adams
2023-02-14  5:53               ` Jean Louis
2023-02-14 16:24                 ` Drew Adams
2023-02-15  5:45                   ` Jean Louis
2023-02-15 16:34                     ` Drew Adams
2023-02-16  8:17                       ` Jean Louis [this message]
2023-02-16 17:38                         ` [External] : On Bookmarks+ package Drew Adams
2023-02-14 20:08           ` A feature to go to last edit locations Dmitry Gutov
2023-02-13 19:48       ` [External] : " Drew Adams
2023-02-13 20:28         ` Dr. Arne Babenhauserheide
2023-02-13 21:17           ` Drew Adams
2023-02-13 21:21           ` Jean Louis
2023-02-13 21:14         ` Jean Louis
2023-02-14  5:21           ` Drew Adams
2023-02-13 19:49   ` Michael Welsh Duggan
2023-02-13 21:35     ` Jean Louis
2023-02-13 23:14     ` Konstantin Kharlamov
2023-02-14  0:00     ` Ergus
2023-02-14  6:29       ` Dr. Arne Babenhauserheide
2023-02-15  0:00         ` Karthik Chikmagalur

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=Y+3mpAtxGGZaVhFZ@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=drew.adams@oracle.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.
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.