Realmente quiero usar org-mode.¿Cómo puedo usar otros estilos de encabezado como twiki --- + o mediawiki == h2 == en org-mode?
Pero, quiero utilizar org-mode para entender los documentos estructurados que ya se han escrito utilizando una sintaxis diferente título,
por ejemplo, el uso de twiki --- +
---+ H1
Top level
---++ H2
Nested
---+ H1 #2
Second top level
O MediaWiki como
= H1 =
Top level
== H2 ==
Nested
= H1 #2 =
Second top level
me gustaría tener todo de la bondad del plegamiento de org-mode, etc., simplemente usando estos diferentes estilos de título.
En realidad, peor que eso:
me gustaría, por ejemplo, la twiki o en las partidas a mediawaiki tienen prioridad sobre las partidas modo asterisco org. Pero me gustaría tener ambos en uso.
= H1 =
Top level
* this is a list
** nested
* list
** nested
== H2 ==
Nested
= H1 #2 =
Second top level
- + Lo que he intentado hasta ahora
he podido usar el modo de esquema para manejar twiki, por ejemplo a través
---+ Emacs stuff
# try (defvar twiki-outline-regexp "---+\\++ \\|\\(\\(?: \\)+\\)[0-9*] ")
Local Variables: ***
outline-regexp: "^---\\++" ***
org-outline-regexp: "^---\\++" ***
End: ***
Sin embargo, org-outline-regexp no hace lo que yo esperaría.
La función de nivel exterior de emacs 'outline-mode se ve casi exactamente como yo quiero.
(defvar outline-level 'outline-level
"*Function of no args to compute a header's nesting level in an outline.
It can assume point is at the beginning of a header line and that the match
data reflects the `outline-regexp'.")
es decir, en lugar de regexps, una función genérica.
Pero no he logrado que funcione con org-mode. Parece que org-mode realmente no usa esto, o más bien, tiene otras cosas.
;; In Org buffers, the value of `outline-regexp' is that of
;; `org-outline-regexp'. The only function still directly relying on
;; `outline-regexp' is `org-overview' so that `org-cycle' can do its
;; job when `orgstruct-mode' is active.
(defvar org-outline-regexp "\\*+ "
"Regexp to match Org headlines.")
(defconst org-outline-regexp-bol "^\\*+ "
"Regexp to match Org headlines.
This is similar to `org-outline-regexp' but additionally makes
sure that we are at the beginning of the line.")
(defconst org-heading-regexp "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
"Matches an headline, putting stars and text into groups.
Stars are put in group 1 and the trimmed body in group 2.")
De no ser así, bueno, lo principal que quiero de org-mode es enlaces, haciendo otra pregunta aquí How can I "linkify" a non-org-mode buffer in emacs
Su mejor opción es convertir los formatos feos en uno bonito. Pero tal vez puedas jugar con 'org-heading-regexp' lo suficiente para que funcione en uno de los otros modos? – pmr
¿Cuál es el formato feo y cuál es el bonito?; -} // en la pregunta vinculada, tengo una vinculación bastante genérica funcionando. –