emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Stefan Reichör" <stefan@xsteve.at>
To: emacs-orgmode@gnu.org
Subject: Use (org-entry-properties) in a mode derived from org-mode
Date: Wed, 31 Aug 2011 15:05:43 +0200	[thread overview]
Message-ID: <m0ei01spco.fsf@ge-research.com> (raw)

Hi!

I'd like to derive a mode from org-mode.

I do something like this:

(define-derived-mode derived-org-mode org-mode "dorg" "derived org-mode"
  (message "derived-org-mode activated")
  )

When I activate the derived-org-mode, M-: (org-entry-properties) does no longer work.

Using org-mode it works.

When I use derived-mode-p in org-mode-p everything works:


(defsubst org-mode-p ()
  "Check if the current buffer is in Org-mode or a derived mode."
  ;;(eq major-mode 'org-mode))
  (if (derived-mode-p 'org-mode) t nil))


I think changing org-mode-p should be the correct change to make
deriving from org-mode work.

Perhaps a (if (symbolp 'derived-mode-p) ...) is necessary to avoid
compatibility problems.

What do the org developers think of this improvement?


Stefan.

             reply	other threads:[~2011-08-31 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 13:05 Stefan Reichör [this message]
2011-09-01 12:15 ` Use (org-entry-properties) in a mode derived from org-mode Stefan Reichör

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0ei01spco.fsf@ge-research.com \
    --to=stefan@xsteve.at \
    --cc=emacs-orgmode@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).