From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: automatic tangle Date: Wed, 11 Jan 2012 21:37:29 +0100 Message-ID: <807h0y6kmu.fsf@somewhere.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Andr=C3=A1s, Andr=C3=A1s Major wrote: >> I have the impression it's already there: if you edit your code directly= in >> the Org buffer, without opening an indirect buffer, the only thing you h= ave to >> do is: > > That's precisely what I want to avoid. I'd like to use the > language-specific indentation and highlighting using the indirect > buffer. Basically, what I'm after is a quick keyboard command that > tangles the entire file while I'm in the indirect buffer. I do have: - language-specific indentation and - highlighting in the Org buffer itself... Just put this in your .emacs file: #+begin_src emacs-lisp ;; fontify code in code blocks (setq org-src-fontify-natively t) ;; preserve spaces and `tab' characters in source code blocks (setq org-src-preserve-indentation t) ;; same effect for `tab' as in the language major mode buffer (setq org-src-tab-acts-natively t) #+end_src >> Another option is the opposite: edit in your tangled file, and untangle = when >> you feel it's the right time. > > I don't think that's practical, since each file can be built up from > several code blocks. That's not a problem: if you turn on the "comments", you'll see every chunk= ed delimited in the tangled buffer. > In any case, it would be too easy to lose code that way by accidentally > tangling while there are changes in the source code file. If you play within both files, yes, that's a real potential danger. Best regards, Seb --=20 Sebastien Vauban