From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.devel Subject: Re: Is `kbd' idempotent? Date: Mon, 30 Nov 2015 16:24:05 +0000 (UTC) Message-ID: References: <87a8pvqzij.fsf@web.de> <87bnabv6m6.fsf@fencepost.gnu.org> <87610jqxx6.fsf@web.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448900787 3486 80.91.229.3 (30 Nov 2015 16:26:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2015 16:26:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 30 17:26:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3RHK-0000Ry-Br for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2015 17:26:14 +0100 Original-Received: from localhost ([::1]:41859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3RHE-0001Nc-Ln for ged-emacs-devel@m.gmane.org; Mon, 30 Nov 2015 11:26:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3RFd-0006Tb-8F for emacs-devel@gnu.org; Mon, 30 Nov 2015 11:24:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3RFY-000853-BU for emacs-devel@gnu.org; Mon, 30 Nov 2015 11:24:29 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:49214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3RFY-00084T-55 for emacs-devel@gnu.org; Mon, 30 Nov 2015 11:24:24 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a3RFP-0005Yf-FB for emacs-devel@gnu.org; Mon, 30 Nov 2015 17:24:15 +0100 Original-Received: from c-68-39-146-59.hsd1.in.comcast.net ([68.39.146.59]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Nov 2015 17:24:15 +0100 Original-Received: from random832 by c-68-39-146-59.hsd1.in.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Nov 2015 17:24:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 19 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: slrn/pre1.0.3-7 (Linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195622 Archived-At: On 2015-11-30, Michael Heerdegen wrote: > Mmh, maybe it should better ask: if KEYS is a string that describes a > key sequence in any format that Emacs understands, or in the format that > is used for keyboard macros, and I call `kbd' on it, is the result > always a representation of same key sequence? The docstring of `kbd' > leaves open what it does with formats different from the keyboard macro > format. Or is there any test that I could use to decide whether KEYS is > in the keyboard macro format? What exactly do you define as "any format that Emacs understands" - do you want to allow backslash-escapes (even though no characters requiring such are used in keyboard macro format)? Control characters typed directly with C-q? A vector literal such as "[?\\M-x]" representing [134217848]? The string "(kbd \"foo\")"? Emacs understands all of these. Basically, what other formats, specifically, do you want to accept? What formats do you think your documentation will cause your users to be inclined to type?