Re: [Orgmode] org-babel: load-path question and indentation of blocks

2009-09-17 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Sebastian Rose sebastian_r...@gmx.de writes:

 Hi Dan and Eric,


 I'm an org-babel fan now :)


 Here are two little things I noticed and that I want to discard from my
 todo list.


 * load-path

   Why is load modified only temporarily in org-babel-init.el?

   Wouldn't this here make sense?


 Yes, I originally wasn't sure about load-path etiquette so I was
 hesitant to change the user's load path.  However I suppose it is better
 to change the load path, then to force the user to manually add the
 babel/lisp/langs directory.  Your patch is now applied (org-babel adds
 it's lisp directories to the user's load path).


Hi Eric,


sorry for the bull shit I've sent before (the load-path patch) :-/

I saw you did the right think anyway. Thanks!


Best wishes,

  Sebastian


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-babel: load-path question and indentation of blocks

2009-09-16 Thread Sebastian Rose
Hi Dan and Eric,


I'm an org-babel fan now :)


Here are two little things I noticed and that I want to discard from my
todo list.


* load-path

  Why is load modified only temporarily in org-babel-init.el?

  Wouldn't this here make sense?

diff --git a/contrib/lisp/org-babel-init.el b/contrib/lisp/org-babel-init.el
index c2e4211..1cd1a30 100644
--- a/contrib/lisp/org-babel-init.el
+++ b/contrib/lisp/org-babel-init.el
@@ -35,11 +35,12 @@
 babel
 (expand-file-name
  .. (file-name-directory (or load-file-name buffer-file-name))
-   
-   (langs-dir (expand-file-name langs babel-dir))
-   (load-path (append
-   (list babel-dir langs-dir)
-   (or load-path nil
+
+   (langs-dir (expand-file-name langs babel-dir)))
+
+  (add-to-list 'load-path (append
+   (list babel-dir langs-dir)
+   (or load-path nil)))
 
   ;; org-babel core
   (require 'cl)

  Users wouldn't have to add the babel/lisp/langs/ directory to the
  load-path `by hand' in that case.




* Evaluation of indented code-blocks

  This is a minor quirk I found.
  If the code block is indented according to the outline, evaluation (C-c C-c)
  does not work:

  #+begin_src sh :results output :exports both
  echo Directory structure:
  tree -d ~/.emacs.d/
  #+end_src

  Error message:

  Debugger entered--Lisp error: (error C-c C-c can do nothing useful
  at this location.)
  ...


  While this works:

#+begin_src sh :results output :exports both
  echo Directory structure:
  tree -d ~/.emacs.d/
#+end_src





Best wishes

   Sebastian
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-babel: load-path question and indentation of blocks

2009-09-16 Thread Eric Schulte
Sebastian Rose sebastian_r...@gmx.de writes:

 Hi Dan and Eric,


 I'm an org-babel fan now :)


 Here are two little things I noticed and that I want to discard from my
 todo list.


 * load-path

   Why is load modified only temporarily in org-babel-init.el?

   Wouldn't this here make sense?


Yes, I originally wasn't sure about load-path etiquette so I was
hesitant to change the user's load path.  However I suppose it is better
to change the load path, then to force the user to manually add the
babel/lisp/langs directory.  Your patch is now applied (org-babel adds
it's lisp directories to the user's load path).


 * Evaluation of indented code-blocks

   This is a minor quirk I found.
   If the code block is indented according to the outline, evaluation (C-c C-c)
   does not work:


ah, thanks, this should now be fixed (please let me know if it isn't)

Thanks! -- Eric


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode