From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Deriving mode from org-mode Date: Tue, 15 Feb 2011 05:11:18 +0100 Message-ID: <877hd2q6mx.fsf@gnu.org> References: <4D584BE5.2050401@0x63.nu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=50921 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpCFw-0002Gh-KD for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 23:11:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpCFv-0003KU-5k for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 23:11:16 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:39235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpCFu-0003KO-Td for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 23:11:15 -0500 Received: by wwb17 with SMTP id 17so5666029wwb.30 for ; Mon, 14 Feb 2011 20:11:14 -0800 (PST) In-Reply-To: <4D584BE5.2050401@0x63.nu> (Anders Waldenborg's message of "Sun, 13 Feb 2011 22:23:49 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Anders Waldenborg Cc: emacs-orgmode@gnu.org Hi Anders, Anders Waldenborg writes: > isn't creating a new major mode derived from org-mode supported? Yes it is... > I guess that part of the problem is that org-mode-p doesn't use > derived-mode-p. (org-mode-p) does the advertized job: checking whether we are in org-mode major mode. It would be confusing to also check against org derived modes, at least with that function's name. > For example: > (define-derived-mode org-derived-mode org-mode "Org-Derived") > > and then create a new buffer using org-derived-mode and enter a source > block, like this: > > #+BEGIN_SRC emacs-lisp > #+END_SRC > > and do org-edit-special (C-c ') in that buffer. When finishing editing > one gets this message: > "org-edit-src-exit: This is not a sub-editing buffer, something is > wrong" Fixed, I corrected this directly in `org-edit-src-code', allow source code to be edited from org-mode derived modes. Can you share what kind of derived mode you're writing? What for? Thanks, -- Bastien