From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hopsing K Subject: org mode in multi-mode Date: Sat, 1 Jan 2011 19:39:45 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0623483489==" Return-path: Received: from [140.186.70.92] (port=35872 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZ6Mn-00036x-66 for emacs-orgmode@gnu.org; Sat, 01 Jan 2011 13:39:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZ6Ml-0000BM-SM for emacs-orgmode@gnu.org; Sat, 01 Jan 2011 13:39:49 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:51015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZ6Ml-0000BF-O9 for emacs-orgmode@gnu.org; Sat, 01 Jan 2011 13:39:47 -0500 Received: by wwi18 with SMTP id 18so13001655wwi.0 for ; Sat, 01 Jan 2011 10:39:46 -0800 (PST) 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: emacs-orgmode@gnu.org --===============0623483489== Content-Type: multipart/alternative; boundary=0016e6de03be233d350498cd3ec2 --0016e6de03be233d350498cd3ec2 Content-Type: text/plain; charset=ISO-8859-1 I am trying to use org-mode and c-mode together with using the Two-Mode-Mode (http://www.emacswiki.org/cgi-bin/wiki/MultipleModes). I'd like to embed org-mode comments inside a c file, using org-mode for commenting c code, something that would be quite useful I thought. something like this ------- /* * Description ** TODO write */ int func1() { int i = 0; } ------ The two-mode-mode.el defines the default mode to be c-mode and the .. chunks to be org-mode. The problem now is that the * headers will fold past the marker. My question is: - is there another multi-mode that works with org - is there a #break style tag in org-mode that lets me define a section end: i.e.: * Description ** TODO write #break This belongs to Description. #break not folded Where I can define a subsection to end. When I then for instance TAB on "** TODO write" only the ** TODO write #break will fold. If I TAB on "* Description" only the part up till "not folded" will fold. -- Greetings Konrad --0016e6de03be233d350498cd3ec2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am trying to use org-mode and c-mode together with using the
Two-Mode= -Mode (http= ://www.emacswiki.org/cgi-bin/wiki/MultipleModes). I'd like to embed= org-mode comments
inside a c file, using org-mode for commenting c code,
something that wo= uld be quite useful I thought.
something like this
-------
/*<o= rg>
* Description
=A0 ** TODO write
=A0
</org>*/
int func1() {
=A0 int i =3D 0;
}
------
The two-mode-mode.el de= fines the default mode to be
c-mode and the <org>..</org> c= hunks to be org-mode.
The problem now is that the * headers will fold pa= st the
</org> marker. My question is:
=A0- is there another multi-mode th= at works with org
=A0- is there a #break style tag in org-mode that
= =A0=A0 lets me define a section end: i.e.:
=A0=A0 <org>
=A0=A0 * Description
=A0=A0 =A0=A0 ** TODO write
=A0=A0=A0=A0=A0 #break
=A0=A0=A0=A0=A0 This belongs to Description.
= =A0=A0 #break
=A0 not folded
=A0=A0 </org>
=A0
=A0 Where I can define a subsection to end. When I = then for instance TAB on "** TODO write" only the
=A0=A0 =A0= =A0 ** TODO write
=A0=A0=A0=A0=A0 #break
will fold. If I TAB on "* Description" only the part up till &quo= t;not folded" will fold.


-- Greetings Konrad
=A0

=A0



--0016e6de03be233d350498cd3ec2-- --===============0623483489== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0623483489==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hopsing K Subject: RE: org mode in multi-mode Date: Sun, 2 Jan 2011 20:42:12 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001485f1e46a5155150498e23bf9 Return-path: Received: from [140.186.70.92] (port=44787 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZTom-0005K1-O3 for emacs-orgmode@gnu.org; Sun, 02 Jan 2011 14:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZTok-0008LE-Jg for emacs-orgmode@gnu.org; Sun, 02 Jan 2011 14:42:15 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:34334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZTok-0008Kr-DK for emacs-orgmode@gnu.org; Sun, 02 Jan 2011 14:42:14 -0500 Received: by wwb17 with SMTP id 17so13304535wwb.30 for ; Sun, 02 Jan 2011 11:42:13 -0800 (PST) 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: emacs-orgmode@gnu.org --001485f1e46a5155150498e23bf9 Content-Type: multipart/alternative; boundary=001485f1e46a51550c0498e23bf7 --001485f1e46a51550c0498e23bf7 Content-Type: text/plain; charset=ISO-8859-1 Appended is a patch to implement kind of a "break" on a child entry: -- a.org --- a a * s1 b b * # c c ----------- When doing a TAB on "* s1" only the "b" section will fold. "* #" (a heading with name "#") is implemented as a child that is made visible by default when when unfolding. It is also shown by default when cycling globally. Works at all sublevels. -- Greetings Konrad --001485f1e46a51550c0498e23bf7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Appended is a patch to implement kind of a "break" on
a child = entry:

-- a.org ---
a
a
* s1b
b
* #
c
c
-----------

When doing a TAB on "*= s1" only the "b" section will fold.
"* #" (a heading with name "#") is implemented as a child that is made visible by default when when unfolding.
It is also s= hown by default when cycling globally.=A0
Works at all sublevels.

-- Greetings Konrad

--001485f1e46a51550c0498e23bf7-- --001485f1e46a5155150498e23bf9 Content-Type: text/x-patch; charset=US-ASCII; name="e.diff" Content-Disposition: attachment; filename="e.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gigci8p00 LS0tIGVtYWNzLTIzLjIvbGlzcC9vcmcvb3JnLmVsCTIwMTAtMDQtMDQgMDA6MjY6MDguMDAwMDAw MDAwICswMjAwCisrKyBzcmMvYzUxL21rL29yZy5lbAkyMDExLTAxLTAyIDIwOjI2OjEwLjI2Njg2 MDgyNyArMDEwMApAQCAtNTI0NSw2ICs1MjQ1LDggQEAKIChkZWZ1biBvcmctY3ljbGUtaW50ZXJu YWwtbG9jYWwgKCkKICAgIkRvIHRoZSBsb2NhbCBjeWNsaW5nIGFjdGlvbi4iCiAgIChvcmctYmFj ay10by1oZWFkaW5nKQorICAoY29uZCAKKyAgICgobm90IChsb29raW5nLWF0IChjb25jYXQgb3V0 bGluZS1yZWdleHAgIlxzKiMiICkpKQogICAobGV0ICgoZ29hbC1jb2x1bW4gMCkgZW9oIGVvbCBl b3MgbGV2ZWwgaGFzLWNoaWxkcmVuIGNoaWxkcmVuLXNraXBwZWQpCiAgICAgOzsgRmlyc3QsIHNv bWUgYm91bmRhcmllcwogICAgIChzYXZlLWV4Y3Vyc2lvbgpAQCAtNTMxOCw3ICs1MzIwLDcgQEAK ICAgICAgIChoaWRlLXN1YnRyZWUpCiAgICAgICAobWVzc2FnZSAiRk9MREVEIikKICAgICAgIChz ZXRxIG9yZy1jeWNsZS1zdWJ0cmVlLXN0YXR1cyAnZm9sZGVkKQotICAgICAgKHJ1bi1ob29rLXdp dGgtYXJncyAnb3JnLWN5Y2xlLWhvb2sgJ2ZvbGRlZCkpKSkpCisgICAgICAocnVuLWhvb2std2l0 aC1hcmdzICdvcmctY3ljbGUtaG9vayAnZm9sZGVkKSkpKSkpKQogCiA7OzsjIyNhdXRvbG9hZAog KGRlZnVuIG9yZy1nbG9iYWwtY3ljbGUgKCZvcHRpb25hbCBhcmcpCi0tLSBlbWFjcy0yMy4yL2xp c3Avb3V0bG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xpbmUtcmVnZXhwICJccyoj IiApKQorCQkgICAocHJvZ24KKwkJICAgICAob3V0bGluZS1zaG93LWhlYWRpbmcgKQorCQkgICAg IChzaG93LWVudHJ5ICkpCisJCSAgIChvdXRsaW5lLXNob3ctaGVhZGluZykpKSkKICAgICAgICAo cG9pbnQpCiAgICAgICAgKHByb2duIChvdXRsaW5lLWVuZC1vZi1zdWJ0cmVlKQogCSAgICAgIChp ZiAoZW9icCkgKHBvaW50LW1heCkgKDErIChwb2ludCkpKSkpKSkK --001485f1e46a5155150498e23bf9 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --001485f1e46a5155150498e23bf9--