Re: [O] Fast Access to TODO States without C-t

2014-04-15 Thread Oleh
Hi Esben,

 If I hit 't' over a TODO item, it just changes the state to the next
 state. How can I jump to DONE(d!), f.ex?

There's https://github.com/abo-abo/worf (also in MELPA) - an
alternative to org speed keys.

It's inspired by vi, so your task is handled by cwd (change word
DONE).  Other stuff works as well, such as cw[tnc] for (change word
[TODO NEXT CANCELLED]).

Similarly:
cp is change property,
dp is delete property,
p is move to property,
ct is change tag,
hjkl - navigate left/down/up/right
d2j - delete two headings down
d3k - delete three headings up
yj - copy one heading down to kill ring
3i - change view to summary level 3.
wn - make jk move only by NEXT keywords.
c - make hjkl behave like Meta+arrows
cf - make hjkl behave like Shift+Meta+arrows
cs - make hjkl behave line Shift+arrows
q - return from the four modes above

Try it out, perhaps you'll like it.

regards,
Oleh



Re: [O] radio links in middle of words.

2014-04-15 Thread Daniel Clemente
El Thu, 10 Apr 2014 23:43:41 +0200 Nicolas Goaziou va escriure:
 
 It could work. But I think [:alnum:] is needed instead of [:alpha:].
 Here's a patch implementing it.
 

Now it's much better. Thanks.




Re: [O] org-agenda-custom-command for property AND TODO state (for a cooking guide :) )

2014-04-15 Thread Alexander Baier
On 2014-04-15 06:12 Xebar Saram wrote:
 thx alot  Alexander!

 this worked. any idea how to bind this to a key?
 ie have  C-c / m   +TODO=TODO+TYPE=main bound to F1-c   etc..

You create an interactive function that simply calls
`org-match-sparse-tree' with the right match string:

#+begin_src emacs-lisp
  (defun my-cooking-sparse-tree-main ()
(interactive)
(org-match-sparse-tree t +TODO=\TODO\+TYPE=\main\))
#+end_src

And now you can simply bind this command (thats what an interactive
function is called) to whatever you like:

#+begin_src emacs-lisp
  (define-key org-mode-map (kbd f1 c) 'my-cooking-sparse-tree-main)
#+end_src

HTH,
-- 
 Alexander Baier



Re: [O] A file with 'org-mode rot'?

2014-04-15 Thread Karl Voit
* Erik Iverson erikriver...@gmail.com wrote:

 Remote possibility: I've had issues with org-mode being slow when using
 linum-mode in the past:

 E.g.,
 http://stackoverflow.com/questions/5229705/emacs-org-mode-turn-off-line-numbers

 So you might want to make sure that's not enabled.

I haven't used it. When I started it in order to try it out, my
Emacs instantly froze. Thanks for the warning :-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] total time spent on a task

2014-04-15 Thread Christoph Groth
Sacha Chua sa...@sachachua.com writes:

 Hmm, mine shows clock overlays for all headings with clock entries,
 including TODO headings. I'm on Org 8.2.5h. By any chance, could those
 overlays have invisible text? You can customize-face
 org-clock-overlay.  I remember that had been a problem for some people
 before.

In fact, times were shown for the other headlines as well, but
white-on-yellow!  I've modified the org-clock-overlay so the problem is
now fixed for me.

Is this a bug?  (It appears for me in bleeding edge orgmode.)  The
original org-clock-overlay only specifies the background color as yellow.
How to find out from which face the white foreground was inherited?  The
command describe-face does not seem to help for this.

Christoph




Re: [O] Multiple Recursive Directories with org-agenda-files

2014-04-15 Thread Julian M. Burgos
Hi Esben,

I use find-lisp-find-files.  I have the following in my .emacs file: 

;;--
;; Load org agenda files
;;--
(load-library find-lisp)

(add-hook 'org-agenda-mode-hook (lambda () 
(setq org-agenda-files 
  (find-lisp-find-files /home/julian/Documents \.org$))
))

With this when I do C-c a, all the *.org files in my Documents directory
get added into the agenda.

According to this
http://archive.today/7McXW#selection-9101.0-9101.4

If you are on a Linux machine you can use the find utility, which can be
faster that the lisp library:

(setq org-agenda-files
  (mapcar 'abbreviate-file-name
  (split-string
   (shell-command-to-string find ~/org -name \*.org\)
  \n)))

I have not tried it though... but I may do it now.

I hope this helps.

Julian



Esben Stien writes:

 I'm trying to add a few recursive directories to org-agenda-files, but
 can't really find any examples doing this 

 I got like 250 org files spread over a few directories.

 I want to add:

 ~/foo/bar/
 ~/baz/quux/
 ~/hukarz/grault/

 ..which again includes multiple directories with .org files and a few
 other files which I don't want included.

 Anyone who does this?


-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnun/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: jul...@hafro.is



[O] radio links match blank spaces

2014-04-15 Thread Daniel Clemente

Hi, after the recent change to radio links, THIS link will make the 2 
spaces around THIS word become blue, as if they were part of the link.

  I wanted to write a test. I have been inspecting org-element's result but I 
can't understand the :begin and :end properties; they seem to be too high, e.g. 
they are :begin 3 :end 5 for a 1-letter link that is in position 0 to 1. I used 
this 2-line file to test:

r LINK
r

  Greetings
  



[O] How to change org-export-html-style

2014-04-15 Thread Rustom Mody
My html styles are in a file my-org.css in ~/orghacks

I need (for various reasons) to inline these styles

I have this code in my init to change the html style

-
(defun rusi/load-css()
  Returns string from css file (hardwired) suitable for inline css
  (interactive)
  (setq org-export-html-style
(with-temp-buffer
  (insert \nstyle type=\text/css\\n)
  (insert-file-contents (expand-file-name my-org.css ~/orghacks))
  (goto-char (point-max))
  (insert \n/style\n)
  (buffer-string
(rusi/load-css)

Now if I edit and save the my-org.css file and then call M-: (rusi/load-css)
it does not work.
Restarting emacs makes it work.
Ive checked that org-export-html-style is actually changed.
However org-mode seems to be keeping some internal copy after first use.
org-reload is not helping here


Re: [O] How to change org-export-html-style

2014-04-15 Thread Rustom Mody
On Tue, Apr 15, 2014 at 5:00 PM, Rustom Mody rustompm...@gmail.com wrote:

 My html styles are in a file my-org.css in ~/orghacks

 I need (for various reasons) to inline these styles



I should have mentioned the org version: 8.2.5e
Emacs version: 24.3.1


[O] bash alias and history in code block (again)

2014-04-15 Thread OSiUX
Hi, in the past I ask *How to use alias and bash builtin functions?*

http://lists.gnu.org/archive/html/emacs-orgmode/2013-12/msg00205.html

The solution:

  (setq org-babel-sh-command bash -i)

But now don't work anymore :-(

My Org-mode version:

8.2.5h release_8.2.5h-660-gef207f

Looking the source:

b896bd4 2014-02-09 20:12 schulte.ericadd :cmdline support to shell code 
blocks
5f0ca0e 2014-01-31 17:02:03 +0100 theonewiththeevillook  Renaming of ob-sh to 
ob-shell: various fixes
1a9a666 2014-01-21 09:52 schulte.ericmention ob-sh renamed to ob-shell in 
ORG-NEWS
80754a8 2014-01-18 10:26 schulte.ericupdated names in test-ob-shell
2ebae7b 2014-01-18 10:25 schulte.ericrenamed test file for shell code blocks
fb09863 2013-12-13 16:04 schulte.ericmore shell names
b319475 2013-12-13 10:03 schulte.ericfix tests with the renamed ob-shell.el
583e7ab 2013-12-13 09:54 schulte.ericrename ob-sh to ob-shell
7a6c0e3 2013-12-13 09:52 schulte.ericmultiple code block types for multiple 
shells
d286d81 2013-12-13 09:18 schulte.ericRevert change default sh code block 
shell to bash
1f498c9 2013-11-23 09:14 schulte.ericchange default sh code block shell to 
bash

I change my ~/.emacs

  (setq org-babel-sh-command bash)

... and try the new :cmdline parameter:

#+BEGIN_SRC sh :cmdline -i :session :results output
   history | wc -l
   alias | wc -l
#+END_SRC

#+RESULTS:
: 0
: 0

*How to use alias and bash builtin functions?*

thanks!

--

::

  Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar
  DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C
  http://www.osiux.com.ar http://www.altermundi.net


signature.asc
Description: Digital signature


Re: [O] empty default captions for src blocks

2014-04-15 Thread Dominik Ernst
By the way, the same applies to labels. I had hoped, that moving the options
from lstset into [] brackets in front of the region would make it be valid
for that element only, but it did nothing.







Re: [O] Fast Access to TODO States without C-t

2014-04-15 Thread Greg Troxel

Esben Stien b...@esben-stien.name writes:

 I'm trying to figure out how to bind fast access to TODO states, without
 using C-t.

 The reason is that I have C-t as escape code for my screen session.

This isn't what you asked, but I would suggest changing your escape key
and perhaps using tmux instead of screen.  Surely screen has way to send
the escape key, but you may need to configure it.

I thought for a long time about escape keys.  screen defaults to C-a and
tmux to C-b.  As an emacs user, I use both of those quite a lot.  So I
went through all the rest of the control characters, and found the one
that I have the least use for to be C-j.  And then I set tmux so that
C-j C-j sends a single C-j to the terminal session.  The only time I
need to type this is when searching for strings that contain newlines,
which is a once/day kind of thing for me.

I also switched from screen to tmux, initially for no good reason (the
cool kids were using tmux, and they all said they liked it better), but
I've been using more and more of it and find very little to complain
about.

Here's my .tmux.conf to set the prefix to C-j: 


unbind-key C-b
bind-key C-j send-prefix
set-option -g prefix C-j




pgpEdGGqFFs6d.pgp
Description: PGP signature


[O] Archive subtree with parent structure

2014-04-15 Thread Florian Lindner

Hello,

is it possible to org-archive-subtree a subtree and keep the entire 
parent structure? e.g.


* A
** AA
** AB
** AC


AB will be archived to:

* A
** AB


Another question, just out of interest: Why is there 
org-archive-subtree-default at all? According to documentation and 
source it just calls the function in org-archive-default-command:


(defun org-archive-subtree-default ()
  Archive the current subtree with the default command.
This command is set with the variable `org-archive-default-command'.
  (interactive)
  (call-interactively org-archive-default-command))

Isn't the emacs way to rather just set org-archive-subtree to another 
function or rebind the key? Just a question from an interessted emacs 
novice.


Best Regards,
Florian



Re: [O] Fast Access to TODO States without C-t

2014-04-15 Thread Thorsten Jolitz
Greg Troxel g...@ir.bbn.com writes:

 Esben Stien b...@esben-stien.name writes:

 I'm trying to figure out how to bind fast access to TODO states, without
 using C-t.

 The reason is that I have C-t as escape code for my screen session.

 This isn't what you asked, but I would suggest changing your escape key
 and perhaps using tmux instead of screen.  Surely screen has way to send
 the escape key, but you may need to configure it.

 I thought for a long time about escape keys.  screen defaults to C-a and
 tmux to C-b.  As an emacs user, I use both of those quite a lot.  So I
 went through all the rest of the control characters, and found the one
 that I have the least use for to be C-j.  

I thought about that too and came up with C-o as tmux prefix key,
probably I actually do use the scratch buffer quite frequently:

,---
| C-j runs the command eval-print-last-sexp, which is an interactive
| compiled Lisp function in `lisp-mode.el'.
`---

I forgot what was originally bound to C-o, but noticed that other Emacs
users independently chose the same prefix for Tmux, so it must have been
something not used that often.

-- 
cheers,
Thorsten




Re: [O] Fast Access to TODO States without C-t

2014-04-15 Thread Nick Dokos
Thorsten Jolitz tjol...@gmail.com writes:


 I thought about that too and came up with C-o as tmux prefix key,
 probably I actually do use the scratch buffer quite frequently:

 ,---
 | C-j runs the command eval-print-last-sexp, which is an interactive
 | compiled Lisp function in `lisp-mode.el'.
 `---

 I forgot what was originally bound to C-o,

open-line usually.

 but noticed that other Emacs users independently chose the same prefix
 for Tmux, so it must have been something not used that often.




[O] org beamer newb TOC problem

2014-04-15 Thread Neal Becker
I'm just learning about org mode, although I've used both emacs and beamer for 
many years.

In my first attempt, I get a frame 'Contents', which is blank.  I tried various 
options, but never get anything but a blank 'Contents'.

Here is an attempt:

#+TITLE: A Test
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation]
#+BEAMER_THEME: default
#+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) 
%8BEAMER_opt(Opt)
#+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC
#+latex_header: \newcommand{\lyxdot}{.}

* First topic
- Of course, it would be a bullet chart

* Second topic
#+ATTR_LaTeX: :height 0.8\textheight
[[../hn-inroute-fixed/stuff\lyxdot 2014-04-14.pdf]]





Re: [O] Export arrays for 'sh' code blocks when using bash

2014-04-15 Thread Nick Dokos
Eric Schulte schulte.e...@gmail.com writes:


 Also, if you can sign your patches (git format-patch -s) that'd
 be even better, but not mandatory.


 Should I start signing my patches as well?

 I'm very happy to, I've just never thought about it.  If so is there an
 easy way to make -s a default option for the Org-mode repo?



$ git config --global alias.fm 'format-patch -s'

Then 

$ git fm since-commit

Nick




Re: [O] radio links match blank spaces

2014-04-15 Thread Nicolas Goaziou
Hello,

Daniel Clemente n142...@gmail.com writes:

 Hi, after the recent change to radio links, THIS link will make
 the 2 spaces around THIS word become blue, as if they were part of the
 link.

This should be fixed. Thank you for reporting it.

 I wanted to write a test. I have been inspecting org-element's
 result but I can't understand the :begin and :end properties; they
 seem to be too high, e.g. they are :begin 3 :end 5 for a 1-letter
 link that is in position 0 to 1.

I didn't notice any error here. :end includes white spaces after the
link.


Regards,

-- 
Nicolas Goaziou



Re: [O] Fast Access to TODO States without C-t

2014-04-15 Thread Esben Stien
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Well there's got to be some way to send the escape sequence to the
 running process! Googling indicates it might be C-t t 

You're right;)

C-c C-t t sends C-c C-t to emacs. I can see it says C-c C-t in the
mode-line. 

 does C-c C-t t d work?

Funnily enough, no, it does not work. It just inserts 'd' into the
buffer. 

If I do M-x describe-function, I see: 

org-todo is an interactive compiled Lisp function in `org.el'.

It is bound to C-c C-t, menu-bar Org TODO Lists TODO/DONE/-,
C-c t.

, so basically, it should have worked.

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] Multiple Recursive Directories with org-agenda-files

2014-04-15 Thread Esben Stien
Julian M. Burgos jul...@hafro.is writes:

 (load-library find-lisp)
 (add-hook 'org-agenda-mode-hook (lambda () 
 (setq org-agenda-files 
   (find-lisp-find-files /home/julian/Documents \.org$))
 ))

This is not a multiple directories examples, so I tried: 

(add-hook 'org-agenda-mode-hook (lambda () 
  (setq org-agenda-files 
(find-lisp-find-files ~/foo/bar 
\.org$)
(find-lisp-find-files ~/hukarz/quux 
\.org$))
  ))

, but that just threw a lisp error.

-- 
Esben Stien is b0ef@e s  a 
 http://www. s tn m
  irc://irc.  b  -  i  .   e/%23contact
   sip:b0ef@   e e 
   jid:b0ef@n n



Re: [O] Multiple Recursive Directories with org-agenda-files

2014-04-15 Thread Nick Dokos
Esben Stien b...@esben-stien.name writes:

 Julian M. Burgos jul...@hafro.is writes:

 (load-library find-lisp)
 (add-hook 'org-agenda-mode-hook (lambda () 
 (setq org-agenda-files 
   (find-lisp-find-files /home/julian/Documents \.org$))
 ))

 This is not a multiple directories examples, so I tried: 

 (add-hook 'org-agenda-mode-hook (lambda () 
 (setq org-agenda-files
(append
   (find-lisp-find-files ~/foo/bar 
 \.org$)
   (find-lisp-find-files ~/hukarz/quux 
 \.org$)

 , but that just threw a lisp error.

You need to append all the subsequent lists onto the first list,
creating a big list which can be setq'ed to org-agenda-files.

What you tried to do is the equivalent of

(setq foo '(1 2 3) '(4 5 6))

which is not legal lisp - do C-h f setq RET to find out why.

Nick




[O] Trouble with Tables and Python

2014-04-15 Thread Martin Schöön
This is my first post here...

I have been using org-mode as a pure TODO-tool for some time but this
winter I realised it could be used for much more and I have been
experimenting with mixing in LaTeX and Python for fun and because I find
literate programming a particularly sane idea (I am a HW engineer).

Less than I week ago I started to look into using tables for input and
output to/from Python scripts. I was inspired by something I found at
http://kitchingroup.cheme.cmu.edu/ . The enclosed example 1 file is a
pruned version of the org-file I found there. If I run the embedded Python
script using C-c C-c I don't get the table shown in the example. Instead I
get none on the row following #+RESULTS:

If I change :results raw to :results output I do get the table but
'wrapped' in #+begin_example and #+end_example as shown in  the
enclosed example 2 file. I have done some further testing/changes in that
file (adding some stuff to the top of the file and changing the formatting
of the print statements) none of which changed the extra wrapping of the
table. When I export to LaTeX - PDF the table does not show up in the end
result.

Let's move over to the third example file and the real mystery. This all my
own code. Reading data from the first table works just fine and the same
goes for the calculations. The output table, however, is different from
that of example 2. The 'wrapper' is gone but each row is starting with :
. Where does that come from? Why does it differ from example 2? If my
results differ from someone else's (different install/versions etc) -- OK.
But how can I get differences like this on my own? To my  un-trained eyes
the print statements of examples 2 and 3 look very similar. (But, the first
things that go blind are the eyes... probably something blatantly obvious
once pointed out to me.)

OS: #! Linux (Based on Debian stable, 64-bit)
Emacs: 23.4.1
Org-mode: 8.2.5h
Python: 2.7.3

TIA,
-- 
Martin Schöön

http://hem.bredband.net/b262106/index.html


table_making_example_1.org
Description: Binary data


table_making_example_2.org
Description: Binary data


table_making_example_3.org
Description: Binary data


Re: [O] Trouble with Tables and Python

2014-04-15 Thread Nick Dokos
Martin Schöön martin.sch...@gmail.com writes:

 ...  Let's move over to the third example file and the real
 mystery. This all my own code. Reading data from the first table works
 just fine and the same goes for the calculations. The output table,
 however, is different from that of example 2. The 'wrapper' is gone
 but each row is starting with : . Where does that come from? Why
 does it differ from example 2? If my results differ from someone
 else's (different install/versions etc) -- OK. But how can I get
 differences like this on my own? To my  un-trained eyes the print
 statements of examples 2 and 3 look very similar. (But, the first
 things that go blind are the eyes... probably something blatantly
 obvious once pointed out to me.)


2) and 3) are exactly the same thing (see section 11.3, Literal
examples in the org manual.)

The only difference is the length of the output - short output is
prepended by a colon, long output is wrapped in
#+BEGIN_EXAMPLE/#+END_EXAMPLE. What is short and what is long is
determined by the value of org-babel-min-lines-for-block-output
(default: 10) which you can customize.

--
Nick




[O] Recording results of TODO items

2014-04-15 Thread William Kunkel
Is there a standard way to record the outcomes of certain TODO items? For
example, I had a TODO item to research and come to a decision about part of
the architecture of a software project I'm starting, and I'd like to record
the result of that TODO item, that is, the decision that I made. I found
closing notes for TODO items, but that's an option that applies to all
TODO items and seems more intended for brief remarks (to me, at least). Is
using the closing notes functionality my best bet, or is there something
better?

Thanks,
Will


[O] undocumented? struggled with category filter on daily/weekly agenda view custom command.

2014-04-15 Thread Brady Trainor


Goal: To make an agenda view custom command that will filter a daily/weekly
view by category. 


I tried to use the documented `org-agenda-category-filter-preset', similar
to functionality of the analogous tag variable,
`org-agenda-tag-filter-preset'. It does not seem to work. However, a word
search in the `org-agenda.el' file uncovered an undocumented variable
`org-agenda-category-filter', which seemed to do the job for me. 

(That is, `C-h v' on the latter leads to Not documented as a variable.) 

Am I using the right variable for the job? I do not really understand the
preset nomenclature. Does this mean it should only be used on the global
block, as opposed to say inside of `(agenda  ...)'? 



Here are some minimal examples I used to work out where my issue was: 

 
/

(setq 
 org-agenda-custom-commands 
 '((r 
the real test (
 (agenda )
 (todo )
;; +CATEGORY=\acat\
 )(
   (org-agenda-files
'(/e/emacs-config/therealagendatest.org))
   ;; (org-agenda-filter-preset '(+acat))
   (org-agenda-category-filter '(+acat))
   

\
/

* TODO an appt
2014-04-15 Tue
* TODO a test todo :acat:
:PROPERTIES:
:CATEGORY: acat
:END:

\


- Brady







Re: [O] The Org Package

2014-04-15 Thread David Masterson
t...@tsdye.com (Thomas S. Dye) writes:

 David Masterson dsmaster...@gmail.com writes:

 Achim Gratz strom...@nexgo.de writes:

 David Masterson writes:
 Something doesn't seem right and I'm sure I'm missing some key in
 understanding how its supposed to work.  What I see right now seems like
 something doesn't match up -- particularly with the Org package:

 1. Most modern Emacs have Org pre-installed.
 2. Unfortunately, that Org is not up-to-date (24.3 has 7.9.3f).
 3. Therefore, installing the latest Org package seems natural.

 The pitfall here is that you _must_ do the first install of the Org
 package from an Emacs that didn't load any part of the built-in Org.

 What does this mean?  Does this mean you expect people to build Emacs
 from scratch just to ensure they do not have Org built-in?

 I believe it means the installation must be done from an Emacs instance
 that hasn't loaded any Org mode functions yet.

   You must make sure there are no =Org-mode= functions loaded while
   the update is done. For that, exit Emacs and then run Emacs without
   loading your =.emacs= (=Emacs -Q=). Remove the old =Org-mode=
   #+BEGIN_SRC sh
   rm -rf ~/.emacs.d/elpa/org-Tab
   #+END_SRC
   where =Tab= means press =Tab= to see and auto complete the old
   =Org-mode= directory you want to remove. Finally, update =Org-mode=
   (=M-x package-install RET org RET=) and restart Emacs as usual.

 See http://nickhigham.wordpress.com/2013/07/05/emacs-org-mode-version-8/

Hmmm.  I would think that this process might work as well:

1. Start with emacs -Q
2. Bring up the Emacs Packages list
3. Mark the available org for Upgrade
4. Execute the upgrade
5. Restart Emacs

The only question is what about the built-in Org?

-- 
David Masterson
Programmer At Large




Re: [O] Trouble with Tables and Python

2014-04-15 Thread John Kitchin
I should probably confess to having this in my .emacs files:

;; language specific headers. I think this comes before the defaults
(setq org-babel-default-header-args:emacs-lisp
  (cons '(:results . value replace)
(assq-delete-all :results org-babel-default-header-args)))

;; set default :results to output
(setq org-babel-default-header-args
  (cons '(:results . output replace)
(assq-delete-all :results org-babel-default-header-args)))

;; set default exports to both code and results
(setq org-babel-default-header-args
  (cons '(:exports . both)
(assq-delete-all :exports org-babel-default-header-args)))

These things change the default behaviors for the results. I almost always
want output as results, and not value (the regular default), except when
coding in emacs-lisp where the value make sense to me.

That would certainly be a point of confusion ;)

I also find you want :results output raw

if you are printing a table or printing org. This is something I have never
found satisfying, especially for long tables or outputs it is tedious to
have to delete the old output by hand before rerunning it. I have not found
any other sets of options that do what I want, e.g. changing raw to org
results in the section being wrapped in #+begin_org/end_org, which is
usually not what I want. I usually do want the raw output.

I hope that clarifies where some of your differences might be coming from.

John

---
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



On Tue, Apr 15, 2014 at 5:18 PM, Martin Schöön martin.sch...@gmail.comwrote:

 This is my first post here...

 I have been using org-mode as a pure TODO-tool for some time but this
 winter I realised it could be used for much more and I have been
 experimenting with mixing in LaTeX and Python for fun and because I find
 literate programming a particularly sane idea (I am a HW engineer).

 Less than I week ago I started to look into using tables for input and
 output to/from Python scripts. I was inspired by something I found at
 http://kitchingroup.cheme.cmu.edu/ . The enclosed example 1 file is a
 pruned version of the org-file I found there. If I run the embedded Python
 script using C-c C-c I don't get the table shown in the example. Instead I
 get none on the row following #+RESULTS:

 If I change :results raw to :results output I do get the table but
 'wrapped' in #+begin_example and #+end_example as shown in  the
 enclosed example 2 file. I have done some further testing/changes in that
 file (adding some stuff to the top of the file and changing the formatting
 of the print statements) none of which changed the extra wrapping of the
 table. When I export to LaTeX - PDF the table does not show up in the
 end result.

 Let's move over to the third example file and the real mystery. This all
 my own code. Reading data from the first table works just fine and the same
 goes for the calculations. The output table, however, is different from
 that of example 2. The 'wrapper' is gone but each row is starting with :
 . Where does that come from? Why does it differ from example 2? If my
 results differ from someone else's (different install/versions etc) --
 OK. But how can I get differences like this on my own? To my  un-trained
 eyes the print statements of examples 2 and 3 look very similar. (But, the
 first things that go blind are the eyes... probably something blatantly
 obvious once pointed out to me.)

 OS: #! Linux (Based on Debian stable, 64-bit)
 Emacs: 23.4.1
 Org-mode: 8.2.5h
 Python: 2.7.3

 TIA,
 --
 Martin Schöön

 http://hem.bredband.net/b262106/index.html



Re: [O] Fast Access to TODO States without C-t

2014-04-15 Thread Eric Abrahamsen
Esben Stien b...@esben-stien.name writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Well there's got to be some way to send the escape sequence to the
 running process! Googling indicates it might be C-t t 

 You're right;)

 C-c C-t t sends C-c C-t to emacs. I can see it says C-c C-t in the
 mode-line. 

 does C-c C-t t d work?

 Funnily enough, no, it does not work. It just inserts 'd' into the
 buffer. 

 If I do M-x describe-function, I see: 

 org-todo is an interactive compiled Lisp function in `org.el'.

 It is bound to C-c C-t, menu-bar Org TODO Lists TODO/DONE/-,
 C-c t.

 , so basically, it should have worked.

If you don't have org-use-fast-todo-selection set to t, all it's
supposed to do is shift the heading under point to the next defined TODO
keyword. What's your value of that variable? Does it work as expected if
you call M-x org-todo directly? Have you tried with a prefix: C-u C-c
C-t t -- it ought to let you complete on TODO keywords. Something in
there has to work...




Re: [O] Recording results of TODO items

2014-04-15 Thread Eric Abrahamsen
William Kunkel w...@wkunkel.com writes:

 Is there a standard way to record the outcomes of certain TODO items?
 For example, I had a TODO item to research and come to a decision
 about part of the architecture of a software project I'm starting,
 and I'd like to record the result of that TODO item, that is, the
 decision that I made. I found closing notes for TODO items, but
 that's an option that applies to all TODO items and seems more
 intended for brief remarks (to me, at least). Is using the closing
 notes functionality my best bet, or is there something better?

 Thanks,
 Will

I do usually use the logging/notes functionality, but if you need more
text, why not just make it the body of the TODO? A TODO is a heading
like any other, you can just put a description of the outcome underneath
it. If that gets unwieldy, separate the bits into multiple sub-headings,
and/or make the TODO itself one smaller part of a larger TODO.




Re: [O] Recording results of TODO items

2014-04-15 Thread William Kunkel
I could well add it in a sub-heading under the TODO, I was just curious if
there was a built-in org-mode way that I ought to be using instead of
rolling something of my own.

Cheers,
Will


On Tue, Apr 15, 2014 at 10:27 PM, Eric Abrahamsen
e...@ericabrahamsen.netwrote:

 William Kunkel w...@wkunkel.com writes:

  Is there a standard way to record the outcomes of certain TODO items?
  For example, I had a TODO item to research and come to a decision
  about part of the architecture of a software project I'm starting,
  and I'd like to record the result of that TODO item, that is, the
  decision that I made. I found closing notes for TODO items, but
  that's an option that applies to all TODO items and seems more
  intended for brief remarks (to me, at least). Is using the closing
  notes functionality my best bet, or is there something better?
 
  Thanks,
  Will

 I do usually use the logging/notes functionality, but if you need more
 text, why not just make it the body of the TODO? A TODO is a heading
 like any other, you can just put a description of the outcome underneath
 it. If that gets unwieldy, separate the bits into multiple sub-headings,
 and/or make the TODO itself one smaller part of a larger TODO.





Re: [O] Recording results of TODO items

2014-04-15 Thread Eric Abrahamsen
William Kunkel w...@wkunkel.com writes:

 I could well add it in a sub-heading under the TODO, I was just
 curious if there was a built-in org-mode way that I ought to be using
 instead of rolling something of my own.

Ah, no -- I think the state-change note is about as built-in as it gets...

 Cheers,
 Will


 On Tue, Apr 15, 2014 at 10:27 PM, Eric Abrahamsen 
 e...@ericabrahamsen.net wrote:

 William Kunkel w...@wkunkel.com writes:

  Is there a standard way to record the outcomes of certain TODO
 items?
  For example, I had a TODO item to research and come to a
 decision
  about part of the architecture of a software project I'm
 starting,
  and I'd like to record the result of that TODO item, that is,
 the
  decision that I made. I found closing notes for TODO items,
 but
  that's an option that applies to all TODO items and seems more
  intended for brief remarks (to me, at least). Is using the
 closing
  notes functionality my best bet, or is there something better?
 
  Thanks,
  Will

 I do usually use the logging/notes functionality, but if you need
 more
 text, why not just make it the body of the TODO? A TODO is a
 heading
 like any other, you can just put a description of the outcome
 underneath
 it. If that gets unwieldy, separate the bits into multiple
 sub-headings,
 and/or make the TODO itself one smaller part of a larger TODO.






Re: [O] Recording results of TODO items

2014-04-15 Thread William Kunkel
Alright, I'll just do my own thing then, I suppose. Thanks!

On Tue, Apr 15, 2014 at 10:48 PM, Eric Abrahamsen
e...@ericabrahamsen.netwrote:

 William Kunkel w...@wkunkel.com writes:

  I could well add it in a sub-heading under the TODO, I was just
  curious if there was a built-in org-mode way that I ought to be using
  instead of rolling something of my own.

 Ah, no -- I think the state-change note is about as built-in as it gets...

  Cheers,
  Will
 
 
  On Tue, Apr 15, 2014 at 10:27 PM, Eric Abrahamsen 
  e...@ericabrahamsen.net wrote:
 
  William Kunkel w...@wkunkel.com writes:
 
   Is there a standard way to record the outcomes of certain TODO
  items?
   For example, I had a TODO item to research and come to a
  decision
   about part of the architecture of a software project I'm
  starting,
   and I'd like to record the result of that TODO item, that is,
  the
   decision that I made. I found closing notes for TODO items,
  but
   that's an option that applies to all TODO items and seems more
   intended for brief remarks (to me, at least). Is using the
  closing
   notes functionality my best bet, or is there something better?
  
   Thanks,
   Will
 
  I do usually use the logging/notes functionality, but if you need
  more
  text, why not just make it the body of the TODO? A TODO is a
  heading
  like any other, you can just put a description of the outcome
  underneath
  it. If that gets unwieldy, separate the bits into multiple
  sub-headings,
  and/or make the TODO itself one smaller part of a larger TODO.
 
 





Re: [O] How to change org-export-html-style

2014-04-15 Thread Rustom Mody
On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel r...@rickster.com wrote:

 On 2014-04-15 07:30, Rustom Mody wrote:

 I need (for various reasons) to inline these styles

 I have this code in my init to change the html style

 -
 (defun rusi/load-css()
   Returns string from css file (hardwired) suitable for inline css
   (interactive)
   (setq org-export-html-style
 (with-temp-buffer
   (insert nstyle type=text/cssn)
   (insert-file-contents (expand-file-name my-org.css ~/orghacks))
   (goto-char (point-max))
   (insert n/stylen)
   (buffer-string
 (rusi/load-css)
 
 Now if I edit and save the my-org.css file and then call M-:
 (rusi/load-css)
 it does not work.
 Restarting emacs makes it work.
 Ive checked that org-export-html-style is actually changed.
 However org-mode seems to be keeping some internal copy after first use.
 org-reload is not helping here


 Can you explain not working? There's not enough info here to see
 what problem you are having.

 rick



Lets say my-org.css has this one line:

code { color: green; }

ie put inline code blocks in green when exporting to html

I change it to

code { color: blue; }

1  save the file
2. Run rusi/load-css
3. Check that org-export-html-file's value has changed from green to blue

However exports from org to html continue to export code-blocks as green

Restart emacs and export (some org file that has code blocks)
Now they are blue


[O] Org-Babel concise named scalar variables

2014-04-15 Thread William Kunkel
I'm just getting started using Org Babel and I've run into a bit of an
annoyance that I can't seem to find an answer to in the Org Babel docs. I
find myself wanting to use one variable in multiple code blocks, for
example, the path to a file. Org Babel provides several mechanisms for
including array/list types, via tables and lists with a #+NAME line before
them. However the only mechanism it provides for single variables is #+NAME
before example blocks, which just seem clunky for something as trivial as a
file path or numeric variable. Is there a more concise way to do simple
variables, or am I stuck with the named example blocks?

Thanks,
Will


Re: [O] How to change org-export-html-style

2014-04-15 Thread Nick Dokos
Rustom Mody rustompm...@gmail.com writes:

 On Tue, Apr 15, 2014 at 10:39 PM, Rick Frankel r...@rickster.com wrote:

 On 2014-04-15 07:30, Rustom Mody wrote:

 I need (for various reasons) to inline these styles

 I have this code in my init to change the html style

 -
 (defun rusi/load-css()
   Returns string from css file (hardwired) suitable for inline css
   (interactive)
   (setq org-export-html-style
     (with-temp-buffer
       (insert nstyle type=text/cssn)
       (insert-file-contents (expand-file-name my-org.css 
 ~/orghacks))
       (goto-char (point-max))
       (insert n/stylen)
       (buffer-string

1) I hope that the various escapes needed *are* in your definition
and were stripped during the email trip; e.g. the inner quotes in the
first string  should be \ and \n instead of n.

2) org-export-html-style smells like an org 7.x variable to me. Are you using
org 7.x? If not, you might need to change the name (although I don't
know for sure and I haven't researched it.)


 (rusi/load-css)
 
 Now if I edit and save the my-org.css file and then call M-: 
 (rusi/load-css)
 it does not work.
 Restarting emacs makes it work.
 Ive checked that org-export-html-style is actually changed.
 However org-mode seems to be keeping some internal copy after first 
 use.
 org-reload is not helping here

 Can you explain not working? There's not enough info here to see
 what problem you are having.

 rick

 Lets say my-org.css has this one line:

 code { color: green; }

 ie put inline code blocks in green when exporting to html

 I change it to

 code { color: blue; }


Is `code' meaningful? Exporting a simple file with code I get things
like this (with org 8.x):

   pre class=src src-asymptote

My css is rusty, but shouldn't that be 

src { color: blue; }

? 

 1  save the file
 2. Run rusi/load-css
 3. Check that org-export-html-file's value has changed from green to blue

 However exports from org to html continue to export code-blocks as green

 Restart emacs and export (some org file that has code blocks)
 Now they are blue


-- 
Nick




[O] Bug: C-C C-W (refile) makes copy when invoked in Agenda view

2014-04-15 Thread Subhasis Ray
 Hi,
I encounter the issue as described here:
http://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg01284.html

More specifically, it copies the task in stead of moving it when I press
C-c C-w while creating a task, but if I quit emacs and press C-c C-w on an
existing entry in my agenda
buffer, it moves, not copies.


Emacs : GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
of 2014-01-02 on king, modified by Debian
Package: Org-mode version 8.2.5h (8.2.5h-19-g0ceb68-elpa @
/home/subha/.emacs.d/elpa/org-20140210/)

current state:
==
(setq
org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-priority-faces '((0 . red))
org-confirm-shell-link-function 'yes-or-no-p
org-default-notes-file ~/Documents/org/notes.org
org-capture-templates '((n
Note
entry
(file
~/Documents/org/notes.org)
)
(t
Tasks
entry
(file+headline ~/Documents/org/todo.org Unsorted)
* TODO %?\n Added:%U\n\n)
)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-from-is-user-regexp nil
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-latex-to-mathml-jar-file /home/subha/lib/mathtoweb.jar
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '(#[nil
\300\301\302\303\304$\207
[org-add-hook
change-major-mode-hook org-show-block-all append local]
5]
#[nil
\300\301\302\303\304$\207
[org-add-hook
change-major-mode-hook org-babel-show-result-all append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-refile-targets '((org-agenda-files :maxlevel . 9)
)
org-outline-path-complete-in-steps nil
org-latex-to-mathml-convert-command java -jar %j -unicode -force -df %o
%I
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
org-refile-use-outline-path t
org-directory ~/Documents/org
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-refile-allow-creating-parent-nodes 'confirm
org-modules '(org-bbdb org-bibtex
org-docview org-gnus
org-habit org-info
org-irc org-mhe
org-rmail org-w3m
org-panel
org-secretary)
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-completion-use-ido t
org-agenda-files '(~/Documents/org/notes.org ~/Documents/org/todo.org)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)

Best,
- Subhasis