Hi,
I'd like to switch from outline-minor-mode to orgstruct-mode for various
programming language files. So for example shell scripts (sh-mode) a
headline looks like
#* Foobar
The fontlocking works for such headlines.
Now I've found out that org-context-p won't return t for that line, and
thus no org-mode command will be executed. So I've redefined
org-context-p to this version:
--8<---------------cut here---------------start------------->8---
(defun org-context-p (&rest contexts)
"Check if local context is and of CONTEXTS.
Possible values in the list of contexts are `table', `headline', and `item'."
(let ((pos (point))
(comment-starter (replace-regexp-in-string "[ ]+$" "" (or comment-start
""))))
(goto-char (point-at-bol))
(prog1 (or (and (memq 'table contexts)
(looking-at (concat comment-starter "?[ \t]*|")))
(and (memq 'headline contexts)
(looking-at (concat comment-starter "?\\*+")))
(and (memq 'item contexts)
(looking-at (concat comment-starter "?[ \t]*\\([-+*]
\\|[0-9]+[.)] \\)"))))
(goto-char pos))))
--8<---------------cut here---------------end--------------->8---
Now it does return t for headlines like above, but still no org-mode
command is issued.
What do I have to do to get that working correctly?
Bye,
Tassilo
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode