From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Huchler <stefan.huchler@mail.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: special-mode buffer changes to fundamental when modified
Date: Thu, 20 Oct 2016 17:33:25 +0200 [thread overview]
Message-ID: <87twc79gsa.fsf@web.de> (raw)
In-Reply-To: <87wph3n4d7.fsf@jupiter.lan> (Stefan Huchler's message of "Thu, 20 Oct 2016 04:25:40 +0200")
Stefan Huchler <stefan.huchler@mail.de> 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.
next prev parent reply other threads:[~2016-10-20 15:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 2:25 special-mode buffer changes to fundamental when modified Stefan Huchler
2016-10-20 15:33 ` Michael Heerdegen [this message]
2016-10-20 16:34 ` Stefan Huchler
2016-10-21 10:58 ` Michael Heerdegen
2016-10-22 0:15 ` Stefan Huchler
2016-10-23 11:41 ` Michael Heerdegen
2016-10-23 12:58 ` Stefan Huchler
2016-10-23 16:24 ` Michael Heerdegen
2016-10-23 16:47 ` Stefan Huchler
2016-10-27 16:59 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twc79gsa.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=help-gnu-emacs@gnu.org \
--cc=stefan.huchler@mail.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).