From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Why is this-command-keys missing? Date: Sun, 2 Jan 2011 03:38:51 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1293935966 2238 80.91.229.12 (2 Jan 2011 02:39:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 2 Jan 2011 02:39:26 +0000 (UTC) Cc: Emacs-Devel devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 02 03:39:21 2011 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 1PZDqq-0004bw-GL for ged-emacs-devel@m.gmane.org; Sun, 02 Jan 2011 03:39:20 +0100 Original-Received: from localhost ([127.0.0.1]:56839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZDqp-00016e-Pk for ged-emacs-devel@m.gmane.org; Sat, 01 Jan 2011 21:39:19 -0500 Original-Received: from [140.186.70.92] (port=60071 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZDql-00016I-2W for emacs-devel@gnu.org; Sat, 01 Jan 2011 21:39:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZDqk-0002LJ-0S for emacs-devel@gnu.org; Sat, 01 Jan 2011 21:39:14 -0500 Original-Received: from mail-ew0-f41.google.com ([209.85.215.41]:33981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZDqj-0002LA-Pi for emacs-devel@gnu.org; Sat, 01 Jan 2011 21:39:13 -0500 Original-Received: by ewy27 with SMTP id 27so6600623ewy.0 for ; Sat, 01 Jan 2011 18:39:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=9Hx/TER+ZkpIsMmXV4DpxLmnzh5jHYaJJ1nU7TqG6t0=; b=Gfm2aVob1tYyih6ApstghojyyEZHwZM6whYeUq24UC+R375t4Yjckyl0BTe+YsIFLz msaHaYGVNkrno6BNseCGXFVw6DdJ2FuDlJ/FzwQ26qS/kBTreN1BD1xojUBMOhQt0+Je zy9CAemD+lMzYC/zXQv2nvyCtPLOM85zMDEZQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=YTnvkk7pTcZFuIC5/+i9QJ6Q3DQqWHWuZ/E1cjzD7wZH9rD/WxiuZ+HxOGsSDyhwq3 blOYxsuEtuIOFOBkf2lH4Ps4Xs0YMzvoGg8HVFJSUyMyATun943hMaoZFwOalt0PZGNu 7kKclMW+waJCMT3YiiEOfyu6N5hW+eKL1WVfg= Original-Received: by 10.213.28.12 with SMTP id k12mr3933224ebc.84.1293935952890; Sat, 01 Jan 2011 18:39:12 -0800 (PST) Original-Received: by 10.213.20.148 with HTTP; Sat, 1 Jan 2011 18:38:51 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:134145 Archived-At: On Sun, Jan 2, 2011 at 2:57 AM, Stefan Monnier w= rote: >> =C2=A0 =C2=A0 (define-key map "\t" 'compilation-next-error) >> However if you hit TAB then this-command-keys will contain (something >> similar to) TAB and not "\t". > > For me it does return "\t". > >> =C2=A0 =C2=A0(key-binding (this-command-keys) t) >> to get back the binding that is really active, i.e. compilation-next-err= or. > > It does sound like you're trying to do something that's > fundamentally unreliable. =C2=A0Can you explain in more detail why you wa= nt > to know "the binding that is really active"? I am trying to use orgstruct-mode for a compilation output buffer. orgstruct-mode binds keys like this: ;; Special treatment needed for TAB and RET (org-defkey orgstruct-mode-map [(tab)] (orgstruct-make-binding 'org-cycle 102 [(tab)] "\C-i")) (org-defkey orgstruct-mode-map "\C-i" (orgstruct-make-binding 'org-cycle 103 "\C-i" [(tab)])) This is to make it possible to use TAB for cycling the outlines when on outline headings. However I would like to get back the normal TAB handling in the compilaiton output buffer when not on an outline heading. However it is a little bit more complicated than that. I bind the key C-i in an emulation mode map. This now gets called when TAB is hit. I am trying to find out what was really hit.