all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bookmarks in registers
@ 2023-06-07 21:28 Christopher Howard
  2023-06-08  6:44 ` Philip Kaludercic
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Howard @ 2023-06-07 21:28 UTC (permalink / raw)
  To: emacs-devel

Hi, I explored this idea recently, and was wondering if it could be something easily added to the next release of emacs:

http://gem.librehacker.com/gemlog/starlog/20230607-0.gmi

Maybe some active Emacs developer would want to run with this basic idea and throw together a patch?

I've found in my workflow that it is convenient to be able to put an anonymous bookmark into a register. For example, if you are temporarily moving around between a few different info manuals.

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bookmarks in registers
  2023-06-07 21:28 Bookmarks in registers Christopher Howard
@ 2023-06-08  6:44 ` Philip Kaludercic
  2023-06-08 14:13   ` [External] : " Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Kaludercic @ 2023-06-08  6:44 UTC (permalink / raw)
  To: Christopher Howard; +Cc: emacs-devel

Christopher Howard <christopher@librehacker.com> writes:

> Hi, I explored this idea recently, and was wondering if it could be something easily added to the next release of emacs:
>
> http://gem.librehacker.com/gemlog/starlog/20230607-0.gmi

For those who don't want to open the link:

--8<---------------cut here---------------start------------->8---
(defun bookmark-point-to-register ()
  (interactive)
  (set-register
   (register-read-with-preview "register: ")
   (bookmark-make-record)))

(defun bookmark-register-to-point ()
  (interactive)
  (bookmark--jump-via
   (get-register
    (register-read-with-preview "register: "))
   'pop-to-buffer-same-window))
--8<---------------cut here---------------end--------------->8---

> Maybe some active Emacs developer would want to run with this basic idea and throw together a patch?

Getting other people to write a patch for you is usually not productive.
I'd recommend trying to do so yourself (check out the CONTRIBUTE file in
emacs.git), in which case there is something concrete to discuss.

> I've found in my workflow that it is convenient to be able to put an
> anonymous bookmark into a register. For example, if you are
> temporarily moving around between a few different info manuals.

How is this different from `point-to-register' and `jump-to-register'?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Re: Bookmarks in registers
  2023-06-08  6:44 ` Philip Kaludercic
@ 2023-06-08 14:13   ` Drew Adams
  2023-06-08 15:41     ` Christopher Howard
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2023-06-08 14:13 UTC (permalink / raw)
  To: Philip Kaludercic, Christopher Howard; +Cc: emacs-devel@gnu.org

> How is this different from `point-to-register' and `jump-to-register'?

OP answered that this way:

  "the problem with these is that if the buffer in-question changes, then running register-to-point will not take you where you want to go. E.g., if you run point-to-register inside an *info* buffer, and then move the buffer to some other info page, then this will not take you back to the original info page."
_______

On the other hand, the OP motivation also says:

  "you can just use a regular bookmark instead, but then you must name the bookmark, and then the bookmark clutters up your list of bookmarks. What I want is to be able to store an anonymous bookmark in a register, which is handy if you only need a bookmark for a little while."

FWIW, Bookmark+ autonamed bookmarks take care of not needing to provide bookmark names etc.  And bookmarks can be temporary.

https://www.emacswiki.org/emacs/BookmarkPlus#AutonamedBookmarks



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [External] : Re: Bookmarks in registers
  2023-06-08 14:13   ` [External] : " Drew Adams
@ 2023-06-08 15:41     ` Christopher Howard
  2023-12-18  5:57       ` Karl Fogel
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Howard @ 2023-06-08 15:41 UTC (permalink / raw)
  To: Drew Adams; +Cc: Philip Kaludercic, emacs-devel@gnu.org

On Thu, Jun 08, 2023 at 02:13:23PM +0000, Drew Adams wrote:
>   "you can just use a regular bookmark instead, but then you must name the bookmark, and then the bookmark clutters up your list of bookmarks. What I want is to be able to store an anonymous bookmark in a register, which is handy if you only need a bookmark for a little while."
> 
> FWIW, Bookmark+ autonamed bookmarks take care of not needing to provide bookmark names etc.  And bookmarks can be temporary.

Thank you. I think, looking bookmark+ over, I would still rather use the solution I've already coded, which seems slightly more convenient. With bookmark+, you would not need to confirm a bookmark name, but you would still need later to figure out what was the correct bookmark name to jump to, as opposed to just remembering "I always put that last bookmark I need in register 1". It does look like bookmark+ has a temporary bookmark functionality, but you either have to consciousless enable it / disable it for individual bookmarks, or go into a special mode. That being said, if I hadn't already coded the register functions that work great for me, I think I would explore bookmark+ a little more.

I certainly don't mean to create a ton of work for other people — my thought was just that if it was pretty easy for me to figure out how to store a bookmark in a register, then maybe an emacs dev with all the knowledge of patch-making and proper naming and such could add the functionality easily. Due to my life time-constraints, I don't think I'd be able to dive more deeply into for another four or five months at least. One part that I also was unsure about was creating the proper CL method so that `list-registers' properly displays the register value when a bookmark is stored in it — maybe that is something that would be trivial to somebody else.

-- 
Christopher Howard



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [External] : Re: Bookmarks in registers
  2023-06-08 15:41     ` Christopher Howard
@ 2023-12-18  5:57       ` Karl Fogel
  0 siblings, 0 replies; 5+ messages in thread
From: Karl Fogel @ 2023-12-18  5:57 UTC (permalink / raw)
  To: Christopher Howard; +Cc: Drew Adams, Philip Kaludercic, emacs-devel@gnu.org

On 08 Jun 2023, Christopher Howard wrote:
>Thank you. I think, looking bookmark+ over, I would still rather 
>use
>the solution I've already coded, which seems slightly more
>convenient. With bookmark+, you would not need to confirm a 
>bookmark
>name, but you would still need later to figure out what was the
>correct bookmark name to jump to, as opposed to just remembering 
>"I
>always put that last bookmark I need in register 1". It does look 
>like
>bookmark+ has a temporary bookmark functionality, but you either 
>have
>to consciousless enable it / disable it for individual bookmarks, 
>or
>go into a special mode. That being said, if I hadn't already 
>coded the
>register functions that work great for me, I think I would 
>explore
>bookmark+ a little more.
>
>I certainly don't mean to create a ton of work for other people — 
>my
>thought was just that if it was pretty easy for me to figure out 
>how
>to store a bookmark in a register, then maybe an emacs dev with 
>all
>the knowledge of patch-making and proper naming and such could 
>add the
>functionality easily. Due to my life time-constraints, I don't 
>think
>I'd be able to dive more deeply into for another four or five 
>months
>at least. One part that I also was unsure about was creating the
>proper CL method so that `list-registers' properly displays the
>register value when a bookmark is stored in it — maybe that is
>something that would be trivial to somebody else.

I think it's an interesting idea and would be a convenience for 
some people!  Have you found yourself using this much?

The hard part here is not the coding itself.  Indeed, Philip 
Kaludercic's follow-up to your original post basically showed the 
code :-).  The real task is deciding exactly how/where this would 
fit into existing bookmark and register functionality (e.g., would 
it imply any other changes?), where the code would live (in 
bookmark.el?  in register.el?), what Info pages and other 
documentation would need to be updated, whether there should be 
keybindigs and if so what they should be, etc.

By the way, the original thing you linked to 
(https://gem.librehacker.com/gemlog/starlog/20230607-0.gmi) 
appears to be gone now.  All my understanding of the proposal 
comes from this email thread, therefore, in particular Philip 
Kaludercic's follow-up.

Best regards,
-Karl



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-18  5:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07 21:28 Bookmarks in registers Christopher Howard
2023-06-08  6:44 ` Philip Kaludercic
2023-06-08 14:13   ` [External] : " Drew Adams
2023-06-08 15:41     ` Christopher Howard
2023-12-18  5:57       ` Karl Fogel

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.