unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Drew Adams <drew.adams@oracle.com>
Cc: "Dmitry Gutov" <dgutov@yandex.ru>,
	"Daniel Martín" <mardani29@yahoo.es>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [External] : Re: A feature to go to last edit locations
Date: Tue, 14 Feb 2023 00:14:12 +0300	[thread overview]
Message-ID: <Y+qoJGXZCMj1dEGT@protected.localdomain> (raw)
In-Reply-To: <SJ0PR10MB54880C99419B734528B29E4CF3DD9@SJ0PR10MB5488.namprd10.prod.outlook.com>

* Drew Adams <drew.adams@oracle.com> [2023-02-13 22:49]:
> > Eli said something important, why go somewhere back randomly, but
> > better going where user marked it to need it.
>          ^^^^^^^^^^^^^^^^^^^^^^^
> > Now I get it with single click: S-C-<down> to record point and then
> > S-C-<left> and <right> to go to previous or next one.
> 
> You are reinventing (part of) what bookmarks do.

Ok, though is not bad, as I do not rely on Emacs Lisp, rather on
PostgreSQL. It could be re-written to use the now built-in SQLite.

> If you don't want to have to name bookmarks for this, then you can use autonamed bookmarks:
> https://www.emacswiki.org/emacs/BookmarkPlus#AutonamedBookmarks

I do not use names automatically, only with C-u prefix. All points are
automatically named. It is very easy to designate the record of the
point as one to be chosen by name or the one to be temporary (your
idea) or the one which was not named.

Only those named points should be used similarly as bookmarks.

> (Single key to set, single key to jump to.)
> 
> For that you need Bookmark+, but as an alternative you can just
> define a bookmark-setting command that provides default names of
> your own design.

Which single key?

I have to use complex key combinations, or maybe function keys.

> Rolling your own thingies which are essentially just bookmarks (and
> using a database to store them, no less) is really not necessary.

It makes things easy in my personal space. I can make package out of
it that uses SQLite. I use it in similar way as previous-buffer,
next-buffer, it is just more specific as by following Edi's advise to
mark what I want.

If necessary or not necesary, is personal opinion.

I am editing text objects in the database, and often temporary files. 

Standard bookmark does not work in a buffer without file. 

"Emacs points" that I have implemented work on temporary buffer.

Bookmark+ works on buffers without file.

"Emacs points" will self-destruct on non-existing buffers without
files:

2023-02-14-00:02:14 Self-destruction initiated on Emacs point ID 113 (reason: not found)

Bookmark+ gives error on buffers without file:

if: Jumping to bookmark: Cannot access file `   - no file -' or buffer `new' [2 times]

I am editing database text, my "Emacs points" can remember table,
column, table ID, to go back to the editing point (not fully
implemented, need few minutes).

No previous implementation can go to database backed text and point
inside.

Now you can see that it could be necessary, as not all cases are
covered.

And it has simple functionality that works already, due to database
usage. Just few functions on top of others. 

Imagine me dwelling in kilobytes of your code, I would never make it,
I feel discouraged and overwhelmed to understand it.

> It may be fun to do, but Emacs already has what you describe, as
> bookmarks.

Sure, though it is not same. 

I use these database backed Emacs places as "points" rather, to move
back and forth from point to point.

- Save point
- Toggle local (buffer based) movement or global movement
- Go next, previous or last, first

Names are automatically implemented, but user can name them explicitly
and so far I did not start using it by names. So it is not yet
"bookmark" in that sense, only point in buffer with or without file
name, or buffer editing database entry.

-- 
Jean

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

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



  parent reply	other threads:[~2023-02-13 21:14 UTC|newest]

Thread overview: 39+ 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-14 20:08           ` 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 [this message]
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

  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=Y+qoJGXZCMj1dEGT@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=dgutov@yandex.ru \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=mardani29@yahoo.es \
    /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.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).