[O] Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]

2012-05-07 Thread Tobias Nähring
Emacs  : GNU Emacs 23.4.1 (i686-pc-cygwin, GTK+ Version 2.24.8)

of 2012-01-29 on fiona

Package: Org-mode version 7.8.09



This bug concerns org-tables.



Field formulas with hline-address on right-hand side don't work anymore.



See the formula below the next table.

There, the address on the right-hand side is @II$1.

The result in @3$1 should be 3.

Nevertheless, re-calculation delivers nothing. The entry of @3$1 remains on
the old value (whatever was entered before).

If one replaces "@II$1" with "@3$1" within the formula one gets the right
result.



|---|

| 1 |

| 2 |

|---|

| 0 |

#+TBLFM: @II$1=vsum(@I$1..@II$1)



I already tried to turn on “Debug Formulas” but this did not help. This
gave just no change in the reaction of the re-calculate command.



Note, that on the other hand the formula below the next table works. As
expected, the 1 in field @1$1 is replaced with the 3 from field @II$1.



|---|

| 1 |

| 2 |

|---|

| 3 |

#+TBLFM: @1$1=@II$1





Pityingly, I can't easily reproduce the former version of orgmode where
this

worked. (I installed over the former version without backup. I should not
have done this.)

Please, inform me if this version number is really important for

the bug-fix. Maybe, I find the time to put more effort in this. I.e.,
install former version until I get one where the field formulas work.



A fast fix would be great since I need the hline-references in field
formulas very much (large variable number of columns in tables, calculate
maximum norm of column sections and stuff like that…,). I have old
org-files where I need to re-calculate stuff like that.



current state:

==

(setq

org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)

org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)

org-metaup-hook '(org-babel-load-in-session-maybe)

org-after-todo-state-change-hook '(org-clock-out-if-current)

org-export-latex-format-toc-function 'org-export-latex-format-toc-default

org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe

 org-babel-hide-result-toggle-maybe)

org-src-mode-hook '(org-src-babel-configure-edit-buffer

org-src-mode-configure-edit-buffer)

org-confirm-shell-link-function 'y-or-n-p

org-export-first-hook '(org-beamer-initialize-open-trackers)

org-agenda-before-write-hook '(org-agenda-add-entry-text)

org-babel-pre-tangle-hook '(save-buffer)

org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers

 org-cycle-show-empty-lines


org-optimize-window-after-visibility-change)

org-descriptive-links nil

org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)

org-mode-hook '((lambda nil

 (org-defkey org-mouse-map [mouse-3] (quote
org-mouse-3-menu))

 (setq
pcomplete-default-completion-function

  (quote (lambda nil (hippie-expand nil

 )

   #[nil "\300\301\302\303\304$\207"

  [org-add-hook change-major-mode-hook
org-show-block-all append

   local]

  5]

   #[nil "\300\301\302\303\304$\207"

  [org-add-hook change-major-mode-hook
org-babel-show-result-all

   append local]

  5]

   org-babel-result-hide-spec
org-babel-hide-all-hashes)

org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)

org-confirm-elisp-link-function 'yes-or-no-p

org-export-interblocks '((src org-babel-exp-non-block-elements))

org-clock-out-hook '(org-clock-remove-empty-clock-drawer)

org-occur-hook '(org-first-headline-recenter)

org-from-is-user-regexp "\\"

org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)

org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc


org-beamer-auto-fragile-frames


org-beamer-place-default-actions-for-lists)

org-metadown-hook '(org-babel-pop-to-session-maybe)

org-export-blocks '((src org-babel-exp-src-block nil)

(export-comment
org-export-blocks-format-comment t)

(ditaa org-export-blocks-format-ditaa
nil)

(dot org-export-blocks-format-dot nil))

)



Best regards,

Tobias



Re: [O] In-line code and fonts

2012-05-07 Thread Neil Smithline
It is not really an Org Mode solution but, if HTML is an acceptable 
output format, I would imagine that you can concoct some CSS to make the 
HTML look the way you want it to.


You can add CSS via the `style' keyword. It can go in projects (see Info 
section 13.3.1,2) or in the file itself (see 12.5.9).


While I think that using CSS is a nasty hack and would consider this a 
bug or missing feature if you can't fix it within Org, if the nasty hack 
allows you to get your work done...


Neil Smithline
http://www.neilsmithline.com
Proud GNU Emacs user since 1986, v. 18.24.


On 5/7 19:59 , Erich Neuwirth wrote:

I need control over the font used for results of inline computations in 
exported files.
When I have the following code

This is inline R 1+2 = src_R{1+2}

and export it to html (or LaTeX) the fonts used for the regular text and the 
fonts used for the results
of the computation are different. Is there an easy way to tell org mode to use 
the regular text font for the
result of the computation?







Re: [O] How to apply multiple TBLFM rules?

2012-05-07 Thread Michael Hannon
Charles  wrote:

> I'm fairly new to Org and did an experiment. Perhaps only one #+TBLFM: per
> table is allowed since the plural is used
.
.
.

Thanks, Charlie.  I think you must be correct.  Since posting my message, I've
run across the notion of using " C-c ' " within a table to edit formulas.  When
I do that and add both of the formulas in my little example, I get:

    #+TBLFM: @1$3='(+ 10 7)::@2$3='(+ 11 9)::@3$1=42

when I return from the editor.  I.e., the two formulas are in a single line,
separated by a double colon, and both formulas get correctly evaluated when I
do C-u C-c C-c.  This is even though I added them as one formula per line in
the editor.

The background here is that I was trying to understand the appended table,
taken from:

    http://www.jstatsoft.org/v46/i03

which seems to use repeated TBLFM lines.  I beat my head against this for a
good long time this afternoon.  It just doesn't work on my system, but I'm
also new enough to this stuff that my first (and reasonable) assumption is
that I'm doing something wrong (which may still be the case here, for that
matter).

-- Mike



#+results: pascals-triangle
| 0 | 1    | 2    | 3    | 4    | 5    |
|---+--+--+--+--+--|
|   | pass | pass | pass | pass | pass |
| 1 |  |  |  |  |  |
| 1 | 1    |  |  |  |  |
| 1 | 2    | 1    |  |  |  |
| 1 | 3    | 3    | 1    |  |  |
| 1 | 4    | 6    | 4    | 1    |  |
| 1 | 5    | 10   | 10   | 5    | 1    |
#+TBLFM: @2$2='(sbe pst-check (row @3$1) (n @1$3))
#+TBLFM: @2$3='(sbe pst-check (row @4$1..@4$2) (n @1$4))
#+TBLFM: @2$4='(sbe pst-check (row @5$1..@5$2) (n @1$5))
#+TBLFM: @2$4='(sbe pst-check (row @6$1..@6$2) (n @1$6))
#+TBLFM: @2$4='(sbe pst-check (row @7$1..@7$2) (n @1$7))



Re: [O] How to apply multiple TBLFM rules?

2012-05-07 Thread Charles

Mike,

I'm fairly new to Org and did an experiment. Perhaps only one #+TBLFM: 
per table is allowed since the plural is used


15.6 Summary of in-buffer settings
==
. . .

`#+TBLFM:'
 This line contains the formulas for the table directly above the
 line.


 #+TBLNAME: test
| 1 | 2 ||
| 4 | 5 ||
| 7 | 8 |  9 |
#+TBLFM: @1$3='(+ 10 7)::@2$3='(+ 11 9)

C-c C-c on #+TBLFM

 #+TBLNAME: test
| 1 | 2 | 17 |
| 4 | 5 | 20 |
| 7 | 8 |  9 |
#+TBLFM: @1$3='(+ 10 7)::@2$3='(+ 11 9)

I have not explored the org-table.el (yet) for any further elucidation.

Charlie Millar

On 5/7/2012 6:00 PM, Michael Hannon wrote:

Greetings.  I'm having difficulty applying multiple formula expressions to an
Org-mode table.  For example, if I start with:

 #+TBLNAME: test
 | 1 | 2 | |
 | 4 | 5 | |
 | 7 | 8 |  9 |
 #+TBLFM: @1$3='(+ 10 7)
 #+TBLFM: @2$3='(+ 11 9)

and then position the cursor on the first TBLFM line and hit C-c C-c, I get:

 #+TBLNAME: test
 | 1 | 2 | 17 |
 | 4 | 5 |  |
 | 7 | 8 |  9  |
 #+TBLFM: @1$3='(+ 10 7)
 #+TBLFM: @2$3='(+ 11 9)

I thought that doing this should apply all the formulas, but evidently that's
not the case.  In any event, If I then position the cursor on the second TBLFM
line, I get no response whatsoever.

If I reverse the order of the two TBLFM lines, I get the '20' inserted in the
appropriate place, but the '17' doesn't appear.

BTW, I've tried doing this with formula debugging turned on (C-{), but that
hasn't provided any information that I've been able to use.

What am I doing wrong?  (Some details of my configuration are appended.)

Thanks,

-- Mike

$ emacs --version
GNU Emacs 23.3.1

Org-mode version 7.8.09 (release_7.8.09-390-gfb7ebd ...

$ uname -a
Linux  3.3.4-3.fc16.x86_64 #1 SMP Thu May 3 14:46:44 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1424 / Virus Database: 2425/4984 - Release Date: 05/07/12








[O] In-line code and fonts

2012-05-07 Thread Erich Neuwirth
I need control over the font used for results of inline computations in 
exported files.
When I have the following code

This is inline R 1+2 = src_R{1+2} 

and export it to html (or LaTeX) the fonts used for the regular text and the 
fonts used for the results 
of the computation are different. Is there an easy way to tell org mode to use 
the regular text font for the
result of the computation?




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] Org-mode as a Quantified Self platform

2012-05-07 Thread Sacha Chua
John Hendy  writes:

> -- On that note, what's the best way to get data out of
> org-habit/headlines and into something a bit more usable like csv? I'm
> looking for something more than just looking through headlines for
> missed days. I'm going to need full access to the time stamps in a
> usable format (say, R) and everything agglomerated into one single
> data file.

A different approach might be to use org-capture with type table-line,
which inserts a new line in the first table at the target location. You
can then use org-capture to automatically capture the timestamp, prompt
you for the type of drink (you can define a completion table) and any
other notes you want to add, and file it automatically. "Drink coffee"
and "Drink tea" aren't really TODOs or habits, so this might be better
for you.

Sacha Chua




[O] How to apply multiple TBLFM rules?

2012-05-07 Thread Michael Hannon
Greetings.  I'm having difficulty applying multiple formula expressions to an
Org-mode table.  For example, if I start with:

    #+TBLNAME: test
    | 1 | 2 | |
    | 4 | 5 | |
    | 7 | 8 |  9 |
    #+TBLFM: @1$3='(+ 10 7)
    #+TBLFM: @2$3='(+ 11 9)

and then position the cursor on the first TBLFM line and hit C-c C-c, I get:

    #+TBLNAME: test
    | 1 | 2 | 17 |
    | 4 | 5 |  |
    | 7 | 8 |  9  |
    #+TBLFM: @1$3='(+ 10 7)
    #+TBLFM: @2$3='(+ 11 9)

I thought that doing this should apply all the formulas, but evidently that's
not the case.  In any event, If I then position the cursor on the second TBLFM
line, I get no response whatsoever.

If I reverse the order of the two TBLFM lines, I get the '20' inserted in the
appropriate place, but the '17' doesn't appear.

BTW, I've tried doing this with formula debugging turned on (C-{), but that
hasn't provided any information that I've been able to use.

What am I doing wrong?  (Some details of my configuration are appended.)

Thanks,

-- Mike

$ emacs --version
GNU Emacs 23.3.1

Org-mode version 7.8.09 (release_7.8.09-390-gfb7ebd ...

$ uname -a
Linux  3.3.4-3.fc16.x86_64 #1 SMP Thu May 3 14:46:44 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux



Re: [O] Org-babel: Maxima invocation fix

2012-05-07 Thread Achim Gratz
Simon Thum writes:
> I'm sure there is a better way to fix this, but the attached patch
> helps me to not get something like "Warning: argument nil not
> recognized" spoiling every maxima result.

I'd rather do this directly in the let form:

-(let* ((cmdline (cdr (assoc :cmdline params)))
+(let* ((cmdline (or (cdr (assoc :cmdline params)) ""))

And please provide a changelog with your patch.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] How to stop M-down from opening folded items?

2012-05-07 Thread Nicolas Goaziou
Hello,

Steinar Bang  writes:

>> Steinar Bang :
>
>> I use M-up and M-down a lot to move items in plain lists up and down in
>> the list.  In the org-mode delivered with emacs 23 the item you moved
>> past stayed folded.  But in git org-mode and in 7.8.09, the item you
>> move past is opened.
>
>> Is there a way to get the old behaviour back?  Ie. that items you move
>> past with M-up or M-down, stays folded?
>
> Looking at the code of org-list-swap-items it doesn't look like this is
> possible to configure.  But I'm not giving up quite yet.
>
> I tried modifying the value of org-cycle-include-plain-lists.
>
> I had org-cycle-include-plain-lists set to the value of integrate.
>
> But changing the value of org-cycle-include-plain-lists to either nil or
> t had no effect on org-list-swap-items, that I could see.

I think this should be fixed now. Could you confirm this?

Thank you for submitting the problem.


Regards,

-- 
Nicolas Goaziou



Re: [O] How to stop M-down from opening folded items?

2012-05-07 Thread Steinar Bang
> Steinar Bang :

> I use M-up and M-down a lot to move items in plain lists up and down in
> the list.  In the org-mode delivered with emacs 23 the item you moved
> past stayed folded.  But in git org-mode and in 7.8.09, the item you
> move past is opened.

> Is there a way to get the old behaviour back?  Ie. that items you move
> past with M-up or M-down, stays folded?

Looking at the code of org-list-swap-items it doesn't look like this is
possible to configure.  But I'm not giving up quite yet.

I tried modifying the value of org-cycle-include-plain-lists.

I had org-cycle-include-plain-lists set to the value of integrate.

But changing the value of org-cycle-include-plain-lists to either nil or
t had no effect on org-list-swap-items, that I could see.






[O] Org-babel: Maxima invocation fix

2012-05-07 Thread Simon Thum

Hi all,

I'm sure there is a better way to fix this, but the attached patch helps 
me to not get something like "Warning: argument nil not recognized" 
spoiling every maxima result.


I guess I might also fix this by adding explicit :cmdline amendments, 
but was too lazy to double-check.


Cheers,

Simon
>From c2a506dd076d0ddb4a7eb925ff5276fdd60abe58 Mon Sep 17 00:00:00 2001
From: Simon Thum 
Date: Mon, 7 May 2012 21:05:16 +0200
Subject: [PATCH] fix maxima invocation without explicit parameters

Signed-off-by: Simon Thum 
---
 lisp/ob-maxima.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el
index b092e13..fdd0804 100644
--- a/lisp/ob-maxima.el
+++ b/lisp/ob-maxima.el
@@ -73,7 +73,7 @@ called by `org-babel-execute-src-block'."
 	 (let* ((cmdline (cdr (assoc :cmdline params)))
 		(in-file (org-babel-temp-file "maxima-" ".max"))
 		(cmd (format "%s --very-quiet -r 'batchload(%S)$' %s"
-			 org-babel-maxima-command in-file cmdline)))
+			 org-babel-maxima-command in-file (if cmdline cmdline ""
 	   (with-temp-file in-file (insert (org-babel-maxima-expand body params)))
 	   (message cmd)
 	   ((lambda (raw) ;; " | grep -v batch | grep -v 'replaced' | sed '/^$/d' "
-- 
1.7.3.4



Re: [O] "# <>" should stick to the following text

2012-05-07 Thread François Pinard
Nicolas Goaziou  writes:

> This is correct. I was just pointing out (though, admittedly, not very
> clearly) that the final part of the next sentence in the manual,
> "sometimes it is convenient to put them into a comment line", isn't.

It might be worth making the manual clear, so users know what's
happening, and what is worth pursuing and avoiding.

> At the moment, "<>" and "# <>" produce, respectively, " name="tag" id="tag">tag" and "".

> In a not so distant future "<>" will produce " id="tag">" and "# <>" will be ignored.

And one will be able to use <> anywhere, would it be at the
beginning of a header of sentence.  That would solve all my problems!
So I'm eagerly awaiting for that "a not so distant future" to turn into
"a recent past" :-).  Thanks for the clarification.

> I hope this is clearer now.

In this message, yes.  In the manual, not yet!

François



Re: [O] Defining a new emphasis

2012-05-07 Thread Francesco Pizzolante


Hi Nicolas,

>> I'm trying to define a new emphasis 
>
> Please don't. We're in the process of hard-coding emphasis markers.

OK. Understood.


>> that would work like org-code (=) except that it would export to
>> \textsf instead of \texttt in LaTeX.
>
> If that's related to export, you can tweak the export of verbatim
> (=text=) output.
>
> For example, in the new exporter (if you use development Org, you can
> (require 'org-export) and just call M-x org-export-dispatch), it just
> means to change \texttt into \textsf through verbatim filters (list of
> function applied to the output of each verbatim object).
>
> It's a way to have the last words over export engine.
>
> Here is the code:
>
> #+begin_src emacs-lisp
> (defun my-latex-verbatim-filter (text backend info)
>   "In `e-latex' backend, change \"texttt\" into \"textsf\"."
>   ;; No change for other backends.
>   (if (not (eq backend 'e-latex)) text
> (replace-regexp-in-string "\\`texttt" "textsf" text)))
>
> (add-to-list 'org-export-filter-verbatim-functions 'my-latex-verbatim-filter)
> #+end_src
>
> If you call `org-export-dispatch' on a buffer containing:
>
>   =look_at:my~ti ny\reference^string=
>
> you will get:
>
>   \textsf{look\_at:my\textasciitilde{}ti 
> ny\textbackslash{}reference\textasciicircum{}string}

My goal is, in fact, to keep the default behavior of the '=' marker and redefine
the behavior of the '~' marker.

I'd like '~' to behave exactly the same way = does but using \textsf instead of
\texttt. Is it possible?

Thanks,
 Francesco




Re: [O] Defining a new emphasis

2012-05-07 Thread Nicolas Goaziou


Hello,

"Francesco Pizzolante"  writes:

> My goal is, in fact, to keep the default behavior of the '=' marker and 
> redefine
> the behavior of the '~' marker.
>
> I'd like '~' to behave exactly the same way = does but using \textsf instead 
> of
> \texttt. Is it possible?

Certainly. Even if we hard code syntax, the user always has the final
word on the produced text.

For now, the easiest way is to customize `org-e-latex-text-markup-alist'
and associate `protectedtexttt' to `code' value.

Then, since you want to change "texttt" into "textsf" in `code' objects
(~text~), add your filter to the right place (and remove the previous
one):

#+begin_src emacs-lisp
(add-to-list 'org-export-filter-code-functions 'my-latex-verbatim-filter)
#+end_src


In a few days, it will be also possible to write a function like the
following (which basically means "treat code as verbatim, but use textsf
instead of texttt"):

#+begin_src emacs-lisp
(defun my-latex-code-handler (code contents info)
  "Handle `code' objects in LaTeX back-end."
  (replace-regexp-in-string
   "\\`texttt" "textsf"
   (org-e-latex-verbatim code contents info)))
#+end_src

And tell the export engine to treat `code' objects with your function
instead of the default one.


Regards,

-- 
Nicolas Goaziou




[O] Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]

2012-05-07 Thread Tobias Nähring
Emacs  : GNU Emacs 23.4.1 (i686-pc-cygwin, GTK+ Version 2.24.8)

of 2012-01-29 on fiona

Package: Org-mode version 7.8.09

 

This bug concerns org-tables.

 

Field formulas with hline-address on right-hand side don't work anymore.

 

See the formula below the next table.

There, the address on the right-hand side is @II$1.

The result in @3$1 should be 3.

Nevertheless, re-calculation delivers nothing. The entry of @3$1 remains on the 
old value (whatever was entered before).

If one replaces "@II$1" with "@3$1" within the formula one gets the right 
result.

 

|---|

| 1 |

| 2 |

|---|

| 0 |

#+TBLFM: @II$1=vsum(@I$1..@II$1)

 

I already tried to turn on "Debug Formulas" but this did not help. This gave 
just no change in the reaction of the re-calculate command.

 

Note, that on the other hand the formula below the next table works. As 
expected, the 1 in field @1$1 is replaced with the 3 from field @II$1.

 

|---|

| 1 |

| 2 |

|---|

| 3 |

#+TBLFM: @1$1=@II$1

 

 

Pityingly, I can't easily reproduce the former version of orgmode where this

worked. (I installed over the former version without backup. I should not have 
done this.)

Please, inform me if this version number is really important for

the bug-fix. Maybe, I find the time to put more effort in this. I.e., install 
former version until I get one where the field formulas work.

 

A fast fix would be great since I need the hline-references in field formulas 
very much (large variable number of columns in tables, calculate maximum norm 
of column sections and stuff like that...,). I have old org-files where I need 
to re-calculate stuff like that.

 

current state:

==

(setq

org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)

org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)

org-metaup-hook '(org-babel-load-in-session-maybe)

org-after-todo-state-change-hook '(org-clock-out-if-current)

org-export-latex-format-toc-function 'org-export-latex-format-toc-default

org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe

 org-babel-hide-result-toggle-maybe)

org-src-mode-hook '(org-src-babel-configure-edit-buffer

org-src-mode-configure-edit-buffer)

org-confirm-shell-link-function 'y-or-n-p

org-export-first-hook '(org-beamer-initialize-open-trackers)

org-agenda-before-write-hook '(org-agenda-add-entry-text)

org-babel-pre-tangle-hook '(save-buffer)

org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers

 org-cycle-show-empty-lines

 org-optimize-window-after-visibility-change)

org-descriptive-links nil

org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)

org-mode-hook '((lambda nil

 (org-defkey org-mouse-map [mouse-3] (quote 
org-mouse-3-menu))

 (setq pcomplete-default-completion-function

  (quote (lambda nil (hippie-expand nil

 )

   #[nil "\300\301\302\303\304$\207"

  [org-add-hook change-major-mode-hook 
org-show-block-all append

   local]

  5]

   #[nil "\300\301\302\303\304$\207"

  [org-add-hook change-major-mode-hook 
org-babel-show-result-all

   append local]

  5]

   org-babel-result-hide-spec 
org-babel-hide-all-hashes)

org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)

org-confirm-elisp-link-function 'yes-or-no-p

org-export-interblocks '((src org-babel-exp-non-block-elements))

org-clock-out-hook '(org-clock-remove-empty-clock-drawer)

org-occur-hook '(org-first-headline-recenter)

org-from-is-user-regexp "\\"

org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)

org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc

  
org-beamer-auto-fragile-frames

  
org-beamer-place-default-actions-for-lists)

org-metadown-hook '(org-babel-pop-to-session-maybe)

org-export-blocks '((src org-babel-exp-src-block nil)

(export-comment 
org-export-blocks-format-comment t)

(ditaa org-export-blocks-format-ditaa nil)

(dot org-export-blocks-format-dot nil))

)

 

Best regards 

Tobias Nähring
Engineering / Software Development
--
_

ITI News & Events
New Version: SimulationX 3.5 


Re: [O] Defining a new emphasis

2012-05-07 Thread Nicolas Goaziou


Hello,

"Francesco Pizzolante"
 writes:

> I'm trying to define a new emphasis 

Please don't. We're in the process of hard-coding emphasis markers.

> that would work like org-code (=) except that it would export to
> \textsf instead of \texttt in LaTeX.

If that's related to export, you can tweak the export of verbatim
(=text=) output.

For example, in the new exporter (if you use development Org, you can
(require 'org-export) and just call M-x org-export-dispatch), it just
means to change \texttt into \textsf through verbatim filters (list of
function applied to the output of each verbatim object).

It's a way to have the last words over export engine.

Here is the code:

#+begin_src emacs-lisp
(defun my-latex-verbatim-filter (text backend info)
  "In `e-latex' backend, change \"texttt\" into \"textsf\"."
  ;; No change for other backends.
  (if (not (eq backend 'e-latex)) text
(replace-regexp-in-string "\\`texttt" "textsf" text)))

(add-to-list 'org-export-filter-verbatim-functions 'my-latex-verbatim-filter)
#+end_src

If you call `org-export-dispatch' on a buffer containing:

  =look_at:my~ti ny\reference^string=

you will get:

  \textsf{look\_at:my\textasciitilde{}ti 
ny\textbackslash{}reference\textasciicircum{}string}


Regards,

-- 
Nicolas Goaziou




Re: [O] Gather properties for use by babel source block?

2012-05-07 Thread Eric Schulte
Colin Hall  writes:

> Tim Burt  rochester.rr.com> writes:
>>
>> I want to gather data from properties into something that can be used by
>> a babel source block (e.g. plot the data).  Searches in the manual,
>> worg, and gmane have not yielded the method, but my best guess is that
>> I've missed it.  If so, this is simply a request for a pointer to the
>> documentation I should read.
>
> Any luck with this, Tim? I'm trying to do something very similar.
>

One approach would be to use the org-collector [1] from contrib/ to
collect properties into a table.  That table could then be fed as the
argument to a source code block.

Hope this helps,

Footnotes: 
[1]  http://orgmode.org/worg/org-contrib/org-collector.html

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



Re: [O] Gather properties for use by babel source block?

2012-05-07 Thread Colin Hall
Tim Burt  rochester.rr.com> writes:
>
> I want to gather data from properties into something that can be used by
> a babel source block (e.g. plot the data).  Searches in the manual,
> worg, and gmane have not yielded the method, but my best guess is that
> I've missed it.  If so, this is simply a request for a pointer to the
> documentation I should read.

Any luck with this, Tim? I'm trying to do something very similar.

Cheers,
Colin.







[O] [patch] org-create-formula-image-with-dvipng (was: [bug] org-create-formula-image-with-dvipng fails to find temporary file)

2012-05-07 Thread Benjamin Motz
Hello,

I have the same problem and resolved it with the appended
patch. Apparently, the .out-files aren't created and therefore can't be
deleted. The patch is checking for file-existence before trying to
delete.

Greetings, Benjamin

diff --git a/lisp/org.el b/lisp/org.el
index 16d2fe0..40fc646 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17246,7 +17246,8 @@ inspection."
;; Use the requested file name and clean up
(copy-file pngfile tofile 'replace)
(loop for e in '(".dvi" ".tex" ".aux" ".log" ".png" ".out") do
- (delete-file (concat texfilebase e)))
+ (if (file-exists-p (concat texfilebase e))
+ (delete-file (concat texfilebase e
pngfile
 
 (defvar org-latex-to-pdf-process) ;; Defined in org-latex.el


Re: [O] How to use % in captions with the new exporter?

2012-05-07 Thread Nicolas Goaziou
Andreas Leha  writes:

> I am trying to use % in a caption on the new exporter.  Both, % and \%,
> fail.  What is the proposed method?
>
> Test case:
>
> #+caption: The values in \%
> | 1 | 3 |
> | 2 | 1 |

This should be fixed now. No need to protect the percent sign.

Thanks again for your report.


Regards,

-- 
Nicolas Goaziou



Re: [O] New exporter #+name: appears in the export

2012-05-07 Thread Andreas Leha
Hi Nicolas,

>> when exporting this with the new exporter, the line #+name: plot_baz is
>> exported literally to the both, LaTeX and ODT.  Is this a bug?
>>
>> #+name: plot_baz
>> #+begin_src R :exports results :results graphics :file fig_baz.png
>>   plot(1:10) #+end_src
>>
>> #+caption: BAZ
>> #+label: fig-baz
>> #+results: plot_baz
>> [[file:fig_baz.png]]
>
> Yes, it is a known bug (see commit
> dec32064a72be7a20bbddcc1f8544a604619ad7b). It should be fixed once
> org-element is in core.
>

Thanks.  Good to know there will be remedy.

- Andreas




Re: [O] italic in the new odt exporter

2012-05-07 Thread Nicolas Goaziou
Andreas Leha  writes:

> I had to add (italic . "Italic") to the definition of
> org-e-odt-default-org-styles-alist in contrib/lisp/org-e-odt.el to get
> /italic/ text exported correctly to odt.

I recently have split `emphasis' object type into `bold', `italic',
`underline' and `strike-through' and `verbatim' object type into
`verbatim' and `code'.

Since I'm not about the values to put in the variable, I add Jambunathan
in Cc.

Jambunathan: Also, shouldn't `org-e-odt-default-org-styles-alist' be
a defconst instead of a defvar?


Regards,

-- 
Nicolas Goaziou



Re: [O] New exporter #+name: appears in the export

2012-05-07 Thread Nicolas Goaziou
Andreas Leha  writes:

> when exporting this with the new exporter, the line #+name: plot_baz is
> exported literally to the both, LaTeX and ODT.  Is this a bug?
>
> #+name: plot_baz
> #+begin_src R :exports results :results graphics :file fig_baz.png
>   plot(1:10) #+end_src
>
> #+caption: BAZ
> #+label: fig-baz
> #+results: plot_baz
> [[file:fig_baz.png]]

Yes, it is a known bug (see commit
dec32064a72be7a20bbddcc1f8544a604619ad7b). It should be fixed once
org-element is in core.


Regards,

-- 
Nicolas Goaziou



Re: [O] can I force all-caps in part of a headline in a capture template?

2012-05-07 Thread Christopher W. Ryan

Richard, this is great!  Thank you.

--Chris

Richard Lawrence wrote:

Richard Lawrence  writes:


Try this: in your .emacs, add the following code:

(defun prompt-for-lastname-and-upcase ()
   (upcase (read-string "Last name: ")))

This defines a function that will prompt the user to type a last name
into the minibuffer, converts the result into uppercase, and returns it
as a string.

Then, in your capture template, change "%^{LASTNAME}" to
"%(prompt-for-lastname-and-upcase)".



By the way, if you need to do the same thing for other fields, you can
do something like this instead:

(defun prompt-and-upcase (prompt-str)
   (upcase (read-string prompt-str)))

This generalizes the original function I gave you; you can pass in a
prompt string.

Then, in your capture template, wherever you need an uppercase field:

%(prompt-and-upcase "Whatever prompt you need: ")

e.g.,

%(prompt-and-upcase "Last name: ")

Best,
Richard






[O] How to use % in captions with the new exporter?

2012-05-07 Thread Andreas Leha
Hi all,

I am trying to use % in a caption on the new exporter.  Both, % and \%,
fail.  What is the proposed method?

Test case:

#+caption: The values in \%
| 1 | 3 |
| 2 | 1 |

Regards,
Andreas




[O] italic in the new odt exporter

2012-05-07 Thread Andreas Leha
Hi all,

I had to add (italic . "Italic") to the definition of
org-e-odt-default-org-styles-alist in contrib/lisp/org-e-odt.el to get
/italic/ text exported correctly to odt.

Is that a known/intended limitation?

Regards,
Andreas




[O] New exporter #+name: appears in the export

2012-05-07 Thread Andreas Leha
Hi all,

when exporting this with the new exporter, the line #+name: plot_baz is
exported literally to the both, LaTeX and ODT.  Is this a bug?

#+name: plot_baz
#+begin_src R :exports results :results graphics :file fig_baz.png
  plot(1:10)
#+end_src

#+caption: BAZ
#+label: fig-baz
#+results: plot_baz
[[file:fig_baz.png]]

Regards,
Andreas




Re: [O] New exporter and subscripts

2012-05-07 Thread Andreas Leha
Hi Nicolas,


>> The LaTeX file looks like this:
>> ,
>> | [...]|
>> | \begin{document} |
>> |  |
>> | \maketitle   |
>> | \tableofcontents |
>> | \vspace*{1cm}|
>> |  |
>> |  |
>> | \section{Test}   |
>> | \label{sec-1}|
>> | Hi all,  |
>> |  |
>> | there seems to be a problem with the option above in the new |
>> | exporter, as this_o is exported as subscript for me. |
>> |  |
>> | Cheers,  |
>> | Andreas  |
>> | % Generated by Org mode 7.8.09 in Emacs 24.1.50.1.   |
>> | \end{document}   |
>> `
>>
>> I think I should see a this\_o here?
>
> You're right. I had overlooked that "_" required to be protected. I have
> pushed a fix for that.
>
> Thank you for your report.

Thanks a lot!  I can confirm the fix.

>> PS: I have some more difficulties with the new exporter.  But I guess
>> I better wait before posting them as well.
>
> On the contrary, you should post them as well, since you're probably not
> the only one with the same difficulties.

Since I already had posted a bogus bug report the last days (and since I
am low on caffeine right now) I wanted to make sure, that it is not all
up to the same configuration issue on my side...

Cheers,
Andreas




Re: [O] New exporter and subscripts

2012-05-07 Thread Nicolas Goaziou
Hello,

Andreas Leha  writes:

> The LaTeX file looks like this:
> ,
> | [...]|
> | \begin{document} |
> |  |
> | \maketitle   |
> | \tableofcontents |
> | \vspace*{1cm}|
> |  |
> |  |
> | \section{Test}   |
> | \label{sec-1}|
> | Hi all,  |
> |  |
> | there seems to be a problem with the option above in the new |
> | exporter, as this_o is exported as subscript for me. |
> |  |
> | Cheers,  |
> | Andreas  |
> | % Generated by Org mode 7.8.09 in Emacs 24.1.50.1.   |
> | \end{document}   |
> `
>
> I think I should see a this\_o here?

You're right. I had overlooked that "_" required to be protected. I have
pushed a fix for that.

Thank you for your report.

> PS: I have some more difficulties with the new exporter.  But I guess
> I better wait before posting them as well.

On the contrary, you should post them as well, since you're probably not
the only one with the same difficulties.


Regards,

-- 
Nicolas Goaziou



Re: [O] New exporter and subscripts

2012-05-07 Thread Andreas Leha
Hi Nicolas,

thanks once more for the prompt reaction!
>
>> #+TITLE: Test subscripts
>> #+OPTIONS: ^:{}
>>
>> * Test
>> Hi all,
>>
>> there seems to be a problem with the option above in the new
>> exporter, as this_o is exported as subscript for me.
>
> I tried various values for `org-export-with-sub-superscripts' and
> `org-use-sub-superscripts' but I couldn't reproduce it.
>
> Is you Org version recent? Does it happens on every back-end?

Just did a fresh git pull before reporting:
,
| commit cbc1c03680e7d5dd24477c090ade15f90f6314e4
| Author: Nicolas Goaziou 
| Date:   Mon May 7 08:53:09 2012 +0200
| 
| org-element: Allow targets in a few more places
| 
| * contrib/lisp/org-element.el (org-element-object-restrictions): Allow
|   targets in a few more places.
`

I only tried tex and odt.  odt is fine.

The LaTeX file looks like this:
,
| [...]|
| \begin{document} |
|  |
| \maketitle   |
| \tableofcontents |
| \vspace*{1cm}|
|  |
|  |
| \section{Test}   |
| \label{sec-1}|
| Hi all,  |
|  |
| there seems to be a problem with the option above in the new |
| exporter, as this_o is exported as subscript for me. |
|  |
| Cheers,  |
| Andreas  |
| % Generated by Org mode 7.8.09 in Emacs 24.1.50.1.   |
| \end{document}   |
`

I think I should see a this\_o here?

Regards,
Andreas


PS: I have some more difficulties with the new exporter.  But I guess
I better wait before posting them as well.




Re: [O] New exporter and subscripts

2012-05-07 Thread Nicolas Goaziou
Hello,

Andreas Leha  writes:

> #+TITLE: Test subscripts
> #+OPTIONS: ^:{}
>
> * Test
> Hi all,
>
> there seems to be a problem with the option above in the new
> exporter, as this_o is exported as subscript for me.

I tried various values for `org-export-with-sub-superscripts' and
`org-use-sub-superscripts' but I couldn't reproduce it.

Is you Org version recent? Does it happens on every back-end?


Regards,

-- 
Nicolas Goaziou



[O] New exporter and subscripts

2012-05-07 Thread Andreas Leha

#+TITLE: Test subscripts
#+OPTIONS: ^:{}

* Test
Hi all,

there seems to be a problem with the option above in the new
exporter, as this_o is exported as subscript for me.

Cheers,
Andreas




[O] How to stop M-down from opening folded items?

2012-05-07 Thread Steinar Bang
I use M-up and M-down a lot to move items in plain lists up and down in
the list.  In the org-mode delivered with emacs 23 the item you moved
past stayed folded.  But in git org-mode and in 7.8.09, the item you
move past is opened.

Is there a way to get the old behaviour back?  Ie. that items you move
past with M-up or M-down, stays folded?

Thanks!


- Steinar




[O] Defining a new emphasis

2012-05-07 Thread Francesco Pizzolante
Hi,

I'm trying to define a new emphasis that would work like org-code (=) except
that it would export to \textsf instead of \texttt in LaTeX.

I tried several combinations using org-emphasis-alist and
org-export-latex-emphasis-alist, but I must admit that I'm lost amongst all
parameters controlling how the emphasis is processed:

- org-emphasis-alist defines a 'verbatim' optional parameter
- org-export-latex-emphasis-alist defines a protected (t/nil) parameter
- special format string like \\verb or \\protectedtexttt may also be used

Here are tests I've made (using the option ^:nil) with this reference string
=look_at:my~ti ny\reference^string=:

| verbatim | protected | format string | Resulting LaTeX code   
   | Comment
 |
|--+---+---+---+-|
| no   | nil   | \\textsf{%s}  | look\_{}at:my\~{}ti 
ny\reference\^{}string| OK except 
for the backslash |
| no   | t | \\textsf{%s}  | look_at:my~ti ny\reference^string  
   | NOT OK 
 |
| yes  | nil   | \\textsf{%s}  | look_at:my~ti ny\reference^string  
   | NOT OK 
 |
| yes  | t | \\textsf{%s}  | look_at:my~ti ny\reference^string  
   | NOT OK 
 |
| yes  | nil   | \\protectedtexttt | look\_at:my\textasciitilde\{}ti 
ny\textbackslash\{}reference\textasciicircum\{}string | NOT OK  
|
| yes  | t | \\protectedtexttt | look\_at:my\textasciitilde{}ti 
ny\textbackslash{}reference\textasciicircum{}string| OK 
 |

I would like to get the exact same output as == gives (no interpretation of
the chars I write) except that I'd like to use \textsf instead of \texttt but
I can't find the right combination for the parameters (verbatim, protected) to
achieve this goal.

Any help or comment is welcome.

Thanks a lot.

Francesco



Re: [O] "# <>" should stick to the following text

2012-05-07 Thread Eric S Fraga
Nicolas Goaziou  writes:

[...]

> On the other hand, every regular target will be invisible. Let me
> explain.
>
> At the moment, "<>" and "# <>" produce, respectively, " name="tag" id="tag">tag" and "".
>
> In a not so distant future "<>" will produce " id="tag">" and "# <>" will be ignored.

And I think this is indeed the right way to go.  Cleaner overall.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-529-g035ab3.dirty




Re: [O] "# <>" should stick to the following text

2012-05-07 Thread Nicolas Goaziou
Hello,

François Pinard  writes:

> When some feature is being deprecated, the Org manual should tell us,
> then ! :-) And at least where that feature is documented.  Currently,
> the manual says:
>
>   The preferred match for a text link is a dedicated target: the same
>   string in double angular brackets.

This is correct. I was just pointing out (though, admittedly, not very
clearly) that the final part of the next sentence in the manual,
"sometimes it is convenient to put them into a comment line", isn't.

As I announced a few times already, targets are going to change a bit
and _commented_ targets will not be possible anymore in the new
exporter.

On the other hand, every regular target will be invisible. Let me
explain.

At the moment, "<>" and "# <>" produce, respectively, "tag" and "".

In a not so distant future "<>" will produce "" and "# <>" will be ignored.

> I'll adapt of course, but to what? If not "# <>", then what is
> the way to create a named anchor at an arbitrary place in an Org file?

<> should suffice for that task.

I hope this is clearer now.


Regards,

-- 
Nicolas Goaziou