Hi András,

András 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 have 
>> 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)

>> 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 chunked
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,

Sebastien Vauban

Reply via email to