all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Štěpán Němec" <stepnem@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs registers above 255
Date: Wed, 19 May 2010 13:18:33 -0400	[thread overview]
Message-ID: <jwvhbm3olus.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87sk5ohtt4.fsf@gmail.com> ("Štěpán Němec"'s message of "Wed, 19 May 2010 16:04:07 +0200")

> according to the documentation, registers are characters up to 255.
> But the actual implementation is very simple and permits storing
> "anything" in `register-alist' using `set-register'; it's just that the
> UI functions use the "c" interactive spec, so you can't really enter
> anything other than a character inputtable without an input method.

> My question is: would you consider it too much of a hack if a package
> used registers above 255 to not clobber the standard registers, but on
> the other hand be able to use the existing infrastructure (my example
> use case would be implementing Vim-compatible registers in an emulation
> package)? 

It would probably be a hack, but it would seem like a fair hack to me.
The main limitation I can see is that the "names" of registers are
compared with `eq', so cons cells wouldn't work too well, but symbols or
negative numbers would work.

This said, I'm not sure why you'd want to use separate registers: I'd
expect it would rather be better if the Vim emulation is integrated with
the rest of Emacs's infrastructure, so being able to set a register with
Vim-emulation and then get it back using Emacs commands would seem like
a desirable feature.


        Stefan



  parent reply	other threads:[~2010-05-19 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 14:04 Emacs registers above 255 Štěpán Němec
2010-05-19 14:15 ` David Kastrup
2010-05-19 17:18 ` Stefan Monnier [this message]
2010-05-20  8:46   ` Štěpán Němec

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=jwvhbm3olus.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=stepnem@gmail.com \
    /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.