Re: [O] [ODT] image scaling overridden by long caption

2012-01-21 Thread Andreas Leha
Jambunathan K kjambunat...@gmail.com writes:

 Hello Andreas

 Hi all,

 I experience unexpected behaviour with the excellent odt exporter in case of
 included images.
 When I add a #+caption the text width of that caption overrides the
 specified image width (#ATTR_ODT: :witdh X), which I use to downscale
 the image in the odt.
 Especially if that caption will span across multiple lines, that effect
 is visible.

 Here is the example:

 ---
 * odt image test
   #+caption: foo
   #+ATTR_ODT: :width 8
   #+header: :file foo.png
   #+header: :width 3600 :height 3600 :res 600
   #+begin_src R :exports results :results graphics
 plot(1:100, 1:100)
   #+end_src
   #+caption: foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
 foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
 foo foo foo foo
   #+ATTR_ODT: :width 8
   #+header: :file foo.png
   #+header: :width 3600 :height 3600 :res 600
   #+begin_src R :exports results :results graphics
 plot(1:100, 1:100)
   #+end_src
 -


 I'd expect the image scaling to take place in either case.  Maybe even
 the caption should wrap at the specified width.

 I have pushed a fix for this. Hope the new behaviour is according to
 your expectation.


Thanks a lot, this works fine now!

But I experienced another issue with respect to images scaling in the odt
export:

This subtree:

 test.org ==
* Test image scaling in odt
#+caption: bar
#+label: fig:bar
#+name: bar
#+attr_odt: :width 8
#+header: :file bar.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src

#+caption: baz
#+label: fig:baz
#+name: baz
#+attr_odt: :scale 0.5
#+header: :file baz.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src
==

exports to this: http://i.imgur.com/sUHQi.png on my system.


 On a related note:  Could I place two (correctly scaled) images
 side-by-side?

 For the sake of record, your request is much similar to what is
 discussed here
 http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00780.html -
 save for (dynamically-generated) images taking the place of src blocks.

 Try something like this:

 #+begin_list-table
 - [[./foo1.png]]
   - [[./foo2.png]]
 #+end_list-table

 Make sure that the images are small images. If you replace the image
 links above with R srcblocks or attach caption/attr_odt to the above
 above images, the results are less than satisfactory. So the answer to
 your question is a soft no.

Thanks for this.  For two reasons that does not work for me:
(1) I want to use captions on my images
(2) it is odt-export specific


 Notes to self:

 There are multiple ways to achieve side-by-side effect.
 - use tables (aka list tables)
 - use 2-Column sections 
 - 2-column frames (what is this?)

 side-by-side has surfaced in the list for the second time, I think it
 deserves to be supported out of the box.

+1.  And ideally generic enough, s.t. also the LaTeX supports it.
Beamer has the concept of columns, which is nicely supported in org
mode.  Maybe that could be a general concept supported by all (or, most)
exporters?

- Andreas



 Jambunathan K.




[O] \ref{} in #+caption

2012-01-21 Thread Andreas Leha
Hi all,

is it possible to get \ref{} to work in #+caption lines generally?  As
it seems, the #+caption is not processed.  So the \ref{} statements in
#+captions work only in LaTeX export, where \ref{} is valid.  In the
#other exports, the \ref{} is exported literally.

Example:
=== test.org =
* Test ref in caption
#+caption: bar referencing \ref{fig:baz}
#+label: fig:bar
#+name: bar
#+attr_odt: :width 8
#+header: :file bar.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src

#+caption: baz
#+label: fig:baz
#+name: baz
#+attr_odt: :scale 0.5
#+header: :file baz.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src
==

Best,
Andreas




Re: [O] Organizing by time or by subject and an idea

2012-01-21 Thread Max Mikhanosha
At Sat, 21 Jan 2012 07:59:38 -0500,
Max Mikhanosha wrote:

 If you do this copy the project thing once a week or so, you can
 have a nice ediff of the project's progress along the time-line.
 
 Actually it may not be a bad idea to implement M-x
 org-ediff-subtree-with-sibling command, that would do that
 automatically, and would include the ediff hooks to do fold/reveal of
 regions

Expanding on that thought, if one were to write a contrib module to do
this type of stuff, maybe each time you want to make revision of a
project, you make a copy of it, and archive the old one. This way all
searches only find the most recent stuff. And then have M-x
org-ediff-subtree-with-archive command, which accepts numeric argument
being the N'th copy of the archived tree?



Re: [O] links to headline in LaTeX export

2012-01-21 Thread Alan Schmitt

On 20 Jan 2012, at 17:42, Alan Schmitt wrote:


On 20 Jan 2012, at 17:34, Thomas S. Dye wrote:

Hmmm, I can't reproduce your results on my setup.  What version of 
Org

mode are you using?


I'm using the one bundled with Aquamacs 2.4, which is 6.33x. Looking 
at the web site, I see that it's quite outdated. I'll try to update it 
this week-end and see if it fixes things.


I installed the current version from git, and everything work as 
expected. Sorry for the noise, and thank for the help.


Alan



Re: [O] [bug] Tables in lists not exported to ODT

2012-01-21 Thread Eric S Fraga
Achim Gratz strom...@nexgo.de writes:

 Eric S Fraga e.fr...@ucl.ac.uk writes:
 By the way, I was surprised, upon reading your comments in the git log,
 that OpenDocument doesn't support tables within lists.  This seems like

 a silly restriction?  Given that OpenDocument uses XML for its encoding,
 I would have thought that a hierarchical structure in a document would
 be trivial to represent.  Do you know what the reasoning was?  Just
 curious!

 You would have to read the DTD for OpenDocument, but I would guess that
 this is similar to the distinction between block-level and inline
 elements in XHTML.  In fact it is exactly the hierarchical nature of
 the definition that makes it possible to prevent the inclusion of higher
 level elements as sub-elements of their children.


 Regards,
 Achim.

Thanks.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.179.ge760)



Re: [O] Syntax error warnings? (Especially important with :noweb-ref's)

2012-01-21 Thread Yu
Hello again!

I thought about the *noweb* part again. I tried the following:

==
#+begin_src sh :tangle test.out :noweb tangle
  task1
  cat  test.org  test.out2
#+end_src

#+begin_src sh :noweb-ref task1
  echo hello world
#+end_src
==

The tangled output file test.out looked like this:
==
/bin/sh

echo hello world
cat  test.out2
==

i.e. the syntactically valid  test.org  construct was omitted.
Thus a separate syntax for forcing a literal  in the tangled
output is needed anyway (if not yet implemented) and if so, warning
about undefined code blocks should be possible too.

The big relevance of warning about undefined and never used code
blocks struck me, when recently I tried to use it again. The natural
work flow to me would have been to write something like

 : The task at hand has an overall structure
 : #+begin_src python :tangle foo.py :noweb tangle
 :   read the data
 :   generate derived information
 :   output the results
 : #+end_src

When proceeding after this however I would have to keep in mind open
tasks or (slightly better) to instantly create TODO sections for said
blocks. However, having this order of working imposed on me sort of
defeats the purpose for my understanding. I'd rather prefer to do an
`M-x org-babel-tangle' tell me, that I forgot to implement one of the
partial tasks, rather than having to find out missing code blocks from
the output file (where, as mentioned, they result in nothing rather
than an unresolved ... construct).

kind regards, Yu



2012/1/14 Eric Schulte eric.schu...@gmx.com:
 Yu yu_...@gmx.at writes:

 Hello!

 I was wondering, if there is a way to get warnings for typos (e.g.
 when specifying invalid properties or header arguments). It can just
 easily happen that I mix up e.g. :exports and :export (though
 that's probably a very harmless example).


 While there is currently no way to do this there are two related
 functions which should help.

 ,[org-babel-view-src-block-info] bound to C-c C-v I
 | org-babel-view-src-block-info is an interactive Lisp function in
 | `ob.el'.
 |
 | (org-babel-view-src-block-info)
 |
 | Display information on the current source block.
 | This includes header arguments, language and name, and is largely
 | a window into the `org-babel-get-src-block-info' function.
 `

 and

 ,[org-babel-check-src-block] bound to C-c C-v c
 | org-babel-check-src-block is an interactive Lisp function in `ob.el'.
 |
 | (org-babel-check-src-block)
 |
 | Check for misspelled header arguments in the current code block.
 `

 This problem is not trivial because new language are permitted to create
 and use *any* header arguments they like, so there are no /wrong/ header
 arguments, there are only /suspicious/ header arguments (like the
 :exports option you suggest).  The above function reports any suspicious
 header arguments.  Perhaps there would be a way to integrate the above
 function with flyspell for automatic highlighting of suspicious header
 arguments.  I'll put looking into such integration on my long-term Org
 task queue.


 More important it gets though, when trying to use the literate
 programming facilities.

 Say I have a source code

 #+begin_src sh :noweb tangle :tangle foo.sh
   foo
 #+end_src
 #+begin_src sh :noweb-ref fo
   echo '... how are you?';
 #+end_src

 then tangling would run through without any indication of the typo in
 the name of the foo block. Such errors might be hard to debug,
 because there is no indication of the error, maybe nothing other than
 runtime errors.

 An error message for the /use/ of undefined references only wouldn't
 avoid such problems either, e.g. consider

 #+begin_src sh :noweb tangle :tangle foo.sh
   foo
 #+end_src
 #+begin_src sh :noweb-ref foo
   echo 'Hello World...';
 #+end_src
 #+begin_src sh :noweb-ref fo
   echo 'Hello World...';
 #+end_src

 where the only detectable error is, that fo was never used anywhere.

 A similiar question (though without the second part) was asked here:
 http://lists.gnu.org/archive/html/emacs-orgmode/2009-11/msg00273.html
 As far as I can tell, it stands unanswered.


 Yes, although in many languages constructs like foo are valid code,
 so it would be inappropriate for tangling to raise errors by default.
 It is possible to turn on such errors on a language-by-language basis,
 by customizing the following variable.

 ,[org-babel-noweb-error-langs]
 | org-babel-noweb-error-langs is a variable defined in `ob.el'.
 | Its value is nil
 |
 | Documentation:
 | Languages for which Babel will raise literate programming errors.
 | List of languages for which errors should be raised when the
 | source code block satisfying a noweb reference in this language
 | can not be resolved.
 `


 On a side note: What is the customary way to mention the
 noweb-relevant name of a source block in the html/pdf export? 

[O] reveal the matches in grep-find or the diffs in ediff and hide the rest

2012-01-21 Thread Michael Brand
Hi all

On Sat, Jan 21, 2012 at 13:59, Max Mikhanosha m...@openchat.com wrote:
 Then use M-x ediff-buffers, and you can navigate changes easily by
 pressing n or p in ediff control panel. I just tried it out and it
 worked pretty good. Only thing that could have worked better, is to
 hook-up ediff with org-reveal or reveal-mode, so that it automatically
 folds all unchanged stuff, and only reveals text in the highlighted
 regions.

hook-up org-reveal when using grep-find or pressing n or p in ediff
control panel sounds like what I have been looking for for a long
time.

Is this documented? I couldn't find it in the Org manual, Emacs
manual, Worg or EmacsWiki. Just enabling reveal-mode before
ediff-buffers alone doesn't seem to do the trick. At least for
grep-find a C-c C-r on each match helps but it would be easier without
when stepping through, similar to M-x occur or
org-occur-in-agenda-files.

How can also drawers be revealed for org-occur etc?

Michael



Re: [O] reveal the matches in grep-find or the diffs in ediff and hide the rest

2012-01-21 Thread Max Mikhanosha
At Sat, 21 Jan 2012 16:24:12 +0100,
Michael Brand wrote:
 
 Hi all
 
 On Sat, Jan 21, 2012 at 13:59, Max Mikhanosha m...@openchat.com wrote:
  Then use M-x ediff-buffers, and you can navigate changes easily by
  pressing n or p in ediff control panel. I just tried it out and it
  worked pretty good. Only thing that could have worked better, is to
  hook-up ediff with org-reveal or reveal-mode, so that it automatically
  folds all unchanged stuff, and only reveals text in the highlighted
  regions.
 
 hook-up org-reveal when using grep-find or pressing n or p in ediff
 control panel sounds like what I have been looking for for a long
 time.
 
 Is this documented? I couldn't find it in the Org manual, Emacs
 manual, Worg or EmacsWiki. Just enabling reveal-mode before
 ediff-buffers alone doesn't seem to do the trick. At least for

No enabling reveal-mode did not worked for me either, that's why i
wrote the only thing that could have worked better.

reveal-mode actually works, if you C-x o from the Ediff control panel
buffer to one of the source buffers and then back again. So it
probably has a check inside of it, that only reveals if buffer is the
active one.

Should be possible to do some magics with defadvice to make it happen
regardless if buffer is current or not, if buffer is part of Ediff
session or some other special condition.



[O] Inconsistency in odt export to other exporters

2012-01-21 Thread Andreas Leha
Hi all,

there is an inconsistency of the odt exporter compared to the LaTeX and
the html export.

The following snippet exports correctly to LaTeX and to html, but
produces the text Figure Figure in odt.

Could the behaviour be synchronized?

=== example.org ==
* Test ref
#+caption: bar
#+label: fig:bar
#+name: bar
#+attr_odt: :width 8
#+header: :file bar.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src

Here is a reference to Figure \ref{fig:bar}
==

Best,
Andreas




Re: [O] links to headline in LaTeX export

2012-01-21 Thread Thomas S. Dye
Alan Schmitt alan.schm...@polytechnique.org writes:

 On 20 Jan 2012, at 17:42, Alan Schmitt wrote:

 On 20 Jan 2012, at 17:34, Thomas S. Dye wrote:

 Hmmm, I can't reproduce your results on my setup.  What version of
 Org
 mode are you using?

 I'm using the one bundled with Aquamacs 2.4, which is 6.33x. Looking
 at the web site, I see that it's quite outdated. I'll try to update
 it this week-end and see if it fixes things.

 I installed the current version from git, and everything work as
 expected. Sorry for the noise, and thank for the help.

 Alan


Glad to hear that you are up and running.  Welcome to the Org mode
community!

Regarding your interest in the LaTeX exporter, please be aware that an
experimental exporter is under development by Nicolas Goaziou.  One of
the design goals is to iron out differences in translations to different
targets (HTML, LaTeX, etc.).  I expect that this will make its way
steadily toward the Org mode core and that it will, in some cases,
change the current LaTeX export behavior.

All the best,
Tom

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



Re: [O] Capitalisation and good taste ?

2012-01-21 Thread Eric S Fraga
Bernt Hansen be...@norang.ca writes:


[...]

 I added the following to my .emacs to keep lowercase.

Thanks.  This is a great suggestion!  Two possible typos, by the way,
that would only affect you if you use muse tags:

 (v #+begin_verse\n?\n#+end_verse verse\n?\n/verse)
 (c #+begin_center\n?\n#+end_center center\n?\n/center)

Missing  for closing tag in each case, after last \n.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.179.ge760)



[O] [ANN] ASCII back-end for new export engine

2012-01-21 Thread Nicolas Goaziou
Hello,

I've commited an ASCII back-end for new export engine.

Assuming contrib directory is in your load-path, you just need to
(require 'org-export) to have both LaTeX and ASCII exporters ready to
boot.

You can then access to the dispatcher with M-x org-export-dispatch and
test various configurations from there.

As a reminder, you can ask for a table of contents, list of tables and
list of listings with, respectively, #+toc: headlines, #+toc: tables
and #+toc: listings. Also, drawers[1] are exported transparently by
default.

Feedback is welcome.


Regards,

[1] properties drawers excepted: those are different elements anyway.

-- 
Nicolas Goaziou



Re: [O] org-babel functions for Io evaluation

2012-01-21 Thread Andrzej Lichnerowicz
2012/1/21  emacs-orgmode-requ...@gnu.org:
 I would like to try it but am kind of put off by the absense of any kind
 of examples or tutorial on how it should be used. Usage example?

You use it with source blocks:

#+begin_src io :results output
Object slotNames sort print
#+end_src

or

#+begin_src io :results output repl
Object slotNames sort
#+end_src

then C-c C-c on the block, to execute it. The block containing an
output will be appended right after.
Sorry, my bad, I thought that's self explanatory. Other language
extensions do not contain any usage examples, so I didn't put them
either.


--a.



Re: [O] [ANN] ASCII back-end for new export engine

2012-01-21 Thread Samuel Wales
Hi Nicolas,

On 2012-01-21, Nicolas Goaziou n.goaz...@gmail.com wrote:
 You can then access to the dispatcher with M-x org-export-dispatch and
 test various configurations from there.

There is a problem with the dispatcher that prevents me from testing.
It exceeds 78 columns, but more importantly, it does not allow
scrolling.  My screen height is too small.  For an example of a menu
that is accessible, please see Magit's, which allow scrolling.  (I
realize this has nothing to do with your exporter.)  I can't tell if
c-c c-e A is yours or the old one.  Assuming it's yours, I am getting
a lot of:

ORG-BLOCKQUOTE-START

type things instead of indentation.

I like the way links are glossed at the end of each section instead of
the end of the whole subtree.  That is best.

I'd like it if the link were indented by 2 spaces underneath the
label, so it doesn't exceed the column.

 As a reminder, you can ask for a table of contents, list of tables and
 list of listings with, respectively, #+toc: headlines, #+toc: tables
 and #+toc: listings. Also, drawers[1] are exported transparently by
 default.

Great feature.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.



Re: [O] [ANN] ASCII back-end for new export engine

2012-01-21 Thread Samuel Wales
Two feature requests:

  1) optionally squeeze blank lines
  2) optionally unfill paragraphs

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.



Re: [O] Capitalisation and good taste ?

2012-01-21 Thread Bernt Hansen
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Bernt Hansen be...@norang.ca writes:


 [...]

 I added the following to my .emacs to keep lowercase.

 Thanks.  This is a great suggestion!  Two possible typos, by the way,
 that would only affect you if you use muse tags:

(v #+begin_verse\n?\n#+end_verse verse\n?\n/verse)
(c #+begin_center\n?\n#+end_center center\n?\n/center)

 Missing  for closing tag in each case, after last \n.

I just took the default setting and lowercased it without actually
looking closely at it -- so I think the problem is in the defcustom in
org.el for org-structure-template-alist too.

Regards,
Bernt



Re: [O] [ANN] ASCII back-end for new export engine

2012-01-21 Thread Nicolas Goaziou
Hello,

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

 There is a problem with the dispatcher that prevents me from testing.
 It exceeds 78 columns, 

[...]

No. The standard UI doesn't even exceed 60 columns. You must be using
something else.

 I can't tell if c-c c-e A is yours or the old one. Assuming it's
 yours

[...]

It's the old one.  There is no binding to access my dispatcher: just use
M-x org-export-dispatch.


Regards,

-- 
Nicolas Goaziou



[O] typo in doc/orgguide.texi

2012-01-21 Thread Guido Arnold
Hello,
please forgive me for not filing a proper bug report, I am not even a
org-mode user yet, but I am very interested. I just had a look at the quick
guide and found a typo in line 1908:
http://orgmode.org/w/?p=org-mode.git;a=blob;f=doc/orgguide.texi;h=0e6295a121a6ac0b2eb8738c1156f2672c24548d;hb=minted

s/will also works/will also work/
  ^
I hope someone with write privileges on this list can fix this.

Greetings,

Guido


Re: [O] [ANN] ASCII back-end for new export engine

2012-01-21 Thread Samuel Wales
In 22, latest git:

downcase: Args out of range: image-keep-calm, 651500, 651505

  match-string(1 image-keep-calm)
  (downcase (match-string 1 val))
  (concat :macro- (downcase (match-string 1 val)))
  (intern (concat :macro- (downcase ...)))
  (plist-put nil (intern (concat :macro- ...)) (match-string 2 val))
  (cond ((string= key SETUP_FILE) (let ... ...)) ((string= key
OPTIONS) (org-export-parse-option-keyword val backend)) ((string=
key MACRO) (string-match ^\\([-a-zA-Z0-9_]+\\)[  ]+\\(.*?[   ]*$\\)
val) (plist-put nil ... ...)))
  (org-combine-plists (cond (... ...) (... ...) (... ... ...)) plist)
  (setq plist (org-combine-plists (cond ... ... ...) plist))
  (let ((key ...) (val ...)) (setq plist (org-combine-plists ... plist)))
  (while (string-match special-re buffer-string start) (setq start
(match-end 0)) (let (... ...) (setq plist ...)))
  (let ((start 0) (special-re ...)) (while (string-match special-re
buffer-string start) (setq start ...) (let ... ...)))
  (let ((case-fold-search t) plist) (let (... ...) (while ... ...
...)) (let* (... ... ... ...) (while ... ... ...) (mapc ...
org-element-parsed-keywords)) plist)
  org-export-get-inbuffer-options(#(#-*- coding: utf-8 -*-
...

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
===
Bigotry against people with serious diseases is still bigotry.