[O] Exporting subtree to LaTeX?

2011-09-18 Thread Johan Ekh
Hi all,
is it possible to export a subtree to LaTeX, i.e. not the entire org-file?
I just want a latex file that I later include manually in an existing LaTeX
document.

Best regards,
Johan


Re: [O] Exporting subtree to LaTeX?

2011-09-18 Thread Jambunathan K
Johan Ekh ekh.jo...@gmail.com writes:

 Hi all,
 is it possible to export a subtree to LaTeX, i.e. not the entire
 org-file?
 I just want a latex file that I later include manually in an existing
 LaTeX document.

Hint: Just hit C-c C-e and see what is on offer.

 Best regards,
 Johan



-- 



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-09-18 Thread David Maus
At Sat, 17 Sep 2011 14:56:09 -0600,
Eric Schulte wrote:

 
  F test-ob-sh/dont-error-on-empty-results
  Was throwing an elisp error when shell blocks threw errors and
  (void-function org-babel-execute:sh)
 
  F test-org-babel/inline-src-blocks
  (error No org-babel-execute function for sh!)
 
  F test-org-babel/inline-src_blk-default-results-replace-line-1
  (error No org-babel-execute function for sh!)
 

 It looks like you need to load ob-sh.el.

Yes, (require 'ob-sh) is sufficient to remove these three from the
list of failing tests.

Best,
  -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpGa49QTgzBi.pgp
Description: PGP signature


Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-09-18 Thread David Maus
At Sat, 17 Sep 2011 14:56:09 -0600,
Eric Schulte wrote:
 
 Hi David,
 
 
  For Emacs22 the only thing we need from simple.el is the definition of
  special-mode; going to factor it out and trim it to Emacs22.
 
 
 Sounds great, thanks.
 
 
  With HEAD at dbf0e6d5bcbe94c8ee57d68889d3c25bf9cdef55 and a fix for
  the check for featurep 'org (37db5deea5ef75186bb7413b196fa0c96e5bdfb9)
  I got:
 
 
 Thanks for compiling this information.
 
 
 
  Selector: \\(org\\|ob\\)
  Passed: 99
  Failed: 10 (10 unexpected)
  Total:  109/109
 
  Started at:   2011-09-16 06:56:59+0200
  Finished.
  Finished at:  2011-09-16 06:57:04+0200
 
  ..FF...FF..F.F...FF.F..F.
 
  F ob-fortran/list-var
  Test real array input
  (void-function characterp)
 
  F ob-fortran/list-var-from-table
  Test real array from a table
  (void-function characterp)
 
 
 I've replaced the use of `characterp' in ob-fortran with integerp, which
 should be backwards-compatible with emacs22.
 
 
  F test-ob-exp/org-babel-exp-src-blocks/w-no-file
  Testing export from buffers which are not visiting any file.
  (wrong-type-argument stringp nil)
 
  F test-ob-exp/org-babel-exp-src-blocks/w-no-headers
  Testing export without any headlines in the org-mode file.
  (wrong-type-argument stringp nil)
 
  F test-ob-lob/export-lob-lines
  Test the export of a variety of library babel call lines.
  (wrong-type-argument stringp nil)
 
 
 I have no idea what could be going wrong with these executions, would it
 be difficult to generate backtraces for these failures?
 
 
  F test-ob-sh/dont-error-on-empty-results
  Was throwing an elisp error when shell blocks threw errors and
  (void-function org-babel-execute:sh)
 
  F test-org-babel/inline-src-blocks
  (error No org-babel-execute function for sh!)
 
  F test-org-babel/inline-src_blk-default-results-replace-line-1
  (error No org-babel-execute function for sh!)
 
 
 It looks like you need to load ob-sh.el.
 
 
  F test-org-exp/stripping-commas
  Test the stripping of commas from within blocks during export.
  (wrong-type-argument stringp nil)

And last not least: In this case it is `org-todo-line-regexp' bound to
nil, too.

 
  F test-org/org-link-unescape-ascii-extended-char
  Unescape old style percent escaped character.
  (ert-test-failed
   ((should
 (string= àâçèéêîôùû
  (org-link-unescape %E0%E2%E7%E8%E9%EA%EE%F4%F9%FB)))
:form
(string= àâçèéêîôùû \340\342\347\350\351\352\356\364\371\373)
:value nil))
 
 
 Hmm, I don't know anything about possible differences in string handling
 between Emacs22 and more modern Emacsen, but I wouldn't be surprised if
 support for accented characters was less complete in Emacs22.  Perhaps
 we should just skip this test on Emacs22.

I'll dig into the link escaping failure.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgp068gV55Vhj.pgp
Description: PGP signature


[O] Can't link to info nodes

2011-09-18 Thread Julien Cubizolles

I cannot link to info nodes.

* If I type a link like :

info:org.info#External%20links, I get No match- Create this as a new
heading

* If I do C-c l while visiting a info buffer, I get
Cannot link to a buffer that is not visiting a file

What am I doing wrong ?

Julien.




Re: [O] Exporting subtree to LaTeX?

2011-09-18 Thread Bernt Hansen
Johan Ekh ekh.jo...@gmail.com writes:

 Hi all,
 is it possible to export a subtree to LaTeX, i.e. not the entire
 org-file?
 I just want a latex file that I later include manually in an existing
 LaTeX document.

 Best regards,
 Johan

Select the subtree first with C-c @ and then export normally.

Regards,
Bernt



Re: [O] Exporting subtree to LaTeX?

2011-09-18 Thread Johan Ekh
Thanks!
That was what I was looking for.

Best regards,
Johan

On Sun, Sep 18, 2011 at 1:28 PM, Bernt Hansen be...@norang.ca wrote:

 Johan Ekh ekh.jo...@gmail.com writes:

  Hi all,
  is it possible to export a subtree to LaTeX, i.e. not the entire
  org-file?
  I just want a latex file that I later include manually in an existing
  LaTeX document.
 
  Best regards,
  Johan

 Select the subtree first with C-c @ and then export normally.

 Regards,
 Bernt



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-09-18 Thread David Maus
At Sat, 17 Sep 2011 14:56:09 -0600,
Eric Schulte wrote:
 
 Hi David,
 
 
  For Emacs22 the only thing we need from simple.el is the definition of
  special-mode; going to factor it out and trim it to Emacs22.
 
 
 Sounds great, thanks.
 
 
  With HEAD at dbf0e6d5bcbe94c8ee57d68889d3c25bf9cdef55 and a fix for
  the check for featurep 'org (37db5deea5ef75186bb7413b196fa0c96e5bdfb9)
  I got:
 
 
 Thanks for compiling this information.
 
 
 
  Selector: \\(org\\|ob\\)
  Passed: 99
  Failed: 10 (10 unexpected)
  Total:  109/109
 
  Started at:   2011-09-16 06:56:59+0200
  Finished.
  Finished at:  2011-09-16 06:57:04+0200
 
  ..FF...FF..F.F...FF.F..F.
 
  F ob-fortran/list-var
  Test real array input
  (void-function characterp)
 
  F ob-fortran/list-var-from-table
  Test real array from a table
  (void-function characterp)
 
 
 I've replaced the use of `characterp' in ob-fortran with integerp, which
 should be backwards-compatible with emacs22.
 
 
  F test-ob-exp/org-babel-exp-src-blocks/w-no-file
  Testing export from buffers which are not visiting any file.
  (wrong-type-argument stringp nil)
 
  F test-ob-exp/org-babel-exp-src-blocks/w-no-headers
  Testing export without any headlines in the org-mode file.
  (wrong-type-argument stringp nil)
 
  F test-ob-lob/export-lob-lines
  Test the export of a variety of library babel call lines.
  (wrong-type-argument stringp nil)
 
 
 I have no idea what could be going wrong with these executions, would it
 be difficult to generate backtraces for these failures?
 
 
  F test-ob-sh/dont-error-on-empty-results
  Was throwing an elisp error when shell blocks threw errors and
  (void-function org-babel-execute:sh)
 
  F test-org-babel/inline-src-blocks
  (error No org-babel-execute function for sh!)
 
  F test-org-babel/inline-src_blk-default-results-replace-line-1
  (error No org-babel-execute function for sh!)
 
 
 It looks like you need to load ob-sh.el.
 
 
  F test-org-exp/stripping-commas
  Test the stripping of commas from within blocks during export.
  (wrong-type-argument stringp nil)
 
  F test-org/org-link-unescape-ascii-extended-char
  Unescape old style percent escaped character.
  (ert-test-failed
   ((should
 (string= àâçèéêîôùû
  (org-link-unescape %E0%E2%E7%E8%E9%EA%EE%F4%F9%FB)))
:form
(string= àâçèéêîôùû \340\342\347\350\351\352\356\364\371\373)
:value nil))
 
 
 Hmm, I don't know anything about possible differences in string handling
 between Emacs22 and more modern Emacsen, but I wouldn't be surprised if
 support for accented characters was less complete in Emacs22.  Perhaps
 we should just skip this test on Emacs22.

Nope, this test is fixed. Had to explicitely tell Emacs that the
expected output string is latin-1; i.e. the input is extended ASCII
which is covered by latin-1 encoding. The test failed because
org-link-unescape returned the raw byte sequence.

I am aware that there might be a problem with opening links that
contain extended ASCII characters (=Org's old escaping choice) and I'm
going to test this next. 

The test is fine, though. The expected output is a latin-1 encoded
string.

Best,
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpNWtYccCf5Q.pgp
Description: PGP signature


Re: [O] Overall organization/setup for org mode: Projects and Tasks

2011-09-18 Thread Alan E. Davis
Max:

This is an awesome, thought provoking infodump.   Full of ideas that I can
use.   Thank you,

Alan

On Sat, Sep 17, 2011 at 12:32 PM, Max Mikhanosha m...@openchat.com wrote:

 Below is infodump on how I use org-mode personally.. You are welcome
 to poach ideas. Generally I'm pretty happy with my setup, and do not
 plan to do any radical changes to it. Wall of text warning.

 1. Org file per project, with single top level heading.. Each file has
   a #+TAGS cookie that assigns default tags.

   Such project files would have more then one level heading, usually
   when project logically splits into sub-projects

   Example: Emacs.org, top level headings. This one has unusually large
   amount of top level headings.

   - Emacs
   - Org-Mode
   - Paredit-Magic
   - C-Paredit
   - Cycle-buffer

 A few special org files which are not projects, one is called Assorted
 Accounts for recording acc/pass/email info on various accounts, and
 one is called Assorted Info for basically a knowledge base of anything
 that is not a TODO. The way I access these are through C-c / search,
 seems to work very well.. Another special project is Finances.org
 and has everything to do with investments, encrypted entries for all
 financial accounts, all recurring TODOS for bills, or portfolio
 review, investment ideas, spreadsheets etc.

 Capture often. Write down just enough so you can re-construct idea
 later.. If you often wondering wtf did I meant by that, then you are
 not writing down enough.. If possible write/assign yourself a shortcut
 key to your window manager so you can capture a short sentence with 1
 key stroke even when in the other programs.

 If it takes less then 1 minute to do what you are capturing,
 especially if it involves emacs customization, do it right there, and
 mark it it done, or C-c C-k it.. I usually mark it done and C-c C-c
 it.

 All captures go to Mind-Sweep.org, under top level heading.. Every few
 days (once I have 10-20 items) in there, I go ahead and refile them to
 appropriate projects, assigning priorities and efforts if these are
 not there.

 Have two agenda keys to show agenda sorted by priority, and by effort
 up..I use block agenda that shows day agenda first, then all NEXT
 items, then all TODO items.

 Learn to use / key in agenda to quickly filter out stuff by tags.. For
 me /e switches agenda to filter out be :emacs tag.

 Have areas of focus. The mind is like a process working set. If I had
 been working on some emacs problem and have Emacs booted up in my
 brain, it takes a while to switch reboot my brain into Looking at my
 investments mode.

 So as long as I'm working on lets say fixing something with paredit,
 you can just as well knock out some other emacs things..

 That is where agenda sorted by effort comes up. Since I'm hacking on
 my emacs setup anyway, I bring up my effort-up agenda view, filter by
 emacs and just knock out every item estimated at 10 minutes or
 less. Sometimes knocking out up to 20 or so small TODO's in 2 hour
 burst, taking care of everything that was annoying me with Emacs in
 last 2 weeks.

 Assign priorities to prune aggressively. If you have that #A item
 starting you for last 5 days, its not #A.. Demote it until it sits in
 the #F pile way down in agenda.

 Temporary move projects out of agenda. Lets say you have a well
 defined project and a bunch of nicely prioritized items, some of them
 #A (which they are in the context of that project) but right now you
 just don't feel like working on that project.

 Starting at these #A items on top of your agenda every day without
 starting to work on them, may be demoralizing. Way I deal with it, is
 that I have hold tag, which I put on top level headings of the
 projects, and its excluded from my agenda by default... If you have
 not touched a project for 2 weeks, it probably should be on
 hold.. When you bored and looking for things to work on, they you can
 use agenda view without filtering out the hold projects, and see if
 you can get a start on some of them.. This way I have only 3-4 projects
 that are in focus rather then 30..

 Review low priority items once a week, if you remember reviewing that
 item last few weeks, just delete it.. If you are type of person who
 can't let go, move it to MAYBE state.

 If something computer related annoys you and interrupts your work flow
 often, it should be #A item and needs to be fixed. Ie if you Emacs
 session consists of 50% beeps, you need to fix something in your
 setup.. If you dread doing something because its just too much effort,
 you need to automate/rethink/change that process.

 Don't burn out.. The bodybuilders and athletes have it right, you have
 to cycle. If you go 100% all the time, generating ideas and knocking
 out TODO's like a robot, you'll burn out. Take it easy for 1 week each
 month. Does not mean eat pizza and party every day, but basically its
 relax and don't kill yourself time.

 Do any health, work, and lifestyle related 

[O] org-babel ruby 1.8 and 1.9

2011-09-18 Thread Steve Harman
Hello,

On my mac, I have rvm installed with ruby 1.9.2 being default.
On the terminal, if I execute ruby, it is always 1.9.2 version.
However, the ruby ran by org-babel is 1.8 version.
How can I make the ruby code blocks in my org files
executed by 1.9?

Since I am new to Emacs, I would appreciate your help.
I found org-mode and org-babel extremely helpful in preparing
course notes. That's why, in fact, I switched to Emacs.
In an attempt to solve the above problem, I installed rvm.el
and put it in my init.el right before loading the org-babel languages.

(add-to-list 'load-path /Users/stvharman/.emacs.d/lisp/rvm)
(require 'rvm)
(rvm-use-default) ;; use rvm’s default ruby for the current Emacs session

(org-babel-do-load-languages
 'org-babel-load-languages
 '(
   (R . t)
   (ruby . t)
))

Thank you in advance.

Have a nice weekend (and week ahead),

Steve


Re: [O] org-babel ruby 1.8 and 1.9

2011-09-18 Thread Eric Schulte
Hi Steve,

You should be able to customize the value of the org-babel-ruby-command
variable to control what external executable is called by ruby code
blocks.  The default value of that variable is simply ruby but
presumably setting that variable to the name of the ruby 1.9 executable
should work.

Note that for code blocks which use a session (see the session header
argument for more information) all execution is handled by inf-ruby, and
the inf-ruby package controls which executable is used.

Hope this helps

Best -- Eric

Steve Harman stvhar...@gmail.com writes:

 Hello,

 On my mac, I have rvm installed with ruby 1.9.2 being default.
 On the terminal, if I execute ruby, it is always 1.9.2 version.
 However, the ruby ran by org-babel is 1.8 version.
 How can I make the ruby code blocks in my org files
 executed by 1.9?

 Since I am new to Emacs, I would appreciate your help.
 I found org-mode and org-babel extremely helpful in preparing
 course notes. That's why, in fact, I switched to Emacs.
 In an attempt to solve the above problem, I installed rvm.el
 and put it in my init.el right before loading the org-babel languages.

 (add-to-list 'load-path /Users/stvharman/.emacs.d/lisp/rvm)
 (require 'rvm)
 (rvm-use-default) ;; use rvm’s default ruby for the current Emacs session

 (org-babel-do-load-languages
  'org-babel-load-languages
  '(
(R . t)
(ruby . t)
 ))

 Thank you in advance.

 Have a nice weekend (and week ahead),

 Steve

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] vmin and probably vmax functions don't work

2011-09-18 Thread Jude DaShiell
I'm getting identical numbers with vmean and vmode.  I don't know if that 
information is correct but will check it with another system later this 
week.  The same figures though also come up for vmin function and I know 
for a fact that isn't correct.  That was after saving my org file and 
starting up emacs again to see if those figures would change and those 
figures did not change.  The only functions from calc that may work are 
vmean and perhaps vsum but I've not tried vsum yet so won't make any more 
categorical statements about that yet.  I modified the #+TBLFM: line with 
the original vmean formulas on it changing them  first to vmode and later 
to vmin.  And that's how I got these results.  What I would have liked to 
have done would have been to calculate a mode and a min and max for each 
of the three figures I'm tracking then had that information show up at the 
bottom of the table.

Something like:
| stats: | systalic | diastalic | pulse |
| mode | xxx | yyy | zzz |
| min | xxx | yyy | zzz |
| max | xxx | yyy | zzz |
|-

Though how to get a #+TBLFM: line to calculate for all of this and 
position correctly I'll have to figure out later.



Jude jdash...@shellworld.net I love the Pope, I love seeing him in his 
Pope-Mobile, his three feet of bullet proof plexi-glass. That's faith in 
action folks! You know he's got God on his side.
~ Bill Hicks



Re: [O] Is LaTeX pdf export that uses pgfSweave possible?

2011-09-18 Thread Charles Berry
Mikhail Titov mlt at gmx.us writes:

 
 Hello!
 
 First of all I’m not good at lisp as of now. I’d like to have an extra 
 export option when I press C-c C-e that
 would create dotRnw file instead of dottex, pass it through pgfSweave 
 in running R session.

Mikhail,

For vanilla Sweave, use the LaTeX style syntax (vs noweb style) to create an
Rtex file. Typing 'C-c C-e l' causes the following *.org to produce  *.Rtex
which R CMD Sweave will turn to *.tex and R CMD pdflatex will turn into a 
*.pdf. 

Note this this will break ordinary R code export in latex, so be sure it 
is not invoked when you want to go from *.org to *.pdf via 'C-c C-e d'

The trick is mainly to get the latex exporter to drop the verbatim wrapper.


---8---8
* Retooling org-babel to accept Rtex

Run this subtree once to start or put these blocks in your =~/.emacs=

Either way, run the elisp in this subtree once to start a session


** Nullify =\begin{verbatim}= ... =\end{verbatim}=

Under standard latex export, the code blocks get wrapped in verbatim
environments. To Sweave the resulting code as =*.Rtex= it is necessary
to unplug this behavior. 'Advising'
=org-export-format-source-code-or-example= like this has the desired
effect on =R= src blocks , but leaves others alone.


#+begin_src emacs-lisp :exports code
  (defadvice
org-export-format-source-code-or-example
(around no-verbatim (lang code optional opts indent caption))
dont wrap R code in verbatim
( let
(( old-verb-wrap org-export-latex-verbatim-wrap))
  (if (equal lang R) (setq org-export-latex-verbatim-wrap nil))
  ad-do-it
  (setq org-export-latex-verbatim-wrap old-verb-wrap)))


  (ad-activate 'org-export-format-source-code-or-example)

#+end_src

#+results:
: org-export-format-source-code-or-example


** after processing convert =*.tex= to =*.Rtex=


Adding the commands to run Sweave and pdflatex to this hook function
is left as an exercise...

#+begin_src emacs-lisp :results silent
  (add-hook
   'org-export-latex-after-save-hook
   (lambda ()
 (rename-file (buffer-file-name)
  (concat (file-name-sans-extension
   (buffer-file-name)) .Rtex) t )
 ))

#+end_src


* SRC BLOCKS

Two simple examples

** R graphics

A simple scatterplot. Here we want the verbatim omitted:


\begin{Scode}{fig=T}
#+begin_src R  :eval never :exports code :results raw
plot(rnorm(10))
#+end_src
\end{Scode}

** shell script

Here we want to execute the shell script and pass it to the =*.Rtex= file

#+begin_src sh :eval t :results output verbatim :exports both
ls | wc
#+end_src


---8---8---

HTH,

Chuck

[rest deleted]