From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: special-mode buffer changes to fundamental when modified Date: Thu, 20 Oct 2016 17:33:25 +0200 Message-ID: <87twc79gsa.fsf@web.de> References: <87wph3n4d7.fsf@jupiter.lan> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476978976 22700 195.159.176.226 (20 Oct 2016 15:56:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2016 15:56:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Stefan Huchler Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 20 17:56:11 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxFh1-0002Cg-Oi for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 17:55:43 +0200 Original-Received: from localhost ([::1]:55758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxFh3-0000TV-US for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Oct 2016 11:55:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxFLj-0004q8-Kc for help-gnu-emacs@gnu.org; Thu, 20 Oct 2016 11:33:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxFLg-0006xM-FJ for help-gnu-emacs@gnu.org; Thu, 20 Oct 2016 11:33:43 -0400 Original-Received: from mout.web.de ([217.72.192.78]:50882) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxFLg-0006wN-6C for help-gnu-emacs@gnu.org; Thu, 20 Oct 2016 11:33:40 -0400 Original-Received: from drachen.dragon ([90.186.0.90]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LlWGZ-1cYESQ0Tw7-00bJzK; Thu, 20 Oct 2016 17:33:33 +0200 In-Reply-To: <87wph3n4d7.fsf@jupiter.lan> (Stefan Huchler's message of "Thu, 20 Oct 2016 04:25:40 +0200") X-Provags-ID: V03:K0:oPXlBY11tzfnXwt2dasngQc4fyVbAStvshsu3EUW1UebJhyZXLC oW8Br529Q7QCC7ER+FZaJcxgNPfe/Z+GUqUPXy/3NRp6tcQSXEsE/D9HGV6R0c/LU+F5uSz hle0x5llMISP5u19WhBqWWZHB8gJZWwzLD1YqT1A0HfKAVU7uv/A7VYoyOx9E0md4v3l8sx AF8j0RKvTjCV0MzXmsyJw== X-UI-Out-Filterresults: notjunk:1;V01:K0:oP05ub97pIs=:keI2ejrafhWvuwv5yXry4D ZavkkgCvPpmcPmQnLj/d0YojH9DEYAL/Q2lx042+CmPxorgpoFGv0ic62NRtPzjU7oQkD7n7C 7lSuunwkwVj8v4VmJSKF+IkWgXRPTZDny14MA03lpNot0DSFa4QQbZp0PDKxRBdWg6wCtMaRm 26hcLAWy/3jyNtqOtodWx92EENNZaGcftBBu1ZK4diGV7XFTriK4VbWkx7c4IslGx5yNIbePK UWhYn/tVKTYYpV+hx0TRb8SBS4Z7saTcSfUo6ujrBnHVlcmWbOzKxJTvAX0cSJpibfDkv2p2V 8mP2cHegAPe9ae0Vp3FoGYSkw7gvKLF1PaPy7w0wir8h9L/B8Ke1js9Q1nX6xtOs3LM8ma50a 1v0M50ib0zroZuFqH8jAPG2R5VG+/l2QaYSxfnIqZ8sme10srfpuOh4UOoumZfllfgsl6egv3 PZUhmw0J2UyR/h4ZCNmVTPqPO+ITN4TorN+/O6WlLyQwAzig1A7qatiuIOpudqIEuaEx6GukP XED6bm/QeLwxrcdbub2qFXj2awrvUv7swtu/6hDvkCDajAEXjsipdeAjpimFxNoSq7sM8tLo2 ZXCiBkvsTn12YnLCVjHvq3kc42LJ15adcEY5hoEiWCuZ6pFUVmxw5fOkUso2d4o+msP88kbm4 ilnGkTt2HnotZ8EVibWjKf6naVcXF/8vsKzLipss8ZLKpZu6EDOvTPMA7vxyl5dZvTyPqnCTe HEMnWnZQ0hHBycOkWRolj6WPdJSFNQ2wISYrSk+6KHLNlwM20IdTzo6X4sMMG6884jJwU8SR X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.78 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:111577 Archived-At: Stefan Huchler writes: > I try something like that: > > > (define-derived-mode foo-mode special-mode "foo" > > (with-current-buffer-window "*foo*" nil nil > (print (concat "...:\n" > (substitute-command-keys > "\\{foo-mode-map}") )) > ) > ) That looks very strange. A mode definition should not make a particular buffer current. It should work in any (current) buffer where the mode is enabled. > but then its no special mode buffer anymore, and it overwrites my > keymaps. Without the with-current-buffer-window macro it works it > supposed to be but the buffer is empty. Hard to guess what you want to do. Maybe you confuse `print' with `insert' or something else? > I tried I think most with- macros and nothing worked, not very obvious > for me how to write stuff in a special buffer. In Emacs, trial and error doesn't work most of the time, you'll get always "error" ;-) Michael.