Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Nicolas Goaziou
Myles English mylesengl...@gmail.com writes:

 Thanks for looking at this, I tried just now and can't see any change in
 what I reported above.

Since the patch, \[ \mysymbol = f \] is correctly displayed after C-c
C-x C-l here (I just changed ~/bug with bug as bug.sty is not
located in my home directory).


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Synchronize slideshow exporters to ox-html changes.

2013-02-26 Thread Nicolas Goaziou
Rick Frankel r...@rickster.com writes:

 On Mon, Feb 25, 2013 at 10:22:54AM +0100, Nicolas Goaziou wrote:
 Hello,
 
 Rick Frankel r...@rickster.com writes:
 
  This patch fixes a couple of bugs in the s5 exporter and brings both
  exporters in-sync w/ the updates to ox-html (uppercase properties, and
  HTML_CONTAINER_CLASS fix).
 
  Note that ox-deck has so many lines of change due to whitespace
  cleanup (won't happen again :).

 I have trouble applying this patch. Could you rebase it against current
 master and resend it?

 Attached.

 Also attached is a separate patch to cleanup the whitespace in
 ox-deck.

 Also, would you mind replacing in both files
   (+ (org-element-property :level headline)
  (plist-get info :headline-offset))
 
 occurrences with:
 
   (org-export-get-relative-level headline info)

 Fix included.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] tabulated-list

2013-02-26 Thread Achim Gratz
Nicolas Goaziou n.goaziou at gmail.com writes:
 Bastien, is there another solution besides reverting the commit?

Not Bastien, but until a more permanent solution is found (if any) you could do
the same thing as with htmlize.el and commit it into contrib/lisp and instruct
folks to add this to ORG_ADD_CONTRIB if needed.  Installing from ELPA would be
preferred, however, just like for htmlize.


Regards,
Achim.





Re: [O] tabulated-list

2013-02-26 Thread Nicolas Goaziou
Hello,

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

 Not Bastien, 

No problem, that will do, too ;)

 but until a more permanent solution is found (if any) you could do
 the same thing as with htmlize.el and commit it into contrib/lisp and instruct
 folks to add this to ORG_ADD_CONTRIB if needed.  Installing from ELPA would be
 preferred, however, just like for htmlize.

Well I'd rather revert it then. Too many headaches foreseen. The commit
was mostly cosmetic anyway.


Regards,

-- 
Nicolas Goaziou



Re: [O] Possible to both clock into :CLOCK: and put notes in :LOGBOOK: ?

2013-02-26 Thread Steinar Bang
 Achim Gratz strom...@nexgo.de:
 Steinar Bang writes:

 But if I have this setting then notes created with `C-c C-z' end up on
 the top level, even if I manually create a :LOGBOOK: drawer.
 
 Is it possible to have both?

 Unless it's been broken recently it should, but you probably need to
 customize org-log-into-drawer to t (for LOGBOOK) or set the property
 LOG_INTO_DRAWER if you want to keep this setting different in
 different subtrees.

I examined org-log-drawer with
 C-h v org-log-drawer RET
and it had the value of `nil'.

I customized by selecting LOGBOOK (ie. `t') from the value menu, and now
notes end up in the :LOGBOOK: drawer in the same nodes where clocking
info ends up in the :CLOCK: drawer.

Thanks!




Re: [O] tabulated-list

2013-02-26 Thread Jude DaShiell
On Tue, 26 Feb 2013, Nicolas Goaziou wrote:

 Hello,
 
 Achim Gratz strom...@nexgo.de writes:
 
  Not Bastien, 
 
 No problem, that will do, too ;)
 
  but until a more permanent solution is found (if any) you could do
  the same thing as with htmlize.el and commit it into contrib/lisp and 
  instruct
  folks to add this to ORG_ADD_CONTRIB if needed.  Installing from ELPA would 
  be
  preferred, however, just like for htmlize.
 
 Well I'd rather revert it then. Too many headaches foreseen. The commit
 was mostly cosmetic anyway.
 
 
 Regards,
 
Since the emacs scratch buffer is read-only in emacs 23.4 on debian, I 
couldn't get elpa to install from its original web site.  This was by 
downloading a piece of elisp code then using control-j just after the 
code's last character.  Is there something else I should try to get elpa 
to install?

 

--- 
jude jdash...@shellworld.net Remember Microsoft didn't write Tiger 10.4 
or any of its successors.




Re: [O] org-meta-return

2013-02-26 Thread Eric S Fraga
Nick Dokos nicholas.do...@hp.com writes:


[...]

 I hope everybody does that. I use both the left and right control keys 
 depending
 on where the controlled key is: C-whatever is always a two-hand operation 
 for me.
 M-x is not however (they are close enough so that left thumb and index can do 
 the
 job): both right and left Alt keys are mapped to meta so there is no reason 
 it couldn't
 be other than habit. But I probably should get out of the habit.

As a previous sufferer of serious RSI, I always warn people against
key-chording that requires any contortion.  C-M-x (with x=anything on
the left half of the keyboard basically) is a bad thing.  In fact, often
anything with M- is bad for me.  I tend to avoid such key chords.  For
instance, for M-x, I have

   (global-set-key '[(control x) (control m)] 'execute-extended-command)

Actually, in practice, I use evil-mode everywhere so I have practically
no key chords!  For M-x, I type , x...  I have defined a number of key
org commands into the evil key maps and I'm a happy camper!

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55




Re: [O] tabulated-list

2013-02-26 Thread Yann Hodique
 François == François Pinard pin...@iro.umontreal.ca writes:

 Hi, Org people.
 This morning, I could not load Org because ox.el calls function
 tabulated-list, which does not seem to exist on this version of Emacs.
 So I fetched the one at https://github.com/sigma/tabulated-list.el to
 get going, but others will likely have the same problem.

Hi,

note that I uploaded this tabulated-list.el version as version 0 (since
unfortunately the builtin package doesn't have a version number...) in
marmalade. So that if org is made to depend on the tabulated-list
package *and* you have marmalade activated, M-x package-install should
handle the rest.

I guess a proper solution would have to have those packages in the
official ELPA as well, so that they can be made backward-compatible. But
all in all, packages for older Emacs versions are a mess.

Yann.

-- 
It's easier to be terrified by an enemy you admire.

  -- THUFIR HAWAT, Mentat and Security Commander to House Atreides



[O] BUG typo in babel.org?

2013-02-26 Thread Andreas Röhler

in org-mode/testing/examples/babel.org

a noweb-example1 as called, which seems not defined

Andreas



[O] Org-mode syntax support of github: overview

2013-02-26 Thread Karl Voit
Hi!

I am using Org-mode files for READMEs and stuff on github.com. Since
github is using an old version of org-ruby[1] to visualize Org-mode,
there is only a limited support for Org-mode syntax elements.

If you don't want to tryerror by yourself, take a look at
github-orgmode-tests[2] where you can see, what works and what
doesn't work (yet).

HTH

  1. https://github.com/bdewey/org-ruby
  2. https://github.com/novoid/github-orgmode-tests
-- 
Karl Voit




Re: [O] C-c ^ not fully useful

2013-02-26 Thread Bastien
Hi François,

François Pinard pin...@iro.umontreal.ca writes:

 P.S. About an option to sort the previous way, that is, by the physical
 contents of the line, visible or not, I do not have a use case for it, I
 would not need such an option.

 I sometimes, yet not often, need to group together links by their
 originating site, and then, the standard Emacs line sorting function
 gave me a very good approximation, good enough for my little needs.

Thanks for your feedback on this.  We will announce the feature widely
enough so that users who need the parameter can chime in.

Best,

-- 
 Bastien



Re: [O] [patch] ox-koma-letter

2013-02-26 Thread Bastien
Hi Rasmus,

Rasmus ras...@gmx.us writes:

 I have been working on extending the KOMA letter support in Org.  The
 backend is still rough and I would like to more stuff such as
 designing firstfood and firsthead with org elements (e.g. I use a
 tabularx for my firstfood with varioues stuff).

Thanks for the patch -- I'll let Nicolas and Alan comment it
feature-wise.  Just wanted to throw the usual reminder: please
add a changelog to it, so that our commit history is as useful
as possible.  (But maybe you planned this already for the final
version of it, in that case just ignore my comment.)

Thanks!

-- 
 Bastien



Re: [O] Org-mode syntax support of github: overview

2013-02-26 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 If you don't want to tryerror by yourself, take a look at
 github-orgmode-tests[2] where you can see, what works and what
 doesn't work (yet).

 HTH

   1. https://github.com/bdewey/org-ruby
   2. https://github.com/novoid/github-orgmode-tests

Thanks for the link above, I hope it will help with the further
development of org-ruby and its use on github.

I also would love to see .org files supported on gitorious.org,
if someone feels like contacting them and to ask for this, feel
free!

-- 
 Bastien



Re: [O] Bug: turn-on-font-lock breaks org-mode in recent emacs [7.9.3e (7.9.3e-3-gb07a9b @ /usr/share/emacs/24.3.50/lisp/org/)]

2013-02-26 Thread Bastien
Hi Gijs,

Gijs Hillenius g...@hillenius.net writes:

 Until today, I had have these two (legacy) lines in my orgmode configuration

 ;; (global-font-lock-mode 1) ; for all buffers

 which is already a default in emacs. This is also noted in the manual
 http://orgmode.org/manual/Activation.html

You have a cached version of this page, `global-font-lock-mode' is not
mentioned in the current one (refresh the page to check.)

 However: it is still recommended in the Org-Mode Beginners Customization
 Guide http://orgmode.org/worg/org-configs/org-customization-guide.html

It is not anymore, fixed, thanks.

 The second line made a bit of a mess of my .org files with the
 20130224 version of emacs-snapshot 

 ;; (add-hook 'org-mode-hook 'turn-on-font-lock)  ; org-mode buffers only

 org files would still open, but show up as (imaginary example)
 [[gnus:982.3334][link]] instead of the nice underlined clickable links.

Mhh... you mean that, with `global-font-lock-mode' already turned on
and (add-hook 'org-mode-hook 'turn-on-font-lock), then the links are
not clickable anymore?  If so, please try ~$ emacs -Q test.org and
report the problem, together with your Emacs and Org versions.

Thanks!

-- 
 Bastien



Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Achim Gratz
Nicolas Goaziou n.goaziou at gmail.com writes:
 Aaron Ecay aaronecay at gmail.com writes:
  Tikz graphics should be exported to LaTeX by \include, not as a link.
  This commit changes the file extension used for tikz graphics from .tex
  to .tikz.
 
 I'm wondering if it's really meant to be inserted as an inline image.
 Does it support wrapfigure environment or width optional attribute?

A .tikz file usually contains a tikzpicture environment that wraps around the
actual tikz code.  It produces a box just like includegraphics does, only that
it is normal LaTeX code, and so you need \include to read it.

 If it doesn't, it may be better to implement a dedicated (or a more
 general input function) formatting function that would be called from
 `org-latex-link'.

I don't understand.  What I currently need to do for TikZ is this:

#+LaTeX: \begin{figure}[t]\centering
#+LaTeX:   \input{oldModel.tikz}
#+LaTeX:   \caption{Relative modelling error}
#+LaTeX: \label{fig:oldModel}
#+LaTeX: \end{figure}

With the patch that becomes much easier (especially if you want to bounce it to
HTML eventually, even though the HTML exporter would need to grok that the tikz
picture should first be converted to SVG or PNG or some other image format):

#+CAPTION:  Relative modelling error
#+LABEL: fig:oldModel
#+ATTR_LaTeX: :placement [t]
[[file:oldModel.tikz]]

Now, what I'd really like to do is to combine this with the production of the
tikz file by Gnuplot like so:

#+HEADERS:  :term tikz size 15cm,5cm :exports none :results yes
#+BEGIN_SRC gnuplot :file oldModel.tikz :cache yes...

#+RESULTS[4d90e02adddfd56f8fbf6bc99963b9bffe1f201e]:
#+CAPTION:  Relative modelling error for DP 0.7 model
#+LABEL: fig:oldModel
#+ATTR_LaTeX: :placement [t]
[[file:oldModel.tikz]]

That works, but I'll always have to remove some extra gunk between the new
result generated and the old one.


Regards,
Achim.




Re: [O] BUG typo in babel.org?

2013-02-26 Thread Bastien
Hi Andreas,

Andreas Röhler andreas.roeh...@easy-emacs.de writes:

 in org-mode/testing/examples/babel.org

 a noweb-example1 as called, which seems not defined

Can you help suggesting a fix (ideally as a patch) and
explaining why it is needed?

Thanks,

-- 
 Bastien



Re: [O] Bug: error on html export [7.9.3e (7.9.3e-3-gb07a9b @ /u/kimr/src/emacs/emacs-trunk_latest/lisp/org/)]

2013-02-26 Thread Bastien
Hi Richard,

Richard Kim emac...@gmail.com writes:

 Starting with emacs bzr trunk revision 111688 of Feb 7, 2013,
 following three line org file results in error when html export is
 attempted.

 -- start of foo.org 
 
 #+TITLE: Nothing

 # file:/tmp
 -- end   of foo.org 
 

 To see the problem, load the three line org file, then hit `C-c C-e h'.
 It results in the following stack trace:

I cannot reproduce this error with Org 7.9.3f, it should
have been fixed.

Please upgrade to the last public release and let us know.

Thanks,

-- 
 Bastien



Re: [O] BUG typo in babel.org?

2013-02-26 Thread Andreas Röhler

Am 26.02.2013 11:41, schrieb Bastien:

Hi Andreas,

Andreas Röhler andreas.roeh...@easy-emacs.de writes:


in org-mode/testing/examples/babel.org

a noweb-example1 as called, which seems not defined


Can you help suggesting a fix (ideally as a patch) and
explaining why it is needed?

Thanks,



Hi Bastien,

as I'm still exploring org-mode and the way to write tests for,
please have a look IIUC,

Andreas
commit 798372693b754e7a5d5311b8e0b8b79f70005212
Author: Andreas Roehler andreas.roeh...@online.de
Date:   Tue Feb 26 12:01:27 2013 +0100

define noweb-example1 in org-mode/testing/examples/babel.org

noweb-example1 as called later on, but seems not defined

TINYCHANGE

diff --git a/testing/examples/babel.org b/testing/examples/babel.org
index 7c30ab2..8fad7f0 100644
--- a/testing/examples/babel.org
+++ b/testing/examples/babel.org
@@ -8,6 +8,11 @@
 
 #+name: noweb-example
 #+begin_src emacs-lisp :results silent :exports code
+  (message expanded)
+#+end_src
+
+#+name: noweb-example1
+#+begin_src emacs-lisp :results silent :exports code
   (message expanded1)
 #+end_src
 


[O] 5f095f5 is the first bad commit (for my use case)

2013-02-26 Thread Sebastien Vauban
Hello,

Since updating to latest Org this morning, I couldn't open anymore my file
~/org/work.org.

Symptom?  Org-mode gets loaded, but buffer remains blank, and Emacs is
(apparently) inflooping, with letting me stop it (with C-g).

Solution?  Kill Emacs through the task manager, and bisect:

  ╭
  │ 5f095f59099e77eda5cf7cae64119f9f246c4c70 is the first bad commit
  │ commit 5f095f59099e77eda5cf7cae64119f9f246c4c70
  │ Author: Nicolas Goaziou n.goaz...@gmail.com
  │ Date:   Sun Feb 10 00:07:48 2013 +0100
  │
  │ Fontify latex, entities and sub/superscript again
  │
  │ * lisp/org-faces.el (org-latex-and-related): Renamed from
  │   `org-latex-and-export-specials', which wasn't appropriate anymore.
  │ * lisp/org.el (org-highlight-latex-and-related,
  │   org-latex-and-related-regexp): New variables.
  │ (org-compute-latex-and-related-regexp, org-do-latex-and-related): New
  │ function, revived from a previous commit.
  │ (org-set-regexps-and-options, org-set-font-lock-defaults): Use new
  │ functions.
  ╰

Now, having my Git tip on commit 3f95d81, everything's OK. I can work again,
but the most difficult problem is that I don't see how to debug further the
above problem.

Any idea why this fails?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [PATCH] bug in expansion of variables in babel Perl

2013-02-26 Thread Achim Gratz
D M German dmg at uvic.ca writes:
   print $BO join($/, @r), $/ ;

Sorry, this should really be:

print $BO join(qq($/), @r), qq($/);

Anyway, I think I'll have to rework the wrapper to be an anonymous subroutine so
that the (reasonably expactable) return @foo; at the end of the program (or in
the middle if so desired) continues to work.

Also, I just checked that noweb syntax does work for code execution, so the
prefix you wanted to have is easy enough to add via Library of Babel:

#+name: prefix
#+begin_src perl
# Santa's little helpers
#+end_src

#+begin_src perl :noweb yes
prefix
help();
#+end_src

In light of this, I think we should not implement the preface change as its
effects can be had without obscuring things too much.


Regards,
Achim.




Re: [O] org-meta-return

2013-02-26 Thread Sebastien Vauban
Eric,

Eric S Fraga wrote:
 Nick Dokos nicholas.do...@hp.com writes:

 [...]

 I hope everybody does that. I use both the left and right control keys
 depending on where the controlled key is: C-whatever is always a two-hand
 operation for me. M-x is not however (they are close enough so that left
 thumb and index can do the job): both right and left Alt keys are mapped to
 meta so there is no reason it couldn't be other than habit. But I probably
 should get out of the habit.

 As a previous sufferer of serious RSI, I always warn people against
 key-chording that requires any contortion. C-M-x (with x=anything on the
 left half of the keyboard basically) is a bad thing. In fact, often anything
 with M- is bad for me. I tend to avoid such key chords. For instance, for
 M-x, I have

(global-set-key '[(control x) (control m)] 'execute-extended-command)

 Actually, in practice, I use evil-mode everywhere so I have practically no
 key chords! For M-x, I type , x... I have defined a number of key org
 commands into the evil key maps and I'm a happy camper!

Quite a bit OT, but is it true that, for example, to type `C-whatever', we
should use both hands, one for `C' and the other for `whatever'?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] BUG typo in babel.org?

2013-02-26 Thread Achim Gratz
Andreas Röhler andreas.roehler at easy-emacs.de writes:
 as I'm still exploring org-mode and the way to write tests for,
 please have a look IIUC,

In any case you should check if that isn't done on purpose to test for the
reaction of Org to missing code references.  There are negative tests that are
expected to fail.


Regards,
Achim.




Re: [O] BUG typo in babel.org?

2013-02-26 Thread Andreas Röhler

Am 26.02.2013 12:19, schrieb Achim Gratz:

Andreas Röhler andreas.roehler at easy-emacs.de writes:

as I'm still exploring org-mode and the way to write tests for,
please have a look IIUC,


In any case you should check if that isn't done on purpose to test for the
reaction of Org to missing code references.  There are negative tests that are
expected to fail.


Regards,
Achim.





Being well aware mistakes are possible. Erorr message was

Debugger entered--Lisp error: (void-variable noweb-example1)
  (progn noweb-example1)
  eval((progn noweb-example1))
  ((lambda (result) (if (member none #1=(cdr (assoc :result-params params))) nil (if (or (member scalar #1#) (member verbatim #1#) (member html #1#) (member code 
#1#) (member pp #1#) (and (member output #1#) (not (member table #1# (let ((print-level nil) (print-length nil)) (if (or (member scalar ...) (member verbatim 
...)) (format %S result) (format %s result))) (org-babel-reassemble-table result (org-babel-pick-name (cdr (assoc :colname-names params)) (cdr (assoc :colnames 
params))) (org-babel-pick-name (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))) (eval (read (format (if (member output (cdr (assoc :result-params 
params))) (with-output-to-string %s) (progn %s)) (org-babel-expand-body:emacs-lisp body params)
  (progn ((lambda (result) (if (member none #1=(cdr (assoc :result-params params))) nil (if (or (member scalar #1#) (member verbatim #1#) (member html #1#) (member 
code #1#) (member pp #1#) (and (member output #1#) (not ...))) (let ((print-level nil) (print-length nil)) (if (or ... ...) (format %S result) (format %s 
result))) (org-babel-reassemble-table result (org-babel-pick-name (cdr ...) (cdr ...)) (org-babel-pick-name (cdr ...) (cdr ...)) (eval (read (format (if (member 
output (cdr ...)) (with-output-to-string %s) (progn %s)) (org-babel-expand-body:emacs-lisp body params))
  (unwind-protect (progn ((lambda (result) (if (member none #1=(cdr (assoc :result-params params))) nil (if (or (member scalar #1#) (member verbatim #1#) (member 
html #1#) (member code #1#) (member pp #1#) (and ... ...)) (let (... ...) (if ... ... ...)) (org-babel-reassemble-table result (org-babel-pick-name ... ...) 
(org-babel-pick-name ... ...) (eval (read (format (if (member output ...) (with-output-to-string %s) (progn %s)) (org-babel-expand-body:emacs-lisp body 
params)) (set-window-configuration wconfig))
  (let ((wconfig (current-window-configuration))) (unwind-protect (progn ((lambda (result) (if (member none #1=(cdr ...)) nil (if (or ... ... ... ... ... ...) (let ... 
...) (org-babel-reassemble-table result ... ... (eval (read (format (if ... (with-output-to-string %s) (progn %s)) (org-babel-expand-body:emacs-lisp body 
params)) (set-window-configuration wconfig)))
  org-babel-execute:emacs-lisp(;; noweb-no-start\n  noweb-example1 ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . no) (:tangle . 
no) (:exports . code) (:results . silent) (:session . none) (:padnewline . yes) (:hlines . yes) (:colnames . no) (:result-type . value) (:result-params 
silent) (:rowname-names) (:colname-names)))
  org-babel-execute-src-block(nil (emacs-lisp ;; noweb-no-start\n  noweb-example1 ((:comments . #1=) (:shebang . #1#) (:cache . no) (:padline . #1#) (:noweb . 
no) (:tangle . no) (:exports . code) (:results . silent) (:session . none) (:padnewline . yes) (:hlines . yes) (:colnames . no) (:result-type . value) 
(:result-params silent) (:rowname-names) (:colname-names))  nil 0))

  org-babel-execute-src-block-maybe()
  org-babel-execute-maybe()
  org-babel-execute-safely-maybe()
  run-hook-with-args-until-success(org-babel-execute-safely-maybe)
  (cond ((or (and (boundp (quote org-clock-overlays)) org-clock-overlays) org-occur-highlights org-latex-fragment-image-overlays) (and (boundp (quote org-clock-overlays)) 
(org-clock-remove-overlays)) (org-remove-occur-highlights) (org-remove-latex-fragment-image-overlays) (message Temporary highlights/overlays removed from current buffer)) 
((and (local-variable-p (quote org-finish-function) (current-buffer)) (fboundp org-finish-function)) (funcall org-finish-function)) ((run-hook-with-args-until-success 
(quote org-ctrl-c-ctrl-c-hook))) (t (let* ((context (org-element-context)) (type (org-element-type context))) (if (save-excursion (beginning-of-line) (looking-at [ 	]*$)) 
(or (run-hook-with-args-until-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-error C-c C-c can do nothing useful at this location)) (if (eq type (quote paragraph)) 
(progn (let (...) (if ... ... (cond ((eql type (quote clock)) (org-clock-update-time-maybe)) ((eql type (quote dynamic-block)) (save-excursion (goto-char ...) 
(org-update-dblock))) ((eql type (quote footnote-definition)) (goto-char (org-element-property :post-affiliated context)) (call-interactively (quote org-footnote-action))) 
((eql type (quote footnote-reference)) (call-interactively (quote 

Re: [O] tabulated-list

2013-02-26 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Well I'd rather revert it then. Too many headaches foreseen. The commit
 was mostly cosmetic anyway.

FWIW, yes, I cannot think of another good solution than reverting the
commit.  If it was just cosmetic, that's even better.

Best,

-- 
 Bastien



Re: [O] org-create-formula-image-with-imagemagick conflicts with org-latex-pdf-process

2013-02-26 Thread Florian Beck
Hello Nicolas,

 What about re-using the existing tool from ox-latex.el? What do you
 think of the following patch?

Very highly, this works perfectly. Thank you.

Unfortunatly, html export doesn't support imagemagick yet.
`org-html-latex-fragment' and `org-html-latex-environment' only handle
mathjax and dvipng. (I've added imagemagick to the dvipng case, and this
seems to work without any problems.)

-- 
Florian Beck



Re: [O] [patch] ox-koma-letter

2013-02-26 Thread Rasmus
Bastien b...@altern.org writes:

 I have been working on extending the KOMA letter support in Org.  The
 backend is still rough and I would like to more stuff such as
 designing firstfood and firsthead with org elements (e.g. I use a
 tabularx for my firstfood with varioues stuff).

 Thanks for the patch -- I'll let Nicolas and Alan comment it
 feature-wise.  Just wanted to throw the usual reminder: please
 add a changelog to it, so that our commit history is as useful
 as possible.  (But maybe you planned this already for the final
 version of it, in that case just ignore my comment.)

Yeah, I followed the Sending quick fixes for testing purpose on the
Worg Contribute page.  If I do stuff in a wrong wayᵀᴹ it's better to
know about it early. . .

–Rasmus

-- 
And let me remind you also that moderation in the pursuit of justice
is no virtue



Re: [O] org-create-formula-image-with-imagemagick conflicts with org-latex-pdf-process

2013-02-26 Thread Nicolas Goaziou
Hello,

Florian Beck f...@miszellen.de writes:

 `org-create-formula-image-with-imagemagick' doesn't handle the case that
 `org-latex-pdf-process' is set to a function.

 To reproduce:

  - set `org-latex-pdf-process' to a function
  - (setq org-latex-create-formula-image-program 'imagemagick)
this makes preview fail
  - set #+OPTIONS: latex:imagemagick = html export broken

 However, just calling this function from
 `org-create-formula-image-with-imagemagick' would not be a good idea.
 How about adding a new variable `org-latex-formula-pdf-process'?

What about re-using the existing tool from ox-latex.el? What do you
think of the following patch?


Regards,

-- 
Nicolas Goaziou
From 40dabf94dae93d2935982a7d04f3b7804069b733 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Tue, 26 Feb 2013 09:28:59 +0100
Subject: [PATCH] Use `org-latex-compile' when processing formulas with
 imagemagick

* lisp/ox-latex.el (org-latex-compile): Add an optional argument for
  latex snippet previewing.
* lisp/org.el (org-create-formula-image-with-imagemagick): Use
  `org-latex-compile' instead of rewriting it.
---
 lisp/org.el  | 36 ++--
 lisp/ox-latex.el | 15 ++-
 2 files changed, 12 insertions(+), 39 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 55cd00e..03bd8f3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18167,7 +18167,7 @@ share a good deal of logic.
 		  (delete-file (concat texfilebase e
 	pngfile
 
-(defvar org-latex-pdf-process)		; From ox-latex.el
+(declare-function org-latex-compile org-latex (texfile optional snippet))
 (defun org-create-formula-image-with-imagemagick (string tofile options buffer)
   This calls convert, which is included into imagemagick.
   (require 'ox-latex)
@@ -18204,39 +18204,7 @@ share a good deal of logic.
 		string
 		\n}\n
 		\n\\end{document}\n)))
-(let ((dir default-directory) cmd cmds latex-frags-cmds)
-  (condition-case nil
-	  (progn
-	(cd tmpdir)
-	(setq cmds org-latex-pdf-process)
-	(while cmds
-	  (setq latex-frags-cmds (pop cmds))
-	  (if (listp latex-frags-cmds)
-		  (setq cmds nil)
-		(setq latex-frags-cmds (list (car org-latex-pdf-process)
-	(while latex-frags-cmds
-	  (setq cmd (pop latex-frags-cmds))
-	  (while (string-match %b cmd)
-		(setq cmd (replace-match
-			   (save-match-data
-			 (shell-quote-argument texfile))
-			   t t cmd)))
-	  (while (string-match %f cmd)
-		(setq cmd (replace-match
-			   (save-match-data
-			 (shell-quote-argument
-			  (file-name-nondirectory texfile)))
-			   t t cmd)))
-	  (while (string-match %o cmd)
-		(setq cmd (replace-match
-			   (save-match-data
-			 (shell-quote-argument
-			  (file-name-directory texfile)))
-			   t t cmd)))
-	  (setq cmd (split-string cmd))
-	  (eval (append (list 'call-process (pop cmd) nil nil nil) cmd
-	(error nil))
-  (cd dir))
+(org-latex-compile texfile t)
 (if (not (file-exists-p pdffile))
 	(progn (message Failed to create pdf file from %s texfile) nil)
   (condition-case nil
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 3b0924c..5ebfe7e 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2774,12 +2774,16 @@ Return PDF file's name.
  (org-latex-export-to-latex
   nil subtreep visible-only body-only ext-plist
 
-(defun org-latex-compile (texfile)
+(defun org-latex-compile (texfile optional snippet)
   Compile a TeX file.
 
 TEXFILE is the name of the file being compiled.  Processing is
 done through the command specified in `org-latex-pdf-process'.
 
+When optional argument SNIPPET is non-nil, TEXFILE is a temporary
+file used to preview a LaTeX snippet.  In this case, do not
+create a log buffer and do not bother removing log files.
+
 Return PDF file name or an error if it couldn't be produced.
   (let* ((base-name (file-name-sans-extension (file-name-nondirectory texfile)))
 	 (full-name (file-truename texfile))
@@ -2788,7 +2792,7 @@ Return PDF file name or an error if it couldn't be produced.
 	 ;; not to whatever value the current buffer may have.
 	 (default-directory (file-name-directory full-name))
 	 errors)
-(message (format Processing LaTeX file %s ... texfile))
+(unless snippet (message (format Processing LaTeX file %s ... texfile)))
 (save-window-excursion
   (cond
;; A function is provided: Apply it.
@@ -2798,7 +2802,8 @@ Return PDF file name or an error if it couldn't be produced.
;; values in each command before applying it.  Output is
;; redirected to *Org PDF LaTeX Output* buffer.
((consp org-latex-pdf-process)
-	(let ((outbuf (get-buffer-create *Org PDF LaTeX Output*)))
+	(let ((outbuf (and (not snippet)
+			   (get-buffer-create *Org PDF LaTeX Output*
 	  (mapc
 	   (lambda (command)
 	 (shell-command
@@ -2811,7 +2816,7 @@ Return PDF file name or an error if it couldn't be produced.
 	  outbuf))
 	   

Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Myles English

Hello,

'Scuse me for butting in but I would just like to share how I use tikz
graphics using the 'standalone' class, maybe its useful (and maybe not).
The advantage is that you can compile the tikz file by itself to see how
it looks and then \include it in the main document without having to
change it or compile it separately.

Achim Gratz writes:

 I don't understand.  What I currently need to do for TikZ is this:

 #+LaTeX: \begin{figure}[t]\centering
 #+LaTeX:   \input{oldModel.tikz}
 #+LaTeX:   \caption{Relative modelling error}
 #+LaTeX: \label{fig:oldModel}
 #+LaTeX: \end{figure}

 With the patch that becomes much easier (especially if you want to bounce it 
 to
 HTML eventually, even though the HTML exporter would need to grok that the 
 tikz
 picture should first be converted to SVG or PNG or some other image format):

 #+CAPTION:  Relative modelling error
 #+LABEL: fig:oldModel
 #+ATTR_LaTeX: :placement [t]
 [[file:oldModel.tikz]]

 Now, what I'd really like to do is to combine this with the production of the
 tikz file by Gnuplot like so:

 #+HEADERS:  :term tikz size 15cm,5cm :exports none :results yes
 #+BEGIN_SRC gnuplot :file oldModel.tikz :cache yes...

 #+RESULTS[4d90e02adddfd56f8fbf6bc99963b9bffe1f201e]:
 #+CAPTION:  Relative modelling error for DP0.7 model
 #+LABEL: fig:oldModel
 #+ATTR_LaTeX: :placement [t]
 [[file:oldModel.tikz]]

(This is not a MWE)

-- tikz file --

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%
decorations.pathreplacing,decorations.pathmorphing,shapes,%
matrix,shapes.symbols,shadows}

\begin{document}
\input{/home/myles/docs/repo/graphics/tikz/tikz_style.tex}
\begin{tikzpicture}[rotate=-40]
\cylAxes;
%\draw[help grid] (0,0) grid (5,5);
\node[draw=none,inner sep=0] at (2,4) (yy) {};
\draw[inner sep=0] (0,0) -- +(90:4cm) arc (180:0:1cm and .5cm) node[name=nn] {};
\node[ellipse,
  rotate=-40,
  draw,anchor=west,
  minimum height=1cm,
  minimum width=2cm,
  inner sep=0] (0,0) (bb) {};
\draw (bb.east) -- (yy);
% domain
\draw[Domain boundary,
  color=red,
  inner sep=0] (bb.50) -- ++(40:8) -- ++(90:4) -- (bb.50|-+90:4.5) -- (bb.50);
\end{tikzpicture}
\end{document}

# - org doc -
#+LATEX_HEADER: \usepackage{standalone}
#+LATEX_CLASS: report
#+LATEX_CLASS_OPTIONS: [10pt,a4paper]
#+LATEX_HEADER: \DeclareGraphicsExtensions{.pdf,.png,.jpg,.mps}
#+LATEX_HEADER: \usepackage{subfig}
#+LATEX_HEADER: \usepackage{tikz}
#+LATEX_HEADER: \usetikzlibrary{shapes,arrows,fit,positioning,backgrounds}
#+LATEX_HEADER: \usetikzlibrary{decorations.pathreplacing} % for braces

#+begin_latex
\begin{figure}[htb]
\centering
\includestandalone[mode=tex,width=5cm]{/home/myles/docs/repo/graphics/tikz/2daxial}
\caption[2D linked domain]{\label{figure:2D_linked_domain}Tunnel domains.}
\end{figure}
#+end_latex

#---

Myles



Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Myles English

Nicolas Goaziou writes:

 Myles English mylesengl...@gmail.com writes:

 Thanks for looking at this, I tried just now and can't see any change in
 what I reported above.

 Since the patch, \[ \mysymbol = f \] is correctly displayed after C-c
 C-x C-l here (I just changed ~/bug with bug as bug.sty is not
 located in my home directory).

I still can't get it to work.  I have just updated doing 'make clean,
git pull, make all', the only messages that looked odd were these:

#-
Making generated-autoload-file local to  *autoload-file* while
let-bound!

In org-make-checklist-export:
org-checklist.el:122:14:Warning: print called with 0 arguments, but requires
1-2
org-checklist.el:126:54:Warning: reference to free variable `a2ps-switches'

In org-checklist:
org-checklist.el:132:17:Warning: reference to free variable `org-state'

In end of data:
org-checklist.el:141:1:Warning: the function `a2ps-buffer' is not known
to be
#-

Then I started emacs as before:

emacs -Q -l minimal.el bug.org

M-x locate-library org RET finds the correct library from git:

Library is file ~/.emacs.d/plugins/org-mode/lisp/org.elc

Any ideas?
Can anyone else verify that this works or not?

Myles



Re: [O] org-create-formula-image-with-imagemagick conflicts with org-latex-pdf-process

2013-02-26 Thread Nicolas Goaziou
Florian Beck f...@miszellen.de writes:

 Very highly, this works perfectly. Thank you.

Patch applied.

 Unfortunatly, html export doesn't support imagemagick yet.
 `org-html-latex-fragment' and `org-html-latex-environment' only handle
 mathjax and dvipng. (I've added imagemagick to the dvipng case, and this
 seems to work without any problems.)

Do you want to prepare a patch for that?


Regards,

-- 
Nicolas Goaziou



Re: [O] [Bug] Export Coding System

2013-02-26 Thread Achim Gratz
Nicolas Goaziou n.goaziou at gmail.com writes:
 Does the following patch fix the problem?

I've just had a chance to test this on the system where the problem originally
showed up (Cygwin with the current 24.3 pre-release).  On this system, the
buffer-file-coding-system is not copied and the (wrong) default takes over
again.  I'm puzzled, I can't see how this happens...


Regards,
Achim.




Re: [O] org-meta-return

2013-02-26 Thread Suvayu Ali
On Tue, Feb 26, 2013 at 12:10:13PM +0100, Sebastien Vauban wrote:
 
 Quite a bit OT, but is it true that, for example, to type `C-whatever', we
 should use both hands, one for `C' and the other for `whatever'?

I determine that depending on the key combination.  e.g. C-x or C-s I do
with my left hand with the left control key, but I do C-l, C-k, C-y, M-y
with two hands with the left control key.  Somehow I have a preference
towards using control or meta keys with my left hand eventhough I find
the two handed version much more comfortable.  Maybe it's time to
consciously switch to two handed key presses for everything.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] BUG typo in babel.org?

2013-02-26 Thread Achim Gratz
Andreas Röhler andreas.roehler at easy-emacs.de writes:
 Being well aware mistakes are possible.

That org file is used for some tests in test-ob-exp and not intended for you to
do manual evaluations in.  And from the test setup in ob-exp/noweb-on-export it
appears that the missing noweb-example1 is intended (as well as the double
definitions that lead to double expansions).  If you change something in that
file you also need to change the test definitions and vice versa.


Regards,
Achim.




Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Nicolas Goaziou
Hello,

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

 A .tikz file usually contains a tikzpicture environment that wraps around the
 actual tikz code.  It produces a box just like includegraphics does, only that
 it is normal LaTeX code, and so you need \include to read it.

Ok, thank you.

 If it doesn't, it may be better to implement a dedicated (or a more
 general input function) formatting function that would be called from
 `org-latex-link'.

 I don't understand.  What I currently need to do for TikZ is this:

 #+LaTeX: \begin{figure}[t]\centering
 #+LaTeX:   \input{oldModel.tikz}
 #+LaTeX:   \caption{Relative modelling error}
 #+LaTeX: \label{fig:oldModel}
 #+LaTeX: \end{figure}

  #+begin_latex
  ...
  #+end_latex

would be easier.

 With the patch that becomes much easier 

[...]

I'm not questioning the usefulness of the patch. I want to know if
`org-latex--inline-image' is the appropriate function to provide that
feature or if the feature should be provided through another function.

In particular, `org-latex--inline-image' provide options to wrap the
picture in wrapfigure environment, or to set width optional argument for
includegraphics. If it doesn't make sense in this case, the code could
as well be moved into another function, like `org-latex--input-file',
which would handle options specific for \input.


Regards,

-- 
Nicolas Goaziou



[O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Andreas Röhler

org-babel-execute-src-block: No org-babel-execute function for python!

When evaluating the following block C-c C-c starting from emacs -Q

#+BEGIN_SRC python
a = 5

b = 16

print(a + b)
#+END_SRC

the error message from title appears

GNU Emacs 24.3.50.1 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of 2013-02-20

Patch attached.
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index f2806c7..fb00053 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
(t
 	(error No function available for running an inferior Python)))
   (setq org-babel-python-buffers
@@ -249,7 +252,8 @@ last statement in BODY, as elisp.
 		(org-babel-trim body))
 		   [\r\n]) \n)
 		 (org-babel-process-file-name tmp-file 'noquote
-	  (org-babel-eval-read-file tmp-file))
+	  ;; (org-babel-eval-read-file tmp-file)
+	  )
 
 (defun org-babel-python-evaluate-session
   (session body optional result-type result-params)


Re: [O] BUG typo in babel.org?

2013-02-26 Thread Bastien
Hi Achim,

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

 Being well aware mistakes are possible.

 That org file is used for some tests in test-ob-exp and not intended for you 
 to
 do manual evaluations in.  And from the test setup in ob-exp/noweb-on-export 
 it
 appears that the missing noweb-example1 is intended (as well as the double
 definitions that lead to double expansions).  If you change something in that
 file you also need to change the test definitions and vice versa.

Thanks for the explanations, but closed then.

-- 
 Bastien



Re: [O] Exporter question

2013-02-26 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 Has it to be an export only property? I mean, it could be used in
 a library like org-toc.el.

(Er.. org-toc.el should be trashed, it's 99% obsolete.)

 Also EXPORT_KEYWORD prefix is mostly used when there is a global
 #+KEYWORD: available. There is no #+ALT_TITLE: (yet?).

 So, what about ALT_TITLE instead?

I like it better, yes.

-- 
 Bastien



Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Nick Dokos
Andreas Röhler andreas.roeh...@easy-emacs.de wrote:

 org-babel-execute-src-block: No org-babel-execute function for python!
 
 When evaluating the following block C-c C-c starting from emacs -Q
 
 #+BEGIN_SRC python
 a = 5
 
 b = 16
 
 print(a + b)
 #+END_SRC
 
 the error message from title appears
 
 GNU Emacs 24.3.50.1 (i686-suse-linux-gnu, GTK+ Version 2.22.1) of 2013-02-20
 
 Patch attached.
 diff --git a/lisp/ob-python.el b/lisp/ob-python.el
 index f2806c7..fb00053 100644
 --- a/lisp/ob-python.el
 +++ b/lisp/ob-python.el
 (t
   (error No function available for running an inferior Python)))
(setq org-babel-python-buffers
 @@ -249,7 +252,8 @@ last statement in BODY, as elisp.
   (org-babel-trim body))
  [\r\n]) \n)
(org-babel-process-file-name tmp-file 'noquote
 -   (org-babel-eval-read-file tmp-file))
 +   ;; (org-babel-eval-read-file tmp-file)
 +   )
  
  (defun org-babel-python-evaluate-session
(session body optional result-type result-params)

I don't understand: afaict the problem is that starting with emacs -Q, python
is not enabled as a babel language: you need to (require 'ox-python) somewhere.
Maybe I'm missing something but what's this patch supposed to do?

Nick



Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Bastien
Hi Andreas,

Andreas Röhler andreas.roeh...@easy-emacs.de writes:

 org-babel-execute-src-block: No org-babel-execute function for python!

 When evaluating the following block C-c C-c starting from emacs -Q

You need 

(org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)))

See (info (Org)Languages)

HTH,

-- 
 Bastien



Re: [O] Warning with latest git pull

2013-02-26 Thread Bastien
Hi Achim,

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

 The point of having the new macro is to avoid the question about
 reverting the file when the file visited by a buffer has been edited
 outside Emacs.  You can do exactly the same changes (cosmetic or not)
 with both macros, but org-unmodified will ask you when the file and the
 buffer have diverged due to the file changing outside Emacs.  You
 shouldn't do this of course unless you know with certainty that you are
 never going to save the file.  There's another difference between these
 two: org-unmodified does not let you change read-only buffers (I don't
 know if that's intentional or not).  With all this said, the
 compatibility part of org-with-silent-modifications can't simply be
 plugging in org-unmodified (this loses functionality that presumably was
 needed).  The change to make from the implementation I gave would be
 losing the let-bindings for buffer-file-name buffer-file-truename and
 perhaps inhibit-read-only.

I don't think Org should do better than Emacs wrt files that are
marked as unmodified while they have been edited outside Emacs.

In such cases, Emacs simply ignore external modifications when
saving, and warn the user before editing.  That's the same for
agenda files: you'll be warned before editing them (switching
a TODO, etc.) and not warned when saving unmodified Org agenda
files.

-- 
 Bastien



Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Bastien
Hi Myles,

Myles English mylesengl...@gmail.com writes:

 #+LATEX_HEADER: \usepackage{~/bug}

you want

#+LATEX_HEADER: \usepackage{/full/path/bug}

HTH,

-- 
 Bastien



[O] org-mode not working properly after update

2013-02-26 Thread Sanjib Sikder
Hi,

Org-mode is not working properly after I updated my Ubuntu 12.04
yesterday.  During the update, emacs also got updated. The .org files look
like plain text file, for example, no tree structure, no folding etc.

Please help.

-
*Sanjib Sikder
**
*


Re: [O] Bug: org-map-entries docstring

2013-02-26 Thread Bastien
Hi Christopher,

Christopher Schmidt christop...@ch.ristopher.com writes:

 C-h f org-map-entries RET

 The remaining args are treated as settings for the skipping
 facilities of the scanner.  The following items can be given here:

   archiveskip trees with the archive tag.
   commentskip trees with the COMMENT keyword
   function or Emacs Lisp form:
  will be used as value for `org-agenda-skip-function',
  so whenever the function returns t, FUNC will not be
  
  called for that entry and search will continue from the
  ^^^
  point where the function leaves it.
  ^^
 That is wrong.  Function must return a buffer position or nil.

Fixed, thanks.

-- 
 Bastien



Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Myles English

Bastien writes:

 Hi Myles,

 Myles English mylesengl...@gmail.com writes:

 #+LATEX_HEADER: \usepackage{~/bug}

 you want

 #+LATEX_HEADER: \usepackage{/full/path/bug}

I do use the full path but cut it down for the example, which was
incorrect, because it should have had a full path, so thanks for
pointing that out.

These fragments still don't work for me though.  Do they work for anyone
else apart from Nicolas?  I have done make clean and build, started with
emacs -Q, checked that the correct org library is found, I don't know
what else to try.

Myles



Re: [O] Add agenda entries into diary to export weelky calendar

2013-02-26 Thread Torsten Wagner
Hi Sakurai san,
CC: Hi David,

thanks a lot for the offer, I would need to check what was the specific
problem. Indeed I would love to use calfw if it can produce a printable
version.
Did you think about a PDF export via LaTeX?
I would be glad to help with this.

Actually, my idea was to get a print-out calendar of the past last week,
the current week and the next 2-3 weeks on a single double sided page. I
would print and fold this every week once, carry it around in my
money-wallet doing good old paper-pen organisation and transfer all the
handwritten stuff into org-mode as soon as I am sitting in front of my PC.

Furthermore, I would like to scan and file those printouts for archiving
purpose.

Finally, you might like to get in contact with the author of
org-caldav David Engster (I was so free to CC him this mail). Since he
should have a pretty good idea of caldav on emacs, it might be possible to
use calfw as caldav-client. This would allow to subscribe to calendars for
public holiday or of co-workers which do not use emacs. If I understood
calfw internal structure right, it would just require a calfw-caldav.el
extension.
I can see a lot of great synergetical effects for both projects and would
be glad if this stipulates both of you to think of e.g. certain hooks to
let both projects work seamlessly together.
E.g. calfw could be the frontend for a merge function of org-caldav showing
conflicting appointments.


Thanks a lot for the great projects.
ども ありがと ございます.

Torsten




On 26 February 2013 01:56, SAKURAI Masashi m.saku...@kiwanami.net wrote:

 Hi,

  Alternatives:
  I read about calfw and org2hpda. However, I did not found a way to
 generate a printable version of
  calfw (and I had trouble to set it up). For org2hpda I still struggle
 with the installation and it
  seems to be broken at the moment. Not sure.

 I'm an author of calfw. I would help you about calfw.

 After displaying your calfw buffer, you can get a HTML buffer
 with M-x htmlfontify-buffer.


 Regards,
 --
 SAKURAI, Masashi (family, given)
 m.saku...@kiwanami.net



Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Achim Gratz
Nicolas Goaziou n.goaziou at gmail.com writes:
 I'm not questioning the usefulness of the patch. I want to know if
 `org-latex--inline-image' is the appropriate function to provide that
 feature or if the feature should be provided through another function.
 
 In particular, `org-latex--inline-image' provide options to wrap the
 picture in wrapfigure environment, or to set width optional argument for
 includegraphics. If it doesn't make sense in this case, the code could
 as well be moved into another function, like `org-latex--input-file',
 which would handle options specific for \input.

1) I don't know offhand what wrapfigure does, but as long as it just manipulates
boxes, I think it should work just fine with tikz.

2) Since \input doesn't take any options, you can't give it any.  Such options
would have to be given to the tikzpicture environment, which is inside the file
you are trying to include.  You can however nest tikzpicutre environments and
have options transfer from the outside to the inside, so if somebody gives you
options, just wrap the input statement in another tikzpicture environment.  But
the options are very different from includegraphics.  Scaling a tikzpicture you
should manipulate its box (resizebox or scalebox), but you'll almost almost want
to set the canvas on the original tikzpicture to the correct size so that the
text stays a sensible size.

Rgards,
Achim.






Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Evan Misshula
Hi Myles,

I followed the directions.  I created bug.sty and minimal.el in the
same directory and it worked for me.

My ox.elc was in /home/evan/Documents/org/elisp/org-mode.
My bug.sty was in /home/evan/Documents/org/exporter
My minimal.el was in /home/evan/Documents/org/exporter
My bug.org was in /home/evan/Documents/org/exporter

I hope this helps.

Best,
Evan

On Tue, Feb 26, 2013 at 9:21 AM, Myles English mylesengl...@gmail.com wrote:

 Bastien writes:

 Hi Myles,

 Myles English mylesengl...@gmail.com writes:

 #+LATEX_HEADER: \usepackage{~/bug}

 you want

 #+LATEX_HEADER: \usepackage{/full/path/bug}

 I do use the full path but cut it down for the example, which was
 incorrect, because it should have had a full path, so thanks for
 pointing that out.

 These fragments still don't work for me though.  Do they work for anyone
 else apart from Nicolas?  I have done make clean and build, started with
 emacs -Q, checked that the correct org library is found, I don't know
 what else to try.

 Myles




-- 
Evan Misshula
Doctoral Student (Criminal Justice)
CUNY John Jay
Let us reform our schools, and we shall find little reform needed in
our prisons.
   John Ruskin, Unto This Last, essay 2 (1862)
   English critic, essayist,  reformer (1819 - 1900)

Instruction does much, but encouragement does everything. Johann
Wolfgang Von Goethe
www.snrg-nyc.org



Re: [O] orgstruct-mode with custom headline prefix

2013-02-26 Thread Stephen Eglen

 No, it is not.

Thanks Bastien for the explanation.  I can now get support for orgstruct
without setting outline-regexp, but in so doing I found an odd error.
I've sent Christopher a minimal example, but didn't send it to the list
as I wasn't sure about whether attachments could be sent to the list?

Stephen




Re: [O] Symbol's value as variable is void: org-babel-temp-file

2013-02-26 Thread Stephen Eglen
 git log | head -3
 commit 3a0e559ad976eaf8e6e6d4b304209d310e282a7d
 Author: Bastien Guerry b...@altern.org
 Date:   Sun Feb 24 19:42:12 2013 +0100
 

 FWIW, I'm on that commit and I don't see the problem.

Thanks Nick; based on your comments and Achim's other replies, I nuked
and reinstalled orgmode -- all working now.  

Thanks, and sorry for the noise!

S



Re: [O] org-mode not working properly after update

2013-02-26 Thread Daimrod
Sanjib Sikder sanjibju2...@gmail.com writes:

 Hi, 

Hi Sanjib,

 Org-mode is not working properly after I updated my Ubuntu 12.04
 yesterday. During the update, emacs also got updated. The .org files
 look like plain text file, for example, no tree structure, no folding
 etc.

Does `M-x org-mode RET' activate Org Mode after you've opened the file?
Do you have « (\\.org\\' . org-mode) » in auto-mode-alist? (check with
`C-h v auto-mode-alist RET')

-- 
Daimrod/Greg


pgpx8IeSCBN5j.pgp
Description: PGP signature


Re: [O] org-mode not working properly after update

2013-02-26 Thread Sebastien Vauban
Hi Sanjib,

Sanjib Sikder wrote:
 Org-mode is not working properly after I updated my Ubuntu 12.04
 yesterday.  During the update, emacs also got updated. The .org files look
 like plain text file, for example, no tree structure, no folding etc.

 Please help.

Could it be related to the bug I reported to Emacs this noon?

  ╭
  │ From: Sebastien Vauban wxhgmqzgw...@spammotel.com
  │ Subject: bug#13820: 24.3.50; Cannot switch to Org mode
  │ Newsgroups: gnu.emacs.bug
  │ To: 13...@debbugs.gnu.org
  │ Date: Tue, 26 Feb 2013 12:06:58 +0100 (4 hours, 8 minutes, 53 seconds ago)
  │ 
  │ Hello,
  │ 
  │ Opening any Org file (that I tried so far) leaves me in text mode.
  │ 
  │ Note -- I've mapped Org mode to the txt file extension.
  │ 
  │ The error displayed in the Messages buffer is:
  │ 
  │ File mode specification error: (wrong-type-argument symbolp (autoload 
org-agenda Activate appointments found in `org-agenda-files'.
  │ With a \\[universal-argument] prefix, refresh the list of
  │ appointments.
  │ 
  │ If FILTER is t, interactively prompt the user for a regular
  │ expression, and filter out entries that don't match it.
  │ 
  │ If FILTER is a string, use this string as a regular expression
  │ for filtering entries out.
  │ 
  │ If FILTER is a function, filter out entries against which
  │ calling the function returns nil.  This function takes one
  │ argument: an entry from `org-agenda-get-day-entries'.
  │ 
  │ FILTER can also be an alist with the car of each cell being
  │ either 'headline or 'category.  For example:
  │ 
  │   '((headline \IMPORTANT\)
  │ (category \Work\))
  │ 
  │ will only add headlines containing IMPORTANT or headlines
  │ belonging to the \Work\ category.
  │ 
  │ ARGS are symbols indicating what kind of entries to consider.
  │ By default `org-agenda-to-appt' will use :deadline, :scheduled
  │ and :timestamp entries.  See the docstring of `org-diary' for
  │ details and examples.
  │ 
  │ If an entry has a APPT_WARNTIME property, its value will be used
  │ to override `appt-message-warning-time'.
  │ 
  │ (fn optional REFRESH FILTER rest ARGS) t nil))
  │ 
  │ This problem does not show up with neither Emacs 24.2.91 nor Emacs 24.2.93,
  │ well with Emacs 24.3.50 (file emacs-trunk-r111822-20130217-w32-i386.zip,
  │ compiled by Dani, 9 days ago).
  │ 
  │ See a comparative demo between Emacs 24.2.91 (working) and Emacs 24.3.50
  │ (failing) on http://screencast.com/t/6QQN6t7qy.
  │ 
  │ In GNU Emacs 24.3.50.1 (i386-mingw-nt6.2.9200)
  │  of 2013-02-17 on VBOX-W7
  │ Bzr revision: 111822 r...@gnu.org-20130217190146-mm9bh3227ev56bus
  │ 
  │ -- 
  │ Sebastien Vauban
  ╰

And here's Bastien's answer on that:

  ╭
  │ From: Bastien b...@altern.org
  │ Subject: bug#13820: 24.3.50; Cannot switch to Org mode
  │ Newsgroups: gnu.emacs.bug
  │ To: Sebastien Vauban 
public-wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@plane.gmane.org
  │ Date: Tue, 26 Feb 2013 14:39:14 +0100 (1 hour, 36 minutes, 46 seconds ago)
  │ 
  │ Hi Sébastien,
  │ 
  │ Sebastien Vauban
  │ wxhgmqzgw...@spammotel.com writes:
  │ 
  │  File mode specification error: (wrong-type-argument symbolp
  │  (autoload org-agenda Activate appointments found in
  │  `org-agenda-files'.  With a \\[universal-argument] prefix, refresh
  │  the list of appointments.
  │ 
  │ This autoload should not be in org-agenda.el, I've removed it from
  │ Org's maint branch, which I will sync with Emacs emacs-24 branch
  │ tonight.
  │ 
  │ It will probably fix your problem.
  │ 
  │ -- 
  │  Bastien
  ╰

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] org-mode not working properly after update

2013-02-26 Thread Bastien
Hi Sanjib,

Daimrod daim...@gmail.com writes:

 Org-mode is not working properly after I updated my Ubuntu 12.04
 yesterday. During the update, emacs also got updated. The .org files
 look like plain text file, for example, no tree structure, no folding
 etc.

 Does `M-x org-mode RET' activate Org Mode after you've opened the file?
 Do you have « (\\.org\\' . org-mode) » in auto-mode-alist? (check with
 `C-h v auto-mode-alist RET')

And do not forget to give us the Emacs and Org versions

M-x emacs-version RET
M-x org-version RET

Thanks,

-- 
 Bastien



Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Myles English

Hi Evan,

Evan Misshula writes:

 I followed the directions.  I created bug.sty and minimal.el in the
 same directory and it worked for me.

 My ox.elc was in /home/evan/Documents/org/elisp/org-mode.
 My bug.sty was in /home/evan/Documents/org/exporter
 My minimal.el was in /home/evan/Documents/org/exporter
 My bug.org was in /home/evan/Documents/org/exporter

Thanks for checking it.  I found the problem but it is too embarrassing
to post here.

And thank you again to Nicolas for fixing it.

Myles




Re: [O] Bug: #+LANGUAGE: es doesn't run in org-export-as-pdf [7.8.11]

2013-02-26 Thread Bastien
Hi David,

davi...@es.gnu.org (David Arroyo Menéndez) writes:

 With #+LANGUAGE: es, doing org-export-as-pdf the dates and the contents is 
 being showed in
 english, but org-export-as-html appears in spanish.

For Org 7.8.11 you need this:

#+LaTeX_HEADER: \usepackage[spanish]{babel}

Thanks,

-- 
 Bastien



Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Ista Zahn
On Tue, Feb 26, 2013 at 10:42 AM, Andreas Röhler
andreas.roeh...@easy-emacs.de wrote:
 Am 26.02.2013 14:49, schrieb Bastien:

 Hi Andreas,

 Andreas Röhler andreas.roeh...@easy-emacs.de writes:

 org-babel-execute-src-block: No org-babel-execute function for python!

 When evaluating the following block C-c C-c starting from emacs -Q


 You need

 (org-babel-do-load-languages
   'org-babel-load-languages
   '((python . t)))

 See (info (Org)Languages)

 HTH,


 Bugs exists after loading that.

What is the nature of the bugs?

 Please tell if you need more info.

what is the result of 'M-x org-version'?

Also, try this simple test and report the results:
1. start emaces with emacs -q
2. visit a new file with a .org extension, e.g., tmp.org
3. paste this in:
8cut here8
Place cursor in the code block below and press C-c C-c

#+begin_src emacs-lisp :exports none
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((python . t)))
#+end_src

#+BEGIN_SRC python :results output
a = 5
b = 16
print(a + b)
#+END_SRC
8cut here8
4. place the cursor inside the first code block and press C-c C-c
5. place the cursor inside the second code block and press C-c C-c
6. let us know what happens

Best,
Ista



 Andreas




Re: [O] orgstruct-mode with custom headline prefix

2013-02-26 Thread Bastien
Stephen Eglen s.j.eg...@damtp.cam.ac.uk writes:

 Thanks Bastien for the explanation.  I can now get support for orgstruct
 without setting outline-regexp, but in so doing I found an odd error.
 I've sent Christopher a minimal example, but didn't send it to the list
 as I wasn't sure about whether attachments could be sent to the
 list?

Yes, you can send attachments to the list -- in general, please share
bugs publicly as much as possible, receiving private emails about bugs
is not encouraging for the maintainer (in this case Christopher) and
not useful for the other people on this list, as they cannot contribute
to debugging.

So, feel free to share attachments :)

-- 
 Bastien



Re: [O] CSS link in html export for v. 7.9.3e woes

2013-02-26 Thread Mike McLean
On Monday, February 25, 2013, Sebastien Vauban wrote:

 Hi Daniel,

 Daniel Hawthorne wrote:
  Greetings,
   After updating to 7.9.3e, I no longer am able to include a
 stylesheet
  link with the following syntax:
 
  #+STYLE: link rel=stylesheet type=text/css
  href=../relative/path/to/mystyle.css/
 
  If I go back to my previous version, it works as expected. It is not a
 path
  issue; On the resulting site, it never tries to load the stylesheet. The
  release notes do not mention anything that would lead me to believe that
  this should have changed. Suggestions welcome.

 I got into the same trouble days ago. Nicolas' answer was to use the new
 syntax therefore, that is:

   #+HTML_STYLE: ...


I've noticed an inconsistency with HTML_STYLE. When I have a few lines of
them in a common file, which I include in all of my Org documents via
#+SETUPFILE, they work fine. For some specific documents, I have a CSS
override, something I desire to look different for just that one documents.
Prior to the new exporter I simply added another #+HTML_STYLE line in the
file itself. The old exporter would add it after the lines from the
#+SETUPFILE and all would look correct. The new exporter skips any such
lines from the file while still including the ones from the common file.


Re: [O] org-mode not working properly after update

2013-02-26 Thread Sanjib Sikder
Hi,

Just now I noticed, the tree structure is working, but it is not hiding the
stars. All texts are black in color. The links are literal like following.

[[file:myfile.org][myfile]]


 Does `M-x org-mode RET' activate Org Mode after you've opened the file?

The above command does not improve the matter.

 Do you have « (\\.org\\' . org-mode) » in auto-mode-alist? (check with
 `C-h v auto-mode-alist RET')

The above command returned several lines. In one of the lines I found the
following
Value: ((\\.org$ . org-mode)

 M-x emacs-version RET
GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-02-25
on platinum, modified by Debian

M-x org-version RET
Org-mode version 7.9.3e (7.9.3e-3-gb07a9b @
/usr/share/emacs/24.3.50/lisp/org/)


@ Sebastien Vauban

I am not sure it is due to the reason you have mentioned or not.

Thanks

-
*Sanjib Sikder
**

*


Re: [O] Org-mode Talk in German

2013-02-26 Thread Bastien
Hi Florian,

thanks for the in-depth presentation -- I need to practice
my german, but Google translate helped a bit.

I added the presentation on the website:
  http://orgmode.org/talks.html

Best,

-- 
 Bastien



Re: [O] org-meta-return

2013-02-26 Thread Eric S Fraga
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Eric,


[...]

 Quite a bit OT, but is it true that, for example, to type `C-whatever', we
 should use both hands, one for `C' and the other for `whatever'?

Hi Seb,

Yes, just as one should do with the shift key.  However, the problem
with C- is that the right control key is in random locations...  I
should add that I always remap the CAPS lock to be my left Control key.

This whole topic may look like it is indeed OT (sorry!) but it is
actually quite relevant for org in that many key sequences are C- and M-
based, not to mention M-S-...  Okay, maybe this is an emacs issue rather
than just org alone.

Luckily, for me, I have been able to remap the majority of the ones I
use (not that many) to single key strokes in evil's [1] /normal/ state
including  and  for org-metaleft and org-metaright.  Prior to my using
evil full time, I made extensive use of the speek keys in org.

And, using evil mode allows me to use org more capably when on a TTY
interface, e.g. via ssh from my phone where M- is impossible and even
some S- keystrokes are inaccessible.


Footnotes: 
[1]  git://gitorious.org/evil/evil.git

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55




Re: [O] [Bug] Export Coding System

2013-02-26 Thread Achim Gratz
Achim Gratz writes:
 I've just had a chance to test this on the system where the problem originally
 showed up (Cygwin with the current 24.3 pre-release).  On this system, the
 buffer-file-coding-system is not copied and the (wrong) default takes over
 again.  I'm puzzled, I can't see how this happens...

Also tested it with NT-Emacs on the same system and it also doesn't copy
all variables to the export buffer.  I can't find anything wrong with
the macro, however, if I run the code there directly it works.


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

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada




Re: [O] orgstruct-mode with custom headline prefix

2013-02-26 Thread Stephen Eglen

 Yes, you can send attachments to the list -- in general, please share
 bugs publicly as much as possible, receiving private emails about bugs
 is not encouraging for the maintainer (in this case Christopher) and
 not useful for the other people on this list, as they cannot contribute
 to debugging.

 So, feel free to share attachments :)

Thanks Bastien; as you'll see, in the meantime Christopher already fixed
this issue in master.  Next time, I'll keep it on the list!

Stephen




Re: [O] org-cycle hook recenter question

2013-02-26 Thread Samuel Wales
On 2/26/13, Bastien b...@altern.org wrote:
 This is the infamous meaningless ellipses at the top of the buffer
 problem.

 ... which should now be fixed.

Thank you very much!

Unfortunately, the bug is still there for the isearch case.  Can't
make an ECM now.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] hiding footnotes

2013-02-26 Thread 42 147
Set it to 20, thanks.

Hopefully I never need to hit the 26 limit.

2012/11/29 Nick Dokos nicholas.do...@hp.com

 42 147 aeus...@gmail.com wrote:

  Very nice.
 
  However, I'd like to write a function that toggles the color value
 (without
  recourse to the customize menu), since it would be useful to highlight
 the
  footnotes from time to time.
 

 Anything that can be done interactively can also be done
 programatically. You know what face you are dealing with, you can get
 its foreground color with face-foreground, and you can set it with
 set-face-attribute. A crude implementation to show the basic outline:

 --8---cut here---start-8---
 (setq org-footnote-fg-color (face-foreground 'org-footnote))

 (setq org-text-fg-color (face-foreground 'default))

 (defun my-toggle-footnote-fg-color ()
   Toggle the org-footnote face foreground color.
   (interactive)
   (let ((fg (face-foreground 'org-footnote)))
 (if (string-equal fg org-footnote-fg-color)
 (set-face-attribute 'org-footnote nil :foreground
 org-text-fg-color)
   (set-face-attribute 'org-footnote nil :foreground
 org-footnote-fg-color
 --8---cut here---end---8---

 The difficulties start (but do not end) with footnotes in all sorts of
 weird places (e.g. headlines) with all sorts of different
 fontifications. You'd want to blend the footnote with its immediate
 surroundings.

 Taking care of such situations (and various others that the above code
 mishandles) is left as an exercise...

 Nick



Re: [O] hiding footnotes

2013-02-26 Thread 42 147
Oops, wrong thread.

2013/2/26 42 147 aeus...@gmail.com

 Set it to 20, thanks.

 Hopefully I never need to hit the 26 limit.


 2012/11/29 Nick Dokos nicholas.do...@hp.com

 42 147 aeus...@gmail.com wrote:

  Very nice.
 
  However, I'd like to write a function that toggles the color value
 (without
  recourse to the customize menu), since it would be useful to highlight
 the
  footnotes from time to time.
 

 Anything that can be done interactively can also be done
 programatically. You know what face you are dealing with, you can get
 its foreground color with face-foreground, and you can set it with
 set-face-attribute. A crude implementation to show the basic outline:

 --8---cut here---start-8---
 (setq org-footnote-fg-color (face-foreground 'org-footnote))

 (setq org-text-fg-color (face-foreground 'default))

 (defun my-toggle-footnote-fg-color ()
   Toggle the org-footnote face foreground color.
   (interactive)
   (let ((fg (face-foreground 'org-footnote)))
 (if (string-equal fg org-footnote-fg-color)
 (set-face-attribute 'org-footnote nil :foreground
 org-text-fg-color)
   (set-face-attribute 'org-footnote nil :foreground
 org-footnote-fg-color
 --8---cut here---end---8---

 The difficulties start (but do not end) with footnotes in all sorts of
 weird places (e.g. headlines) with all sorts of different
 fontifications. You'd want to blend the footnote with its immediate
 surroundings.

 Taking care of such situations (and various others that the above code
 mishandles) is left as an exercise...

 Nick





Re: [O] apparent limit to headline nesting

2013-02-26 Thread 42 147
Set it to 20, thanks.

Hopefully I never need to hit the 26 limit.

2013/2/24 Nick Dokos nicholas.do...@hp.com

 42 147 aeus...@gmail.com wrote:

 
  I'm unable to go past 14 levels in.
 
  ** Headline 14 levels in.
  *** Headline 15 levels in.
 
  I can't fold Headline 15 into Headline 14.
 
 

 You are probably hitting org-inlinetask-min-level (15 by default).

 Nick



Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Achim Gratz
Aaron Ecay writes:
 Tikz graphics should be exported to LaTeX by \include, not as a link.
 This commit changes the file extension used for tikz graphics from .tex
 to .tikz.

Thank you, this works nicely.  Instead of dropping the options you might
want to consider wrapping another tikzpicture environment around the
\input statement and applying any options there.


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

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] [PATCH] ox-latex: provide width and height options for images

2013-02-26 Thread Aaron Ecay
These are implemented with \resizebox, and thus are uniform across
different types of image inclusion (\includegraphics, \input of tikz
images).  This differs from the older way of using width and height
optional args to \includegraphics.

Thus, the default value for org-latex-image-default-options is left
untouched, to avoid breaking compatibility with older code.  After a
transition period, the 0.9\linewidth value should be moved into
org-latex-image-default-width, and the -options variable set to the
empty string.

Also introduce a convenience function to org-macs.el.
---
 lisp/org-macs.el |  7 +++
 lisp/ox-latex.el | 29 ++---
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 172d5d1..3fe62cd 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -87,6 +87,13 @@
 Otherwise return nil.
   (and v (not (equal v nil)) v))
 
+(defun org-not-nil-or-empty (v)
+  Return V if V is not nil, the string \nil\, or a string
+consisting of solely whitespace.  Otherwise return nil.
+  (and (org-not-nil v)
+   (org-string-nw-p v)
+   v))
+
 (defun org-substitute-posix-classes (re)
   Substitute posix classes in regular expression RE.
   (let ((ss re))
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 13da3f0..d1f47b8 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -471,11 +471,24 @@ which format headlines like for Org version prior to 8.0.
 
  Links
 
+;;; NOTE: this variable is for backwards compatibility; eventually the
+;;; width setting should be moved to the default-width variable, and
+;;; this set to the empty string.
 (defcustom org-latex-image-default-option width=.9\\linewidth
   Default option for images.
   :group 'org-export-latex
   :type 'string)
 
+(defcustom org-latex-image-default-width 
+  Default option for images.
+  :group 'org-export-latex
+  :type 'string)
+
+(defcustom org-latex-image-default-height 
+  Default option for images.
+  :group 'org-export-latex
+  :type 'string)
+
 (defcustom org-latex-default-figure-position htb
   Default position for latex figures.
   :group 'org-export-latex
@@ -1755,6 +1768,15 @@ used as a communication channel.
   (format [%s] org-latex-default-figure-position))
  (t 
 (comment-include (if (plist-get attr :comment-include) % ))
+;; It is possible to specify width and height in the
+;; ATTR_LATEX line, and also via default variables.
+(width (format %s (or (plist-get attr :width)
+org-latex-image-default-width)))
+(height (format %s (or (plist-get attr :height)
+ org-latex-image-default-height)))
+(resize (format \\resizebox{%s}{%s}{%%s}
+(if (org-not-nil-or-empty width) width !)
+(if (org-not-nil-or-empty height) height !)))
 ;; Options for includegraphics macro. Make sure it is
 ;; a string with square brackets when non empty.  Default to
 ;; `org-latex-image-default-option' when possible.
@@ -1766,9 +1788,10 @@ used as a communication channel.
  ((eq float 'float) [width=0.7\\textwidth])
  ((eq float 'wrap) [width=0.48\\textwidth])
  (t 
-(image-code (if (equal filetype tikz)
-(format \\input{%s} path)
-  (format \\includegraphics%s{%s} options path
+(image-code (format resize
+(if (equal filetype tikz)
+(format \\input{%s} path)
+  (format \\includegraphics%s{%s} options 
path)
 ;; Return proper string, depending on FLOAT.
 (case float
   (wrap (format \\begin{wrapfigure}%s
-- 
1.8.1.4




Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Andreas Röhler

Am 26.02.2013 17:00, schrieb Ista Zahn:

On Tue, Feb 26, 2013 at 10:42 AM, Andreas Röhler
andreas.roeh...@easy-emacs.de wrote:

Am 26.02.2013 14:49, schrieb Bastien:


Hi Andreas,

Andreas Röhler andreas.roeh...@easy-emacs.de writes:


org-babel-execute-src-block: No org-babel-execute function for python!

When evaluating the following block C-c C-c starting from emacs -Q



You need

(org-babel-do-load-languages
   'org-babel-load-languages
   '((python . t)))

See (info (Org)Languages)

HTH,



Bugs exists after loading that.


What is the nature of the bugs?


Please tell if you need more info.


what is the result of 'M-x org-version'?

Also, try this simple test and report the results:
1. start emaces with emacs -q
2. visit a new file with a .org extension, e.g., tmp.org
3. paste this in:
8cut here8
Place cursor in the code block below and press C-c C-c

#+begin_src emacs-lisp :exports none
   (org-babel-do-load-languages
'org-babel-load-languages
'((python . t)))
#+end_src

#+BEGIN_SRC python :results output
a = 5
b = 16
print(a + b)
#+END_SRC
8cut here8
4. place the cursor inside the first code block and press C-c C-c
5. place the cursor inside the second code block and press C-c C-c
6. let us know what happens

Best,
Ista




Andreas





Hi Ista,

Org-mode version is 7.9.3e (7.9.3e-3-gb07a9b

i.e. loading current trunk.

When following your prescription, bug does not occur.

My from way to load languages was

  (org-babel-do-load-languages
   'org-babel-do-load-languages
   '(
 (sh . t)
 (python . t)
 ))

If I load this first, then your print-example shows error like indicated in 
subject line.

Something wrong with this code?

Thanks all,

Andreas



Re: [O] Exporter question

2013-02-26 Thread Aaron Ecay
2013ko otsailak 26an, Bastien-ek idatzi zuen:
 (Er.. org-toc.el should be trashed, it's 99% obsolete.)

It is?  I like its functionality and don’t know of any replacement...

-- 
Aaron Ecay



Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Thomas S. Dye
Andreas Röhler andreas.roeh...@easy-emacs.de writes:

 Hi Ista,

 Org-mode version is 7.9.3e (7.9.3e-3-gb07a9b

 i.e. loading current trunk.

 When following your prescription, bug does not occur.

 My from way to load languages was

   (org-babel-do-load-languages
'org-babel-do-load-languages
'(
  (sh . t)
  (python . t)
  ))

 If I load this first, then your print-example shows error like indicated in 
 subject line.

 Something wrong with this code?


I think it should be 'org-babel-load-languages instead of
'org-babel-do-load-languages. 

Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Org-mode Talk in German

2013-02-26 Thread Sebastien Vauban
Hi Florian,

Florian Adamsky wrote:
 mid last year, I held a talk about Emacs Org-mode at a small hacker
 conference in Germany called Gulaschprogrammiernacht (GPN12) with the
 title Emacs Org-mode - der hackbare Notizblock in Plaintext (engl.
 the hackable notepad in plain text).

 The organization of this event recorded my talk and uploaded it to
 YouTube [1]. Maybe this is a talk which can be added to the
 org-mode talks page. My slides are also online [2] if anyone is
 interested.

 [1] https://www.youtube.com/watch?v=mUSoo4UaKBo
 [2] http://florian.adamsky.it/research/talks/gpn12/GPN12-Emacs-Org-mode.pdf

Very, very nice slides[1]. I guess Beamer?  Coult it be Org beamer?

Anyway, is your source as well available?  I'd like to steal some styling
stuff (if permitted) ;-)

Best regards,
  Seb

[1] And nice font as well: which one is it?

-- 
Sebastien Vauban




[O] [PATCH] contrib/org-toc.el: add forward and back commands

2013-02-26 Thread Aaron Ecay
These commands navigate among siblings in the outline, and are bound to
the ‘f’ and ‘b’ keys.  Move the function for toggling toc-follow to ‘F’.
---

Bastien's comment about org-toc prompted me to send in this patch,
which I've been sitting on for a while.

 contrib/lisp/org-toc.el | 29 +
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/contrib/lisp/org-toc.el b/contrib/lisp/org-toc.el
index 83f7c29..7302a61 100644
--- a/contrib/lisp/org-toc.el
+++ b/contrib/lisp/org-toc.el
@@ -110,7 +110,7 @@ echo-area. The COLUMNS property is always exluded.
   (setq major-mode 'org-toc-mode))

 ;; toggle modes
-(define-key org-toc-mode-map f 'org-toc-follow-mode)
+(define-key org-toc-mode-map F 'org-toc-follow-mode)
 (define-key org-toc-mode-map S 'org-toc-show-subtree-mode)
 (define-key org-toc-mode-map s 'org-toc-store-config)
 (define-key org-toc-mode-map g 'org-toc-restore-config)
@@ -120,8 +120,10 @@ echo-area. The COLUMNS property is always exluded.
 ;; navigation keys
 (define-key org-toc-mode-map p 'org-toc-previous)
 (define-key org-toc-mode-map n 'org-toc-next)
-(define-key org-toc-mode-map [(left)] 'org-toc-previous)
-(define-key org-toc-mode-map [(right)] 'org-toc-next)
+(define-key org-toc-mode-map f 'org-toc-forward)
+(define-key org-toc-mode-map b 'org-toc-back)
+(define-key org-toc-mode-map [(left)] 'org-toc-back)
+(define-key org-toc-mode-map [(right)] 'org-toc-forward)
 (define-key org-toc-mode-map [(up)] 'org-toc-previous)
 (define-key org-toc-mode-map [(down)] 'org-toc-next)
 (define-key org-toc-mode-map 1 (lambda() (interactive) (org-toc-show 1 
(point
@@ -332,6 +334,24 @@ If DELETE is non-nil, delete other windows when in the Org 
buffer.
   (if org-toc-info-mode (org-toc-info))
   (if org-toc-follow-mode (org-toc-goto)))

+(defun org-toc-forward ()
+  Go to the next headline at the same level in the TOC.
+  (interactive)
+  (condition-case nil
+  (outline-forward-same-level 1)
+(error (message No next headline at this level.)))
+  (if org-toc-info-mode (org-toc-info))
+  (if org-toc-follow-mode (org-toc-goto)))
+
+(defun org-toc-back ()
+  Go to the previous headline at the same level in the TOC.
+  (interactive)
+  (condition-case nil
+  (outline-backward-same-level 1)
+(error (message No previous headline at this level.)))
+  (if org-toc-info-mode (org-toc-info))
+  (if org-toc-follow-mode (org-toc-goto)))
+
 (defun org-toc-quit ()
   Quit the current Org TOC buffer.
   (interactive)
@@ -462,12 +482,13 @@ status.
   (let ((st-start 0)
(help-message
 \[space\]   show heading \[1-4\] hide headlines 
below this level
-\[TAB\] jump to heading  \[f\]   toggle follow mode 
(currently %s)
+\[TAB\] jump to heading  \[F\]   toggle follow mode 
(currently %s)
 \[return\]  jump and delete others windows   \[i\]   toggle info mode 
(currently %s)
 \[S-TAB\]   cycle subtree (in Org)   \[S\]   toggle show subtree mode 
(currently %s)
 \[C-S-TAB\] global cycle (in Org)\[r\]   toggle recenter mode 
(currently %s)
 \[:\]   cycle subtree (in TOC)   \[c\]   toggle column view 
(currently %s)
 \[n/p\] next/previous heading\[s\]   save TOC configuration
+\[f/b\] next/previous heading of same level
 \[q\]   quit the TOC \[g\]   restore last TOC 
configuration))
 (while (string-match \\[[^]]+\\] help-message st-start)
   (add-text-properties (match-beginning 0)
--
1.8.1.4



Re: [O] BUG org-babel-execute-src-block: No org-babel-execute function for python!

2013-02-26 Thread Andreas Röhler

Am 26.02.2013 20:50, schrieb Thomas S. Dye:

Andreas Röhler andreas.roeh...@easy-emacs.de writes:


Hi Ista,

Org-mode version is 7.9.3e (7.9.3e-3-gb07a9b

i.e. loading current trunk.

When following your prescription, bug does not occur.

My from way to load languages was

   (org-babel-do-load-languages
'org-babel-do-load-languages
'(
  (sh . t)
  (python . t)
  ))

If I load this first, then your print-example shows error like indicated in 
subject line.

Something wrong with this code?



I think it should be 'org-babel-load-languages instead of
'org-babel-do-load-languages.

Tom



Argh, thanks. Sorry for the noice,

Andreas



[O] [PATCH] ob-core: do not ask for confirmation if cached value is current

2013-02-26 Thread Achim Gratz

Babel asks for confirmation to evaluate a source block even when it is
going to use the cached value.  This patch skips the superfluous
confirmation in that case (no evaluation takes place, the cached value
is used).

From da687f5a40767921c7f3f309eeda0cadb09f7116 Mon Sep 17 00:00:00 2001
From: Achim Gratz strom...@stromeko.de
Date: Tue, 26 Feb 2013 21:23:37 +0100
Subject: [PATCH] ob-core:  do not ask for confirmation if cached value is
 current
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/ob-core.el (org-babel-execute-src-block): Do not run
  `org-babel-confirm-evaluate´ if source block has a cache and the
  cache value is current (there is no evaluation involved in this
  case).
---
 lisp/ob-core.el | 30 --
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 3278bf9..573fa20 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -521,21 +521,23 @@ (defun org-babel-execute-src-block (optional arg info params)
 the header arguments specified at the front of the source code
 block.
   (interactive)
-  (let ((info (or info (org-babel-get-src-block-info
-(when (org-babel-confirm-evaluate
-	   (let ((i info))
-	 (setf (nth 2 i) (org-babel-merge-params (nth 2 info) params))
-	 i))
+  (let* ((info (or info (org-babel-get-src-block-info)))
+	 (params (if params
+		 (org-babel-process-params
+		  (org-babel-merge-params (nth 2 info) params))
+		   (nth 2 info)))
+	 (cache? (and (not arg) (cdr (assoc :cache params))
+		  (string= yes (cdr (assoc :cache params)
+	 (new-hash (when cache? (org-babel-sha1-hash info)))
+	 (old-hash (when cache? (org-babel-current-result-hash)))
+	 (cache-current? (and (not arg) new-hash (equal new-hash old-hash
+(when (or cache-current?
+	  (org-babel-confirm-evaluate
+	   (let ((i info))
+		 (setf (nth 2 i) (org-babel-merge-params (nth 2 info) params))
+		 i)))
   (let* ((lang (nth 0 info))
-	 (params (if params
-			 (org-babel-process-params
-			  (org-babel-merge-params (nth 2 info) params))
-		   (nth 2 info)))
-	 (cache? (and (not arg) (cdr (assoc :cache params))
-			  (string= yes (cdr (assoc :cache params)
 	 (result-params (cdr (assoc :result-params params)))
-	 (new-hash (when cache? (org-babel-sha1-hash info)))
-	 (old-hash (when cache? (org-babel-current-result-hash)))
 	 (body (setf (nth 1 info)
 			 (if (org-babel-noweb-p params :eval)
 			 (org-babel-expand-noweb-references info)
@@ -562,7 +564,7 @@ (defun org-babel-execute-src-block (optional arg info params)
 			  (funcall lang-check (symbol-name
 	   (cdr (assoc lang org-src-lang-modes
 			  (error No org-babel-execute function for %s! lang
-	  (if (and (not arg) new-hash (equal new-hash old-hash))
+	  (if cache-current?
 		  (save-excursion ;; return cached result
 		(goto-char (org-babel-where-is-src-block-result nil info))
 		(end-of-line 1) (forward-char 1)
-- 
1.8.1.4



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

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs


Re: [O] [Feature] Highlighting of timestamps

2013-02-26 Thread Bastien


Hi Sébastien,

Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 With recent versions of Org mode, the Highlighting of timestamps is not
 happening between the right positions anymore: it begins one character before
 the beginning of the timestamp, as you can see on
 http://screencast.com/t/llxtNT3m.

Fixed, thanks.

-- 
 Bastien




Re: [O] 5f095f5 is the first bad commit (for my use case)

2013-02-26 Thread Nicolas Goaziou


Hello,

Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 Since updating to latest Org this morning, I couldn't open anymore my file
 ~/org/work.org.

 Symptom?  Org-mode gets loaded, but buffer remains blank, and Emacs is
 (apparently) inflooping, with letting me stop it (with C-g).

 Solution?  Kill Emacs through the task manager, and bisect:

   ╭
   │ 5f095f59099e77eda5cf7cae64119f9f246c4c70 is the first bad commit
   │ commit 5f095f59099e77eda5cf7cae64119f9f246c4c70
   │ Author: Nicolas Goaziou 
 n.goaziou-re5jqeeqqe8avxtiumw...@public.gmane.org
   │ Date:   Sun Feb 10 00:07:48 2013 +0100
   │
   │ Fontify latex, entities and sub/superscript again
   │
   │ * lisp/org-faces.el (org-latex-and-related): Renamed from
   │   `org-latex-and-export-specials', which wasn't appropriate anymore.
   │ * lisp/org.el (org-highlight-latex-and-related,
   │   org-latex-and-related-regexp): New variables.
   │ (org-compute-latex-and-related-regexp, org-do-latex-and-related): New
   │ function, revived from a previous commit.
   │ (org-set-regexps-and-options, org-set-font-lock-defaults): Use new
   │ functions.
   ╰

 Now, having my Git tip on commit 3f95d81, everything's OK. I can work again,
 but the most difficult problem is that I don't see how to debug further the
 above problem.

 Any idea why this fails?

Probably an infloop, as you suggest. It would be great if you could
provide an ECM (even not M) for that problem. You can send it through
private mail if you want.

Also, what's your value for `org-highlight-latex-and-related'?


Regards,

-- 
Nicolas Goaziou




Re: [O] 5f095f5 is the first bad commit (for my use case)

2013-02-26 Thread Bastien


Hi Sébastien,

Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 Now, having my Git tip on commit 3f95d81, everything's OK. I can work again,
 but the most difficult problem is that I don't see how to debug further the
 above problem.

Is this with Emacs/24.2.91 on windows-nt?

Do you have this error with emacs -Q?

-- 
 Bastien




Re: [O] [patch] ox-koma-letter

2013-02-26 Thread Rasmus


 I have been working on extending the KOMA letter support in Org.  The
 backend is still rough and I would like to more stuff such as
 designing firstfood and firsthead with org elements (e.g. I use a
 tabularx for my firstfood with varioues stuff).
 
 I have changed the following objects:
 [...]
   3. Added from-bank, invoice and other keywords like that.  Still
  many to go, but some of them would probably need some thought.
  For instance firstfoot should work differently depending on
  whether it is given a NAMEd table or a string.  Any though? 
 [...]

 IMO your approach goes into a questionable direction here.  Following it
 we will end up defining the complete letterhead and letter layout by
 setting org-mode variables.  Wouldn't it be better to use Markus Kohm's
 concept of letter class options to set all the static stuff?

Potentially.  What do you mean by letter class options?  Are you
referring to customized LCO files or do you refer to e.g. customized
org-latex-classes?  

One reason for adopting such variables might be that it would, in a
very long run, allow for export into other formats that scrlttr2.

Even when using a dedicated LCO files and or org-latex-classes it
might be appropriate to overwrite variables.  

In any case I don't have a strong opinion on this issue and your
approach also makes sense.


   2. Added AFTER_CLOSING and AFTER_LETTER keywords for arbitrary code
  after \closing{.} and \end{letter}, respectively.
  [...]
  b. Would it be better to have a dedicated, say, PS and ENCL rather
 than the generic AFTER_CLOSING?
 I would opt for dedicated variables.

Fine by be..  At the very least these should come in the order that
they are specified in the document, I guess.  E.g. I should be able to
place ENCL before PS in the output, if I so desire.

For arbitrary code I find AFTER_CLOSING and AFTER_LETTER nice.
E.g. for pdfpages inclusions.

-- 
May contains speling mistake




Re: [O] org-cycle hook recenter question

2013-02-26 Thread Arun Persaud
On 02/26/2013 07:29 AM, Bastien wrote:
 Hi Samuel and all,
 
 Samuel Wales samolog...@gmail.com writes:
 
 This is the infamous meaningless ellipses at the top of the buffer
 problem.
 
 ... which should now be fixed.
 
 Thanks for confirming,

Thanks for fixing it! Just tested the latest git and the problem is gone.

Arun




Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Aaron Ecay
2013ko otsailak 26an, Nicolas Goaziou-ek idatzi zuen:
 
 I'm not questioning the usefulness of the patch. I want to know if
 `org-latex--inline-image' is the appropriate function to provide that
 feature or if the feature should be provided through another function.
 
 In particular, `org-latex--inline-image' provide options to wrap the
 picture in wrapfigure environment, or to set width optional argument
 for includegraphics. If it doesn't make sense in this case, the code
 could as well be moved into another function, like
 `org-latex--input-file', which would handle options specific for
 \input.

As Achim pointed out, it is useful to wrap the \input{...} in figure,
wrapfig, etc. environments.  For resizing, one needs to use a \resizebox
command or similar.  (Also as Achim pointed out.)

In the message with id 877gm98irg@gmail.com, you pointed out the
possibility to factor out :width (and presumably :height) from :options.
This is the logical thing to do in order to support resizing of tikz
images.  (Putting aside the issue of text sizes becoming too big or too
small – but this is also a problem for the resizing of non-tikz images,
of course.)

Thus, I’ve implemented this (patch to follow, on top of the tikz support
patch).

I decided to use \resizebox for all width and height-setting, instead of
trying to condition on whether we’re using \includegraphics or \input.
This means that the code in its purest form is backwards-incompatible
with old documents that might be using :options width=... to set the
width of images, since the width would be set twice (once explicitly by
the options, once by default in the \resizebox).

I’ve thus left the default value of the org-latex-image-default-option
variable alone.  It should eventually be changed to move the width
setting to org-latex-image-default-width, but I’m not sure how long we
want the grace period to be.  (Maybe it should be short, since the new
exporter already introduced some incompatibilities).

People who want to do things the new way should set ...-default-option
to “” (or some value not making reference to width) and
...-default-width to “0.9\linewidth” in their initialization file.

(It’s possible to try to code around the problem by detecting if
someone’s options have width= in them, etc. – but I couldn’t figure out
how to do so without having an ugly mess of code.)

WDYT?

-- 
Aaron Ecay



Re: [O] [new exporter][latex] does org-preview-latex-fragment use #+latex_header ?

2013-02-26 Thread Evan Misshula
If it would be helpful I can send a screen shot to anyone who wants one offlist.

Best,
Evan

On Tue, Feb 26, 2013 at 9:54 AM, Evan Misshula evanmissh...@gmail.com wrote:
 Hi Myles,

 I followed the directions.  I created bug.sty and minimal.el in the
 same directory and it worked for me.

 My ox.elc was in /home/evan/Documents/org/elisp/org-mode.
 My bug.sty was in /home/evan/Documents/org/exporter
 My minimal.el was in /home/evan/Documents/org/exporter
 My bug.org was in /home/evan/Documents/org/exporter

 I hope this helps.

 Best,
 Evan

 On Tue, Feb 26, 2013 at 9:21 AM, Myles English mylesengl...@gmail.com wrote:

 Bastien writes:

 Hi Myles,

 Myles English mylesengl...@gmail.com writes:

 #+LATEX_HEADER: \usepackage{~/bug}

 you want

 #+LATEX_HEADER: \usepackage{/full/path/bug}

 I do use the full path but cut it down for the example, which was
 incorrect, because it should have had a full path, so thanks for
 pointing that out.

 These fragments still don't work for me though.  Do they work for anyone
 else apart from Nicolas?  I have done make clean and build, started with
 emacs -Q, checked that the correct org library is found, I don't know
 what else to try.

 Myles




 --
 Evan Misshula
 Doctoral Student (Criminal Justice)
 CUNY John Jay
 Let us reform our schools, and we shall find little reform needed in
 our prisons.
John Ruskin, Unto This Last, essay 2 (1862)
English critic, essayist,  reformer (1819 - 1900)

 Instruction does much, but encouragement does everything. Johann
 Wolfgang Von Goethe
 www.snrg-nyc.org



-- 
Evan Misshula
Doctoral Student (Criminal Justice)
CUNY John Jay
Let us reform our schools, and we shall find little reform needed in
our prisons.
   John Ruskin, Unto This Last, essay 2 (1862)
   English critic, essayist,  reformer (1819 - 1900)

Instruction does much, but encouragement does everything. Johann
Wolfgang Von Goethe
www.snrg-nyc.org



Re: [O] [PATCH] ob-R.el, ox-latex.el: support for tikz graphics

2013-02-26 Thread Aaron Ecay
2013ko otsailak 26an, Achim Gratz-ek idatzi zuen:

 Thank you, this works nicely.  Instead of dropping the options you
 might want to consider wrapping another tikzpicture environment around
 the \input statement and applying any options there.
 


This is a good idea.  To avoid a proliferation of patches, I will wait
to see what Nicolas and others think of the patch to separate handling
of :width and :height from :options.  Then I will send a new patch with
the original change, the :width/:height thing, and this idea about
:options all squashed together.

-- 
Aaron Ecay



Re: [O] [PATCH] contrib/org-toc.el: add forward and back commands

2013-02-26 Thread Bastien
Hi Aaron,

Aaron Ecay aarone...@gmail.com writes:

 These commands navigate among siblings in the outline, and are bound to
 the ‘f’ and ‘b’ keys.  Move the function for toggling toc-follow to ‘F’.
 ---

 Bastien's comment about org-toc prompted me to send in this patch,
 which I've been sitting on for a while.

Applied, thanks!  Please feel free to take over maintainership
of org-toc.el, I'm glad it's still useful.

-- 
 Bastien



Re: [O] org-cycle hook recenter question

2013-02-26 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 On 2/26/13, Bastien b...@altern.org wrote:
 This is the infamous meaningless ellipses at the top of the buffer
 problem.

 ... which should now be fixed.

 Thank you very much!

 Unfortunately, the bug is still there for the isearch case.  Can't
 make an ECM now.

I fixed this one too.  Thanks for your patience,

-- 
 Bastien



Re: [O] CSS link in html export for v. 7.9.3e woes

2013-02-26 Thread Nicolas Goaziou
Hello,

Mike McLean mike.mcl...@pobox.com writes:

 I've noticed an inconsistency with HTML_STYLE. When I have a few lines of
 them in a common file, which I include in all of my Org documents via
 #+SETUPFILE, they work fine. For some specific documents, I have a CSS
 override, something I desire to look different for just that one documents.
 Prior to the new exporter I simply added another #+HTML_STYLE line in the
 file itself. The old exporter would add it after the lines from the
 #+SETUPFILE and all would look correct. The new exporter skips any such
 lines from the file while still including the ones from the common
 file.

I think I have fixed this. Could you confirm it?

If it still doesn't work, would you mind providing an ECM?

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-cycle hook recenter question

2013-02-26 Thread Samuel Wales
On 2/26/13, Bastien b...@altern.org wrote:
 I fixed this one too.  Thanks for your patience,

Greatly appreciated!  I have been trying to fix that for years.

Will test.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] new version of org-mew.el

2013-02-26 Thread Bastien
Hi Tokuya,

thanks a lot for all these enhancements!

Tokuya Kameshima kamet...@gmail.com writes:

 If this is fine, I would like Bastien to incorporate it to the git
 repo.

I applied this patch:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=7604fe1

I allowed myself to incorporate your workflow in the comment
section as I think it is useful for users.

Thanks!

-- 
 Bastien



Re: [O] footnotes export verbatim

2013-02-26 Thread Samuel Wales
On 2/25/13, Nicolas Goaziou n.goaz...@gmail.com wrote:
 I think we're not talking about the same thing. The fix allows empty
 lines in regular footnote definitions, not inline ones.

This thread's subject is inline footnotes, in which
paragraphs worked well for me in the old exporter and do not
work for me now.  So your reply made it seem like you had
fixed them.


 That hook function can be added in `org-export-before-parsing-hook'.

That doesn't seem to work for me.  After a great deal of
effort I came up with this:

  (add-hook 'org-export-before-parsing-hook
   'alpha-org-export-fix-inline-footnotes)
  (defun alpha-org-export-fix-inline-footnotes (_back-end)
Try to get paragraphs to work in inline footnotes
again.
;; this is both slow and buggy
;;
;; replace every set of blank lines in the buffer with
;; \par.  what i really want is to do so only in
;; footnotes and to not squeeze multiple blank lines.
;;
;; this merely does on whole buffer:
;; (while (re-search-forward from nil t)
;;   (replace-match to t))
(alpha-replace-re-in-buffer \\(\n[[:blank:]]*\\)*\n \npar\n)
(org-footnote-normalize)
(alpha-replace-re-in-buffer par \n))

I am past my limit.  It produces incorrect output:

  this should work without any problems.  this should work

   without any problems.[1] this should work without any
  problems.
   this should work without any problems.



  Footnotes
  _

  [1] this should work.

  *** test case
  this should work without any problems.  this should work
  without any problems.[2] this should work without any problems.
  this should work without any problems.

Samuel

-- 
The Kafka Pandemic: [http://thekafkapandemic.blogspot.com]

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Footnotes
_

[1] DEFINITION NOT FOUND.

[2] this should work.

  this should work.



[O] [PATCH] Update to slideshows for changed ox-html functions

2013-02-26 Thread Rick Frankel
Attached is a patch to fix a couple of bugs which slipped by during
the re-integration. Also, a fix for the renamed functions in ox-html.

rick
From daf83f8743cf512185e8ba2168571759bf51eac4 Mon Sep 17 00:00:00 2001
From: Rick Frankel em...@rickster.com
Date: Tue, 26 Feb 2013 14:26:27 -0500
Subject: [PATCH] Slideshow bugfixes and sync with ox-html function name
 changes.

* contrib/lisp/ox-deck.el: Default org-deck-directories to ./deck.js.
(org-deck-toc): Sync w/ ox-html name change (org-html--toc-text.)
(org-deck-inner-template): Remove duplicate toc generation code.
* contrib/lisp/ox-s5.el: Add inner template to fix duplicate content
  div error.
(org-s5-toc): Sync w/ ox-html name change (org-html--toc-text) and
make toc entries static since s5 doesn't support deep linking.
---
 contrib/lisp/ox-deck.el | 21 +++--
 contrib/lisp/ox-s5.el   | 35 ++-
 2 files changed, 37 insertions(+), 19 deletions(-)

diff --git a/contrib/lisp/ox-deck.el b/contrib/lisp/ox-deck.el
index a5327e9..5d25369 100644
--- a/contrib/lisp/ox-deck.el
+++ b/contrib/lisp/ox-deck.el
@@ -37,6 +37,7 @@
 ;; works (it is derived from ox-html.)
 
 (require 'ox-html)
+(eval-when-compile (require 'cl))
 
 (org-export-define-derived-backend deck html
   :menu-entry
@@ -62,9 +63,7 @@
(:deck-include-extensions DECK_INCLUDE_EXTENSIONS nil
  org-deck-include-extensions split)
(:deck-exclude-extensions DECK_EXCLUDE_EXTENSIONS nil
- org-deck-exclude-extensions split)
-   (:deck-directories DECK_DIRECTORIES nil
-  org-deck-directories split))
+ org-deck-exclude-extensions split))
   :translate-alist
   ((headline . org-deck-headline)
(inner-template . org-deck-inner-template)
@@ -76,7 +75,7 @@
   :tag Org Export DECK
   :group 'org-export-html)
 
-(defcustom org-deck-directories nil
+(defcustom org-deck-directories '(./deck.js)
   Directories to search for deck.js components (jquery,
 modernizr; core, extensions and themes directories.)
   :group 'org-export-deck
@@ -250,7 +249,7 @@ Note that the wrapper div must include the class \slide\.
div id=\table-of-contents\ class=\slide\\n
(format h2%s/h2\n
(org-html--translate Table of Contents info))
-   (org-html-toc-text
+   (org-html--toc-text
 (mapcar
  (lambda (headline)
(let* ((class (org-element-property :HTML_CONTAINER_CLASS headline))
@@ -269,7 +268,7 @@ Note that the wrapper div must include the class \slide\.
  /?a[^]* 
  (org-export-data
   (org-element-property :title headline) info)
- (list
+ (cons
   (if (and class (string-match-p \\slide\\ class))
   (format
a href='#outline-container-%s'%s/a
@@ -319,17 +318,11 @@ Note that the wrapper div must include the class 
\slide\.
 (list :scripts (nreverse scripts) :sheets (nreverse sheets)
   :snippets snippets)))
 
-(defun org-html-inner-template (contents info)
+(defun org-deck-inner-template (contents info)
   Return body of document string after HTML conversion.
 CONTENTS is the transcoded contents string.  INFO is a plist
 holding export options.
-  (concat
-   ;; Table of contents.
-   (let ((depth (plist-get info :with-toc)))
- (when depth (org-deck-toc depth info)))
-   ;; Document contents.
-   contents
-   \n))
+  (concat contents \n))
 
 (defun org-deck-headline (headline contents info)
   (let ((org-html-toplevel-hlevel 2)
diff --git a/contrib/lisp/ox-s5.el b/contrib/lisp/ox-s5.el
index 9b140c5..1e76324 100644
--- a/contrib/lisp/ox-s5.el
+++ b/contrib/lisp/ox-s5.el
@@ -74,6 +74,7 @@
   :translate-alist
   ((headline . org-s5-headline)
(plain-list . org-s5-plain-list)
+   (inner-template . org-s5-inner-template)
(template . org-s5-template)))
 
 (defgroup org-export-s5 nil
@@ -150,20 +151,37 @@ Note that the wrapper div must include the class 
\slide\.
   :type 'string)
 
 
+(defun org-s5--format-toc-headline (headline info)
+  Return an appropriate table of contents entry for HEADLINE.
+Note that (currently) the S5 exporter does not support deep links, 
+so the table of contents is not \active\.
+INFO is a plist used as a communication channel.
+  (let* ((headline-number (org-export-get-headline-number headline info))
+(section-number
+ (and (not (org-export-low-level-p headline info))
+  (org-export-numbered-headline-p headline info)
+  (concat (mapconcat 'number-to-string headline-number .) . )))
+(tags (and (eq (plist-get info :with-tags) t)
+   (org-export-get-tags headline info
+(concat section-number
+   (org-export-data
+(org-export-get-optional-title headline info) info)
+   (and tags nbsp;nbsp;nbsp;) (org-html--tags tags
+
 (defun org-s5-toc (depth info)
   (let* ((headlines (org-export-collect-headlines 

Re: [O] [PATCH] ox-latex: provide width and height options for images

2013-02-26 Thread Rasmus
Aaron Ecay aarone...@gmail.com writes:
 WDYT?
 [...]
 These are implemented with \resizebox, and thus are uniform across
 different types of image inclusion (\includegraphics, \input of tikz
 images).  This differs from the older way of using width and height
 optional args to \includegraphics.

I don't like it.  Why would we use resizebox rather than the the
arguments in includegraphics for pictures?  From a TeXnish perspective
it seems wrong and inelegant to me (totally subjective).

For tikz figures resizing should be done via the scale argument to
preserve the right font sizes.  If people want to resize a tikz figure
they should do so in their tikz code. 

That being said, better tikz handling in Org is a wonderful idea.

–Rasmus

-- 
Need more coffee. . .




Re: [O] Exporter question

2013-02-26 Thread Nicolas Goaziou
Hello,

Bastien b...@altern.org writes:

 Hi Nicolas,

 Nicolas Goaziou n.goaz...@gmail.com writes:

 Has it to be an export only property? I mean, it could be used in
 a library like org-toc.el.

 (Er.. org-toc.el should be trashed, it's 99% obsolete.)

 Also EXPORT_KEYWORD prefix is mostly used when there is a global
 #+KEYWORD: available. There is no #+ALT_TITLE: (yet?).

 So, what about ALT_TITLE instead?

 I like it better, yes.

Done.

Node property is ALT_TITLE and function is `org-export-get-alt-title'.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Update to slideshows for changed ox-html functions

2013-02-26 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 Attached is a patch to fix a couple of bugs which slipped by during
 the re-integration. Also, a fix for the renamed functions in ox-html.

Applied. Thank you.

I renamed `org-export-get-optional-title' into
`org-export-get-alt-title'.


Regards,

-- 
Nicolas Goaziou



Re: [O] footnotes export verbatim

2013-02-26 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 That doesn't seem to work for me.  After a great deal of
 effort I came up with this:

   (add-hook 'org-export-before-parsing-hook
'alpha-org-export-fix-inline-footnotes)
   (defun alpha-org-export-fix-inline-footnotes (_back-end)
 Try to get paragraphs to work in inline footnotes
 again.
 ;; this is both slow and buggy
 ;;
 ;; replace every set of blank lines in the buffer with
 ;; \par.  what i really want is to do so only in
 ;; footnotes and to not squeeze multiple blank lines.
 ;;
 ;; this merely does on whole buffer:
 ;; (while (re-search-forward from nil t)
 ;;   (replace-match to t))
 (alpha-replace-re-in-buffer \\(\n[[:blank:]]*\\)*\n \npar\n)
 (org-footnote-normalize)
 (alpha-replace-re-in-buffer par \n))

Try the following:

#+begin_src emacs-lisp
(defun my-par-in-inline-fn (backend)
  (unless (org-export-derived-backend-p backend 'latex)
(let ((org-footnote-section My section))
  (org-footnote-normalize)
  (while (re-search-forward \\par\\s-* nil t)
(replace-match \n\n)

(add-hook 'org-export-before-parsing-hook 'my-par-in-inline-fn)
#+end_src


Regards,

-- 
Nicolas Goaziou



Re: [O] footnotes export verbatim

2013-02-26 Thread Nicolas Goaziou
Correcting myself:

 Try the following:

 #+begin_src emacs-lisp
 (defun my-par-in-inline-fn (backend)
   (unless (org-export-derived-backend-p backend 'latex)
 (let ((org-footnote-section My section))
   (org-footnote-normalize)
   (while (re-search-forward \\par\\s-* nil t)
 (replace-match \n\n)

 (add-hook 'org-export-before-parsing-hook 'my-par-in-inline-fn)
 #+end_src

This should be:

#+begin_src emacs-lisp
(defun my-par-in-inline-fn (backend)
  (unless (org-export-derived-backend-p backend 'latex)
(org-footnote-normalize)
(while (re-search-forward \\par\\s-* nil t)
  (replace-match \n\n

(add-hook 'org-export-before-parsing-hook 'my-par-in-inline-fn)
#+end_src


-- 
Nicolas Goaziou



Re: [O] footnotes export verbatim

2013-02-26 Thread Samuel Wales
That is better and almost usable now.

It exports My section in addition to  Footnotes.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



[O] [org-contacts] need help for making gnus/message-mode integration optional

2013-02-26 Thread Simon Campese
Hello,

I have one quick feature request for org-contacts.el that should be
pretty easy and quick to implement: Could someone please introduce
customizable variables to optionally disable the gnus/message mode
integration?  

I don't know a lot of elisp, so instead of copy-pasting my way to a
half-baked solution that would maybe not be accepted upstream, I thought
that asking the experts here is more appropriate.  

My reason for this request:
For email address completion in message mode, I use a program that scans
through my whole email database (I use notmuch to manage emails and have
all my mails stored locally). This program is stored in
'notmuch-address-command' and the integration has so far been done by
'notmuch-address'. However, the recent version of org-contacts breaks
this behaviour, i.e. I only get the emails from my org-contacts file
when I try to complete recipients. As I don't want to add all the people
I correspond with electronically to my org-contacts file, this is a huge  
annoyance.


Thank you very much,

Simon



[O] Bug: org-babel-tangle purges comma at the beginning of a line ]

2013-02-26 Thread Simon Campese
Hello,

I just noticed that org-babel-tangle removes the comma if its at the
beginning of a line inside a source block. This seems to be independent from the
language indicated (tried with sh, js and emacs-lisp) and also
independent from the characters that follow (',' gets tangled to a blank
line, ',,,' gets tangled to ',,', ',sometext' gets tangled to 'sometext'
etc.).


Best,

Simon

Emacs  : GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4) 
 of 2013-01-20 on eric
Package: Org-mode version 7.9.3e (7.9.3e-1122-g27da9a @ mixed
 installation! ~/.emacs.d/el-get/org-mode/contrib/lisp/ and
 ~/.emacs.d/el-get/org-mode/lisp/) 




Re: [O] [PATCH] ox-latex: provide width and height options for images

2013-02-26 Thread Aaron Ecay
2013ko otsailak 26an, Rasmus-ek idatzi zuen:
 I don't like it.  Why would we use resizebox rather than the the
 arguments in includegraphics for pictures?

Because it achieves the same result, but allows the operation to be more
uniform from the org side of things.  A \resizebox is something that org
can stuff any image into and have it be resized, so org doesn’t have to
deal with the different ways of resizing things.

One thing that might be suspected is that passing the width and height
to \includegraphics would allow it to scale down an image that is
included at less than 100% size, shrinking the resultant pdf.  But this
is not what happens (at least for jpg images), in my testing.

 For tikz figures resizing should be done via the scale argument to
 preserve the right font sizes.  If people want to resize a tikz figure
 they should do so in their tikz code.

There’s two ways of resizing tikz images: rescaling the distances
between things and leaving the text alone, or resizing the whole image
including the text.  This supports the latter.  Achim’s suggestion about
nested tikzpicture environments (which I intend to implement) takes care
of the former.

-- 
Aaron Ecay



[O] logdone enhancement

2013-02-26 Thread Arun Persaud
Hello

if I have something like the following

#+STARTUP: logdone

* project
** TODO headline :repeat:
   a longer description of what the todo item is about
   SCHEDULED: 2013-06-18 Tue +1m
   - State DONE   from WAITING[2013-02-26 Tue 21:56]
   - State DONE   from WAITING[2013-01-14 Mon 18:18]
   - State DONE   from WAITING[2012-09-30 Sun 19:36]
   - State DONE   from WAITING[2012-09-02 Sun 10:28]
   - State DONE   from WAITING[2012-06-28 Thu 11:08]
   - State DONE   from WAITING[2012-05-07 Mon 10:56]


and then cycle through the TODO states the new '- State Done...'
message shows up between the headline and the description. Is there a
way to always add the new line after the SCHEDULED or perhaps better
before the first log-message in the task? That way they could be kept
easily at any position in the task.

Thanks

Arun



  1   2   >