[O] navi equivalent to 'g' speed command?

2014-09-02 Thread Alan Schmitt
Hello,

I very often use the org speed command 'g' to navigate to a headline
(it opens a completion buffer that I can use to quickly fuzzy match the
target). Is there an equivalent navi workflow for non-org buffer in
outshine mode?

Thanks,

Alan 

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Moving my init.el to Org

2014-09-02 Thread Rainer M Krug
Jonathan Leech-Pepin  writes:

> Hello,
>
> On 2 September 2014 08:42, Rasmus  wrote:
>
>> Rainer M Krug  writes:
>>
>> > Oleh  writes:
>> >
>> >>> I know that I could use org-babel-load-file, or outshine.  What are
>> >>> other possibilities?  What are the caveats (and advantages) of both
>> >>> (other?) ways?
>> >>
>> >> I'm using a one .el file per mode approach, with around 4000 lines
>> >> split into 40 files.
>> >>
>> >> This approach simplifies things a lot: for instance I haven't touched
>> >> Javascript in ages, but all my customizations for it are sitting in
>> >> javascript.el without getting in the way of the stuff that I'm using
>> >> now. They aren't even loaded unless I open a js file.
>> >
>> > Interesting - is your configuration online, so that one could take a
>> > look at it? I did not find them on your github page?
>> >
>> > Or how do you do it, that the e.g. javascript.el is only loaded when a
>> > js file is opened? Because this is exactly what I would like to have.
>>
>> How about something like this:
>>
>> (with-eval-after-load 'js-mode (load "javascript.el"))
>>
>> Use eval-after-load if you are using an older Emacs.  Note I don't
>> know if there's anything called js-mode. . .
>>
>
> I've been using use-package (https://github.com/jwiegley/use-package) for
> only loading the various package-specific configurations when needed.
>
> For that example it would be:
>
> (use-package js-mode
>   :mode ("\\.js\\'" . js-mode)
>   :config (require 'javascript) ;; or (load "javascript.el") if not provided
> )

That is what I was looking for - I'll try it out soon - step by step -
one package at a time.

>
> In my case it's still all in my init.el (with Outshine headings for each
> mode that use-package manages), but could easily extract the portions into
> their own files (especially for larger configurations like org)

I think it makes sense to extract these into different files, and have
them in one org file which is then tangled.

Thanks,

Rainer

>
> Regards,
> Jon

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpSWwsaUt7v2.pgp
Description: PGP signature


Re: [O] Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa /home/will/.emacs.d/elpa/org-20140616/)]

2014-09-02 Thread Thierry Banel
Yes Will, there is a bug.
I will look at it.
In the meantime, as a workaround, you may move includes from header to body:

#+BEGIN_SRC C++
#include 
#include 
using namespace std;
int main()
{
  printf("Hello ");
  cout << "world";
}
#+END_SRC


Thanks for reporting
Thierry



Le 03/09/2014 01:06, Will Everett a écrit :
> Will Everett  spings.net> writes:
>> I believe the :includes header argument is incorrectly parsing lists of
> includes for c++. This snippet:
>> #+BEGIN_SRC C++ :includes  
>> using namespace std;
>> printf("Hello ");
>> cout << "world";
>> #+END_SRC
>>
>> produces a compiler error:
>>
>> warning: extra tokens at end of #include directive
>>  #include  
>>
>> Then, of course printf and cout are undeclared. It looks like the include
> is just throwing all the includes onto one line when they should be broken
> up and each put on their own line.
>
>



Re: [O] Help with org-lookup-all

2014-09-02 Thread Alan L Tyree


On 03/09/14 15:04, Nick Dokos wrote:

Alan L Tyree  writes:


I feel so dumb!

I have this expession attached to a table: (org-lookup-all $1
'(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)))

It is returning the right list of numbers since I can examine them
with (nth n 

How do I add the list up? I keep getting #ERROR or obviously wrong
answers. What I want is something like

  $2='(apply '+ (org-lookup-all $1 '(remote(payments,@2$4..@>$4))
'(remote(payments,@2$2..@>$2

but that gives me errors since (I presume) the list is a bunch of strings.


If they *are* a bunch of strings, then mapping string-to-number across the
list should do the trick:


  $2='(apply '+ (mapcar (function string-to-number) (org-lookup-all $1 
'(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)



That worked a treat - thanks Nick.

Cheers,
Alan

--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




Re: [O] Help with org-lookup-all

2014-09-02 Thread Nick Dokos
Alan L Tyree  writes:

> I feel so dumb!
>
> I have this expession attached to a table: (org-lookup-all $1
> '(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)))
>
> It is returning the right list of numbers since I can examine them
> with (nth n 
>
> How do I add the list up? I keep getting #ERROR or obviously wrong
> answers. What I want is something like
>
>  $2='(apply '+ (org-lookup-all $1 '(remote(payments,@2$4..@>$4))
> '(remote(payments,@2$2..@>$2
>
> but that gives me errors since (I presume) the list is a bunch of strings.
>

If they *are* a bunch of strings, then mapping string-to-number across the
list should do the trick:


 $2='(apply '+ (mapcar (function string-to-number) (org-lookup-all $1 
'(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)

-- 
Nick




Re: [O] progress indicator for code blocks?

2014-09-02 Thread Nick Dokos
John Kitchin  writes:

> No, it does not seem to work for me. C-g kills the current evaluation
> for me.
>
> Rainer M Krug  writes:
>
>> Thanks for this snippet - I think something along these lines should be
>> included into org out-of-the-box. 
>>
>> There are many cases where I simply use C-g to go back to emacs while
>> the evaluation is still running - would your snippet still work?
>>
>> Rainer
>>
>>
>> John Kitchin  writes:
>>
>>> John Kitchin  writes:
>>>
>>> I am currently using this bit of advice to change the color of code
>>> blocks while they are being executed so there is a visual hint something
>>> is happening.
>>>
>>> ;; give us some hint we are running
>>> (defadvice org-babel-execute-src-block (around progress nil activate)
>>>   (set-face-attribute
>>>'org-block-background nil :background "LightSteelBlue")
>>>   (message "Running your code block")
>>>   ad-do-it
>>>   (set-face-attribute 'org-block-background nil :background "gray")
>>>   (message "Done with code block"))
>>>
>>>
 Hi all,
 I am using org-mode in a class, and some students wondered if it was
 possible for there to be a progress bar of some kind while a code block
 is running. Right now Emacs just appears to lock up and there is no
 indication anything is happening, especially the first time we run a
 python block.

 I found make-progress-reporter and tried something like this::

 #+BEGIN_SRC emacs-lisp
 (defadvice org-babel-execute-src-block (around progress nil activate)
   (let ((pr (make-progress-reporter "Running")))
 ad-do-it
 (progress-reporter-done pr)))
 #+END_SRC

 but there is no way to update it, so it doesn't quite do anything
 useful.

 What I would really like is an hourglass or some spinning thing. Does
 anyone know how to get that (in a cross-platform way)?

Until emacs becomes multi-threaded, this will be a difficult thing
to do. You can create two asynchronous processes, one to do the
computation and the other to do the spinning: you wait on the first one
and when it finishes, you kill the second, e.g.

#+BEGIN_SRC emacs-lisp
(defvar gq nil)
(defun foo ()
  (let* ((p (start-process "computation" "foo" "sleep" "10"))
 (sentinel (lambda (p event) (delete-process gq
(setq gq (start-process "spinner" "bar" "spin-the-bottle"))
(set-process-sentinel p sentinel))
  )

(foo)
#+END_SRC

where spin-the-bottle is a program that pops up a spinner[fn:1].

Or you can use coroutines: the computation "thread" yields every second
(or half-second or whatever) to the spinner "thread" which advances the
spinner (e.g. with progress-reporter-update) and yields control
back to the computation "thread". There is even a coroutine.el but
I have no idea how to use it or how well it works.

The first one works better if the computation is done externally (if
it's done by a lisp function, then you'll have to write a script that
starts another emacs instance to call the function). The second one
might work better if the computation is done by a lisp function.

In any case, things get complicated very quickly, so most people don't
bother.

Footnotes:

[fn:1] Here's my poor-man's "spinner":

--8<---cut here---start->8---
#!/usr/bin/env python

import gtk
import sys

text = 'Spinning'
dialog = gtk.MessageDialog(None,
   gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
   gtk.MESSAGE_INFO, gtk.BUTTONS_NONE,
   text)
dialog.run()
dialog.destroy()
--8<---cut here---end--->8---

-- 
Nick




Re: [O] Babel more verbose?

2014-09-02 Thread Nick Dokos
John Kitchin  writes:


> I found a message is not sufficient because I get another message from
> running the code block that looks like:
>
> Wrote
> /var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/T/babel-27354lYd/ob-input-27354uxF
>
> and it obscures the first message so you cannot tell what is happening.
>

Right - that seems to be quite accidental though: it is done by
write-region in ob-eval.el:org-babel--shell-command-on-region when it
writes the input file, before it is passed to the shell for execution;
hardly a significant milestone. I wonder if that call should be changed
to suppress the message, something like

  (write-region start end input-file nil 'no-message)

quite apart from the problem at hand.

--
Nick

>>> Try this:
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (defadvice org-babel-execute-src-block (around progress nil activate)
>>>   "create a buffer indicating what is running"
>>>   (let ((code-block (org-element-property :name (org-element-at-point)))
>>> (cb (current-buffer)))
>>> (split-window-below)
>>> (other-window 1)
>>> (switch-to-buffer "*My Babel*")
>>> (insert (format "Running %s" code-block))
>>> (other-window 1)
>>> ad-do-it
>>> (kill-buffer "*My Babel*")
>>> (delete-other-windows)))
>>> #+END_SRC
>>>
>>> It will mess with your windows a bit, but it does what you want I think.
>>>
>>
>> Wouldn't a (message (format "Running %s" code-block)) be enough?
>> That would avoid all the window munging.
>>
>>>
>>> Gary Oberbrunner  writes:
>>>
 I have an org-mode babel program/document that takes about half an
 hour to run (end result is a LaTeX or HTML doc with figures). It's a
 mix of SQL and python. (The SQL is the slow part.) I'd really like it
 if org-mode could tell me, while it's running, which named block it's
 processing. Is there anything like that available? An option perhaps?
>>
>> --
>> Nick
>>
>>
>>

-- 
Nick




Re: [O] Please help with a filter

2014-09-02 Thread Charles Berry
Rafael  gmail.com> writes:

> 
> 
> I want that the result of exporting to markdown the following two blocks
> be identical:

Rafael,

You probably want a derived backend taking 'md as the parent. 

You want to tool up a src-block transcoder.

Look at org-html-src-block (which is what markdown uses) and create
org-md-sage-src-block (say) based on that.

The :language property in `info' - the communication channel - is a human 
language not a computer language. Confusingly, babel has an `info'
variable that has different contents.

Filters might be made to work, but it seems like more work than a
derived backend.

HTH,

Chuck






[O] Help with org-lookup-all

2014-09-02 Thread Alan L Tyree

I feel so dumb!

I have this expession attached to a table: (org-lookup-all $1 
'(remote(payments,@2$4..@>$4)) '(remote(payments,@2$2..@>$2)))


It is returning the right list of numbers since I can examine them with 
(nth n 


How do I add the list up? I keep getting #ERROR or obviously wrong 
answers. What I want is something like


 $2='(apply '+ (org-lookup-all $1 '(remote(payments,@2$4..@>$4)) 
'(remote(payments,@2$2..@>$2


but that gives me errors since (I presume) the list is a bunch of strings.

Thanks for any help,
Alan

--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




[O] [Babel] Source block highlighting in Beamer ...

2014-09-02 Thread aditya siram
Hi all,
How do I get code on my beamer slides to print with color and highlighting?
I'm doing the standard:

#+BEGIN_SRC blah
 
#+END_SRC

but all my source blocks come out the same.

Thanks!
-deech


Re: [O] Marking items done in the past

2014-09-02 Thread Jorge A. Alfaro-Murillo
Fletcher Charest writes: 

Have you made any progress? I am also interested. 


Me too.

On 18 August 2014 02:52, Noah Slater  wrote: 
I have a number of habits set up that I regularly fill in the 
day after the activity was done. Is there a way to mark an item 
as done (in a way that hooks into the habits stuff) but for a 
day in the past? 

So instead of doing C-c C-t d (I have "d" set up as "DONE") I 
could get a prompt which asked me for a date. 



Changing the LOGBOOK, and LAST_REPEAT would not be that difficult, 
since you could use something like:


#+BEGIN_SRC emacs-lisp
 (org-entry-put nil "LAST_REPEAT" (concat "[" (org-read-date) 
 "]")) 
#+END_SRC


But changing the SCHEDULED and the 'State "DONE" from "TODO"' part 
would be more complicated. For example I think one would need to 
modify the function org-auto-repeat-maybe to be able to ask for a 
time. Checking at the code of this function the SCHEDULED part 
doesn't look that complicated, but I couldn't understand what 
produces the 'State "DONE" from "TODO"'


Does any of the org-gurus have an idea?

Best,

--
Jorge.




Re: [O] Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa /home/will/.emacs.d/elpa/org-20140616/)]

2014-09-02 Thread Will Everett
Will Everett  spings.net> writes:
> I believe the :includes header argument is incorrectly parsing lists of
includes for c++. This snippet:
> 
> #+BEGIN_SRC C++ :includes  
> using namespace std;
> printf("Hello ");
> cout << "world";
> #+END_SRC
> 
> produces a compiler error:
> 
> warning: extra tokens at end of #include directive
>  #include  
> 
> Then, of course printf and cout are undeclared. It looks like the include
is just throwing all the includes onto one line when they should be broken
up and each put on their own line.


Sorry to be a pest, but did anyone see this? Does no one else try to use
org-babel for LP with C/C++?




Re: [O] org-agenda

2014-09-02 Thread Jorge A. Alfaro-Murillo
David Arroyo Menendez writes: 

I've a recurrent little problem, with a light TODO.org 
org-agenda is fast, but every year or so, I need create a new 
TODO.org, because is so slow. More people with this problem? 
Some solution? 


I keep an archive file, so I get things out of my agenda files 
after they are done with C-c C-x C-a. Check the variable 
`org-archive-location'.


Best,

--
Jorge.




[O] Normalizing tags

2014-09-02 Thread Brett Witty
Hi,

Has anyone made a module to normalize tags across your entire setup? That
is if you have "Blog" and "blog" as tags, then you fix it as one or the
other, or "hint" and "tip" tags being collapsed.

If not, would people be interested in that?

BrettW


Re: [O] [PATCH] make orgtbl-ascii-plot easier to install

2014-09-02 Thread Thierry Banel
Le 29/08/2014 11:54, Nicolas Goaziou a écrit :
>
> Patch applied (with tiny changes to comments formatting, and a few
> trailing whitespaces).
>

Here is a patch for the info doc.
I added a few lines in the Org-Plot page.

Regards
Thierry


>From 96155719a26614f1abed7370ddd81f7238767597 Mon Sep 17 00:00:00 2001
From: Thierry Banel 
Date: Tue, 2 Sep 2014 23:41:41 +0200
Subject: [PATCH] * doc/org.texi (Org-Plot): add ascii plot

---
 doc/org.texi | 45 +++--
 1 file changed, 43 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index fafa93b..d0e1476 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -3258,8 +3258,13 @@ functions.
 @cindex plot tables using Gnuplot
 @cindex #+PLOT
 
-Org-Plot can produce 2D and 3D graphs of information stored in org tables
-using @file{Gnuplot} @uref{http://www.gnuplot.info/} and @file{gnuplot-mode}
+Org-Plot can produce graphs of information stored in org tables, either
+graphically or in ascii-art.
+
+@subheading Graphical plots using @file{Gnuplot}
+
+Org-Plot produces 2D and 3D graphs using @file{Gnuplot}
+@uref{http://www.gnuplot.info/} and @file{gnuplot-mode}
 @uref{http://xafs.org/BruceRavel/GnuplotMode}.  To see this in action, ensure
 that you have both Gnuplot and Gnuplot mode installed on your system, then
 call @code{org-plot/gnuplot} on the following table.
@@ -3337,6 +3342,42 @@ may still want to specify the plot type, as that can impact the content of
 the data file.
 @end table
 
+@subheading Ascii bar plots
+
+While the cursor is on a column, typing @kbd{C-c p} create a new column
+containing an ascii-art bars plot.  The plot is implemented through a regular
+column formula.  When the source column changes, the bar plot may be updated
+by refreshing the table, for example typing @kbd{C-u C-c *}.
+
+@example
+@group
+| Sede  | Max cites |  |
+|---+---+--|
+| Chile |257.72 |  |
+| Leeds |165.77 | WWWh |
+| Sao Paolo | 71.00 | WWW; |
+| Stockholm |134.19 | WW:  |
+| Morelia   |257.56 | WWWH |
+#+TBLFM: $3='(orgtbl-ascii-draw $2 0 257.72 12)
+@end group
+@end example
+
+The formula is an elisp call:
+@lisp
+(orgtbl-ascii-draw COLUMN MIN MAX WIDTH)
+@end lisp
+
+@table @code
+@item COLUMN
+  is a reference to the source column.
+@item MIN MAX
+  are the minimal and maximal values displayed.  Sources values
+  outside this range are displayed as @code{too small}
+  or @code{too large}.
+@item WIDTH
+  is the width in characters of the bar-plot.  It default to @code{12}.
+@end table
+
 @node Hyperlinks
 @chapter Hyperlinks
 @cindex hyperlinks
-- 
1.9.1



Re: [O] Getting lots of Emacs crashes

2014-09-02 Thread David Arroyo Menendez
Noah Slater  writes:

> Hello,
>
> I'm getting a lot of Emacs crashes recently using Org. Is there any
> way I can help to debug why this is happening?
>
> Thanks,

You can open Emacs with --debug-init and take a look to *Messages* 

Good luck.



[O] org-agenda

2014-09-02 Thread David Arroyo Menendez

Hello,

I've a recurrent little problem, with a light TODO.org org-agenda is
fast, but every year or so, I need create a new TODO.org, because is so
slow. More people with this problem? Some solution?

Thanks in advance.



Re: [O] Marking items done in the past

2014-09-02 Thread Fletcher Charest
Hi,

Have you made any progress? I am also interested.

FC


On Fri, Aug 22, 2014 at 12:40 AM, Noah Slater  wrote:

> I have posted this to StackOverflow, if someone wants to grab the karma:
>
> http://stackoverflow.com/questions/25437069/
>
> On 18 August 2014 02:52, Noah Slater  wrote:
> > Hello,
> >
> > I have a number of habits set up that I regularly fill in the day
> > after the activity was done. Is there a way to mark an item as done
> > (in a way that hooks into the habits stuff) but for a day in the past?
> >
> > So instead of doing C-c C-t d (I have "d" set up as "DONE") I could
> > get a prompt which asked me for a date.
> >
> > Something like that anyway.
> >
> > Thanks,
> >
> > --
> > Noah Slater
> > https://twitter.com/nslater
>
>
>
> --
> Noah Slater
> https://twitter.com/nslater
>
>


Re: [O] Symbol's value as variable is void: org-planning-line-re

2014-09-02 Thread Nick Dokos
Jeff Kowalczyk  writes:

> Nicolas Goaziou  nicolasgoaziou.fr> writes:
>>
>> >> `org-planning-line-re' is a defconst defined in "org.el". It looks like
>> >> a mixed installation.
>> >
>> > It's possible, how do I confirm?
>> 
>> M-x org-version might tell you.  You can also try to "make autoloads".
>
> You are correct, there is a discrepancy in versions:
>
> M-x org-version:
>
> Org-mode version 8.2.6 (release_8.2.6-1 @ ~/.emacs.d/el-get/org-mode/lisp/)
>
> Make output @401bf2:
>
> org-version: 8.3beta (release_8.3beta-310-g38d0eb)
>
> I tried the following, restart-testing each step with no change
> in M-x org-version reported version:
>
> - org-mode git pull, make clean && make && make autoloads
>

Strictly speaking, you don't need `make autoloads' here : `make' is
equivalent to `make all' and the `all' target depends on the `autoloads'
target, so just `make' is enough. OTOH, it does not hurt (other than it
duplicates work that is already done).

> - remove el-get .loaddefs.el, restart emacs (which rebuilds .loaddefs)
>
> - el-get update org-mode
>
> For comparison to bundled org version, I am using Emacs bzr upstream:
>
> GNU Emacs 24.4.50.1 (x86_64-pc-linux-gnu, X toolkit) of 2014-09-01
>

Check your load-path. 

--
Nick





Re: [O] Symbol's value as variable is void: org-planning-line-re

2014-09-02 Thread Jeff Kowalczyk
Nicolas Goaziou  nicolasgoaziou.fr> writes:
>
> >> `org-planning-line-re' is a defconst defined in "org.el". It looks like
> >> a mixed installation.
> >
> > It's possible, how do I confirm?
> 
> M-x org-version might tell you.  You can also try to "make autoloads".

You are correct, there is a discrepancy in versions:

M-x org-version:

Org-mode version 8.2.6 (release_8.2.6-1 @ ~/.emacs.d/el-get/org-mode/lisp/)

Make output @401bf2:

org-version: 8.3beta (release_8.3beta-310-g38d0eb)

I tried the following, restart-testing each step with no change
in M-x org-version reported version:

- org-mode git pull, make clean && make && make autoloads

- remove el-get .loaddefs.el, restart emacs (which rebuilds .loaddefs)

- el-get update org-mode

For comparison to bundled org version, I am using Emacs bzr upstream:

GNU Emacs 24.4.50.1 (x86_64-pc-linux-gnu, X toolkit) of 2014-09-01

Thanks,
Jeff




[O] help

2014-09-02 Thread Moritz Kiefer
help



Re: [O] Symbol's value as variable is void: org-planning-line-re

2014-09-02 Thread Nicolas Goaziou
Jeff Kowalczyk  writes:

> Nicolas Goaziou  nicolasgoaziou.fr> writes:
>>
>> Jeff Kowalczyk  gmail.com> writes:
>> 
>> > Using org-mode a4a1d85 or 2df0785, I see multiple errors, including:
>> >
>> > Using M-q to fill a paragraph, error on the line at point:
>> >
>> >   user-error: An element cannot be parsed line 7149
>> >
>> >   user-error: An element cannot be parsed line 7141
>> >
>> > When using M-RET to insert a heading:
>> >
>> >   byte-code: Symbol's value as variable is void: org-planning-line-re
>> >
>> > When using C-c to update the duration of a clocked time line:
>> >
>> >   byte-code: Symbol's value as variable is void: org-planning-line-re
>> 
>> `org-planning-line-re' is a defconst defined in "org.el". It looks like
>> a mixed installation.
>
> It's possible, how do I confirm?

M-x org-version might tell you.  You can also try to "make autoloads".

Regards,

-- 
Nicolas Goaziou



Re: [O] org-elements-parse-buffer and weird property drawers

2014-09-02 Thread Will Monroe
Hello,

I'm not as adept at troubleshooting as others on this list, but I believe
I've encountered this problem as well.  After updating my org-mode version
this morning, I opened some of my org files and encountered some strange
display behaviors:

- The "TODO" keywords did not seem to have the usual faces applied to
them.  I expected to see bold text and different colors on some of them but
I did not.

- I also saw that notes and some of the properties were not indented
anymore.

- In addition, I discovered that some actions (e.g., clocking in/out) no
longer seemed to work.

None of these were problems before updating.  And I am able to open the
same org files without any problems on other machines that have not been
updated.

The error report information from org is below.  If there's any more detail
I can provide, I'd be glad to do so.  If anyone has ideas about how to:  1)
resolve the problem and/or 2) revert to a prior version using basic
installation methods (ie, M-x package install), I would greatly appreciate
it.

Thanks,

Will

***
Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2013-03-12 on bob.porkrind.org
Package: Org-mode version 8.2.7c (8.2.7c-57-g37bf05-elpa @
/Users/wmonro1/.emacs.d/elpa/
org-20140901/)

current state:
==
(setq
 org-export-backends '(ascii html icalendar latex md odt freemind)
 org-hide-leading-stars t
 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-html-format-drawer-function '(lambda (name contents) contents)
 org-log-done t
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-pdf-process '("pdflatex -shell-escape -shell-escape -interaction
nonstopmode -output-directory %o %f" "pdflatex -shell-escape -shell-escape
-interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape
-shell-escape -interaction nonstopmode -output-directory %o %f")
 org-export-date-timestamp-format "%Y-%m-%d"
 org-agenda-custom-commands '(("w" todo "WAITING") ("n" todo "NEXT") ("S"
tags-todo "@SILENCE")
  ("e" tags-todo "@EMAIL") ("E" tags-todo "@ERRAND")
  ("W" "calendar cd-"
   ((agenda "Work"
 ((org-agenda-files
   (quote
("~/Dropbox/org/workx.org" "~/Dropbox/org/prodevx.org"
 "~/Dropbox/org/writingx.org")
)
   )
  )
 )
)
   )
  ("H" "calendar cd-"
   ((agenda "Home"
 ((org-agenda-files
   (quote
("~/Dropbox/org/homex.org" "~/Dropbox/org/cookingx.org"
 "~/Dropbox/org/errandsx.org")
)
   )
  )
 )
)
   )
  ("P" "calendar cd-"
   ((agenda "Personal"
 ((org-agenda-files
   (quote
("~/Dropbox/org/fitnessx.org" "~/Dropbox/org/socialx.org
"
 "~/Dropbox/org/musicx.org")
)
   )
  )
 )
)
   )
  ("h" "Daily habits" ((agenda "habits"))
   ((org-agenda-show-log t) (org-agenda-ndays 1)
(org-agenda-log-mode-items (quote (state)))
(org-agenda-skip-function
 (quote (org-agenda-skip-entry-if (quote notregexp)
":HABIT:")))
)
   )
  )
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-default-notes-file "~/Dropbox/org/inbox.org"
 org-startup-indented t
 org-after-todo-state-change-hook '(org-clock-out-if-current
mm/org-insert-trigger)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-odt-format-headline-function 'ignore
 org-loop-over-headlines-in-active-region "t"
 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-babel-pre-tangle-hook '(save-buffer)
 org-global-properties '(("Effort_ALL" . "0:05 0:15 0:25 0:45 1:00 2:00"))
 org-export-copy-to-kill-ring t
 org-trigger-hook '(org-depend-trigger-todo)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
before-save-hook org-encrypt-entries nil t]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook org-show-block-all append
lo

[O] Please help with a filter

2014-09-02 Thread Rafael

I want that the result of exporting to markdown the following two blocks
be identical:

#+begin_src org
  #+BEGIN_MARKDOWN
  
2+3
  
  #+END_MARKDOWN
  
  #+BEGIN_SRC sage
2+3
  #+END_SRC
#+end_src

I have tried the following, which seems similar to examples in the web,
and I think it should work, but it doesn't:

#+begin_src emacs-lisp
  (defun org-octopress-src-block (contents backend info)
(when (eq backend 'md)
  (let (
  (lang (org-element-property :language info))
  (value (org-element-property :value info)))
(message "Language is %s. Value is %s" lang value)
(when (eq lang "sage" )
(format
 "
 %s
 \n"
 value
 ))
))
)
  
  (add-to-list 'org-export-filter-src-block-functions
 'org-octopress-src-block)
#+end_src

My debugging message says: 'Language is nil. Value is nil', so I cannot
get the name of the language from the source code. What should I do to
get the filter to work?

Thanks in advance,



Re: [O] Babel more verbose?

2014-09-02 Thread John Kitchin
Nick Dokos  writes:

I found a message is not sufficient because I get another message from
running the code block that looks like:

Wrote
/var/folders/5q/lllv2yf95hg_n6h6kjttbmdwgn/T/babel-27354lYd/ob-input-27354uxF

and it obscures the first message so you cannot tell what is happening.

Here is a another approach that simply puts an overlay to change the
color of the text in the code block while running.

#+BEGIN_SRC emacs-lisp
(defadvice org-babel-execute-src-block (around progress nil activate)
  "create a buffer indicating what is running"
  (let ((ol (make-overlay (org-element-property :begin (org-element-at-point))
  (org-element-property :end (org-element-at-point)

(overlay-put ol 'face '(foreground-color . "blue"))

ad-do-it

(delete-overlay ol)))
#+END_SRC



> John Kitchin  writes:
>
>> Try this:
>>
>> #+BEGIN_SRC emacs-lisp
>> (defadvice org-babel-execute-src-block (around progress nil activate)
>>   "create a buffer indicating what is running"
>>   (let ((code-block (org-element-property :name (org-element-at-point)))
>>  (cb (current-buffer)))
>> (split-window-below)
>> (other-window 1)
>> (switch-to-buffer "*My Babel*")
>> (insert (format "Running %s" code-block))
>> (other-window 1)
>> ad-do-it
>> (kill-buffer "*My Babel*")
>> (delete-other-windows)))
>> #+END_SRC
>>
>> It will mess with your windows a bit, but it does what you want I think.
>>
>
> Wouldn't a (message (format "Running %s" code-block)) be enough?
> That would avoid all the window munging.
>
>>
>> Gary Oberbrunner  writes:
>>
>>> I have an org-mode babel program/document that takes about half an
>>> hour to run (end result is a LaTeX or HTML doc with figures). It's a
>>> mix of SQL and python. (The SQL is the slow part.) I'd really like it
>>> if org-mode could tell me, while it's running, which named block it's
>>> processing. Is there anything like that available? An option perhaps?
>
> --
> Nick
>
>
>

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



Re: [O] Babel more verbose?

2014-09-02 Thread Grant Rettke
I am curious about how to get more reporting when tangling is
occurring because I would like to narrow down what parts of my
document are slow to tangle so that I can refactor them and speed it
up.
Grant Rettke | ACM, ASA, FSF
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Tue, Sep 2, 2014 at 10:01 AM, David Wagle  wrote:
> It sounds like perhaps the issue is code blocks with a long run-time that
> may or may not fail or hang in some way?
>
> If that's the case, the solution is probably simply breaking up your code
> blocks into smaller bits of code so that you more easily follow what's
> happening.
>
> If the code is emacs-lisp, it's easy enough to put (message ...) calls
> entering and leaving the code blocks.
>
>
> On Tue, Sep 2, 2014 at 9:54 AM, Nick Dokos  wrote:
>>
>> John Kitchin  writes:
>>
>> > Try this:
>> >
>> > #+BEGIN_SRC emacs-lisp
>> > (defadvice org-babel-execute-src-block (around progress nil activate)
>> >   "create a buffer indicating what is running"
>> >   (let ((code-block (org-element-property :name (org-element-at-point)))
>> >   (cb (current-buffer)))
>> > (split-window-below)
>> > (other-window 1)
>> > (switch-to-buffer "*My Babel*")
>> > (insert (format "Running %s" code-block))
>> > (other-window 1)
>> > ad-do-it
>> > (kill-buffer "*My Babel*")
>> > (delete-other-windows)))
>> > #+END_SRC
>> >
>> > It will mess with your windows a bit, but it does what you want I think.
>> >
>>
>> Wouldn't a (message (format "Running %s" code-block)) be enough?
>> That would avoid all the window munging.
>>
>> >
>> > Gary Oberbrunner  writes:
>> >
>> >> I have an org-mode babel program/document that takes about half an
>> >> hour to run (end result is a LaTeX or HTML doc with figures). It's a
>> >> mix of SQL and python. (The SQL is the slow part.) I'd really like it
>> >> if org-mode could tell me, while it's running, which named block it's
>> >> processing. Is there anything like that available? An option perhaps?
>>
>> --
>> Nick
>>
>>
>



Re: [O] Store links under cursor

2014-09-02 Thread Carlos Pita
Well I've done (part of) my homework and found out that:

* By default gnus uses shr (simple html renderer) for washing html parts

* The function shr-copy-url (bound to u) will copy the url under point
  to the kill ring.

* The url is stored as a text property:
  (get-text-property (point) 'shr-url)  -->  url

I guess I can figure out how to write my own link handler now, but maybe
one generous soul between you has done it already and is eager to share
the result.

Cheers
--
Carlos

Carlos Pita  writes:

> Hi all,
>
> there are occasions, v.g. when reading a gnus article, when I don't want
> to store a link to the article itself (which is the behavior of C-c l)
> but some link that is part of the article instead. I use to read rss
> through gwene and many times I want to link the url for the full post,
> while the gnus article is itself irrelevant as a bookmark.
>
> How can I achieve that with org? That is, assuming the point is under
> some link, to store that link and not the link for the document
> containing it.
>
> Thank you in advance.
>
> Cheers
> --
> Carlos




Re: [O] Symbol's value as variable is void: org-planning-line-re

2014-09-02 Thread Jeff Kowalczyk
Nicolas Goaziou  nicolasgoaziou.fr> writes:
>
> Jeff Kowalczyk  gmail.com> writes:
> 
> > Using org-mode a4a1d85 or 2df0785, I see multiple errors, including:
> >
> > Using M-q to fill a paragraph, error on the line at point:
> >
> >   user-error: An element cannot be parsed line 7149
> >
> >   user-error: An element cannot be parsed line 7141
> >
> > When using M-RET to insert a heading:
> >
> >   byte-code: Symbol's value as variable is void: org-planning-line-re
> >
> > When using C-c to update the duration of a clocked time line:
> >
> >   byte-code: Symbol's value as variable is void: org-planning-line-re
> 
> `org-planning-line-re' is a defconst defined in "org.el". It looks like
> a mixed installation.

It's possible, how do I confirm? I build org daily with
'make clean && make'. git status shows clean tree (d4e4b1e today).

$ find . -iname 'org.el*'
./lisp/org.el

$ find . -iname '.el[c~]'
(no output)

Jeff





[O] Follow mode to also narrow buffer

2014-09-02 Thread casedeck
Hi all,

apologies if this was asked before, I couldn't find it.

I would like, when using Follow mode in the agenda view, to have the other
buffer (opened through Follow) be immediately narrowed to the current
subtree (through function org-narrow-to-subtree). 

So, the Follow-mode would not show the whole agenda file (centered to the
selected item in the agenda), but would show only that item and it's subtree. 

Ideally, if the current item is a subtask, the Follow mode would also show
the parent task abbreviated (with "..."), and it's parent if it exists, and
so on until the top heading marked with a todo keyword is shown (I guess
that could be called org-narow-subtree-with-above-tasks or similar) - but
I'm not sure this is achievable...

I suppose just the buffer narrowing can be done (probably quite easily)
through some hook or something, but I (yet) don't have the skill to write
that code myself. Can anyone help, please?





[O] Store links under cursor

2014-09-02 Thread Carlos Pita
Hi all,

there are occasions, v.g. when reading a gnus article, when I don't want
to store a link to the article itself (which is the behavior of C-c l)
but some link that is part of the article instead. I use to read rss
through gwene and many times I want to link the url for the full post,
while the gnus article is itself irrelevant as a bookmark.

How can I achieve that with org? That is, assuming the point is under
some link, to store that link and not the link for the document
containing it.

Thank you in advance.

Cheers
--
Carlos




Re: [O] Command to open up any agenda file?

2014-09-02 Thread Kyle Meyer
Noah Slater  wrote:
> Kyle,
>
> Ooh, thanks! Any way to get it so I don't have to TAB complete the
> leading path? Sort of how like org-iswitchb lets me just type in "Fo"
> and then tab complete to "Foo.org" without
> "/Users/nslater/Documents/Org" or whatever being prepended?

Does turning on `org-completion-use-iswitchb' or
`org-completion-use-ido' work for you? I think `org-switchb' just sets
`org-completion-use-iswitchb' to t if both of the above variables are
nil.




Re: [O] Getting lots of Emacs crashes

2014-09-02 Thread Richard Lawrence
Hi Noah,

Noah Slater  writes:

> I'm getting a lot of Emacs crashes recently using Org. Is there any
> way I can help to debug why this is happening?

What version of Org are you using?  What happens when Emacs crashes?

Best,
Richard




Re: [O] Babel more verbose?

2014-09-02 Thread David Wagle
It sounds like perhaps the issue is code blocks with a long run-time that
may or may not fail or hang in some way?

If that's the case, the solution is probably simply breaking up your code
blocks into smaller bits of code so that you more easily follow what's
happening.

If the code is emacs-lisp, it's easy enough to put (message ...) calls
entering and leaving the code blocks.


On Tue, Sep 2, 2014 at 9:54 AM, Nick Dokos  wrote:

> John Kitchin  writes:
>
> > Try this:
> >
> > #+BEGIN_SRC emacs-lisp
> > (defadvice org-babel-execute-src-block (around progress nil activate)
> >   "create a buffer indicating what is running"
> >   (let ((code-block (org-element-property :name (org-element-at-point)))
> >   (cb (current-buffer)))
> > (split-window-below)
> > (other-window 1)
> > (switch-to-buffer "*My Babel*")
> > (insert (format "Running %s" code-block))
> > (other-window 1)
> > ad-do-it
> > (kill-buffer "*My Babel*")
> > (delete-other-windows)))
> > #+END_SRC
> >
> > It will mess with your windows a bit, but it does what you want I think.
> >
>
> Wouldn't a (message (format "Running %s" code-block)) be enough?
> That would avoid all the window munging.
>
> >
> > Gary Oberbrunner  writes:
> >
> >> I have an org-mode babel program/document that takes about half an
> >> hour to run (end result is a LaTeX or HTML doc with figures). It's a
> >> mix of SQL and python. (The SQL is the slow part.) I'd really like it
> >> if org-mode could tell me, while it's running, which named block it's
> >> processing. Is there anything like that available? An option perhaps?
>
> --
> Nick
>
>
>


Re: [O] Babel more verbose?

2014-09-02 Thread Nick Dokos
John Kitchin  writes:

> Try this:
>
> #+BEGIN_SRC emacs-lisp
> (defadvice org-babel-execute-src-block (around progress nil activate)
>   "create a buffer indicating what is running"
>   (let ((code-block (org-element-property :name (org-element-at-point)))
>   (cb (current-buffer)))
> (split-window-below)
> (other-window 1)
> (switch-to-buffer "*My Babel*")
> (insert (format "Running %s" code-block))
> (other-window 1)
> ad-do-it
> (kill-buffer "*My Babel*")
> (delete-other-windows)))
> #+END_SRC
>
> It will mess with your windows a bit, but it does what you want I think.
>

Wouldn't a (message (format "Running %s" code-block)) be enough?
That would avoid all the window munging.

>
> Gary Oberbrunner  writes:
>
>> I have an org-mode babel program/document that takes about half an
>> hour to run (end result is a LaTeX or HTML doc with figures). It's a
>> mix of SQL and python. (The SQL is the slow part.) I'd really like it
>> if org-mode could tell me, while it's running, which named block it's
>> processing. Is there anything like that available? An option perhaps?

--
Nick




Re: [O] progress indicator for code blocks?

2014-09-02 Thread John Kitchin
No, it does not seem to work for me. C-g kills the current evaluation
for me.

Rainer M Krug  writes:

> Thanks for this snippet - I think something along these lines should be
> included into org out-of-the-box. 
>
> There are many cases where I simply use C-g to go back to emacs while
> the evaluation is still running - would your snippet still work?
>
> Rainer
>
>
> John Kitchin  writes:
>
>> John Kitchin  writes:
>>
>> I am currently using this bit of advice to change the color of code
>> blocks while they are being executed so there is a visual hint something
>> is happening.
>>
>> ;; give us some hint we are running
>> (defadvice org-babel-execute-src-block (around progress nil activate)
>>   (set-face-attribute
>>'org-block-background nil :background "LightSteelBlue")
>>   (message "Running your code block")
>>   ad-do-it
>>   (set-face-attribute 'org-block-background nil :background "gray")
>>   (message "Done with code block"))
>>
>>
>>> Hi all,
>>> I am using org-mode in a class, and some students wondered if it was
>>> possible for there to be a progress bar of some kind while a code block
>>> is running. Right now Emacs just appears to lock up and there is no
>>> indication anything is happening, especially the first time we run a
>>> python block.
>>>
>>> I found make-progress-reporter and tried something like this::
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (defadvice org-babel-execute-src-block (around progress nil activate)
>>>   (let ((pr (make-progress-reporter "Running")))
>>> ad-do-it
>>> (progress-reporter-done pr)))
>>> #+END_SRC
>>>
>>> but there is no way to update it, so it doesn't quite do anything
>>> useful.
>>>
>>> What I would really like is an hourglass or some spinning thing. Does
>>> anyone know how to get that (in a cross-platform way)?

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



Re: [O] Babel more verbose?

2014-09-02 Thread John Kitchin

Try this:

#+BEGIN_SRC emacs-lisp
(defadvice org-babel-execute-src-block (around progress nil activate)
  "create a buffer indicating what is running"
  (let ((code-block (org-element-property :name (org-element-at-point)))
(cb (current-buffer)))
(split-window-below)
(other-window 1)
(switch-to-buffer "*My Babel*")
(insert (format "Running %s" code-block))
(other-window 1)
ad-do-it
(kill-buffer "*My Babel*")
(delete-other-windows)))
#+END_SRC

It will mess with your windows a bit, but it does what you want I think.


Gary Oberbrunner  writes:

> I have an org-mode babel program/document that takes about half an
> hour to run (end result is a LaTeX or HTML doc with figures). It's a
> mix of SQL and python. (The SQL is the slow part.) I'd really like it
> if org-mode could tell me, while it's running, which named block it's
> processing. Is there anything like that available? An option perhaps?

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



Re: [O] [babel, R] Commands are not copied in the iESS buffer upon evaluation

2014-09-02 Thread Sebastien Vauban
Charles Berry wrote:
> Sebastien Vauban  writes:
>> Aaron Ecay wrote:
>>> 2014ko abuztuak 29an, Sebastien Vauban-ek idatzi zuen:
>>>
 Does it have something to do with `ess-eval-visibly' not being respected
 (whose default is `t')?
>>>
>>> Indeed, babel’s R support let-binds this variable to nil when evaluating
>>> value-type results in a session.
>> 
>> OK. Can we put it to `t' by default [1] or, at least, have Org Babel
>> respect our ESS setting?
>
> If you Google `ess-eval-visibly slow' you will get a bunch of hits
> that show why people prefer `nil' and why that is a good default.

OK, I can imagine letting the current default is good.

> But it may be OK to allow a user to override.

But I really find we should be able to override it, yes!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Table formula with @I

2014-09-02 Thread Andrea Rossetti
Charles Millar  writes:
> I must be missing something. When I recalculate the table (update
> table) applying both above TBLFM's - on the line to be updated, in the
> TBLFM line, and in the table itself, an error is returned
>
> "can't assign to hline relative reference"
>
> Org-mode version 8.3beta (release_8.3beta-304-ga4a1d8 @
> c:/cygwin/home/Charlie01/.elisp/org-mode/lisp/)
> GNU Emacs 24.3.1 (i386-mingw-nt6.0.6002) of 2013-03-17 on MARVIN
> Windows Vista SP2
>

It works on my Org version (8.2.7c from ELPA). After a bit of
digging I found that:

  - the "can't assign to hline relative reference" message was
added by commit a2c71a6e359cb93aa652f65c666294fb2a3b5e1b
dated Nov 5th, 2013

  - motivations for that patch have been discussed here:
http://thread.gmane.org/gmane.emacs.orgmode/71562
 
  - so I think I suggested something undocumented/unsupported
that can't be used anymore, sorry :(

  - I'd like to express it as a wish for the future: support for
hline references ("@I") in the left side of the formula
would be a great feature (and it already seemed to work
in some special cases, like @I+1$1..@I+1$1)

Kindest regards,

  Andrea



[O] org-pretty-entitities t screws up clocktable formatting

2014-09-02 Thread Joost Helberg
Hi,

The following piece of org-code comes out a bit crooked iff
org-pretty-entities is set:

* testing
  CLOCK: [2014-09-02 Tue 10:54]--[2014-09-02 Tue 12:42] =>  1:48
  CLOCK: [2014-09-02 Tue 09:02]--[2014-09-02 Tue 09:15] =>  0:13
  CLOCK: [2014-09-01 Mon 14:42]--[2014-09-01 Mon 16:47] =>  2:05
** testing indented
  CLOCK: [2014-09-01 Mon 14:34]--[2014-09-01 Mon 14:35] =>  0:01
  CLOCK: [2014-09-01 Mon 12:00]--[2014-09-01 Mon 12:10] =>  0:10
  CLOCK: [2014-09-01 Mon 08:16]--[2014-09-01 Mon 11:30] =>  3:14

* clocktable
#+BEGIN: clocktable :maxlevel 3  :block 2014-W36 :formula % 
#+CAPTION: Clock summary at [2014-09-02 Tue 14:00], for week 2014-W36.
| Headline   | Time   |  |   | % |
|++--+---+---|
| *Total time*   | *7:31* |  |   | 100.0 |
|++--+---+---|
| testing| 7:31   |  |   | 100.0 |
| \emsp testing indented || 3:25 |   |  45.5 |
#+TBLFM: $6='(org-clock-time% @2$3 $3..$5);%.1f
#+END:

When my cursor is inside the table and I run M-x org-table-align ,
things come out OK.

Somehow setting the table-write function to:

(defun my-formatter( ipos tables params )
  (progn
(org-clocktable-write-default ipos tables params)
(forward-line 2)
(org-table-align)
)
  )

doesn't work.

I use Emacs 24.4.50 and org-mode 8.2.7c (20140901).

Can someone point me into a direction in order to fix this in the
org-code? 

regards,

Joost

-- 
Snow B.V.



Re: [O] Moving my init.el to Org

2014-09-02 Thread Jonathan Leech-Pepin
Hello,

On 2 September 2014 08:42, Rasmus  wrote:

> Rainer M Krug  writes:
>
> > Oleh  writes:
> >
> >>> I know that I could use org-babel-load-file, or outshine.  What are
> >>> other possibilities?  What are the caveats (and advantages) of both
> >>> (other?) ways?
> >>
> >> I'm using a one .el file per mode approach, with around 4000 lines
> >> split into 40 files.
> >>
> >> This approach simplifies things a lot: for instance I haven't touched
> >> Javascript in ages, but all my customizations for it are sitting in
> >> javascript.el without getting in the way of the stuff that I'm using
> >> now. They aren't even loaded unless I open a js file.
> >
> > Interesting - is your configuration online, so that one could take a
> > look at it? I did not find them on your github page?
> >
> > Or how do you do it, that the e.g. javascript.el is only loaded when a
> > js file is opened? Because this is exactly what I would like to have.
>
> How about something like this:
>
> (with-eval-after-load 'js-mode (load "javascript.el"))
>
> Use eval-after-load if you are using an older Emacs.  Note I don't
> know if there's anything called js-mode. . .
>

I've been using use-package (https://github.com/jwiegley/use-package) for
only loading the various package-specific configurations when needed.

For that example it would be:

(use-package js-mode
  :mode ("\\.js\\'" . js-mode)
  :config (require 'javascript) ;; or (load "javascript.el") if not provided
)

In my case it's still all in my init.el (with Outshine headings for each
mode that use-package manages), but could easily extract the portions into
their own files (especially for larger configurations like org)

Regards,
Jon


Re: [O] Moving my init.el to Org

2014-09-02 Thread Rasmus
Rainer M Krug  writes:

> Oleh  writes:
>
>>> I know that I could use org-babel-load-file, or outshine.  What are
>>> other possibilities?  What are the caveats (and advantages) of both
>>> (other?) ways?
>>
>> I'm using a one .el file per mode approach, with around 4000 lines
>> split into 40 files.
>>
>> This approach simplifies things a lot: for instance I haven't touched
>> Javascript in ages, but all my customizations for it are sitting in
>> javascript.el without getting in the way of the stuff that I'm using
>> now. They aren't even loaded unless I open a js file.
>
> Interesting - is your configuration online, so that one could take a
> look at it? I did not find them on your github page?
>  
> Or how do you do it, that the e.g. javascript.el is only loaded when a
> js file is opened? Because this is exactly what I would like to have.

How about something like this: 

(with-eval-after-load 'js-mode (load "javascript.el"))

Use eval-after-load if you are using an older Emacs.  Note I don't
know if there's anything called js-mode. . .

-- 
Summon the Mothership!




Re: [O] Table formula with @I

2014-09-02 Thread Loris Bennett
Charles Millar  writes:

> Andrea Rossetti wrote:
>> "Loris Bennett"  writes:
>>> In the following:
>>>
>>> |   |   |   |
>>> |   |   |   |
>>> |---+---+---|
>>> | 1 | 1 | 1 |
>>> #+TBLFM: @I$3=1
>>>
>>> I expected to get a '1' just in the third column.  Where am I going
>>> wrong?
>> (apologies in advance for suggesting just a workaround
>> instead of a rational explanation, hope it helps anyway)
>>
>> It happened to me too some time ago, I used a slightly
>> different formula and it worked:
>>
>> #+TBLFM: @I+1$3..@I+1$3=1
>>
>> Does it work for you too? Kindest regards,
>>
>>Andrea
>>
> I must be missing something. When I recalculate the table (update
> table) applying both above TBLFM's - on the line to be updated, in the
> TBLFM line, and in the table itself, an error is returned
>
> "can't assign to hline relative reference"
>
> Org-mode version 8.3beta (release_8.3beta-304-ga4a1d8 @
> c:/cygwin/home/Charlie01/.elisp/org-mode/lisp/)
> GNU Emacs 24.3.1 (i386-mingw-nt6.0.6002) of 2013-03-17 on MARVIN
> Windows Vista SP2
>
> Charlie

Andrea's kludge works for me.  My understanding is that only a C-c C-c
in the TBLFM would actually update the table.

Looking at the documentation at 

http://orgmode.org/manual/References.html#References

again, I would have expected

@I+1$3

to be a correct way of referring to the 3rd column in the row after the
first hline, rather than the entire row.   It is unclear
to me what 

@I$3

as I used in my example above should correspond to.

Cheers,

Loris

-- 
This signature is currently under construction.




[O] Babel more verbose?

2014-09-02 Thread Gary Oberbrunner
I have an org-mode babel program/document that takes about half an hour to
run (end result is a LaTeX or HTML doc with figures).  It's a mix of SQL
and python.  (The SQL is the slow part.)  I'd really like it if org-mode
could tell me, while it's running, which named block it's processing.  Is
there anything like that available?  An option perhaps?


-- 
Gary


Re: [O] Command to open up any agenda file?

2014-09-02 Thread Noah Slater
Kyle,

Ooh, thanks! Any way to get it so I don't have to TAB complete the
leading path? Sort of how like org-iswitchb lets me just type in "Fo"
and then tab complete to "Foo.org" without
"/Users/nslater/Documents/Org" or whatever being prepended?


On 1 September 2014 22:58, Kyle Meyer  wrote:
> Kyle Meyer  wrote:
> [...]
>> I don't know of any Org function that does this either (and, as
>> suggested, I prefer projectile for this), but if you just want a single
>> function, I think it could be as simple as this:
>>
>> #+begin_src elisp
>>   (defun find-org-agenda-file (file)
>> (interactive (list (org-completing-read "Agenda file: " 
>> (org-agenda-files
>> (find-file file))
>> #+end_src
>
> Oops, I'd actually change that to this (although the interactive
> behavior is the same).
>
> #+begin_src elisp
>   (defun find-org-agenda-file ()
> (interactive)
> (find-file (org-completing-read "Agenda file: " (org-agenda-files
> #+end_src



-- 
Noah Slater
https://twitter.com/nslater



Re: [O] Table formula with @I

2014-09-02 Thread Charles Millar


Andrea Rossetti wrote:

"Loris Bennett"  writes:

In the following:

|   |   |   |
|   |   |   |
|---+---+---|
| 1 | 1 | 1 |
#+TBLFM: @I$3=1

I expected to get a '1' just in the third column.  Where am I going
wrong?

(apologies in advance for suggesting just a workaround
instead of a rational explanation, hope it helps anyway)

It happened to me too some time ago, I used a slightly
different formula and it worked:

#+TBLFM: @I+1$3..@I+1$3=1

Does it work for you too? Kindest regards,

   Andrea

I must be missing something. When I recalculate the table (update table) 
applying both above TBLFM's - on the line to be updated, in the TBLFM 
line, and in the table itself, an error is returned


"can't assign to hline relative reference"

Org-mode version 8.3beta (release_8.3beta-304-ga4a1d8 @ 
c:/cygwin/home/Charlie01/.elisp/org-mode/lisp/)

GNU Emacs 24.3.1 (i386-mingw-nt6.0.6002) of 2013-03-17 on MARVIN
Windows Vista SP2

Charlie

---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com




Re: [O] org-elements-parse-buffer and weird property drawers

2014-09-02 Thread Daimrod
Nicolas Goaziou  writes:

> Hello,
>
> Daimrod  writes:
>
>> Since the change to `org-re-property' I have problems to display org
>> files. My *Message* buffer is spammed with the following error:
>>
>> Error during redisplay: (jit-lock-function 1119) signaled (error "No match 3 
>> in highlight (3 (quote org-property-value) t)")
>> this number changes
>
> Fixed. Thank you.

It works, thanks.

> Regards,

-- 
Daimrod/Greg



Re: [O] [RFC] Block switches as #+HEADER: args?

2014-09-02 Thread Thorsten Jolitz
Nicolas Goaziou  writes:

> Thorsten Jolitz  writes:
>
>> Thats what I thought, but wouldn't it be nicer to treat switches and
>> header args more uniformly here?
>
> Header arguments are for Babel consumption. Switches are not. I see no
> reason to treat them similarly.
>
>> Otherwise custom solutions are needed to store the switches in some
>> place when nuking the surrounding #+begin/#+end lines in a conversion
>> process, and restore them again when converting back to Org. Or the
>> switches-info is simply lost during conversion.
>
> Since you already store header args, it isn't much difficult to also
> store switch, is it?

Ok, thanks, thats what I wanted to know (not necessarily what I wanted
to hear though), so I need a custom solution. 

-- 
cheers,
Thorsten




Re: [O] org-elements-parse-buffer and weird property drawers

2014-09-02 Thread Nicolas Goaziou
Hello,

Daimrod  writes:

> Since the change to `org-re-property' I have problems to display org
> files. My *Message* buffer is spammed with the following error:
>
> Error during redisplay: (jit-lock-function 1119) signaled (error "No match 3 
> in highlight (3 (quote org-property-value) t)")
> this number changes

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Block switches as #+HEADER: args?

2014-09-02 Thread Nicolas Goaziou
Thorsten Jolitz  writes:

> Thats what I thought, but wouldn't it be nicer to treat switches and
> header args more uniformly here?

Header arguments are for Babel consumption. Switches are not. I see no
reason to treat them similarly.

> Otherwise custom solutions are needed to store the switches in some
> place when nuking the surrounding #+begin/#+end lines in a conversion
> process, and restore them again when converting back to Org. Or the
> switches-info is simply lost during conversion.

Since you already store header args, it isn't much difficult to also
store switch, is it?


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Block switches as #+HEADER: args?

2014-09-02 Thread Thorsten Jolitz
Nicolas Goaziou  writes:

> Hello,
>
> Thorsten Jolitz  writes:
>
>> and at least in the 2nd case the switches are lost, because they don't
>> work as header args:
>
> [...]
>
>> #+HEADER: -n
>> #+BEGIN_EXAMPLE
>> Hallo World
>> whats up?
>> #+END_EXAMPLE
>
> This is not valid syntax. Switches are to be put on the block line.
> Only header arguments can be put on a #+HEADER line. See
>
>  (info "(Org) Structure of code blocks")
>
> in particular the difference between switches and header arguments.

Thats what I thought, but wouldn't it be nicer to treat switches and
header args more uniformly here? E.g allow something like:

#+HEADER: :switches -n
#+BEGIN_EXAMPLE
Hallo World
whats up?
#+END_EXAMPLE

Otherwise custom solutions are needed to store the switches in some
place when nuking the surrounding #+begin/#+end lines in a conversion
process, and restore them again when converting back to Org. Or the
switches-info is simply lost during conversion.

-- 
cheers,
Thorsten




Re: [O] ox-freemind.el / org-freemind.el

2014-09-02 Thread Thorsten Jolitz
Felix Natter  writes:

> So the right way for ox-freeplane.el to be accepted in org-mode is to
> extend or clone ox-freemind.el?

Thats just a technical question, and it seems to make more sense than
starting from scratch. The maintainers accept libs, doesn't matter if
cloned or written from scratch, its more a question of quality and
usefullness.

> Is there a chance that ox-freeplane.el
> will move from contrib/ to lisp/ (when I sign the copyright papers)?

You can have a github repo and make a MELPA package, that way all Emacs
users who use MELPA can easily install your lib. Its not a *must* to
include an Org lib in Org-mode, but if you want to, you need to convince
the maintainers and probably sign the papers, yes.

-- 
cheers,
Thorsten




Re: [O] [RFC] Block switches as #+HEADER: args?

2014-09-02 Thread Nicolas Goaziou
Hello,

Thorsten Jolitz  writes:

> and at least in the 2nd case the switches are lost, because they don't
> work as header args:

[...]

> #+HEADER: -n
> #+BEGIN_EXAMPLE
> Hallo World
> whats up?
> #+END_EXAMPLE

This is not valid syntax. Switches are to be put on the block line.
Only header arguments can be put on a #+HEADER line. See

 (info "(Org) Structure of code blocks")

in particular the difference between switches and header arguments.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-elements-parse-buffer and weird property drawers

2014-09-02 Thread Daimrod
Eike  writes:

> Hello,
>
> Nicolas Goaziou writes:
>> Eike  writes:
>>
>>> I'm playing with the functions in org-elements.el and the following
>>> effect seems strange to me:
>>>
>>> I have a few propery drawers with empty propertys, like
>>>
>>> #+BEGIN_EXAMPLE
>>> :PROPERTIES:
>>> :date: [2014-08-29 Fr]
>>> :chf:  21.76
>>> :eur:
>>> :END:
>>> #+END_EXAMPLE
>>>
>>> If I do org-elements-parse-buffer, the empty one is not there, but the
>>> first one is duplicated. At least, there are two node-property
>>> elements in the tree like that:
>>>
>>> #+BEGIN_EXAMPLE
>>> (node-property (:key "chf" :value "21.76" :begin 38 :end 58 :post-blank 0 
>>> :post-affiliated 38 :parent #4))
>>> (node-property (:key "chf" :value "21.76" :begin 58 :end 67 :post-blank 0 
>>> :post-affiliated 58 :parent #4))
>>> #+END_EXAMPLE
>>>
>>> The function call was this:
>>>
>>> #+begin_src emacs-lisp
>>> (with-current-buffer "test-exp.org"
>>>   (org-element-parse-buffer))
>>> #+end_src
>>>
>>> And here is the "test-exp.org" org file:
>>>
>>> #+BEGIN_EXAMPLE
>>> * Sonstiges
>>> ** Pizza
>>>:PROPERTIES:
>>>:chf:  21.76
>>>:eur:
>>>:END:
>>> #+END_EXAMPLE
>>
>> This should be fixed. Thank you for reporting it.
>
> Many thanks! It works here now.

Hi,

Since the change to `org-re-property' I have problems to display org
files. My *Message* buffer is spammed with the following error:

Error during redisplay: (jit-lock-function 1119) signaled (error "No match 3 in 
highlight (3 (quote org-property-value) t)")
    this number changes

I know the problem lies in org-re-property because if I revert the
change, it works as it did before.

Test file:
* TODO Test
  :PROPERTIES:
  :TEST: test
  :END:


Best,

--
Daimrod/Greg



[O] [RFC] Block switches as #+HEADER: args?

2014-09-02 Thread Thorsten Jolitz

Hi List, 

I wrote `org-dp-toggle-headers' (https://github.com/tj64/org-dp) which
allows to toggle between parameters and header-args:

#+BEGIN_SRC emacs-lisp -n :cache no
(+ 2 2)
#+END_SRC

#+HEADER: :cache no
#+BEGIN_SRC emacs-lisp -n
(+ 2 2)
#+END_SRC

and I convert sources back and forth between org-mode (src-blocks) and
plain (programming-mode) code in outorg, and at least in the 2nd case
the switches are lost, because they don't work as header args:

#+BEGIN_ORG
* ORG SCRATCH

#+BEGIN_EXAMPLE -n
Hallo World
whats up?
#+END_EXAMPLE

#+HEADER: -n
#+BEGIN_EXAMPLE
Hallo World
whats up?
#+END_EXAMPLE
#+END_ORG

,
| C-c C-e t A =>
`


1 ORG SCRATCH
=

  ,
  | 1  Hallo World
  | 2  whats up?
  `

  ,
  | Hallo World
  | whats up?
  `

Is there a special keyword for this, or is it not implemented yet? Are
there plans to make it work - it would be nice if all the info (except
the block-type and language) of the #+BEGIN_XYZ line could given as
header args too, so that no information is lost when converting a
block. 

-- 
cheers,
Thorsten





Re: [O] Moving my init.el to Org

2014-09-02 Thread Thorsten Jolitz
Alan Schmitt  writes:

> On 2014-09-01 23:24, Thorsten Jolitz  writes:
>
>> Thats a bug, it should be fixed now in branch tj-outorg (which should
>> actually be faster and better than master anyway and will hopefully be
>> merged in a few weeks or so).
>
> Great, thanks.
>
>> can you test it too?
>
> Unfortunately I install navi as a package, so it's not easy for me to
> switch branches. Let me know when you do the merge and I'll definitely
> test then. (There is no hurry as I manually converted the file to
> outshine format, which was less painful than I feared.)

Too bad, I thought I found a beta-tester for the outshine/outorg/navi
"tj" branches before merging them into master ;)

And sorry for the hassle of manual converting, the bug was actually in
this function, so in case you want to convert another org file, here is
the (hopefully) fixed version:

#+BEGIN_SRC emacs-lisp
(defun outorg-transform-active-source-block-headers ()
  "Move switches and arguments on top of block.

This functions transforms all active source-blocks, i.e. those
with the associated source-code buffer's major-mode as
language. If there are switches and header arguments after the
language specification on the #+BEGIN_SRC line, they are moved on
top of the block.

The idea behind this function is that it should be possible to
specify permanent switches and arguments even for source-code
blocks that are transformed back to code after
`outorg-copy-and-switch' is called. They will remain as comment
lines directly over their code section in the source-code buffer,
and thus be transformed to text - and thereby activated - everytime
`outorg-edit-as-org' is called."
  (save-excursion
(let* ((mode (outorg-get-buffer-mode
  (marker-buffer outorg-code-buffer-point-marker)))
   (active-lang
(outorg-get-babel-name mode 'as-strg-p)))
  (org-babel-map-src-blocks nil
(when (string-equal active-lang lang)
  (let ((sw switches)
(args header-args))
(goto-char end-lang)
(delete-region (point) (line-end-position))
(goto-char beg-block)
(forward-line -1)
(when (org-string-nw-p sw)
  (newline)
  (insert (format "#+header: %s" sw)))
(when (org-string-nw-p args)
  (let ((params
 (ignore-errors
   (org-split-string args)))
headers)
(while params
  (setq headers
(cons
 (format "#+header: %s %s"
 (org-no-properties (pop params))
 (org-no-properties (pop params)))
 headers)))
(newline)
(insert (mapconcat 'identity headers "\n"))
#+END_SRC

-- 
cheers,
Thorsten




Re: [O] progress indicator for code blocks?

2014-09-02 Thread Rainer M Krug
Thanks for this snippet - I think something along these lines should be
included into org out-of-the-box. 

There are many cases where I simply use C-g to go back to emacs while
the evaluation is still running - would your snippet still work?

Rainer


John Kitchin  writes:

> John Kitchin  writes:
>
> I am currently using this bit of advice to change the color of code
> blocks while they are being executed so there is a visual hint something
> is happening.
>
> ;; give us some hint we are running
> (defadvice org-babel-execute-src-block (around progress nil activate)
>   (set-face-attribute
>'org-block-background nil :background "LightSteelBlue")
>   (message "Running your code block")
>   ad-do-it
>   (set-face-attribute 'org-block-background nil :background "gray")
>   (message "Done with code block"))
>
>
>> Hi all,
>> I am using org-mode in a class, and some students wondered if it was
>> possible for there to be a progress bar of some kind while a code block
>> is running. Right now Emacs just appears to lock up and there is no
>> indication anything is happening, especially the first time we run a
>> python block.
>>
>> I found make-progress-reporter and tried something like this::
>>
>> #+BEGIN_SRC emacs-lisp
>> (defadvice org-babel-execute-src-block (around progress nil activate)
>>   (let ((pr (make-progress-reporter "Running")))
>> ad-do-it
>> (progress-reporter-done pr)))
>> #+END_SRC
>>
>> but there is no way to update it, so it doesn't quite do anything
>> useful.
>>
>> What I would really like is an hourglass or some spinning thing. Does
>> anyone know how to get that (in a cross-platform way)?

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpOcdNteDqfe.pgp
Description: PGP signature


Re: [O] navi-search-and-switch fails

2014-09-02 Thread Alan Schmitt
On 2014-09-01 20:13, Thorsten Jolitz  writes:

> This whole thing is related to loading libraries and calling hooks, and
> its quite hard to tell whats going on there inside emacs sometimes. 

I guess I was unlucky since this hook issue has not happened again. I'll
keep my eyes opened to see if I find a cause for it.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Moving my init.el to Org

2014-09-02 Thread Rainer M Krug
Oleh  writes:

>> I know that I could use org-babel-load-file, or outshine.  What are
>> other possibilities?  What are the caveats (and advantages) of both
>> (other?) ways?
>
> I'm using a one .el file per mode approach, with around 4000 lines
> split into 40 files.
>
> This approach simplifies things a lot: for instance I haven't touched
> Javascript in ages, but all my customizations for it are sitting in
> javascript.el without getting in the way of the stuff that I'm using
> now. They aren't even loaded unless I open a js file.

Interesting - is your configuration online, so that one could take a
look at it? I did not find them on your github page?
 
Or how do you do it, that the e.g. javascript.el is only loaded when a
js file is opened? Because this is exactly what I would like to have.

Cheers,

Rainer

>
> The rest of my codes are published and I just use them via
> MELPA.  I use my own package to navigate and maintain code
> (https://github.com/abo-abo/lispy).  Here's a short screencast if you
> haven't seen it before: https://vimeo.com/86894158.
>
> regards,
> Oleh
>
>

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgp7vARmadsSZ.pgp
Description: PGP signature


Re: [O] ox-freemind.el / org-freemind.el

2014-09-02 Thread Felix Natter
Thorsten Jolitz  writes:

> Felix Natter  writes:
>
>> Thorsten Jolitz  writes:
>>
>>> Felix Natter  writes:
>>>
 hi,

 I am working on org-freeplane.el, a fork of org-freemind.el [1].

 [1] FreeMind and Freeplane are mind mapping programs and can thus
 be used to organize tree-structured information like org-mode does.
 Freeplane is a FreeMind fork, org-freeplane.el was necessary because
 users want to use the features of Freeplane.

 Can someone please point me to the code for converting node text to
 HTML in org-mode?
>>>
>>> org-freemind is derived from ox-html:
>>>
>>> ,
>>> | ;;; Define Back-End
>>> | (org-export-define-derived-backend 'freemind 'html ...)
>>> `
>>>
>>> so if org-freeplane derives from org-freemind, you have all the
>>> html-exporting functionality at your fingertips already, if I'm not
>>> mistaken. 
>>
>> hi Thorsten,
>>
>> thanks for the hint, seems my org-mode is hopelessly outdated (from
>> emacs 24.3). 
>> However, I cannot find any *-freemind.el in
>> git://git.savannah.gnu.org/emacs.git, is that because it's non-free?
>> (in git://orgmode.org/org-mode.git, it is included as
>> contrib/lisp/ox-freemind.el, does the 'contrib' indicate non-free as
>> well...?)
>
> for me its in:
>
> ,
> | /org-mode/contrib/lisp/ox-freemind.el
> `

For me too :-)

So the right way for ox-freeplane.el to be accepted in org-mode is to
extend or clone ox-freemind.el? Is there a chance that ox-freeplane.el
will move from contrib/ to lisp/ (when I sign the copyright papers)?

>> Is ox-freemind.el derived (forked/copied) from org-freemind.el?
>> Is anyone currently actively developing ox-freemind.el?
>
> Does org-freemind.el exist at all?

Yes, it's part of GNU Emacs 24.3:
/usr/share/emacs/24.3/lisp/org/org-freemind.el.gz

Thanks and Best Regards,
-- 
Felix Natter




Re: [O] Moving my init.el to Org

2014-09-02 Thread Alan Schmitt
On 2014-09-01 23:24, Thorsten Jolitz  writes:

> Thats a bug, it should be fixed now in branch tj-outorg (which should
> actually be faster and better than master anyway and will hopefully be
> merged in a few weeks or so).

Great, thanks.

> can you test it too?

Unfortunately I install navi as a package, so it's not easy for me to
switch branches. Let me know when you do the merge and I'll definitely
test then. (There is no hurry as I manually converted the file to
outshine format, which was less painful than I feared.)

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Symbol's value as variable is void: org-planning-line-re

2014-09-02 Thread Nicolas Goaziou
Hello,

Jeff Kowalczyk  writes:

> Using org-mode a4a1d85 or 2df0785, I see multiple errors, including:
>
> Using M-q to fill a paragraph, error on the line at point:
>
>   user-error: An element cannot be parsed line 7149
>
>   user-error: An element cannot be parsed line 7141
>
> When using M-RET to insert a heading:
>
>   byte-code: Symbol's value as variable is void: org-planning-line-re
>
> When using C-c to update the duration of a clocked time line:
>
>   byte-code: Symbol's value as variable is void: org-planning-line-re

`org-planning-line-re' is a defconst defined in "org.el". It looks like
a mixed installation.


Regards,

-- 
Nicolas Goaziou