From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs registers above 255 Date: Wed, 19 May 2010 13:18:33 -0400 Message-ID: References: <87sk5ohtt4.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274289557 830 80.91.229.12 (19 May 2010 17:19:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 May 2010 17:19:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 19 19:19:16 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OEmuu-0004bS-8W for ged-emacs-devel@m.gmane.org; Wed, 19 May 2010 19:19:16 +0200 Original-Received: from localhost ([127.0.0.1]:42493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEmuo-0007vk-CL for ged-emacs-devel@m.gmane.org; Wed, 19 May 2010 13:18:42 -0400 Original-Received: from [140.186.70.92] (port=46508 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEmuj-0007uO-0H for emacs-devel@gnu.org; Wed, 19 May 2010 13:18:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEmuh-0007rC-0l for emacs-devel@gnu.org; Wed, 19 May 2010 13:18:36 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:26082 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEmug-0007qx-Ul for emacs-devel@gnu.org; Wed, 19 May 2010 13:18:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJ6680tMCpz0/2dsb2JhbACddXK+YoUQBINfiFA X-IronPort-AV: E=Sophos;i="4.53,264,1272859200"; d="scan'208";a="64576736" Original-Received: from 76-10-156-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.156.244]) by ironport2-out.pppoe.ca with ESMTP; 19 May 2010 13:18:33 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4FFC57F40; Wed, 19 May 2010 13:18:33 -0400 (EDT) In-Reply-To: <87sk5ohtt4.fsf@gmail.com> (=?utf-8?B?IsWgdMSbcMOhbiBOxJtt?= =?utf-8?B?ZWMiJ3M=?= message of "Wed, 19 May 2010 16:04:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:124947 Archived-At: > 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