From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Embedding org-syntax in program source Date: Tue, 13 Apr 2010 10:47:15 -0600 Message-ID: <87zl17guzw.fsf@gmail.com> References: <871vejjsps.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1jGs-0006d7-5I for emacs-orgmode@gnu.org; Tue, 13 Apr 2010 12:47:30 -0400 Received: from [140.186.70.92] (port=36577 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1jGo-0006aZ-1L for emacs-orgmode@gnu.org; Tue, 13 Apr 2010 12:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1jGl-0007cZ-Ly for emacs-orgmode@gnu.org; Tue, 13 Apr 2010 12:47:25 -0400 Received: from mail-bw0-f223.google.com ([209.85.218.223]:63475) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1jGl-0007cH-Cv for emacs-orgmode@gnu.org; Tue, 13 Apr 2010 12:47:23 -0400 Received: by bwz23 with SMTP id 23so3860681bwz.26 for ; Tue, 13 Apr 2010 09:47:22 -0700 (PDT) In-Reply-To: (LanX's message of "Tue, 13 Apr 2010 17:40:25 +0200") 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: LanX Cc: emacs-orgmode@gnu.org LanX writes: > Oops, forgot to reply to the list... 8-| .. > > ---------- Forwarded message ---------- > > Thanks Eric, > > > see this thread http://thread.gmane.org/gmane.emacs.orgmode/7957, as I >> recall basically it's possible to get most org-like behavior using >> orgstruct-mode, but many are continually frustrated by the remaining >> missing 20% of behavior. >> > > Hmm, for what I read it's NOT easily possible, Tassilo switched back to > outline-minor-mode. > > > >> >> > I know of org-babel, but the code produced is no legal Lisp/Perl code >> > anymore... >> >> could you please elaborate, >> ... >> >> I'm currently using Org-babel to write code in a variety of programming >> languages, and I've had no problems running the tangled code. >> > > Thats the point you have to tangle the code and furthermore you have to run > emacs to tangle it. > > The file as such is not a legal Perl code anymore because of lines starting > with a "*". > (never actually worked with babel, but thats what I read from the docs) > Ah, I see, I was worried that you were having a problem with tangling. Maybe there is some way to hide the org-mode wrappings with "heredoc" style lines (I'm not very familiar with perl, but I hear it is very flexible about the syntax in source-code files). Maybe something like =for comment org-mode text * headlines etc... #+begin_src perl =cut =for comment #+end_src more org-mode... > > And relying on an extra step for code generation is dangerous... > > This is for sure acceptable with elisp or multilanguage projects. > Certainly tangling is an extra step, and as a matter of taste not something many people will want to use, but I wouldn't say it's dangerous. I tangle in a couple of very real very large single-language projects (sometimes with the same code tangling to run on different platforms) and find it reliable. > > Anyway I think, I will do some experiments with using a Code Filter in >Perl > which eliminates the org-code. (thats a filter run at execution-time > changing the source before it's fed into the compiler) > Good luck, if you find a workable solution, I'm sure there'd be interest to hear about it here. Best -- Eric > > Cheers > Rolf > > PS: I forgot to mention that when switching to other modes the highlighting > will also get confused and fly-make will report plenty of syntax problems. > _______________________________________________ > 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