Re: [O] Discussion request: 15m tangle time, details follow

2014-06-18 Thread Grant Rettke
On Tue, Jun 17, 2014 at 9:41 PM, Aaron Ecay  wrote:
> Here you mean time to tangle, correct?

Yes, thank you for digging in.



Re: [O] Discussion request: 15m tangle time, details follow

2014-06-18 Thread Grant Rettke
On Wed, Jun 18, 2014 at 3:20 AM, Andreas Leha
 wrote:
> Just one quick idea:  Have you tried [fn:1]
> (setq org-babel-use-quick-and-dirty-noweb-expansion t)
>
> This can lead to dramatic speedups in my experience.

I have not because I am utilizing property inheritance; it makes it
really, really pleasant to work with the document.



Re: [O] Discussion request: 15m tangle time, details follow

2014-06-18 Thread Grant Rettke
On Wed, Jun 18, 2014 at 3:18 AM, Thorsten Jolitz  wrote:
> Grant Rettke  writes:
>
>> The average build takes 15m.
>
> Which file do you mean - TC3F.org?
> Thats some 4400 lines, thus not _that_ big really. I once used a giant
> init.el copied from the web that had some 8000 lines (now I'm back to
> 2500 again ...).

Yes. Thank you for digging in. Thanks for the tip, I had not learned
out-org yet.



Re: [O] Discussion request: 15m tangle time, details follow

2014-06-18 Thread Grant Rettke
I still want to be using org,, so my plan for now then is to write a
pre-processing script for before org-babel-tangle is run that:

1. Checks each headline
2. Checks if there is a source block
3. If that source block doesn't have a noweb-ref name, and there is
another source block under that
headline, then "merge" it with the next source block of the same
nature in that heading.

That is off the top of my head, and I will try it by hand, first and
see if it tangles the same result.

Thoughts?



Re: [O] How do you capture the intent never to tangle or weave a headline or its children?

2014-06-18 Thread Grant Rettke
Understood, and thank you.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Jun 15, 2014 at 10:29 PM, Charles Berry  wrote:
> Grant Rettke  wisdomandwonder.com> writes:
>
>>
>> Good evening,
>>
>> For both performance and cognitive reasons, sometimes I specifically
>> never want to tangle or weave a headline or any of
>> its children. I still value it though, so it belongs in that document,
>> and it wouldn't make sense for it to be linked as an
>> external document. For performance reasons, I suspect that it would
>> speed up tangling, but I need to verify this.
>>
>> Thus far I just add something like this, so at least it is obvious to
>> *me* what is my intent:
>>
>> # INTENT: never weave or tangle this headline or its children
>>   :PROPERTIES:
>>   :exports: none
>>   :tangle: no
>>   :END:
>>
>
> You want this:
>
> http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html#Header-arguments-in-Org-mode-properties
>
> i.e. :header-args: :exports none :tangle no
>
> HTH,
>
> Chuck
>
>



Re: [O] A simple org tangle and weave makefile

2014-06-18 Thread Grant Rettke
I see. Thank you.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jun 12, 2014 at 2:54 PM, Eric Schulte  wrote:
> Grant Rettke  writes:
>
>> Hi,
>>
>> My goals was to have a simple makefile to tangle and weave a document;
>> so org-mk was out of scope.
>>
>> Just wondering; how could I have done it better?
>>
>> ##
>> INIT=.emacs.el
>>
>> $(INIT): TC3F.org
>> time emacs --batch --no-init-file --load .org-mode.emacs.el
>> --find-file TC3F.org --funcall org-babel-tangle --kill
>>
>> TC3F.html: $(INIT)
>> time emacs --batch --no-init-file --load .org-mode.emacs.el
>> --find-file TC3F.org --funcall org-html-export-to-html --kill
>>
>> clean:
>> rm $(INIT)
>> rm TC3F.html
>> ##
>>
>> Kind regards,
>>
>
> I don't know if this is better, but its closer to what I use locally.
>
>
>
>>
>> Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
>> 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.” --ThompsonH
>>
>
> --
> Eric Schulte
> https://cs.unm.edu/~eschulte
> PGP: 0x614CA05D (see https://u.fsf.org/yw)
>



Re: [O] Discussion request: 15m tangle time, details follow

2014-06-19 Thread Grant Rettke
Understood. I will start testing.

Just out of curiosity, knowing full well that it will break the
tangle, and also since I hadn't tried
the quick and dirty flag, I ran it with this to see how long it took:

(setq org-babel-common-header-args-w-values nil)

It went from 936 seconds (15 minutes)

Down to 279 (4 minutes).

Now I am wondering if it is worth converting my document *not* to use
property inheritance...

What would you folks do?
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jun 19, 2014 at 8:44 AM, Eric Schulte  wrote:
> Grant Rettke  writes:
>
>> I still want to be using org,, so my plan for now then is to write a
>> pre-processing script for before org-babel-tangle is run that:
>>
>> 1. Checks each headline
>> 2. Checks if there is a source block
>> 3. If that source block doesn't have a noweb-ref name, and there is
>> another source block under that
>> headline, then "merge" it with the next source block of the same
>> nature in that heading.
>>
>> That is off the top of my head, and I will try it by hand, first and
>> see if it tangles the same result.
>>
>> Thoughts?
>
> Perhaps an easier workaround would be to customize the value of
> `org-babel-common-header-args-w-values'.  This variable determines which
> header arguments are checked for in properties.  If you remove all
> header arguments from this variable which you know are not used in a
> property, it may dramatically speed up tangle time.
>
> This may reduce the utility of some convenience functions, but should
> not have too large of an impact on overall functionality.
>
> Best,
> Eric
>
> --
> Eric Schulte
> https://cs.unm.edu/~eschulte
> PGP: 0x614CA05D (see https://u.fsf.org/yw)



Re: [O] Discussion request: 15m tangle time, details follow

2014-06-19 Thread Grant Rettke
Just excluded what seemed excludable and got build time down to 8
minutes from 15 minutes.

Kept the following as it seems that it would allow the most important things:

(session. :any)
(noweb-ref  . :any)
(noweb  . ((yes no tangle no-export strip-export)))
(file   . :any)
(tangle . ((tangle yes no :any)))
(results. ((file list vector table scalar verbatim)
   (raw html latex org code pp drawer)
   (replace silent none append prepend)
   (output value)))

Here is what I excluded:

(setq org-babel-common-header-args-w-values
  (assq-delete-all 'cache org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'cmdline org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'colnames org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'comments org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'dir org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'eval org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'exports org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'epilogue org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'file-desc org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'hlines org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'mkdirp org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'no-expand org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'noeval org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'noweb-sep org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'padline org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'post org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'prologue org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'rownames org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'sep org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'shebang org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'tangle-mode org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'var org-babel-common-header-args-w-values))
(setq org-babel-common-header-args-w-values
  (assq-delete-all 'wrap org-babel-common-header-args-w-values))
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jun 19, 2014 at 7:01 PM, Grant Rettke  wrote:
> Understood. I will start testing.
>
> Just out of curiosity, knowing full well that it will break the
> tangle, and also since I hadn't tried
> the quick and dirty flag, I ran it with this to see how long it took:
>
> (setq org-babel-common-header-args-w-values nil)
>
> It went from 936 seconds (15 minutes)
>
> Down to 279 (4 minutes).
>
> Now I am wondering if it is worth converting my document *not* to use
> property inheritance...
>
> What would you folks do?
> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
> 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 Thu, Jun 19, 2014 at 8:44 AM, Eric Schulte  wrote:
>> Grant Rettke  writes:
>>
>>> I still want to be using org,, so my plan for now then is to write a
>>> pre-processing script for before org-babel-tangle is run that:
>>>
>>> 1. Checks each headline
>>> 2. Checks if there is a source block
>>> 3. If that source block doesn't have a noweb-ref name, and there is
>>> another source block under

Re: [O] Discussion request: 15m tangle time, details follow

2014-06-20 Thread Grant Rettke
This is a nicer way, makes it obvious what *is* being used; uses dash.el:

(let* ((allowed '(exports
  file
  noweb
  noweb-ref
  session
  tangle))
   (new-ls
(--filter (member (car it) allowed)
  org-babel-common-header-args-w-values)))
  (setq org-babel-common-header-args-w-values new-ls))
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jun 19, 2014 at 8:26 PM, Grant Rettke  wrote:
> Just excluded what seemed excludable and got build time down to 8
> minutes from 15 minutes.
>
> Kept the following as it seems that it would allow the most important things:
>
> (session. :any)
> (noweb-ref  . :any)
> (noweb  . ((yes no tangle no-export strip-export)))
> (file   . :any)
> (tangle . ((tangle yes no :any)))
> (results. ((file list vector table scalar verbatim)
>(raw html latex org code pp drawer)
>(replace silent none append prepend)
>(output value)))
>
> Here is what I excluded:
>
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'cache org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'cmdline org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'colnames org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'comments org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'dir org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'eval org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'exports org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'epilogue org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'file-desc org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'hlines org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'mkdirp org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'no-expand org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'noeval org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'noweb-sep org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'padline org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'post org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'prologue org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'rownames org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'sep org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'shebang org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'tangle-mode org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'var org-babel-common-header-args-w-values))
> (setq org-babel-common-header-args-w-values
>   (assq-delete-all 'wrap org-babel-common-header-args-w-values))
> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
> 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 Thu, Jun 19, 2014 at 7:01 PM, Grant Rettke  
> wrote:
>> Understood. I will start testing.
>>
>> Just out of curiosity, knowing full well that it will break the
>> tangle, and also since I hadn't tried
>> the quick and dirty flag, I ran it wit

[O] Thoughts on weaving variable documentation

2014-06-20 Thread Grant Rettke
Good morning,

A lot of people are weaving their Emacs init files for the obvious
reason: it is difficult to remember why
we configured stuff and other people definitely won't know why we did
it. There is a common operation
that occurs though when other people read our Emacs init:

1. They open it up in Emacs
2. Find what looks interesting
3. Do a C-h f or C-h v on it and learn about it

Makes total sense.

What I got curious about is for this specific use case, people
scanning other people's configs, how I
could make it easier. A thought is to weave the docstrings for
variables right into the weaved file any
time a variable is set. I am thinking something like this:

1. When the weave occurs
2. Look at each line of code that starts with a setq
3. Look up the docstring for the variable
4. TBD: Weave that documentation into the output.

That is the idea, at least.

My question is:
1. What are the standard mechanisms to do something like this within
the ob lifecycle?
2. What do you think in general?

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] Thoughts on weaving variable documentation

2014-06-20 Thread Grant Rettke
org-docco is something that comes to mind:

http://orgmode.org/worg/org-contrib/index.html
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jun 20, 2014 at 11:10 AM, Grant Rettke  wrote:
> Good morning,
>
> A lot of people are weaving their Emacs init files for the obvious
> reason: it is difficult to remember why
> we configured stuff and other people definitely won't know why we did
> it. There is a common operation
> that occurs though when other people read our Emacs init:
>
> 1. They open it up in Emacs
> 2. Find what looks interesting
> 3. Do a C-h f or C-h v on it and learn about it
>
> Makes total sense.
>
> What I got curious about is for this specific use case, people
> scanning other people's configs, how I
> could make it easier. A thought is to weave the docstrings for
> variables right into the weaved file any
> time a variable is set. I am thinking something like this:
>
> 1. When the weave occurs
> 2. Look at each line of code that starts with a setq
> 3. Look up the docstring for the variable
> 4. TBD: Weave that documentation into the output.
>
> That is the idea, at least.
>
> My question is:
> 1. What are the standard mechanisms to do something like this within
> the ob lifecycle?
> 2. What do you think in general?
>
> Kind regards,
>
> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
> 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



[O] Should C-c C-c always jump between a footnote and its definition? C-c C-x f, too?

2014-06-20 Thread Grant Rettke
Good evening,

Today I noticed that hitting C-c C-c won't always jump back and forth
between its reference. I assume
that this because there may be many, and that makes sense. The other
thing that I noticed, though
is that C-c C-x f sometimes works and sometimes doesn't. Specifically,
sometimes it goes to the newly
created footnote, and sometimes it doesn't. However, this is just on
my one file. Here
is what I mean:

File: https://github.com/grettke/home/blob/master/TC3F.org
Emacs init: https://github.com/grettke/home/blob/master/.emacs.el
Emacs: 24.3.1
org: 8.2.7

Here is the simplest example, but this is code just representative by
hand in Emacs:
(find-file "TC3F.org")
(got-char 1642)
(org-ctrl-c-ctrl-c)

That moves the cursor up to line 37, instead of where the footnote
lives on 3898.

Ideas:
1. I screwed up the format of the footnotes.
2. Go back in version control and manually cope with this. I would
still like the understand the issue.

Tried:
1. Renumbering the footnotes with C-u C-c C-x f, but got the same behavior.

Now, I am asking for help, because this one is odd to see.

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] Should C-c C-c always jump between a footnote and its definition? C-c C-x f, too?

2014-06-20 Thread Grant Rettke
On Fri, Jun 20, 2014 at 5:13 PM, Nicolas Goaziou  wrote:
> I cannot reproduce it, neither on maint nor on master. Each time, cursor
> ends up on line 3898.

Understood. Thank you much for trying.

I will convert the document to in-line footnotes.



[O] How to never have the Footnote heading generated?

2014-06-21 Thread Grant Rettke
Good afternoon,

I want only to use in-line footnotes and never to have them
automatically entered into an auto created
Footnote heading. Rather I want that auto-generated, just like it is
now. My goal is to allow refactoring
literature with footnotes without having to update anything else in
that document (barring references).

Is there a setting to get that behavior. I read the docs and am not seeing it.

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] Thoughts on weaving variable documentation

2014-06-21 Thread Grant Rettke
Understood. Thanks for sharing and elaborating.

The use case on my mind was for people scouring the Internet for
interesting things
inside of other people's configuration files.

That is what I did for a while, but now I just load stuff and use
Emacs to read the documentation.

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sat, Jun 21, 2014 at 12:58 AM, Aaron Ecay  wrote:
> Hi Grant,
>
> 2014ko ekainak 20an, Grant Rettke-ek idatzi zuen:
>>
>> Good morning,
>>
>> A lot of people are weaving their Emacs init files for the obvious
>> reason: it is difficult to remember why
>> we configured stuff and other people definitely won't know why we did
>> it. There is a common operation
>> that occurs though when other people read our Emacs init:
>>
>> 1. They open it up in Emacs
>> 2. Find what looks interesting
>> 3. Do a C-h f or C-h v on it and learn about it
>>
>> Makes total sense.
>>
>> What I got curious about is for this specific use case, people
>> scanning other people's configs, how I
>> could make it easier. A thought is to weave the docstrings for
>> variables right into the weaved file any
>> time a variable is set. I am thinking something like this:
>>
>> 1. When the weave occurs
>> 2. Look at each line of code that starts with a setq
>> 3. Look up the docstring for the variable
>> 4. TBD: Weave that documentation into the output.
>>
>> That is the idea, at least.
>>
>> My question is:
>> 1. What are the standard mechanisms to do something like this within
>> the ob lifecycle?
>> 2. What do you think in general?
>
> I don’t really see the use case.  One of the best parts of developing
> elisp in emacs is the level of interactive documentation:
> describe-function, find-function, interactive info manuals, etc.  It’s
> there when you need it, but not in the way when you don’t.  I almost
> never read elisp code in a non-emacs environment (except for short
> snippets in blog posts, I suppose).
>
> FWIW, my wishlist for literate programming in org/elisp is something
> like (in approximately increasing order of estimated difficulty):
>
> - allow find-function/variable to jump to the location in an org file
>   where something is defined, rather than the tangled elisp file.
>
> - allow org-mode text “near” a function definition to be used as the
>   function’s docstring (for describe-function et al.):
>
> ,
> | docstring docstring docstring
> | #+begin_src elisp
> |   (defun foo ()
> | ...)
> | #+end_src
> `
>
> rather than:
>
> ,
> | #+begin_src elisp
> |   (defun foo ()
> | "docstring docstring docstring"
> | ...)
> | #+end_src
> `
>
> - allow more features of underlying source code editing modes to be used
>   in org buffers directly (no org-edit-special context switch needed).
>   For me, this would include:
>   - eval-defun (C-M-x)
>   - paredit
>   - eldoc
>   - auto-complete (company etc.)
>   For your use case, a mode which shows the docstring for a fn/var in a
>   tooltip on mouseover/keystroke could be added (I couldn’t find
>   anything like this already existing for emacs-lisp-mode, which is
>   kind of surprising to me – but I did not look very hard)
>
> - make it easier to develop parts of org using these LP features.
>
> Cheers,
>
> --
> Aaron Ecay



Re: [O] How to never have the Footnote heading generated?

2014-06-22 Thread Grant Rettke
Thank you Matt.

What I was aiming for was to have in-line footnotes that did have
randomly generated IDs so that I one still may reference them. I
misunderstood though, because the footnotes will still get defined in
the Footnote section, too. I will look at what it takes to have a new
footnote type with that behavior.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sat, Jun 21, 2014 at 9:20 PM, Matt Lundin  wrote:
> Grant Rettke  writes:
>
>> I want only to use in-line footnotes and never to have them
>> automatically entered into an auto created Footnote heading.
>
> An easy way to create inline footnotes is to use the following setting:
>
> (setq org-footnote-auto-label nil)
>
> Then, when you call org-footnote-action, simply press return for an
> "anonymous" (i.e., inline) footnote.
>
>  - The footnote looks like this.[fn:: Like this one]
>
> Best,
> Matt



Re: [O] How to never have the Footnote heading generated?

2014-06-22 Thread Grant Rettke
Here is what I had intended:

(setq org-footnote-define-inline +1)
(setq org-footnote-auto-label 'random)
(setq org-footnote-auto-adjust nil)
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Jun 22, 2014 at 7:56 AM, Grant Rettke  wrote:
> Thank you Matt.
>
> What I was aiming for was to have in-line footnotes that did have
> randomly generated IDs so that I one still may reference them. I
> misunderstood though, because the footnotes will still get defined in
> the Footnote section, too. I will look at what it takes to have a new
> footnote type with that behavior.
> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
> 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 Sat, Jun 21, 2014 at 9:20 PM, Matt Lundin  wrote:
>> Grant Rettke  writes:
>>
>>> I want only to use in-line footnotes and never to have them
>>> automatically entered into an auto created Footnote heading.
>>
>> An easy way to create inline footnotes is to use the following setting:
>>
>> (setq org-footnote-auto-label nil)
>>
>> Then, when you call org-footnote-action, simply press return for an
>> "anonymous" (i.e., inline) footnote.
>>
>>  - The footnote looks like this.[fn:: Like this one]
>>
>> Best,
>> Matt



Re: [O] How to never have the Footnote heading generated?

2014-06-22 Thread Grant Rettke
The former, and you explained something that I didn't even know that I
should have known, too.

Thanks!
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Jun 22, 2014 at 9:30 AM, Matt Lundin  wrote:
> Grant Rettke  writes:
>
>>> What I was aiming for was to have in-line footnotes that did have
>>> randomly generated IDs so that I one still may reference them.
>
>> Here is what I had intended:
>>
>> (setq org-footnote-define-inline +1)
>> (setq org-footnote-auto-label 'random)
>> (setq org-footnote-auto-adjust nil)
>
> Nice! I misunderstood the initial question. The above works fine for me
> as a way to insert inline footnotes with random labels. When I call
> org-footnote-action, I get the following.
>
>  - Here is a footnote.[fn:5952d54e: A footnote]
>
>>> I misunderstood though, because the footnotes will still get defined
>>> in the Footnote section, too.
>
> Could you please explain what you mean here? The above settings do not
> create a footnote section when I call org-footnote-action or
> org-footnote-new. But you could use (setq org-footnote-section nil) to
> ensure that any footnote definitions (if they exist) will be placed in
> the same section as the footnote reference.
>
> Or do you mean the label for "Footnotes" in, say, html export? If so, I
> believe you can configure the variable org-html-footnotes-section.
>
> Best,
> Matt



Re: [O] Thoughts on weaving variable documentation

2014-06-24 Thread Grant Rettke
Fabrice,

Thank you for sharing that kind reminder and true inspiration.

Looking forward to your results.

Kind regards,

gcr
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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, Jun 24, 2014 at 7:17 AM, Fabrice Niessen  wrote:
> Hello Grant,
>
>> A lot of people are weaving their Emacs init files for the obvious
>> reason: it is difficult to remember why
>> we configured stuff and other people definitely won't know why we did
>> it. There is a common operation
>> that occurs though when other people read our Emacs init:
>>
>> 1. They open it up in Emacs
>> 2. Find what looks interesting
>> 3. Do a C-h f or C-h v on it and learn about it
>>
>> Makes total sense.
>>
>> What I got curious about is for this specific use case, people
>> scanning other people's configs, how I could make it easier.
>
> Remember the following quote of Knuth:
>
>   ╭
>   │ Let us change our traditional attitude to the construction of
>   │ programs: Instead of imagining that our main task is to instruct
>   │ a computer what to do, let us concentrate rather on explaining to
>   │ human beings what we want a computer to do.
>   │
>   │ The practitioner of literate programming can be regarded as an
>   │ essayist, whose main concern is with exposition and excellence of
>   │ style. Such an author, with thesaurus in hand, chooses the names of
>   │ variables carefully and explains what each variable means. He or she
>   │ strives for a program that is comprehensible because its concepts
>   │ have been introduced in an order that is best for human
>   │ understanding, using a mixture of formal and informal methods that
>   │ reinforce each other.
>   ╰
>
> Hence, for me, people scanning your config should read the document that
> you've made therefore (that is, the weaved document), not the file
> that's made for a computer (that is, the tangle document).
>
> If there are parts you don't want others to see, tag them as
> ":noexport:" or similar more subtle ways.
>
> As a guy convinced by LP, I wouldn't invest much time into facilitating
> the reading of the tangled file; I would, on the opposite, invest a lot
> of time (and I did -- results will be public soon on my Web site and on
> GitHub!) on the weaved document, by improving CSS for the HTML version
> and LaTeX styles.
>
>> A thought is to weave the docstrings for variables right into the
>> weaved file any time a variable is set. I am thinking something like
>> this:
>>
>> 1. When the weave occurs
>> 2. Look at each line of code that starts with a setq
>> 3. Look up the docstring for the variable
>> 4. TBD: Weave that documentation into the output.
>>
>> That is the idea, at least.
>>
>> My question is:
>> 1. What are the standard mechanisms to do something like this within
>> the ob lifecycle?
>> 2. What do you think in general?
>
> Best regards,
> Fabrice
>
> --
> Fabrice Niessen
> Leuven, Belgium
> http://www.pirilampo.org/
>
>



[O] Massive tangle speedup in the 8.2.7a release

2014-06-25 Thread Grant Rettke
Hi,

Just want to share what I experienced:

Tangle time sped up by 50%!

Thank you for that.

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] org-ref in action

2014-06-25 Thread Grant Rettke
John:

Beautiful, thanks!

Eric:

My goodness, that 8 minute video sums up what was not obvious to many
even after wantingly browsing the documentation on it. Thanks!
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Wed, Jun 25, 2014 at 3:25 PM, Eric Schulte  wrote:
> John Kitchin  writes:
>
>> Hello everyone,
>>
>> org-ref has basically stabilized. You can get the latest code at
>> https://github.com/jkitchin/jmax/blob/master/org-ref.org.
>>
>> I made a little screen capture video here to show you what it does:
>> https://www.youtube.com/watch?v=JyvpSVl4_dg
>>
>> Try it out, if it looks interesting, and let me know if you find any
>> bugs!
>>
>> Thanks,
>
> Great,
>
> This is a lot of useful functionality, and very nicely presented.
>
> Did you happen to try the built in bibtex support in Org-mode core and
> contrib?  And if so, is there a reason that you implemented this all
> independently?
>
> I think part of the problem with existing Org-mode bibtex support is
> that no-one knows it exists.  To help address this I threw up a very
> quick-and-dirty screen cast demonstrating some of Org's existing bibtex
> functionality.
>
> https://vimeo.com/99167082
>
> Best,
> Eric
>
> --
> Eric Schulte
> https://cs.unm.edu/~eschulte
> PGP: 0x614CA05D (see https://u.fsf.org/yw)
>



Re: [O] org-ref in action

2014-06-26 Thread Grant Rettke
On Thu, Jun 26, 2014 at 9:08 AM, Matt Lundin  wrote:
> I think the key in any possible feature merge is to remember citation
> management is idiosyncratic.

Off topic:

How do people choose today?

Why choose bibtex over biblatex?

Where do people discuss such questions like this in real life?



Re: [O] org-ref in action

2014-06-27 Thread Grant Rettke
Thanks for your answer on that everybody.

My apologies for my poor grammar asking where "people discuss such
questions in real life". What I really had wanted to say, what I
meant, was that I was wondering what professions utilize such
workflows and where they discuss it primarily because the topic does
go beyond LaTeX alone. My usage of such a workflow is pretty
lightweight, and I've never had anyone to talk to about it because in
my field generally no one cites their references.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jun 26, 2014 at 9:39 AM, Matt Lundin  wrote:
> Grant Rettke  writes:
>
>> On Thu, Jun 26, 2014 at 9:08 AM, Matt Lundin  wrote:
>>> I think the key in any possible feature merge is to remember citation
>>> management is idiosyncratic.
>>
>> Off topic:
>>
>> How do people choose today?
>>
>> Why choose bibtex over biblatex?
>
> Thanks to inertia, bibtex still has a number of users in the sciences,
> since it was originally designed for scientific citations. In the
> humanities, however, bibtex is a non-starter, since biblatex offers much
> more flexibility. The good news is that bibtex and biblatex use the same
> database format, so it's easy to transition from bibtex to biblatex.
> However, there are other options, such as CSL.[1]
>
>> Where do people discuss such questions like this in real life?
>
> I'm not sure I understand your question. Could you clarify?
>
> I simply meant that everyone will have a different workflow/system for
> storing and managing citations. E.g., some will prefer to store
> bibliographical data in a zotero database, others in a single bib file,
> others in multiple bib files, others as properties in org headlines,
> etc.
>
> I think one can make a conception distinction here between citation
> management (i.e., how one stores bibliographical data) and citation
> processing (i.e., the software one uses to export that data to some
> output format). There are many, many formats (mods, bib, etc.) and tools
> (biber, bibtex, csl/citeproc, etc.) for formatting bibliographical data.
>
> In an ideal world, one should be able to 1) process bibliographical data
> from multiple formats; 2) choose from hundreds of citation styles; and
> 3) format citations for multiple backends. I am not suggesting that
> org-mode should directly support all these things, but its default
> methods of handling citations should not get in the way of using
> external tools that provide such flexibility.
>
> For instance, pandoc (an immensely impressive piece of software!)
> accepts bibliographical data from numerous sources and processes it for
> multiple outputs (html, plain text, docx, rtf, etc.). By contrast,
> ox-bibtex.el runs citations through bibtex2html, which is pretty much
> limited to the "old-fashioned" bibtex formats. Ironically, ox-bibtex.el
> invokes pandoc to convert from html to plain text, but only after it has
> already used bibtex2html to process the data.
>
> Best,
> Matt
>
> Footnotes:
>
> [1] Citation Style Language - http://citationstyles.org/



Re: [O] Using #+NAME for single value, not table?

2014-06-27 Thread Grant Rettke
On Fri, Jun 27, 2014 at 12:38 PM, Aaron Ecay  wrote:
> You can use a verbatim block:
>
> ,
> | #+name: xyz
> | : hi
> |
> | #+begin_src emacs-lisp :var abc=xyz
> | (concat "*" abc "*")
> | #+end_src
> |
> | #+RESULTS:
> | : *hi*
> `

Is that similar to (setq xyz "hi")?



Re: [O] R src block not highlighted in pdf

2014-06-27 Thread Grant Rettke
Just ran apropos and it looks like org-latex-listings might be the one.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jun 27, 2014 at 12:23 PM, Shiyuan  wrote:
> Hi,
> I have a R code src block in a org file. When exported to html, the R
> code is correctly syntax highlighted. But when exported to pdf(latex), the R
> code is not highlighted. I found this thread
> https://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg00379.html
> which suggests setting the variable org-export-latex-listings. This variable
> seems no longer exist in Org 8.2.6.  What variables shall I set so that the
> R code is syntax highlighted when exported to pdf in Org mode 8.2.6? Thanks.
>
> Shiyuan



Re: [O] PDF output from Org

2014-06-28 Thread Grant Rettke
For when we can't just use A4:

,
| #+OPTIONS: texht:t
| #+LATEX_CLASS: article
| #+LATEX_CLASS_OPTIONS: [letterpaper, 12pt]
| #+LATEX_HEADER: \usepackage[paperwidth=8.5in, paperheight=11in,
hmargin=0.5in, vmargin=0.5in]{geometry}
`
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jun 27, 2014 at 3:15 PM, David Masterson  wrote:
> Hi,
>
> I'm doing my first paper in Org and outputting it to PDF.  So far, it's
> been pretty easy and the results look quite good.  The one issue that
> I'm wondering about is "page setup".  The output looks like it was done
> with ~2.5" margins all around which means that, on an 8.5"x11" paper,
> almost 5" is wasted.
>
> How do I control the page margins that Org uses in its Latex/PDF output?
> --
> David Masterson
> Programmer At Large
>
>



[O] How to evaluate all source blocks like at export time, anytime?

2014-06-28 Thread Grant Rettke
Hi,

In the manual it explains how to disable all source block evaluation
during export with org-export-babel-evaluate.

I did that, and it is desirable.

However, what is the "right way" to request org to evaluate all of the
source blocks, in exactly the same manner that would
have happened during an export with org-export-babel-evaluate non-nil?

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] indent c-c -?

2014-06-30 Thread Grant Rettke
https://github.com/emacsmirror/multiple-cursors

is what I use for doing that specific thing
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Mon, Jun 30, 2014 at 3:26 PM, Samuel Wales  wrote:
> i mark headlines then do c-c -.  i get this:
>
> - 1
> - 2
>
> i would like this:
>
>   - 1
>   - 2
>
> is there such a command?  if not, how does one write it?
>
> thanks.
>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> The disease DOES progress.  MANY people have died from it.  And
> ANYBODY can get it.
>
> Denmark: free Karina Hansen NOW.
>



[O] How to make clicking on a URL inside of inline randomized footnotes open the url?

2014-07-05 Thread Grant Rettke
Good afternoon,

My org is configured to use footnotes that are inline and randomized.
They look like this:

,
| [fn:7256ed34: http://www.google.com]
`

My goal is to be able to click on the URL and have it open in a web browser.

This works out of the box for URLs appearing anywhere else.

How may I enable this feature inside of footnotes?

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] A simple org tangle and weave makefile

2014-07-06 Thread Grant Rettke
I think that I ran into the same thing and someone else explained that
the htmlize package
is required to get syntax highlighting on export.

,
| (require 'htmlize)
`
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jul 4, 2014 at 10:26 AM, Rainer M Krug  wrote:
> Following an older thread.
>
> I would like to use a make file to export my document, and I am
> essentially following Eric's suggestion. But I have some problems which
> I did not manage to solve:
>
> html: I would like to have syntax highlighting in the document, but I
> don't manage. I have added the following
>
> ,
> | ;;Initialization of my org version
> | ;; Enable org languages
> | (org-babel-do-load-languages
> |  'org-babel-load-languages
> |  '((R . t)
> |(latex . t)
> |(sh . t)
> |(plantuml . t)
> |(emacs-lisp . t)
> |))
> |
> | ;; Setup org-ref
> | (require 'reftex-cite)
> | (require 'dash)
> | (org-babel-load-file "~/.emacs.d/org-ref/org-ref.org")
> | (setq reftex-default-bibliography 
> '("~/Documents/Mendeley/bibliography.bib"))
> | (setq org-ref-default-bibliography 
> '("~/Documents/Mendeley/bibliography.bib"))
> |
> | (setq org-src-fontify-natively t)
> `
>
> to a minimal init.el which I use to initialize the emacs session using
> the following in the make file:
>
> ,
> | PROJECT=prodMixStands
> | EMACS=emacs
> | BATCH_EMACS=$(EMACS) --batch -Q --no-desktop -l ~/.emacs.d/init.minimal.el
> | html:
> |     $(BATCH_EMACS) $(PROJECT).org -f org-html-export-to-html
> `
>
> The result is still without syntax highlighting - what am I missing?
>
> Thanks
>
> Rainer
>
>
>
> Eric Schulte  writes:
>
>> Grant Rettke  writes:
>>
>>> Hi,
>>>
>>> My goals was to have a simple makefile to tangle and weave a document;
>>> so org-mk was out of scope.
>>>
>>> Just wondering; how could I have done it better?
>>>
>>> ##
>>> INIT=.emacs.el
>>>
>>> $(INIT): TC3F.org
>>> time emacs --batch --no-init-file --load .org-mode.emacs.el
>>> --find-file TC3F.org --funcall org-babel-tangle --kill
>>>
>>> TC3F.html: $(INIT)
>>> time emacs --batch --no-init-file --load .org-mode.emacs.el
>>> --find-file TC3F.org --funcall org-html-export-to-html --kill
>>>
>>> clean:
>>> rm $(INIT)
>>> rm TC3F.html
>>> ##
>>>
>>> Kind regards,
>>>
>>
>> I don't know if this is better, but its closer to what I use locally.
>>
>>
>> EMACS=emacs
>> BATCH_EMACS=$(EMACS) --batch -Q -l init.el
>>
>> %.html: %.org
>>   $(BATCH_EMACS) $*.org -f org-html-export-to-html
>>
>> %.tex: %.org init.el
>>   $(BATCH_EMACS) $*.org -f org-latex-export-to-latex
>>
>> %.el: %.org init.el
>>   $(BATCH_EMACS) $*.org -f org-babel-tangle
>>
>> # two fancier alternatives to the above which provide a default file
>> # name and encode language information
>>
>> %.el: %.org init.el
>>   $(BATCH_EMACS) $*.org \
>>   --eval '(org-babel-tangle nil "$@" (quote emacs-lisp))'
>>
>> %.sh: %.org init.el
>>   $(BATCH_EMACS) $*.org \
>>   --eval '(org-babel-tangle nil "$@" (quote bash))'
>>
>>
>>>
>>> Grant Rettke | AAAS, ACM, ASA, FSF, IEEE, SIAM, Sigma Xi
>>> 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.” --ThompsonH
>>>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :   +33 - (0)9 53 10 27 44
> Cell:   +33 - (0)6 85 62 59 98
> Fax :   +33 - (0)9 58 10 27 44
>
> Fax (D):+49 - (0)3 21 21 25 22 44
>
> email:  rai...@krugs.de
>
> Skype:  RMkrug
>
> PGP: 0x0F52F982



Re: [O] How to make clicking on a URL inside of inline randomized footnotes open the url?

2014-07-06 Thread Grant Rettke
Thank you and have a great day.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Jul 6, 2014 at 4:29 AM, Nicolas Goaziou  wrote:
> Nicolas Goaziou  writes:
>
>> This is not possible at the moment as a consequence of a poor design
>> decision in `org-element-footnote-reference-parser'. I will fix it
>> soon.
>
> Done.



Re: [O] org-mode date stamp with just month?

2014-07-07 Thread Grant Rettke
That property then is something that we may set as a buffer local
variable set in the file itself for cases where want only months in
the entire file?

How might we get that form for only parts of a file in which the rest
of that file we want the standard date format?
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Jul 6, 2014 at 7:05 PM, Thorsten Jolitz  wrote:
> David Rogoff  writes:
>
>> I can’t see how to insert a datestamp with just year and month.  I’m
>> adding an archive of various past events that I don’t have the exact
>> date for.
>
> Maybe try
>
> ,[ C-h v org-time-stamp-custom-formats RET ]
> | org-time-stamp-custom-formats is a variable defined in `org.el'.
> | Its value is ("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>")
> |
> | Documentation:
> | Custom formats for time stamps.  See `format-time-string' for the syntax.
> | These are overlaid over the default ISO format if the variable
> | `org-display-custom-times' is set.  Time like %H:%M should be at the
> | end of the second format.  The custom formats are also honored by export
> | commands, if custom time display is turned on at the time of export.
> |
> | You can customize this variable.
> |
> | [back]
> `
>
> --
> cheers,
> Thorsten
>
>



Re: [O] [BUG] src_blocks - :results raw and replace don't work together

2014-07-07 Thread Grant Rettke
It sounds like you wanted the same thing that I did.

What I wanted is something like running 'script' before starting a
REPL and just capturing the output and that is it. That output is not
being used to be inserted back into the document or anything... it
just captured the results of commands sent into the REPL.

I tried a lot of different combinations until I felt like my goal was simple:
1. Wrap the output.
2. Put the output in a "sh" type result, something from the shell
3. Let replace work

This is what was the best:

,
| #+PROPERTY: header-args+:results output scalar pp replace
`
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Mon, Jul 7, 2014 at 8:56 AM, Nick Dokos  wrote:
> Thorsten Jolitz  writes:
>
>> Hi List,
>>
>> evaluating this 3 times does not work as expected:
>>
>> ,
>> | * A
>> |
>> | #+header: :results raw replace
>> | #+begin_src emacs-lisp
>> |   (+ 2 2)
>> | #+end_src
>> |
>> | #+results:
>> | 4
>> | 4
>> | 4
>> `
>>
>> Independent from argument order, 'replace' (which should be default
>> anyway) is ignored.
>
> Right - `raw' inserts results without delimiters so org has no idea
> where they end and cannot delete them (try org-babel-remove-result)
> or replace them.
> --
> Nick
>
>



Re: [O] [BUG] src_blocks - :results raw and replace don't work together

2014-07-07 Thread Grant Rettke
On Mon, Jul 7, 2014 at 10:31 AM, Thorsten Jolitz  wrote:
> Have you found a way to get rid of those leading colons (maybe with a
> hook for post-processing the results before they are printed or so)?

No I have not. I'm not sure how to think about it yet.



[O] What is the best in-Emacs presentation mode for org-files today?

2014-07-08 Thread Grant Rettke
Hi,

There are a lot of options for presentation from org, both inside of
Emacs and outside of it:

http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

What are you opinions on the best mode for doing:
1. Presentations inside of Emacs
2. Using all the options available for org mode while in the presentation

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-09 Thread Grant Rettke
Congratulations on your effort.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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, Jul 8, 2014 at 7:24 PM, Doyley, Marvin M.
 wrote:
> Dear All,
>
> Here is a link to a manuscript my research group produced completely with org
> http://medicalimaging.spiedigitallibrary.org/issue.aspx.
>
> For the last 6 years, I have used org mainly for teaching (beamer),
> productivity, outlining ideas, and note taking. Inspired by John
> Kitchin's 2013 Scipy talk, I tried to encourage members of my research
> group to use Org. Since the gentle approach didn't work, I made it
> mandatory requirement that all junior members must generate
> manuscripts in org, and now I am seeing the fruits of this decision--- we are 
> now a org-centric  research group :)
>
> I would like to thank  Carsten and all the other contributors for creating 
> such
> an awesome research tool.
>
> Cheers,
> M



Re: [O] Basic Literate Program

2014-07-10 Thread Grant Rettke
On Thu, Jul 10, 2014 at 4:31 PM, Jacob Gerlach  wrote:
> - Does this sound like a reasonable use case and approach?

Yes.

> - I am writing this program in C++. I believe that I can interweave
>   SRC blocks with different header arguments so that they tangle to my
>   .h file and .cpp file as appropriate. Is this correct?

Yes.

> - I may need to share the tangled cpp files with colleagues. Are there
>   any ways to control the sequence of code in the resulting files
>   other than the sequence of SRC blocks in org mode?

Yes.

> - On a related note, are there any tools to take org content from
>   outside the SRC blocks and tangle it into comments in the C++ files?

Yes.



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-10 Thread Grant Rettke
On Wed, Jul 9, 2014 at 5:37 PM, Doyley, Marvin M.
 wrote:
> I notice that you prefer to use python rather than matlab. Is there a reason  
> for this ? Matlab is free at my
> institution so cost  is not an issue.

Doing all of your reproducible research with free software will
maximize the number of people who may reproduce your research. MATLAB
is a great, great tool, and not many people purchase it other than
universities or professional engineers, minimize the number of people
to reproduce your research.



[O] How to call org-display-inline-images so that after a graphviz block is evaluated the image is refreshed?

2014-07-11 Thread Grant Rettke
Hi,

The ability to use graphviz in an org document is stellar and makes it
so much more productive to use org.

Combined with inline image display, it is a powerhouse combo.

After evaluating my source block, I would like to refresh the generated image.

Thus far, I just call org-display-inline-image.

What is the best way to automate it so that the images are always up to date?

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-11 Thread Grant Rettke
Octave is an option, too: https://www.gnu.org/software/octave/
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jul 11, 2014 at 7:31 PM, Ken Mankoff  wrote:
> Hi Marvin,
>
> * On 2014-07-09 at 18:37, Doyley, Marvin M. wrote:
>> I notice that you prefer to use python rather than matlab. Is there a
>> reason for this ? Matlab is free at my institution so cost is not an
>> issue.
>
> An additional blog post (with good discussion and links to other posts)
> on the Python v. MATLAB debate:
>
> http://lorenabarba.com/blog/why-i-push-for-python/
>
> and
>
> http://phillipmfeldman.org/Python/Advantages_of_Python_Over_Matlab.html
>
>   -k.
>



Re: [O] An Org centric research lab: Goodbye MS word, excel, and powerpoint

2014-07-11 Thread Grant Rettke
Now that I wrote that... MATLAB is totally worth the money.

A nice option for reproducible research is also to develop on MATLAB
and just make sure that OCTAVE can run it, too. Nice when you don't
want to worry about N licenses for deploying on a HPC cluster.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jul 11, 2014 at 9:03 PM, Grant Rettke  wrote:
> Octave is an option, too: https://www.gnu.org/software/octave/
> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
> 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 Fri, Jul 11, 2014 at 7:31 PM, Ken Mankoff  wrote:
>> Hi Marvin,
>>
>> * On 2014-07-09 at 18:37, Doyley, Marvin M. wrote:
>>> I notice that you prefer to use python rather than matlab. Is there a
>>> reason for this ? Matlab is free at my institution so cost is not an
>>> issue.
>>
>> An additional blog post (with good discussion and links to other posts)
>> on the Python v. MATLAB debate:
>>
>> http://lorenabarba.com/blog/why-i-push-for-python/
>>
>> and
>>
>> http://phillipmfeldman.org/Python/Advantages_of_Python_Over_Matlab.html
>>
>>   -k.
>>



Re: [O] How to call org-display-inline-images so that after a graphviz block is evaluated the image is refreshed?

2014-07-12 Thread Grant Rettke
Perfect!
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Jul 11, 2014 at 7:28 PM, Ken Mankoff  wrote:
>
> Try (org-redisplay-inline-images). Note "re".
>
> #+BEGIN_SRC  :post (org-redisplay-inline-images)
> #+END_SRC
> #+RESULTS:
>
>   -k.
>
> * On 2014-07-11 at 20:14, Grant Rettke wrote:
>> Hi,
>>
>> The ability to use graphviz in an org document is stellar and makes it
>> so much more productive to use org.
>>
>> Combined with inline image display, it is a powerhouse combo.
>>
>> After evaluating my source block, I would like to refresh the generated 
>> image.
>>
>> Thus far, I just call org-display-inline-image.
>>
>> What is the best way to automate it so that the images are always up to date?
>>
>> Kind regards,
>>
>> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
>> 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
>



[O] How does org-babel-post-tangle-hook work?

2014-07-12 Thread Grant Rettke
Hi,

In this document

http://orgmode.org/manual/Extracting-source-code.html#Extracting-source-code

the hook 'org-babel-post-tangle-hook is explained as

,
| This hook is run from within code files tangled by org-babel-tangle.
Example applications could include post-processing, compilation or
evaluation of tangled code files.
`

I know what a hook is and how to use them and where they run.

My trouble is that I don't understand what this documentation is saying.

Is it saying that if this hook exists in a file that was tangled by
org that it will be executed? If so does it only work for elisp files
or any kind of file?

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



[O] What all of those org-babel user functions do

2014-07-13 Thread Grant Rettke
Hi,

For the lazy org users like myself who want to know what the functions
listed [here] do, just evaluate the one you want:

╭
│ (describe-function 'org-babel-execute-src-block)
│ (describe-function 'org-babel-open-src-block-result)
│ (describe-function 'org-babel-load-in-session)
│ (describe-function 'org-babel-pop-to-session)
│ (describe-function 'org-babel-previous-src-block)
│ (describe-function 'org-babel-next-src-block)
│ (describe-function 'org-babel-execute-maybe)
│ (describe-function 'org-babel-open-src-block-result)
│ (describe-function 'org-babel-expand-src-block)
│ (describe-function 'org-babel-goto-src-block-head)
│ (describe-function 'org-babel-goto-named-src-block)
│ (describe-function 'org-babel-goto-named-result)
│ (describe-function 'org-babel-execute-buffer)
│ (describe-function 'org-babel-execute-subtree)
│ (describe-function 'org-babel-demarcate-block)
│ (describe-function 'org-babel-tangle)
│ (describe-function 'org-babel-tangle-file)
│ (describe-function 'org-babel-check-src-block)
│ (describe-function 'org-babel-insert-header-arg)
│ (describe-function 'org-babel-load-in-session)
│ (describe-function 'org-babel-lob-ingest)
│ (describe-function 'org-babel-view-src-block-info)
│ (describe-function 'org-babel-switch-to-session-with-code)
│ (describe-function 'org-babel-sha1-hash)
│ (describe-function 'org-babel-describe-bindings)
│ (describe-function 'org-babel-do-key-sequence-in-edit-buffer)
╰


[here]
http://orgmode.org/manual/Key-bindings-and-useful-functions.html#Key-bindings-and-useful-functions

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] Org-mode/R/Latex treatment of NAs

2014-07-13 Thread Grant Rettke
Just wanting to understand more:

Do you equate nil in Emacs Lisp with NA in R or do you equate it some other way?

I believe that the data brokering adheres to "expected" mappings as such.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Jul 13, 2014 at 2:42 PM, Vikas Rawal
 wrote:
>
> I have some tables created by Org-babel/R source codes with NAs. These get 
> exported as “nil” in the latex export. I would like to replace them with 
> blanks.
>
> Any suggestions?
>
> Vikas
>
>



Re: [O] proposal to make C-c C-c not remove latex overlays

2014-07-14 Thread Grant Rettke
On Mon, Jul 14, 2014 at 7:33 PM, Aaron Ecay  wrote:
> The first is to use the C-c C-v C-e binding to execute source blocks
> rather than C-c C-c.

Like this?

(setq org-babel-no-eval-on-ctrl-c-ctrl-c +1)



Re: [O] proposal to make C-c C-c not remove latex overlays

2014-07-15 Thread Grant Rettke
C-c C-v C-e might seem like a lot but it nice to have control and be
sure when code is getting evaluated.

That said, I do have a more obvious one using "super" which is indeed, super:

(local-set-key (kbd "s-t") 'org-babel-tangle)
(local-set-key (kbd "s-e") 'org-babel-execute-maybe)
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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, Jul 15, 2014 at 4:00 PM, John Kitchin  wrote:
> I actually love C-c C-c to run code blocks! Maybe I should just bind it
> to f5 or something, I am just so used to C-cC-c now!
>
> Grant Rettke  writes:
>
>> On Mon, Jul 14, 2014 at 7:33 PM, Aaron Ecay  wrote:
>>> The first is to use the C-c C-v C-e binding to execute source blocks
>>> rather than C-c C-c.
>>
>> Like this?
>>
>> (setq org-babel-no-eval-on-ctrl-c-ctrl-c +1)
>>
>>
>
> --
> ---
> John Kitchin
> Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu



[O] Evaluating inline source blocks on export issue

2014-07-22 Thread Grant Rettke
Good evening,

From [org-scraps] I pasted this example into a buffer:

,—-
━
 #+name: square
 #+begin_src emacs-lisp :var it=0
 (* it it)
 #+end_src

 Here is a call_square(it=4), stuck in the middle of some prose.
━
`—-

When I export the buffer I get:

,—-

 ╭
 │   (* it it)
 ╰

 Here is a , stuck in the middle of some prose.

`—-

I expected a 16 to have appeared there.

I did double check that inline call blocks work on export:

╭
│ (list org-export-babel-evaluate)
╰

#+NAME:
| inline-only |

Clearly I am missing something.

What am I doing wrong here?

My environment:

╭
│ (format "%S" (emacs-version))
╰

#+NAME:
#+begin_example
"GNU Emacs 24.3.1 (x86_64-apple-darwin13.2.0, Carbon Version 1.6.0
AppKit 1265.2)
 of 2014-07-03 on orion"
#+end_example

╭
│ (format "%S" (org-version))
╰

#+NAME:
#+begin_example
"8.2.7a"
#+end_example

Kind regards,

gcr


[org-scraps]
https://raw.githubusercontent.com/eschulte/org-scraps/master/scraps.org


Re: [O] Evaluating inline source blocks on export issue

2014-07-23 Thread Grant Rettke
Thanks for looking Thomas and Nick.

When I set this and export

,
| (setq org-export-babel-evaluate t)
`

I get the expected result of

,
| Here is a `16', stuck in the middle of some prose.
`

But when I do this and export

,
| (setq org-export-babel-evaluate 'inline-only)
`

I get this output which is not what I expected

,
| Here is a , stuck in the middle of some prose.
`

I thought that I was enabling inline code block execution correctly
and making the inline call correctly.

How does it look should it be doing what I had wanted?

I have not yet begun trimming down my org initialization, and trying
to decide when I need to start narrowing things down by deduction.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Wed, Jul 23, 2014 at 7:43 AM, Nick Dokos  wrote:
> Grant Rettke  writes:
>
>> Good evening,
>>
>> From [org-scraps] I pasted this example into a buffer:
>>
>> ,—-
>> ━
>>
>>  #+name: square
>>  #+begin_src emacs-lisp :var it=0
>>
>>  (* it it)
>>  #+end_src
>>
>>  Here is a call_square(it=4), stuck in the middle of some prose.
>> ━
>> `—-
>>
>> When I export the buffer I get:
>>
>> ,—-
>> 
>>  ╭
>>  │   (* it it)
>>  ╰
>>
>>  Here is a , stuck in the middle of some prose.
>> 
>> `—-
>>
>> I expected a 16 to have appeared there.
>>
>
> The following works for me:
>
> --8<---cut here---start->8---
>  #+name: square
>  #+begin_src emacs-lisp :var it=0 :exports none
>  (* it it)
>  #+end_src
>
>  Here is a call_square(it=4), stuck in the middle of some prose.
> --8<---cut here---end--->8---
>
> --
> Nick
>
>


[O] What is Babel's language model?

2014-07-23 Thread Grant Rettke
Good morning,

Whenever I learn a new programming language, I want to start by learning
about it's language model. The language model explains, among other
things, the order of evaluation, eagerness of evaluation, scope, and
binding approach. For example the Racket programming language has their
documentation here [1].

When I started learning `babel', I viewed it only as a means to and end,
the end being literate programming. Consequently, I just identified
goals and then either found a way to do it myself or had the kind and
generous `org-mode' users here explain the right way to do it. Please
don't take my laziness in learning as a mark of disrespect to `babel' or
to the community. The thing is that I failed to internalize literate
programming when I failed to view `babel' as a programming
language. Despite having read this [2] quite informative paper, I still
kind of missed the point. Now, I think that I get that I missed the
point, and here is how: when I read through [org-scraps], I still get
surprised and confused.

`org-scraps' is great. I understand 10% of it and have a lot to
learn. It never occurred to me that we may utilize the data structures
that define the document itself. That is so /lispy/. Looking at how one
may easily utilize souce code to assemble the very document in which it
is defined is really, really great. When I play with it though, I get it
wrong. My language model in my head is wrong, clearly.

My goal, then, is to develop a correct language model for `babel'.

My questions are:
• What is the best possible way to approach this goal?
• How have other `babelers' been documenting their pursuit of that goal?

Some thoughts on the goal:
• Thinking of a typical LISP language learning approach of evalutaion
  and binding review and study
  • `org-scraps' does this already, I just don't understand it
• Thinking of a flow chart of how things are processed between
  • The document
  • The meta-language in which `babel' itself runs via emacs-lisp
  • The guest languages managed and data-brokered with `babel'
• Target audience would be `babel' users but not implementers
  • Wouldn't need to dig into the source or `babel'
• Or is that the best approach?
  • Measure of success would be to have people be productive without
using up the time and resources of the `babel' maintainers
  • Perhaps users who want to understand the language model would need
to also learn [org-element] just as one would understand how to
parse/implement a LISP interpreter in LISP?

Looking for comments, questions, and concerns about this goal.

Kind regards,

gcr


[org-scraps]
https://raw.githubusercontent.com/eschulte/org-scraps/master/scraps.org

[org-element]
http://orgmode.org/w/?p=org-mode.git;a=blob;f=lisp/org-element.el;h=352482ef825fa495fd4e0daa7f6f236a442d2b01;hb=0be96db56e0ab973463376997fe1198a28d89e5b



Footnotes
─

[1] [http://docs.racket-lang.org/reference/model.html]

[2] [http://www.jstatsoft.org/v46/i03]



Re: [O] Reproducible research with Org mode

2014-07-24 Thread Grant Rettke
Wonderful. Thanks for sharing that.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jul 24, 2014 at 7:45 PM, Thomas S. Dye  wrote:
> Aloha all,
>
> A piece of reproducible research and a compendium developed with Org
> mode were just published:
>
> http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0102431
>
> Many thanks to all the patient, gentle souls on this ML, without whose
> generous advice and assistance the research and compendium could not
> have been completed.
>
> Also, an Org mode template for a PLOS One journal article is described
> on Worg:
>
> http://orgmode.org/worg/exporters/plos-one-template-worg.html
>
> I'm sure the template could be improved in many ways, but it works!
>
> All the best,
> Tom
>
> --
> T.S. Dye & Colleagues, Archaeologists
> 735 Bishop St, Suite 315, Honolulu, HI 96813
> Tel: 808-529-0866, Fax: 808-529-0884
> http://www.tsdye.com
>



Re: [O] Evaluating inline source blocks on export issue

2014-07-25 Thread Grant Rettke
Understood. Somehow got the call syntax suck in my head and didn't see
that the underscore named syntax only works for LoB stuff and works
perfectly when you just make a plain old language call.

Thanks!

This feature is really, really important.

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Thu, Jul 24, 2014 at 8:53 PM, Ista Zahn  wrote:
> On Thu, Jul 24, 2014 at 6:14 AM, Andreas Leha
>  wrote:
>> Nick Dokos  writes:
>>
>>> Grant Rettke  writes:
>>>
>>>> Thanks for looking Thomas and Nick.
>>>>
>>>> When I set this and export
>>>>
>>>> ,
>>>> | (setq org-export-babel-evaluate t)
>>>> `
>>>>
>>>> I get the expected result of
>>>>
>>>> ,
>>>> | Here is a `16', stuck in the middle of some prose.
>>>> `
>>>>
>>>> But when I do this and export
>>>>
>>>> ,
>>>> | (setq org-export-babel-evaluate 'inline-only)
>>>> `
>>>>
>>>> I get this output which is not what I expected
>>>>
>>>> ,
>>>> | Here is a , stuck in the middle of some prose.
>>>> `
>>>>
>>>> I thought that I was enabling inline code block execution correctly
>>>> and making the inline call correctly.
>>>>
>>>> How does it look should it be doing what I had wanted?
>>>>
>>>
>>> I don't think you can: the `type' (see below) of the inline code is not
>>> `inline' as one might think at first, but `lob', presumably because
>>> call_foo is defined in the library-of-babel.
>>>
>>> The relevant code is in ob-exp.el:org-babel-exp-results:
>>>
>>> ,
>>> |   ...
>>> |   (when (and (or (eq org-export-babel-evaluate t)
>>> |  (and (eq type 'inline)
>>> |   (eq org-export-babel-evaluate 'inline-only)))
>>> |  (not (and hash (equal hash (org-babel-current-result-hash)
>>> |   ...
>>> `
>>
>> Then I would like to turn this into a feature request:  Enable
>> inline-block-specific settings.
>
> I'm not sure if this solves your problem, but
>
> --8<---cut here---start->8---
>  #+name: squareFun
>  #+begin_src emacs-lisp :exports none
>(defun square (it) (* it it))
>  #+end_src
>
>  #+RESULTS: squareFun
>  : square
>
> Here is a src_emacs-lisp{(square 10)}, from an inline source block.
> --8<---cut here---end--->8---
>
> does work with org-export-babel-evaluate set to 'inline-only. You do
> have to evaluate the squareFun block before exporting.
>
> Best,
> Ista
>
>
>
>>
>> This does not only hold for the evaluation, but also for default header
>> arguments.  Different settings for inline code are quite useful.  I do
>> have to specify [:results raw] on the block-to-block basis quite a lot
>> and would benefit a lot from global inline-specific settings.
>>
>> As always, point me to the way to do it, if (quite likely) this is
>> possible already.
>>
>> Regards,
>> Andreas
>>
>>
>



Re: [O] What is the best in-Emacs presentation mode for org-files today?

2014-07-29 Thread Grant Rettke
el-get might be a nice option for you.

el-get-sources lets you set up any source and you might use an 'after'
action to tangle the file.

I didn't do that, because my system won't tangle org-show for some
reason only my system knows.

The recipe is really basic but good enough for me:

#+begin_src emacs-lisp
(add-to-list
 'el-get-sources
 '(:name org-show
  :type http
  :url 
"https://raw.githubusercontent.com/jkitchin/jmax/master/org-show.org";
  :website "https://github.com/jkitchin/jmax/blob/master/org-show.org";
  :description "simple presentations in org-mode"))
(add-to-list 'gcr/el-get-packages 'org-show)
#+end_src
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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, Jul 29, 2014 at 10:45 AM, Thorsten Jolitz  wrote:
> John Kitchin  writes:
>
>> yes, you should be able to use org-babel-tangle to extract the .el
>> file. Sorry for leaving that detail out!
>
> since I always work the other way around (from elisp to org-mode via
> outorg) I don't have the tangling option very present, otherwise it
> would (and should) be quite obvious.
>
> Thx for the nice library!
>
> --
> cheers,
> Thorsten
>
>



Re: [O] Unicode (double-byte?) goofs up text table layout

2014-08-01 Thread Grant Rettke
Layout works for ASCII width characters

https://lists.gnu.org/archive/html/emacs-orgmode/2009-02/msg00323.html

The maintainers surely may tell you more, though.

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Fri, Aug 1, 2014 at 8:46 AM, John Lusk  wrote:

> Hey, org-mode crew.  Awesome app; I love it.  It's pretty much the only
> thing that keeps me in emacs these days (apart from writing Python code :)
> ).
>
> You probably already know about this problem, but here's a thousand words:
>
> ​
> (I hope that comes through.)
>
> I'm sorry I only have time to whine and not fix, but, hey: day job and all.
>
> GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN
> Org-mode version 8.2.5h (8.2.5h-dist @
> c:/usr/local/share/emacs/site-lisp/org/)
>
> (Re-attaching pic at full size, since I don't know what gmail is going to
> do to that insertion.)
>
> John.
>
>


[O] How to disable block evaluation results being wrapped with a single character like =?

2014-08-03 Thread Grant Rettke
Hi,

Sometimes block evaluation results are wrapped with a single character like =.

When exporting to latex, the results block is lost.

How may one force block evaluation always to be wrapped properly for
export to latex?

org 8.2.7a

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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



Re: [O] How to disable block evaluation results being wrapped with a single character like =?

2014-08-04 Thread Grant Rettke
That is what I was thinking.

I had set it to 0.

What happened is that instead of a block showing up, the results were
delimited with a prepended '=' instead of a ':'.

Unfortunately I forgot how this occurred, as I manually wrapped the
result with a block instead, so org was happy to use that instead.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sun, Aug 3, 2014 at 7:24 PM, Ista Zahn  wrote:
> I'm somewhat confused by the "wrapped in =" part, but I think you are
> looking for 'C-h v org-babel-min-lines-for-block-output'.
>
> Best,
> Ista
>
> On Sun, Aug 3, 2014 at 3:03 PM, Grant Rettke  wrote:
>> Hi,
>>
>> Sometimes block evaluation results are wrapped with a single character like 
>> =.
>>
>> When exporting to latex, the results block is lost.
>>
>> How may one force block evaluation always to be wrapped properly for
>> export to latex?
>>
>> org 8.2.7a
>>
>> Kind regards,
>>
>> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
>> 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
>>



[O] How to mark headings to be exclude from inclusion in tangling or weaving?

2014-08-05 Thread Grant Rettke
Good morning,

My system is set up to tangle and weave an org file into a .emacs.el
file. By ensuring property inheritance is configured like this

╭
│ (setq org-babel-use-quick-and-dirty-noweb-expansion nil)
╰

, each heading takes properties from its parents.

Sometimes I don't want that inheritance to occur for one specific
sub-heading, though, and I want to know, what is the best way to go
about that?

My current approach, which works, but is probably wrong, is to give the
property to the subheading of:

╭
│ :PROPERTIES:
│ :noweb-ref: ignore-r-config
│ :END:
╰

which seems to exclude it from export or tangling. Then later when I
tangle the file, noweb expansion lets me put this where I want.

What is going on here is that I've got a programming configuration
section, and it makes sense to keep it all together, but for the fact
that 90% of that config goes into the .emacs.el an 10% of goes into
another config file, so I do need to "exclude and put somewhere else"
that 10%.

emacs "GNU Emacs 24.3.1 (x86_64-apple-darwin13.2.0, Carbon Version 1.6.0
AppKit 1265.2)\n of 2014-07-03 on orion"

org "8.2.7a"

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM 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



[O] file-truename: Variable binding depth exceeds max-specpdl-size when tangling

2014-08-20 Thread Grant Rettke
Good afternoon,

While debugging one of my babel documents, I re-read [this]
documentation on `:noweb-ref'.

What I had wanted to do was to define a bunch of source blocks and then
at the end of the heading to tangle them all into a file. This was just
a natural thing to do while /in the flow/ and *not* thinking about the
document structure.

Here is the simplest possible example.

,
|
| * Demo
|   :PROPERTIES:
|   :noweb-ref: demo
|   :END:
|
| #+begin_src emacs-lisp
| (message "demo")
| #+end_src
|
| #+begin_src emacs-lisp
| (message "this")
| #+end_src
|
| #+begin_src sh :tangle ~/tmp/demo.el :noweb yes
| «demo»
| #+end_src
`


  When you try and tangle this, you get the error:

file-truename: Variable binding depth exceeds
max-specpdl-size

  You can increase the size but it will run out:
  ╭
  │ (setq max-specpdl-size 1500)
  ╰

  Feel like I have caused an endless loop by asking babel to collect all
  references to `demo' and place them inside of a sourceblock, when that
  sourceblock itself will be collected. That said, I'm not sure where to
  go next and simply moved it up one heading.

  Questions:
  • What did I do wrong here?
  • Am I the only one to ever encounter this?
• Web search did not reveal a lot quickly

  Here is the org and emacs version
  ╭
  │ (org-version nil t)
  ╰

  ╭
  │ Org-mode version 8.2.7c (8.2.7c-25-g1faeb4-elpaplus @
/Users/gcr/.emacs.d/.cask/24.3.1/elpa/org-plus-contrib-20140811/)
  ╰

  ╭
  │ (emacs-version)
  ╰

  ╭
  │ GNU Emacs 24.3.1 (x86_64-apple-darwin13.2.0, Carbon Version 1.6.0
AppKit 1265.2)
  │  of 2014-07-03 on orion
  ╰

  Kind regards,

  gcr



[O] [PATCH] ob-R.el: Add customizable R command primary prompt setting

2014-08-22 Thread Grant Rettke
 list/ob-R.el (org-babel-R-command-primary-prompt,
org-babel-R-evaluate-session): Former adds customizable prompt value
the latter utilizes it.

My R prompt looks like this "ℝ> ".  Babel needs to know more how to
handle various situations so the
regex used in `org-babel-R-evaluate-session' to identify the prompt
looks like this "^\\([ ]*[ℝ>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)".
It is required to handle various R prompt situations correctly.  It
may change over time to handle more situations.  The
user doesn't need to know about those details.  The user only cares
about the R prompt alone.  For example, when
they set the prompt in R it looks like this =options(prompt="ℝ> ")=,
it is very simple.  It should be this simple for bable, too.

This change adds a user customizable variable for the prompt from user
perspective `org-babel-R-command-primary-prompt'.  That variable is
utilized in `org-babel-R-evaluate-session' where the full regular
expression to match the prompt is constructed.  This makes it very
easy to handle a custom prompt since from the R side of things, the
value of `org-babel-R-command-primary-prompt' is the only thing that
the user needs to know to set.  Via custom it looks like this
'(org-babel-R-command-primary-prompt "ℝ>").

TINYCHANGE
---
 lisp/ob-R.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 41b943c..1cb675b 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -87,6 +87,11 @@ this variable.")
   :version "24.1"
   :type 'string)

+(defcustom org-babel-R-command-primary-prompt ">"
+  "User configurable portion of the primary prompt."
+  :group 'org-babel
+  :type 'string)
+
 (defvar ess-local-process-name) ; dynamically scoped
 (defun org-babel-edit-prep:R (info)
   (let ((session (cdr (assoc :session (nth 2 info)
@@ -413,6 +418,7 @@ last statement in BODY, as elisp."
 (list body org-babel-R-eoe-indicator)
 "\n"))
  (inferior-ess-send-input)) "\n"
+  (concat  "^\\([ ]*["
org-babel-R-command-primary-prompt "+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)")
line)

 (defun org-babel-R-process-value-result (result column-names-p)
   "R-specific processing of return value.
--
1.9.2


0001-ob-R.el-Add-customizable-R-command-primary-prompt-se.patch
Description: Binary data


Re: [O] [PATCH] ob-R.el: Add customizable R command primary prompt setting

2014-08-23 Thread Grant Rettke
Gotcha.

I wasn't tracking that thread. My desires was independent, I had just
wanted supported for a non-standard prompt because my source block
evaluation obviously quit working.

Good to know it is addressed!

Have a great day.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
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 Sat, Aug 23, 2014 at 3:34 AM, Aaron Ecay  wrote:
> Hi Grant,
>
> We have some discussion of realted issues in the thread that starts at
> <http://mid.gmane.org/can7vk5r+2dhrajur8+ndmwsplhjtodrdjxoo0v027cjhy7g...@mail.gmail.com>.
>
> 2014ko abuztuak 22an, Grant Rettke-ek idatzi zuen:
>>
>>  list/ob-R.el (org-babel-R-command-primary-prompt,
>> org-babel-R-evaluate-session): Former adds customizable prompt value
>> the latter utilizes it.
>>
>> My R prompt looks like this "ℝ> ".  Babel needs to know more how to
>> handle various situations so the
>> regex used in `org-babel-R-evaluate-session' to identify the prompt
>> looks like this "^\\([ ]*[ℝ>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)".
>> It is required to handle various R prompt situations correctly.  It
>> may change over time to handle more situations.  The
>> user doesn't need to know about those details.  The user only cares
>> about the R prompt alone.  For example, when
>> they set the prompt in R it looks like this =options(prompt="ℝ> ")=,
>> it is very simple.  It should be this simple for bable, too.
>>
>> This change adds a user customizable variable for the prompt from user
>> perspective `org-babel-R-command-primary-prompt'.  That variable is
>> utilized in `org-babel-R-evaluate-session' where the full regular
>> expression to match the prompt is constructed.  This makes it very
>> easy to handle a custom prompt since from the R side of things, the
>> value of `org-babel-R-command-primary-prompt' is the only thing that
>> the user needs to know to set.  Via custom it looks like this
>> '(org-babel-R-command-primary-prompt "ℝ>").
>>
>> TINYCHANGE
>> ---
>>  lisp/ob-R.el | 6 ++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/lisp/ob-R.el b/lisp/ob-R.el
>> index 41b943c..1cb675b 100644
>> --- a/lisp/ob-R.el
>> +++ b/lisp/ob-R.el
>> @@ -87,6 +87,11 @@ this variable.")
>>:version "24.1"
>>:type 'string)
>>
>> +(defcustom org-babel-R-command-primary-prompt ">"
>> +  "User configurable portion of the primary prompt."
>> +  :group 'org-babel
>> +  :type 'string)
>> +
>>  (defvar ess-local-process-name) ; dynamically scoped
>>  (defun org-babel-edit-prep:R (info)
>>(let ((session (cdr (assoc :session (nth 2 info)
>> @@ -413,6 +418,7 @@ last statement in BODY, as elisp."
>>  (list body org-babel-R-eoe-indicator)
>>  "\n"))
>>   (inferior-ess-send-input)) "\n"
>> +  (concat  "^\\([ ]*[" 
>> org-babel-R-command-primary-prompt "+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)") line)
>
> I don’t think this does what you want it to: you’re inserting the
> contents of the variable inside a regex character class (delimited by
> []).
>
> See the patch I just sent
> <http://mid.gmane.org/871ts7r4ho@gmail.com> for a different
> approach.
>
> --
> Aaron Ecay



[O] [babel-R][RFC] Customizing the R prompt for babel sessions approach, advice, discussion

2014-08-27 Thread Grant Rettke
Good evening,

The `R' programming language lets you set a custom prompt by evaluating
this `R' code:

╭
│ options(prompt="ℝ> ")
╰

When you are using `ess' [1] you need to let it know that you are using
a different prompt than the defult by customizing the following value
like this:

╭
│ (defcustom inferior-S-prompt "[]a-zA-Z0-9.[]*\\(?:[>+.] \\)*ℝ+> "
│   "Regexp used in S and R inferior and transcript buffers for prompt
navigation.
│ Customise it to make `comint-previous-prompt' quiqly navigate to
│ interesting portions of the buffer.
│  "
│   :group 'ess-proc
│   :type 'string)
╰

In order for `babel' to work correctly with the custom prompt currently
I make a change manually to ob-R.el in the function
`org-babel-R-evaluate-session' to modify the regex to look like this:

╭
│ "^\\([ ]*[ℝ>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)"
╰

Instead of making the change by hand I would like to add a new
customizable value to ob-R that contains the regex. The goal is to let
the user customize it themselves to accomodate any prompt. A couple of
weeks ago I posted a [patch] with that intent, and aaronecay provided
valuable feedback… but what I did wrong was both not discussing it with
anyone before I sent that patch and I also was too aggressive with the
change (it was a bad idea for the change).

Question:
• What do you think of such a change?
• Do you have a desired approach?
• Would you like a patch?
  • My change would be really basic, just add a new defcustom to store
the regex and reference it in the session evalution function

It would change from this

╭
│ (if (string-match
│  "^\\([ ]*[ℝ>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line)
│ (substring line (match-end 1))
│   line)
╰

to this

╭
│ (if (string-match
│  inferior-R-prompt line)
│ (substring line (match-end 1))
│   line)
╰

╭
│ emacs-version
╰

╭
│ 24.3.1
╰

╭
│ org-version
╰

╭
│ 8.2.7c
╰

╭
│ ess-version
╰

╭
│ 14.06
╰

Kind regards,


[patch]
https://lists.gnu.org/archive/html/emacs-orgmode/2014-08/msg00753.html



Footnotes
─

[1] [http://ess.r-project.org/]

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


Re: [O] [babel-R][RFC] Customizing the R prompt for babel sessions approach, advice, discussion

2014-08-29 Thread Grant Rettke
Gotcha thanks for explaining that because I didn't understand how it
would fix it and just wanted to communicate my intent here.

Love that we can make customizations and am sure to enjoy the end
result of that discussion.
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 Thu, Aug 28, 2014 at 12:12 AM, Aaron Ecay  wrote:
> Hi Grant,
>
> 2014ko abuztuak 27an, Grant Rettke-ek idatzi zuen:
>
> [...]
>
>>
>> Question:
>> • What do you think of such a change?
>> • Do you have a desired approach?
>> • Would you like a patch?
>>   • My change would be really basic, just add a new defcustom to store
>> the regex and reference it in the session evalution function
>
> I think this patch will be made superfluous by the approach that Charles
> Berry and I are working on in the thread I linked in my response to your
> previous email (with useful contributions also from others).  Babel will
> no longer need to know about the user’s prompt customizations (or lack
> thereof) at all.
>
> It’s taking a little bit for me to digest the discussion in that thread,
> but I hope that if you can live with your local modifications a bit
> longer you will be pleased with the end result.
>
> --
> Aaron Ecay



Re: [O] A Babel block to #+INCLUDE all .org files of a directory

2014-08-30 Thread Grant Rettke
May you please discuss your use case that motivated this code?
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 Sat, Aug 30, 2014 at 10:50 AM, Andrea Rossetti
 wrote:
> Hi Org users,
>
>   I wrote a Babel block to generate the #+INCLUDE statements
> for all Org files of a directory.
>
>   Nothing spectacular: not recursive through directories,
> only .org files ... but I wanted to share it, just in case
> someone finds it helpful. Source code and usage example
> are available here:
>
> https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-all-org-files
>
> (GitHub renders Org files as html, so be sure to click the "Raw" button
> in order to see #+BEGIN_SRC, #+END_SRC and #+COMMENTS)
>
>   Opinions, corrections and enhancements are of course
> more than welcome. Kindest regards,
>
>   Andrea
>
>



[O] How are *you* realizing traceability from your org documents to their tangled and weaved destination?

2014-08-30 Thread Grant Rettke
How are *you* realizing traceability from your org documents to their
tangled and weaved destination?

I was thinking of using UUIDs or git hashes for commits, and wanted to
know what others have done.

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



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

2014-08-31 Thread Grant Rettke
Good morning,

There are as many /right ways/ to use `org' for *literate programming*
as there are flowers. They are all delightful and everyone has their own
personal preference.

My personal preference is to embrace /literate programming/ in the
truest sense of the word: the document everything. It is for humans, and
computers, and anything else that needs to read it in any form
whatsoever.

My primary audience is myself, but since I am an English speaking human
others may value it, too, but it is all personal preference.

Here are some direct links:
• [The human readable part]
• [The Emacs readable part]
• [All of the artifacts]

[The human readable part]
https://github.com/grettke/home/blob/master/TC3F.txt

[The Emacs readable part]
https://github.com/grettke/home/blob/master/.emacs.el

[All of the artifacts] https://github.com/grettke/home

Kind regards,

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 Sun, Aug 31, 2014 at 3:37 AM, Marcin Borkowski  wrote:
> OK,
>
> so the time has come.  Either I'll declare .emacs bankruptcy soon, or
> I'll use Org-mode to structure it.
>
> I googled for a while, but couldn't find what I'm looking for: a list
> of options with hints (or links to hints) about how to get started, and
> possibly their pros and cons.
>
> 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 am pretty sure that my question *can* be answered by RTFM (Worg
> page? some blog post?), so please link the FM if possible.
>
> Best,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Adam Mickiewicz University
>



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



[O] How to tangle contents of a noweb-ref block that as source block indicators in it?

2014-09-19 Thread Grant Rettke
Good afternoon,

I work in:

╭
│ (print emacs-version)
│ (print org-version)
╰

╭
│ "24.3.1"
│
│ "8.2.7c"
╰

My `org' configuration specifies source blocks like this:

╭
│ (setq org-babel-noweb-wrap-start "«")
│ (setq org-babel-noweb-wrap-end "»")
╰

When I tangle this block the output is bit for bit.

When I tangle this other block:

╭
│ (wrap-region-add-wrapper "«" "»" "w" 'org-mode) ;; noweb blocks
╰

the guillemot is removed.

What I want is to tangle the source block without having the guillemot
removed.

I did it wrong because I generated this:

╭
│ (wrap-region-add-wrapper "" "w" 'org-mode) ;; noweb blocks
╰

What should I do to generate the desired output?

Kind regards,

Grant Rettke
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



Re: [O] meaningfull names for org-src buffers

2014-09-21 Thread Grant Rettke
On Thu, Sep 11, 2014 at 5:05 PM, Adriaan Sticker
 wrote:
> I was wondering if it's somehow possible to give named org src buffer the
> name they were give in their #+NAME tag? Now there are just called something
> like:
> *Org Src test.org[ R ]*
>
> But if you have multiple org-src buffers opened at the same time, its hard
> to find the correct one back.

Excellent idea. I've got so many small source blocks that it is too
difficult to make sense of
keeping multiple source block edit buffers open and limit them to one
at a time eg

,
| (setq org-src-window-setup 'current-window)
`

How have you come upon your workflow of keeping multiple open and what
are some of the pros and
cons that you've found with it?

-- 
Grant Rettke
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



Re: [O] Emacs Lisp Depth

2014-09-21 Thread Grant Rettke
On Tue, Sep 16, 2014 at 8:01 AM, Fabrice Popineau
 wrote:
> Curious to hear about other reports.

My primary document has 8051 lines in it so I set max-specpdl-size to
2600 "just in case".

That was before I realized that in *my* case, all the bugs were
introduced by me into
the document itself.

It was a good opportunity to learn more about how =org= really works though.

-- 
Grant Rettke
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



Re: [O] State-of-the-art in linking org items to places in source files?

2014-09-21 Thread Grant Rettke
On Wed, Sep 17, 2014 at 2:37 AM, Thorsten Jolitz  wrote:
> Wasn't there even a library to support this kind of workflow?
> I would appreciate any hint that updates me on this topic.

Did your research yield any further results?

-- 
Grant Rettke
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



Re: [O] [Feature request] org-babel-tangle-file add an option to tangle if target-file is older than file.

2014-09-21 Thread Grant Rettke
On Thu, Sep 18, 2014 at 5:27 AM, Thorsten Jolitz  wrote:
> Marcin Antczak  writes:
>
>> As in topic.
>>
>> I think that if both parameters 'file' and 'target-file' are set and
>> target-file' exists, 'org-babel-tangle-file' should tangle only if
>> target-file' is older.
>
> I think the Org based Emacs Starter Kit does this conditional tangling,
> you might have a look there
> (http://eschulte.github.io/emacs24-starter-kit/) to see how it is done.


Martin what did you end up using to obtain your desired functionality?

-- 
Grant Rettke
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



Re: [O] meaningfull names for org-src buffers

2014-09-21 Thread Grant Rettke
On Sun, Sep 21, 2014 at 10:07 AM, Adriaan Sticker
 wrote:
> Im also thinking about investigating the usefullness of polymode
> (https://github.com/vitoshka/polymode)
> So I dont have to go to a different buffer all the time. Do you have any
> experience with this?

No and it is on my TODO list because you may use it for .Rmd files so
it is a must-learn.



Re: [O] [RFC] [PATCH] Warn about unexpanded macros on export

2014-09-23 Thread Grant Rettke
Aaron may I trouble you to add a flag so that if such errors occur
then the export fails?

>From my perspective, if the document doesn't "compile", then nothing
should succeed.

Compile includes export from my perspective.

On Mon, Sep 22, 2014 at 10:25 PM, Aaron Ecay  wrote:
> Hi Nicolas,
>
> 2014ko irailak 19an, Nicolas Goaziou-ek idatzi zuen:
>>
>> Certainly not a message, due to asynchronous export.
>
> Very good point.
>
>>
>>> 2. Since this is a feature that many backends will want to use, should
>>> we introduce a new “abstract” backend from which other backends can
>>> inherit, which incorporates this feature, and others like it in the
>>> future?  The idea would be similar to prog-mode in emacs, the major
>>> mode from which programming-language modes can derive.  The
>>> alternative is adding the (macro . org-export-macro-warn) entry
>>> manually to all the relevant backends, and relying on future backend
>>> authors to do the same.
>>>
>>> 3. Should this even be implemented as part of the backend’s
>>> translate-alist, or at a lower level?
>>
>> Don't bother with export back-ends, they never get to see macros, which
>> are expanded very early in the export process. This explains, for
>> example, why there is no `macro' translator.
>
> Um...but the patch I sent works precisely by defining a macro translator,
> which does get called for any unexpanded (because undefined) macros.  I
> guess you’re saying the code ought to block this at a lower/earlier level.
>
>>
>> You have two options. Either report an error, as you suggested, or
>> insert an obnoxious message in the output, e.g., "UNKNOWN MACRO", à la
>> "DEFINITION NOT FOUND." for footnote definitions. In any case, this
>> should happen in "org-macro.el", not in the export framework.
>
> I think error is better than obnoxious message, because it’s possible
> for the latter to slip through into a “production” document.  (We ought
> to proofread our documents carefully, of course...but no one’s perfect).
>
> One issue is that the exporter does two macro expansion passes – one
> for garden-variety macros, and the second for author, date, email, and
> title.  So, we can’t make the macro expansion unconditionally barf on
> undefined macros (since for the first pass e.g. author is undefined).
> I see three options:
> 1. explicitly whitelist the few “blessed” macros like author, and error
>on any other undefined macro
> 2. add an optional “final” arg to org-macro-replace-all, which will
>activate the undefined checking only if non-nil, and pass this flag
>in the exporter’s second (and last) call to org-macro-replace-all
> 3. in ‘org-export-as’, manually walk the parse tree after expanding
>macros, and make sure no 'macro type objects are left
>
> WDYT?
>
> --
> Aaron Ecay
>



-- 
Grant Rettke
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



[O] How to utilize the vc package inside of the edit source block buffer?

2014-09-23 Thread Grant Rettke
Good afternoon,

The ability to org-edit-special inside of source block is truly priceless.

There is a delightful workflow to be found with approach.

It has got me spending more and more time in the edit buffer though,
wanting to utilize
vc-next-action to initiate a commit. This is not possible because the
buffer is not associated
with a file.

Is there some way to get tell Emacs to execute the action on the
source buffer from which the
source edit block buffer originated?

My apologies as I have not been able to locate the post where this
topic was originally discussed.

Kind regards,

-- 
Grant Rettke
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



Re: [O] Bug: Export to html inserts strange unicode characters at line breaks because of fci-mode [8.2.7c (8.2.7c-64-g01f736-elpa @ /home/kmodi/.emacs.d/elpa/org-20140915/)]

2014-09-25 Thread Grant Rettke
Works perfectly on this:

╭
│ (print emacs-version)
│ (print org-version)
╰

╭
│ "24.3.1"
│
│ "8.2.7c"
╰


Re: [O] Bug: Export to html inserts strange unicode characters at line breaks because of fci-mode [8.2.7c (8.2.7c-64-g01f736-elpa @ /home/kmodi/.emacs.d/elpa/org-20140915/)]

2014-09-25 Thread Grant Rettke
Yes. I faced the issue here:

https://github.com/alpaker/Fill-Column-Indicator/issues/45

On Thu, Sep 25, 2014 at 6:58 PM, Kaushal  wrote:
> Do you mean that the fix works perfectly?
>
> Thanks.
>
> --
> Kaushal Modi
>
> On Sep 25, 2014 7:55 PM, "Grant Rettke"  wrote:
>>
>> Works perfectly on this:
>>
>> ╭
>> │ (print emacs-version)
>> │ (print org-version)
>> ╰────
>>
>> ╭
>> │ "24.3.1"
>> │
>> │ "8.2.7c"
>> ╰



-- 
Grant Rettke
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



Re: [O] ob-R, about :results value verbatim drawer

2014-09-25 Thread Grant Rettke
On Wed, Sep 24, 2014 at 2:52 AM, Rainer M Krug  wrote:
> would there be interest in pursuing this?

Yes.

I'm interested in working with other serious babel users to pool our
efforts, provide a meaningful contribution, and do it in a way that
works best for the maintainers.



Re: [O] Formal description of Org files

2014-09-26 Thread Grant Rettke
Eric do you use org in Emacs on the Pandora?

Just curious also to know where Emacs on Pandora users hang out?

On Fri, Sep 26, 2014 at 3:12 AM, Eric S Fraga  wrote:
> On Sunday, 21 Sep 2014 at 14:10, Gustav Wikström wrote:
>
> [...]
>
>> (For me, the biggest limitation of Org mode is lacking tools to
>> utilize it on the run. The aim of this is thus to feed thoughts on how
>> to simplify processes that can expand Org mode into those "more
>> mobile" domains).
>
> Just curious: what is it you wish to do in a mobile environment.  I have
> everything I need with MobileOrg and running full emacs + org on an
> OpenPandora.  Obviously, your needs may be different than mine.
>
> (email composed on train offline on my OpenPandora in Emacs with gnus ;-)
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf



-- 
Grant Rettke
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



Re: [O] Difference between eval and export

2014-09-26 Thread Grant Rettke
My eye is on you post about that topic because I would also like to know.



On Fri, Sep 26, 2014 at 8:17 AM, Johannes Rainer
 wrote:
> thanks Grant for this information.
>
> I was just wondering, because it seemed to me that some environment variables 
> (from the shell) are present in the, while they some (LC_ALL) are not present 
> in the export process.
> In my case, the export call fails with an error message, while there is no 
> problem if I evaluate source block per source block from the buffer.
>
> At present I am therefore looking for a way to specify environment variables 
> in the export process, but I have no idea how to do that...
>
> On 26 Sep 2014, at 15:11, Grant Rettke  wrote:
>
>> On Fri, Sep 26, 2014 at 5:43 AM, Johannes Rainer
>>  wrote:
>>> I am wondering what the difference between the eval of a source block and 
>>> the export of a buffer is in terms
>>> of the process in which the code is evaluated.
>>
>> When you evaluate a source block, it executes in the processed defined
>> by your configuration. Then the results of that evaluation are stored
>> according to your configuration. For example store the results in an
>> example block.
>>
>> Exporting is the conversion for the org file content into and file
>> format. During that process, you can configure whether or not you want
>> evaluation of source blocks to occur during that process.
>



-- 
Grant Rettke
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



[O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
Good afternoon,

╭
│ (print emacs-version)
│ (print org-version)
╰

╭
│ "24.3.1"
│
│ "8.2.7c"
╰

My goal was to set a new keybinding for two keys like this:

╭
│ (local-set-key (kbd "C-,") (lambda () (interactive) (insert " \\larr ")))
│ (local-set-key (kbd "C-.") (lambda () (interactive) (insert " \\rarr ")))
╰

The second works fine. The first does not; it stays bound to
`org-cycle-agenda-files' instead. Trying to remove it first and the bind
it I did:

╭
│ (local-unset-key (kbd "C-,"))
│ (local-set-key (kbd "C-,") (lambda () (interactive) (insert " \\larr ")))
╰

With no effect. That got me wondering if the binding occurred to
`org-cycle-agenda-files' /after/ mine. I don't think it that is possible
or likely because I do not customize agenda at all either via the UI or
Lisp.

Not sure if I am facing a Lisp thing or where to start.

What do you folks think I ought to do here?

Kind regards,


-- 
Grant Rettke
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



Re: [O] Difference between eval and export

2014-09-26 Thread Grant Rettke
On Fri, Sep 26, 2014 at 1:44 PM, Rainer M Krug  wrote:
> Grant Rettke  writes:
>> My eye is on you post about that topic because I would also like to know.
>
> As you are using R, and if you are using sessions, what about setting
> them from within R[1]?
>
> Footnotes:
> [1]  http://stat.ethz.ch/R-manual/R-devel/library/base/html/Sys.setenv.html

Yes indeed. I am quite interested in the general mechanism of how the
environment exists for when exports occur and in particular whether or
not it is different somehow. Right now I've delegated things between
[1] and .Renviron.



Re: [O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo
 wrote:
> Grant Rettke writes:

> For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you have
> something that sets C-' to C-, globally?

Definitely, here in my .emacs.el:

╭
│ (global-set-key (kbd "C-;") 'vc-next-action)
│ (global-set-key (kbd "C-'") 'er/expand-region)
╰

I /thought/ that was *OK*. Later in the `org-mode-hook' function I call:

╭
│ (local-set-key (kbd "C-,") (lambda () (interactive) (insert " \\larr ")))
│ (local-set-key (kbd "C-.") (lambda () (interactive) (insert " \\rarr ")))
╰

The help documentation for `org-cycle-agenda-files' says:

  C-, runs the command org-cycle-agenda-files, which is an
  interactive autoloaded compiled Lisp function in `org.el'.

  It is bound to C-', C-,,.

What I am stumped on is:
• What did I do wrong?
• How do I fix it?



Re: [O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
Yes it is the only time it is globally bound.

On Fri, Sep 26, 2014 at 4:03 PM, Jorge A. Alfaro-Murillo
 wrote:
> Jorge A. Alfaro-Murillo writes:
>>
>> Grant Rettke writes:
>>>
>>> On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo
>>>  wrote:
>>>>
>>>> For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you have
>>>> something that sets C-' to C-, globally?
>>>
>>>
>>> Definitely, here in my .emacs.el:
>>> ╭ │ (global-set-key (kbd "C-;") 'vc-next-action) │ (global-set-key
>>> (kbd "C-'") 'er/expand-region) ╰
>>
>>
>> That is very strange. It is that the line in your .emacs for C-'?  Outside
>> of org files, does C-, work as expected, or does it expand the region?
>
>
> I mean the only line in your .emacs for C-'
>
> --
> Jorge.
>
>



-- 
Grant Rettke
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



Re: [O] How to re-bind C-,?

2014-09-27 Thread Grant Rettke
That works as expected.

Thank very much Jorge and Teika.

Bit of a mystery why that local-set-key didn't work; and I'm OK with
it remaining so :).

On Sat, Sep 27, 2014 at 7:30 AM, Teika Kazura  wrote:
> How about this?
> (define-key org-mode-map [(control ?,)] 'your-lambda-expression)
>
> Teika (Teika kazura)



-- 
Grant Rettke
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



Re: [O] Header Arguments of Code Blocks - problems and challenges

2014-09-27 Thread Grant Rettke
On Fri, Sep 26, 2014 at 3:20 AM, Rainer M Krug  wrote:
> OK - I hope we can geth this going and make a usefull contribution to
> org babel,

Three ideas for ways work on this:
• Purely technically driven
  • Learn the current test framework
  • Identify property permutations
  • Verify tests and documentation
• Purely scenario driven
  • Identify common development scenarios
  • Define the desired results and actual
  • Create vignette's for other users to pull from
• Combination of both
  • Allows for more focus on coding of desired
  • Allows for more focus on using if desired
  • We all are curious about and have invested in both already



Re: [O] How to utilize the vc package inside of the edit source block buffer?

2014-09-27 Thread Grant Rettke
Thank you Aaron and Jonathan.

Here is what I did:

(defadvice vc-next-action (before vc-next-action-in-org-src-block last activate)
  "If in org source block, exit it."
  (when (condition-case nil
(org-src-in-org-buffer)
  (error nil))
(org-edit-src-exit)))

I had trouble with the latter and I suspect it is due to my personal
configuration. That would be quite nice indeed to be able to keep the
org source edit buffer open.

On Tue, Sep 23, 2014 at 1:52 PM, Jonathan Leech-Pepin
 wrote:
> Hello,
>
> On 23 September 2014 14:19, Aaron Ecay  wrote:
>>
>> Hi Grant,
>>
>> 2014ko irailak 23an, Grant Rettke-ek idatzi zuen:
>> >
>> > Good afternoon,
>> >
>> > The ability to org-edit-special inside of source block is truly
>> > priceless.
>> >
>> > There is a delightful workflow to be found with approach.
>> >
>> > It has got me spending more and more time in the edit buffer though,
>> > wanting to utilize
>> > vc-next-action to initiate a commit. This is not possible because the
>> > buffer is not associated
>> > with a file.
>> >
>> > Is there some way to get tell Emacs to execute the action on the
>> > source buffer from which the
>> > source edit block buffer originated?
>>
>> One approach might be to advise the vc commands like (pseudocode):
>>
>> (defadvice vc-foo (around org-src activate)
>>   (when (in-src-edit-p)
>> (org-edit-src-exit))
>>   ad-do-it)
>>
>
> The following would work as a wrapper:
>
> (defun test-buffer ()
>   (interactive)
>   (when org-edit-src-from-org-mode
> (let ((buffer (marker-buffer org-edit-src-beg-marker)))
>   (with-current-buffer buffer
> (message "%s is current for file: %s"
>  (current-buffer)
>  (buffer-file-name))
>
> Replace (message ...) with `vc-next-action` or use the above as advice
> [adjusting from (when..) to (if..)].
>
> Regards,
> Jonathan
>
>>
>> --
>> Aaron Ecay
>>
>



-- 
Grant Rettke
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



[O] How to optionally export source blocks to HTML as only black-and-white?

2014-09-28 Thread Grant Rettke
Good evening,

It is great being able to export documents either to ASCII or HTML or
PDF.  When I want to export to HTML, sometimes I want code blocks to be
black and white and sometimes I want the syntax highlighting to be the
same as in Emacs.

For the latter, `htmlize' does all of the work. For the former, I am
stuck. I am not sure how to do it.

It looks like coming up with a custom style-sheet might do it, but that
is probably wrong.

One option I've been considering is to change the color theme before
exporting, and I will try that.

Question: what is the best way to produce black and white pre blocks for
source code in export to HTML?

Kind regards,

-- 
Grant Rettke
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



Re: [O] Difference between eval and export

2014-09-29 Thread Grant Rettke
How painful would it be to pare it down to the minimal example of the behavior?

On Mon, Sep 29, 2014 at 6:14 AM, Johannes Rainer
 wrote:
> I checked the environment variables in Emacs and also in R (using 
> Sys.getenv). all environment variables are set correctly (I am now also using 
> “exec-path-from-shell” to make sure that Emacs is reading system environment 
> variables).
> It is absolutely strange. I only get the error when I export the org file, 
> but not if I execute R code chunk by code chunk sequentially.
>
> best, jo
>
> On 26 Sep 2014, at 21:58, Grant Rettke  wrote:
>
>> On Fri, Sep 26, 2014 at 1:44 PM, Rainer M Krug  wrote:
>>> Grant Rettke  writes:
>>>> My eye is on you post about that topic because I would also like to know.
>>>
>>> As you are using R, and if you are using sessions, what about setting
>>> them from within R[1]?
>>>
>>> Footnotes:
>>> [1]  http://stat.ethz.ch/R-manual/R-devel/library/base/html/Sys.setenv.html
>>
>> Yes indeed. I am quite interested in the general mechanism of how the
>> environment exists for when exports occur and in particular whether or
>> not it is different somehow. Right now I've delegated things between
>> [1] and .Renviron.
>



-- 
Grant Rettke
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



Re: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)

2014-09-30 Thread Grant Rettke
On Tue, Sep 30, 2014 at 3:05 AM, Rainer M Krug  wrote:
> Eric Brown  writes:

Like Rainier mentioned you might want to use [noweb] to tangle both
for output tangling and execution. My system is set up to tangle for
both eg:

This
## ✂✂
#+name: query
#+begin_src sql
select
*
from
table
where
x > 10
#+end_src

#+begin_src R :tangle output.R
input <- '
«query»
'
#+end_src
## ✂✂
produces this
## ✂✂
input <- '
select
*
from
table
where
x > 10
'
## ✂✂
and

this
## ✂✂
#+name: msg
#+begin_src sql
Hello, world.
#+end_src

#+begin_src R :eval yes
print("«msg»")
#+end_src

#+NAME:
#+begin_example
[1] "Hello, world."
#+end_example
## ✂✂

produces this

## ✂✂
╭
│ Hello, world.
╰

╭
│ print("«msg»")
╰

╭
│ [1] "Hello, world."
╰
## ✂✂

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


Re: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)

2014-09-30 Thread Grant Rettke
On Tue, Sep 30, 2014 at 9:32 AM, Eric Brown  wrote:
> 2) Grant, I tried your code, but there seem to be some missing headers.
> Do you have a complete minimal example that exhibits the behavior that
> you have demonstrated?

Sorry for omitting that key point:

✂✂
#+name: msg
#+begin_src sql
Hello, world.
#+end_src

#+begin_src R :eval yes
print("«msg»")
#+end_src

#+NAME:
[1] "Hello, world."
#+end_example

#+begin_src emacs-lisp
(print emacs-version)
(print org-version)
(print org-babel-default-header-args)
(print org-babel-default-inline-header-args)
#+end_src

#+NAME:
#+begin_example

"24.3.1"

"8.2.7c"

((:eval . "always") (:noweb . "no-export") (:exports . "both")
(:results . "output") (:comments . "no") (:session . "none") (:cache .
"no") (:hlines . "no") (:tangle . "no"))

((:results . "value replace") (:eval . "always") (:session . "none")
(:exports . "results"))
#+end_example
✂✂



Re: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)

2014-09-30 Thread Grant Rettke
On Tue, Sep 30, 2014 at 2:15 PM, Nick Dokos  wrote:
> Eric Brown  writes:
>
>> 2) Grant, I tried your code, but there seem to be some missing headers.
>> Do you have a complete minimal example that exhibits the behavior that
>> you have demonstrated?
>
> Add :noweb yes. Also Grant seems to have gone non-standard and replaced
> the <> markup with guillemots. Using the default markers,
> it should read:

Yikes what a week sorry about that here is what you would need I shall
be defining a function to provide all such details in the future and
thanks Nick for addressing:

╭
│ (setq org-babel-noweb-wrap-start "«")
│ (setq org-babel-noweb-wrap-end "»")
╰



Re: [O] Error Embedding SQL Source from code block into R Source of Another (noweb)

2014-10-01 Thread Grant Rettke
> On Tue, Sep 30, 2014 at 9:23 PM, Nick Dokos  wrote:
>> Grant Rettke  writes:
>> Yikes what a week sorry about that here is what you would need I shall
>> be defining a function to provide all such details in the future and
>> thanks Nick for addressing:
>>
>> ╭
>> │ (setq org-babel-noweb-wrap-start "«")
>> │ (setq org-babel-noweb-wrap-end "»")
>> ╰
>>
>>
>
> And an OT question:
>
> Since on my keyboard I can type << much more easily than I can type «

Totally agreed, I'm using a US QWERTY keyboard.

> I was wondering: does your keyboard provide an easy way to type a
> guillemet?

No but I use the [key-chord] package to do so like this:

╭
│ (key-chord-define-global "<<" (lambda () (interactive) (insert "«")))
│ (key-chord-define-global ">>" (lambda () (interactive) (insert "»")))
╰

It is the same amount of typing but you get the desired character.

> Is that why you changed it? Or is it purely aesthetics?

Aesthetic personal preferences. After the fact, this preference has
proven to be valuable for non-org-users, though.

When I use `org' at work and show literate documents to non-users, the
guillemet makes it crystal clear that the text is somehow special, and
not just "something enclosed by two less-than and greater-than
symbols". Not totally sure why people react this way, but they do.


[key-chord]
https://github.com/emacsmirror/key-chord/blob/master/key-chord.el



Re: [O] real-time image rendering

2014-10-03 Thread Grant Rettke
Sorry for not discussing further:

https://stackoverflow.com/questions/17621495/emacs-org-display-inline-images

On Fri, Oct 3, 2014 at 5:12 PM, Doyley, Marvin M.
 wrote:
> Dear All,
>
> I am currently using Org mode as a teaching tool for a course that I am 
> teaching this semester. I would like to run some python simulations in class 
> and save the results to a file. I would like to show the results in real time 
> as I change various parameters.  I am using iimage-mode to display images. 
> The only snag is that I have to toggle iimage-mode on and off to see the 
> changes. Is there away to get iimage-mode to render in real time
>
> thanks
> M
>
> Sent from my iPad



-- 
Grant Rettke
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



Re: [O] Babel: reusing language-specific functions

2014-10-09 Thread Grant Rettke
That is a great option when you want to run *without* a session.

That is also a nice approach when you are using plantuml and do not
want to use a single external file
and include it all over the place.

On Thu, Oct 9, 2014 at 12:23 AM, Jarmo Hurri  wrote:
> t...@tsdye.com (Thomas S. Dye) writes:
>
>>> Jarmo Hurri  writes:
>>>> I have a language-specific function - in this case Asymptote, but it
>>>> could be e.g. C as well - that I want to use in a number of different
>>>> source blocks of the same language in an Org file. How do I accomplish
>>>> this?
>> Or, perhaps use the noweb syntax.
>>
>>
>> #+NAME: foo
>> #+BEGIN_SRC emacs-lisp
>>   (defun foo (x) (+ x 2))
>> #+END_SRC
>>
>> #+results: foo
>> : foo
>> #+begin_src emacs-lisp :noweb yes
>> <>
>> (foo 3)
>> #+end_src
>>
>> #+results:
>> : 5
>
> Yes, this is a perfect solution. You can use noweb to include any code
> block, not only function definitions. Thanks!
>
> Jarmo
>
>



-- 
Grant Rettke
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



Re: [O] [BUG][babel] Tangling into directories does not add directories to org file

2014-10-09 Thread Grant Rettke
Sounds like a valuable use of R.

Do you have a writeup on the approach or is it a standard feature of
org and ess?

On Thu, Oct 9, 2014 at 7:37 AM, Rainer M Krug  wrote:
>
> I'd like to ping this as I think it
> is an important bug. It e.g. make debugging of R packages, whose source
> is in org, more difficult, (the .R files are tangled into ./R/) as ess
> does not find the source of the R code in R as it uses the links in the
> comments to find the org file.
>
> Temporary solution: I created a link to the org file in the ./R directory.
>
> Cheers,
>
> Rainer
>
> Rainer M Krug  writes:
>
>> When in the tangling taerget a directory is specified, this is not
>> reflected in the comments in the tangled file when comments are set to
>> include links:
>>
>> ,
>> |* `link' The code block is wrapped in comments which contain
>> |  pointers back to the original Org file from which the code was
>> |  tangled.
>> `
>>
>> In the org file =prodMixStands.org=:
>>
>> ,
>> | :PROPERTIES:
>> | :header-args+: :tangle ./R/update.cache.R
>> | :END:
>> | #+begin_src R
>> | test
>> | #+end_src
>> `
>>
>> results in the file =update.cache.R= in a link to the file
>> =prodMixStands.org= and not =./../prodMixstands.org=:
>>
>> ,
>> |  ## [[file:prodMixStands.org::*Begin][Begin:1]]
>> `
>>
>> This is particularly bad when using ess and developer mode to develop a
>> package.
>>
>> Cheers,
>>
>> Rainer
>
> --
> Rainer M. Krug
> email: Rainerkrugsde
> PGP: 0x0F52F982
>



-- 
Grant Rettke
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



Re: [O] [BUG][babel] Tangling into directories does not add directories to org file

2014-10-10 Thread Grant Rettke
On Fri, Oct 10, 2014 at 3:24 AM, Rainer M Krug  wrote:
> Grant Rettke  writes:
>
>> Sounds like a valuable use of R.
>
> It definitely is.
>
>
>>
>> Do you have a writeup on the approach or is it a standard feature of
>> org and ess?
>
> No - but please bug me - I can post in the intermediate future an
> example demonstrating the points.

I will read and ask, thanks.



Re: [O] [BUG][babel] Tangling into directories does not add directories to org file

2014-10-10 Thread Grant Rettke
On Fri, Oct 10, 2014 at 11:50 AM, Thorsten Jolitz  wrote:
> Aaron Ecay  writes:
>
> Hi Rainer,
>
>> 2014ko urriak 10an, Rainer M Krug-ek idatzi zuen:
>>> It looks like this - but I am always shocked by the number of brackets
>>> in lisp.
>>
>> It’s a bit of an adjustment.  If you get into any serious lisp coding,
>> check out paredit – it forces you to always have balanced brackets in
>> the file, thus avoiding a whole class of silly but hard-to-spot mistakes
>> on lines ending with and avalanche of )
>>
>> 
>
> if you are less into bondage&submission, smartparens.el is another option,
> it *helps* to have balanced brackets w/o breaking your will ;-)

It is more about ease-of-coding them B&D.

=turn-on-smartparens-strict-mode= add years to ones life to allow for
more hacking. Seriously.



Re: [O] Math formatting in HTML export - The Org Manual

2014-10-12 Thread Grant Rettke
What version of Emacs and org mode are you using?

What is your configuration?

What action did you perform on what document?

What did you want and expect to have happen with that action?

What happened instead?

On Sun, Oct 12, 2014 at 3:17 AM, Joseph Vidal-Rosset
 wrote:
> http://orgmode.org/manual/Math-formatting-in-HTML-export.html
>
> Hello the list,
>
> Unfortunately, I do not know how to use Mathjax in order to convert any
> mathematical symbol or any proof in html. Therefore the only solution that I
> see is to use imagemagick.
> But the line
>
>  #+OPTIONS: tex:imagemagick
>
> in my setup gives always corrupted png images and I do not succeed to
> understand why.
> I would be thankful if someone could tell me how to configure my emacs in
> order to use imagemagick to convert any proof in png image to export it in
> html.
>
> Thanks !
>
> Jo.
>
>



-- 
Grant Rettke
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



Re: [O] inline constant substitution

2014-10-12 Thread Grant Rettke


Should a noweb-ref be expanded as imagined inside of a table for this case?

Eg pseudo code:

,
| #+NAME: foo
| #+begin_src emacs-lisp
| 42
| #+end_src
|
|
| #+NAME: ns
| | n |
| |---|
| | 1 |
| | 2 |
| | <> |
| |   |
`

On Sun, Oct 12, 2014 at 10:05 AM, Nicolas Goaziou
 wrote:
>
>
> Hello,
>
> Paul Rudin  writes:
>
>> Suppose I have:
>>
>> #+CONSTANTS: foo=42
>>
>> How can I make inline references to a constant on export in regular
>> text, rather than in a table?
>>
>> I want to be able to write something like:
>>
>>   The value of foo is $foo
>>
>> in my org file, and then end up with:
>>
>>   The value of foo is 42
>>
>> when I export to LaTeX.
>
> Constants are for tables only. You can use a macro instead:
>
> #+MACRO: foo 42
>
>   The value of foo is {{{foo}}}.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
>



-- 
Grant Rettke
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




Re: [O] export "simple" HTML?

2014-10-12 Thread Grant Rettke
If it is an easy answer, how would one do this in batch mode?

On Sun, Oct 12, 2014 at 1:46 PM, Eric Abrahamsen
 wrote:
> Gary Oberbrunner  writes:
>
>> Has anyone created an HTML exporter that just exports "simple" HTML
>> with no fancy CSS stuff, just "normal" tags like  and  and
>>  and  and ?  Basically something that could be pasted into
>> an email or a larger document.  The current HTML export is beautiful,
>> but it adds all kinds of divs, spans, CSS tags, and other extraneous
>> stuff.
>
> Try the "body only" export option: in the export dispatcher, hit "C-b"
> to toggle. That should give you clean HTML with no file template, and no
> bells and whistles.
>
>



-- 
Grant Rettke
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



  1   2   3   4   >