From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Different key maps in different dired buffers Date: Thu, 26 May 2016 07:03:16 -0700 (PDT) Message-ID: <4159df5c-3545-4c5a-829f-abc80f620813@default> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1464271457 32289 80.91.229.3 (26 May 2016 14:04:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 May 2016 14:04:17 +0000 (UTC) To: Whitfield Diffie , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 26 16:04:04 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1b5vtJ-000389-Iw for geh-help-gnu-emacs@m.gmane.org; Thu, 26 May 2016 16:04:01 +0200 Original-Received: from localhost ([::1]:38577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5vtI-0003Ta-SK for geh-help-gnu-emacs@m.gmane.org; Thu, 26 May 2016 10:04:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5vst-0003Sb-Bt for help-gnu-emacs@gnu.org; Thu, 26 May 2016 10:03:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5vsp-0008Hu-Dy for help-gnu-emacs@gnu.org; Thu, 26 May 2016 10:03:35 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:43737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5vsp-0008F5-5C for help-gnu-emacs@gnu.org; Thu, 26 May 2016 10:03:31 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u4QE3MIb029769 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 May 2016 14:03:23 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u4QE3LE4025513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 26 May 2016 14:03:21 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u4QE3HCn003083; Thu, 26 May 2016 14:03:20 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110122 Archived-At: > The function local-set-key seems to be local to major mode, not > local to an individual buffer. Can anyone tell me how to set keys to > special functions in only some dired buffers? In addition to what others have said, which answers your question, I'd ask what you really want to do. In particular, are you trying to do something different for a given class (subset, kind) of Dired buffers, or just arbitrary different Dired buffers. If the former, then consider defining a submode, i.e., a mode that inherits from Dired mode but has its own keymap and possibly does things a bit differently. You can do this with a major mode or a minor mode. But if there is no way to recognize a Dired buffer that you might want to have different key bindings for, then this approach would not apply. In that case, the Dired buffers you want to do this in/for are, in effect, arbitrary.