unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Barra Ó Catháin via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Thierry Volpiatto <thievol@posteo.net>
Cc: Eli Zaretskii <eliz@gnu.org>, 73308@debbugs.gnu.org
Subject: bug#73308: [PATCH] Add file-to-register and buffer-to-register.
Date: Wed, 18 Sep 2024 03:26:58 +0100	[thread overview]
Message-ID: <87ldzpu26l.fsf@ocathain.ie> (raw)
In-Reply-To: <87jzfamkv2.fsf@posteo.net> (Thierry Volpiatto's message of "Tue,	17 Sep 2024 14:10:41 +0000")


Thanks, Thierry. I'll look into how point-to-register does things and
see if I can improve things alongside. 

Thanks for your time!
-----
Barra

Thierry Volpiatto <thievol@posteo.net> writes:

> One comment about buffer-to-register:
>
> More or less you can have the same with point-to-register, the advantage
> is that when you kill the buffer, the register-alist entry is turned in
> a file-query entry (when buffer is representing a file of course), for
> example from register.el buffer:
>
> C-x r <SPC> RET
>
> register-alist entry:
> (115 . #<marker at 27354 in register.el>)
>
> Now kill the the buffer, the register-alist entry is turned in:
> (115 file-query "/home/thierry/work/emacs/lisp/register.el" 27354)
>
> This is why I guess such functions where never added to register.el.
>
> OTOH they provide an alternative which is easier to find as most users
> don't know about this feature (buffer => file-qurey).
>
> BTW I suggest you use for buffer-to-register an entry something like
> (buffer-name . marker), this way register-swap-out will be able
> to transform it like point-to-register does. Need also to add a add-hook
> call like point-to-register does.





  parent reply	other threads:[~2024-09-18  2:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 23:32 bug#73308: [PATCH] Add file-to-register and buffer-to-register Barra Ó Catháin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-17 12:20 ` Eli Zaretskii
2024-09-17 14:10   ` Thierry Volpiatto
2024-09-17 19:18     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-18  2:51       ` Barra Ó Catháin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-18  2:26     ` Barra Ó Catháin via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-09-18  2:19   ` Barra Ó Catháin via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87ldzpu26l.fsf@ocathain.ie \
    --to=bug-gnu-emacs@gnu.org \
    --cc=73308@debbugs.gnu.org \
    --cc=barra@ocathain.ie \
    --cc=eliz@gnu.org \
    --cc=thievol@posteo.net \
    /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).