Bug report: org-preview-latex fails when using tramp

2021-12-29 Thread Dov Grobgeld
Hello,

Since the instructions say that bugs should be reported on the mailing
list, I do so here.

When visiting a file by tramp over ssh, doing latex preview fails.

* Version

Tag 9.4.6 (commit:652430128)

* To reproduce:

Create the following org file:

#+begin_example
* Testing formulas
\[\xi^2+\chi^2\]
#+end_example

and invoke =org-latex-preview=.

The result is that org-latex preview fails finding the temporary tex file
(which was saved on the remote server)

#+begin_example
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded
format=latex)
 restricted \write18 enabled.
entering extended mode
! I can't find file `/tmp/orgtexq5rOVI.tex'.
<*> /tmp/orgtexq5rOVI.tex

(Press Enter to retry, or Control-D to exit)
Please type another input file name
! Emergency stop.
<*> /tmp/orgtexq5rOVI.tex

No pages of output.
Transcript written on /tmp//texput.log.
#+end_example


Regards,
Dov


Re: Newline woes when exporting to mediawiki markup

2021-06-01 Thread Dov Grobgeld
Thanks for the help. I now updated the function `org-mw-item` to:

(defun org-mw-item (item contents info)
  "Transcode ITEM element into Mediawiki format.
CONTENTS is the item contents.  INFO is a plist used as
a communication channel."
  (let* ((type (org-element-property :type (org-export-get-parent item)))
 (bullet (if (eq type 'ordered) ?# ?*))
 (the-item (org-trim contents))
 (level (- (/
 (length (org-element-map (org-element-lineage
item) 'plain-list
  #'identity info)) 2) 3)))
(progn
  (org-element-put-property item :post-blank 0)
  (format "%s %s" (make-string level bullet) the-item

With this change the following org input:
```
* A section
Here is a list of things

- An item
- Another item
- A subitem
- Another subitem
- Back to first
```

Is output as:
```
= A section =
Here is a list of things

* An item
* Another item

** A subitem
** Another subitem
* Back to first

```

This is close to the required result though there is still a redundant
empty line before "A subitem". How can  I get rid of it?

I also have no idea why I had to do the expression $level/2-3$ to get
the correct number of asterisks.

Another complication that I am currently ignoring is how to nest 
and  lists. But that's ok for now.

Thanks again!


On Tue, Jun 1, 2021 at 12:08 PM Nicolas Goaziou  wrote:
>
> Hello,
>
> Dov Grobgeld  writes:
>
> > I tried to modify ox-mediawiki.el to solve the following two issues:
> >
> > - Get rid of redundant newlines between exported list items
> > - Replicate the leading asterisk to reflect the indentation level of the
> > list.
> >
> > To get of the newline I tried to rewrite the org-export "item" translation
> > function `org-mw-item` but I would either get no newlines at all between my
> > items, or an extra newline between two subsequent items.
> >
> > I just noted that ox-mediawiki is derived from the html backend, so perhaps
> > the limitations are there.
> >
> > I would appreciate any guidance of how to fix this.
>
> It's difficult to answer since I know neither what you tried nor what is
> correct syntax, but I think asterisks could be obtained with
>
>   (let ((level
>  ;; Level can be seen as the number of parent plain lists.
>  (length (org-element-map (org-element-lineage item) 'plain-list
>#'identity info
> (make-string level ?*))
>
> To remove any newline, you may try
>
>   (org-element-put-property item :post-blank 0)
>
> prior to returning.
>
> Regards,
> --
> Nicolas Goaziou



Newline woes when exporting to mediawiki markup

2021-06-01 Thread Dov Grobgeld
Hello,

I've been trying to use the ox-mediawiki.el export option to export from
org mode to mediawiki mode.

Unfortunately the exporting does a poor job of exporting lists. E.g. the
following org mode source:

```
* A section
  - An item
  - Another item
- A subitem
- Another subitem
  - Back to first
```

is exported as:
```

= A section =
* An item

* Another item

  * A subitem

  * Another subitem

* Back to first

```
The expected is:
```
= A section =

* An item
* Another item
** A subitem
** Another subitem
* Back to first
```
I tried to modify ox-mediawiki.el to solve the following two issues:

- Get rid of redundant newlines between exported list items
- Replicate the leading asterisk to reflect the indentation level of the
list.

To get of the newline I tried to rewrite the org-export "item" translation
function `org-mw-item` but I would either get no newlines at all between my
items, or an extra newline between two subsequent items.

I just noted that ox-mediawiki is derived from the html backend, so perhaps
the limitations are there.

I would appreciate any guidance of how to fix this.

Thanks!


Re: spreadsheet formulas without a .

2020-08-24 Thread Dov Grobgeld
You can do the following:

#+TBLFM: $3=$1*$2;%.0f

Search for % at https://orgmode.org/manual/Formula-syntax-for-Calc.html .

Regards,

On Mon, Aug 24, 2020 at 12:03 PM Uwe Brauer  wrote:

>
> Hi
>
> Please look at
>
>
> | 20 | 0.9 | 18. |
> #+TBLFM: $3=$1*$2;f0
>
>
> I'd prefer to have the result 18, just written 18 and not 18.
>
> I can't the right format in the documentation.
>
> Thanks and regards
>
> Uwe Brauer
>
>
>


[O] Quoting a REPL session in an org document

2018-04-20 Thread Dov Grobgeld
Hello,

I wonder if there is a "standard" way of quoting a REPL session in an org
document. Right now I'm using #example, but I wonder if there is something
richer. The ideal would be to get something that is syntax aware so that
anything after the "prompt" is syntax highlighted.

Here is an example of a session that I would like to include literally in
my document:

$ ipython
Python 2.7.14 (default, Mar 14 2018, 13:36:31)
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
In [1]: import pandas as pd
In [2]: df = pd.read_csv('/tmp/foo.csv')
In [3]: df
Out[3]:
  Animal  WeightColor
0   Bear 200Brown
1Cat   5   Orange
2Dog  10  Black
In [4]:

I would e.g. like this to look as follows in the exported document (but
with colored selectable text, not through an image!):


​
Thanks in advance!
Dov


[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Dov Grobgeld
The correct Unicode≥6.3 way to do this would be with the unicode isolation
characters. I.e. you would wrap each of the columns with column
contents. Does emacs honor these? Should be easy to test.

Regards,
Dov

On Mon, Dec 4, 2017 at 9:27 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Eli Zaretskii <e...@gnu.org> writes:
>
> >> Date: Wed, 13 Jun 2012 22:26:35 +0300
> >> From: Dov Grobgeld <dov.grobg...@gmail.com>
> >>
> >> Imagine you have a buffer with the following logical contents (using the
> >> convention that capitals are RTL characters).
> >>
> >> | abcdef | abc |
> >> | ABCDEF | ABC |
> >>
> >> I would like this to be displayed as:
> >>
> >> | abcdef | abc |
> >> | FEDCBA | CBA |
> >>
> >> The problem is that I want to each column of the table to be isolated
> >> (with regards to bidi influence) from other columns in the table. (Of
> >> course we also want to choose the table direction, but that is a
> >> different and solvable issue.) If there is no such separation, which
> >> is the behaviour currently get in emacs HEAD, then the resulting
> >> rendered buffer is:
> >>
> >> | abcdef | abc |
> >> | CBA | FEDCBA |
> >>
> >> Is this even solvable in the current emacs bidi model?
> >
> > Yes, it is.  The solution involves putting segment separators between
> > the table columns.  These could be TAB characters or a display
> > property whose value is (space . :width N) or (space . :align-to COL).
> >
> > Org maintainers, please ask if you need help in fixing this.
>
> *raises a hand*
>
> I'd rather preserve structure of Org documents outside of Emacs. So,
> `:align-to' is not an option.
>
> IIUC, I need to replace the closest space from vertical bars with
>
>   #(" " 0 1 (space :width 1))
>
> This doesn't sound too difficult.
>
> However, could someone provide tests cases so we get it right once and
> for all?
>
> Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou0x80A93738
>


Re: [O] org-babel python eval discrepancy

2017-08-03 Thread Dov Grobgeld
Shell is using python3 and org-mode python2?

On Aug 3, 2017 8:31 PM, "Dushyant Juneja"  wrote:

> Hi,
>
> I have the following code block in my org mode based literate programming
> notes:
>
> #+BEGIN_SRC python
> print('1+2 > 4 is ', 1+2 > 4)
> print("What is 3 + 2?", 3 + 2)
> #+END_SRC
>
> When I tangle it and run the script, it gives me expected output as
> follows:
>
> > python notes.py
> 1+2 > 4 is  False
> What is 3 + 2? 5
>
> However, in buffer evaluation (using =C-c C-c= with cursor on src block)
> gives me the following output, which seems unexpected:
>
> #+BEGIN_SRC python
> print('1+2 > 4 is ', 1+2 > 4)
> print("What is 3 + 2?", 3 + 2)
> #+END_SRC
>
> #+RESULTS:
> : ('1+2 > 4 is ', False)
> : ('What is 3 + 2?', 5)
>
> Any hints what may be going wrong?
>
> Dushyant
>


[O] org-mode, file-link, tramp, and smb domain

2015-07-08 Thread Dov Grobgeld
Hello,

In tramp the syntax for specifying a domain in a smb link is by using a
percentage sign [1]

//smb:user%DOMAIN@host:D/path/

but when trying to use this together with the org-mode file: link the
result is that it changes %D to ^M (control-M). Similar results are gotten
with other characters after the percentage sign. (If the letter is not in
the hexadecimal range, ^@ (null) is received). Even %% does not escape the
percentage sign.

Is there any easy workaround?

Thanks!
Dov


[1]
http://www.gnu.org/software/emacs/manual/html_node/tramp/External-methods.html


Re: [O] Table with images export to LaTeX

2015-06-23 Thread Dov Grobgeld
Some further probing showed that it worked by me as well! But with one
LaTex related restriction that I missed. The included filename must *not*
include more than one period! In my original file I had part of the
experiment conditions encoded in the name, e..g. lc-p0.5.jpg . This works
fine in HTML but fails in LaTeX.

Running pdflatex on the tex file yields:

! LaTeX Error: Unknown graphics extension: .5.jpg .

The problem has nothing to do with the org exporting, and is a LaTeX
limitation that I can live with. Case closed. :-)

​Regards,
Dov​


On Tue, Jun 23, 2015 at 2:24 PM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

 On Tuesday, 23 Jun 2015 at 10:24, Dov Grobgeld wrote:
  I tried to export a table with four images to LaTeX, but got a big mess
 as
  a result. In contrast, the result in HTML export is fine. Has anyone had
  better experience and can recommend some remedy?

 Works for me with recent org.  What version of org are you using?  What
 is a /big mess/ more precisely?  It could be useful to post the bit of
 LaTeX generated for the table.

 How big are the images? Maybe set org-latex-image-default-width, for
 instance?  I often have something like this in documents where I am
 going to change the default image size for LaTeX export frequently:

 #+begin_src org
   # -*- org-export-allow-bind-keywords: t; -*-
   ,#+bind: org-latex-image-default-width 2cm
 #+end_src

 --
 : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org
 release_8.3beta-1231-ga0a883



Re: [O] Table with images export to LaTeX

2015-06-23 Thread Dov Grobgeld
Thanks. Indeed I am using an older version of org. Adding grffile to
org-latex-default-packages-alist solves the problem.

Regards,
Dov

On Tue, Jun 23, 2015 at 5:41 PM, Rasmus ras...@gmx.us wrote:

 Dov Grobgeld dov.grobg...@gmail.com writes:

  Running pdflatex on the tex file yields:
 
  ! LaTeX Error: Unknown graphics extension: .5.jpg .
 
  The problem has nothing to do with the org exporting, and is a LaTeX
  limitation that I can live with. Case closed. :-)

 This should not happen in a recent version of org 8.3 as grffile was added
 to org-default-packages-alist.

 Rasmus

 --
 Er du tosset for noge' lårt!





[O] Table with images export to LaTeX

2015-06-23 Thread Dov Grobgeld
I tried to export a table with four images to LaTeX, but got a big mess as
a result. In contrast, the result in HTML export is fine. Has anyone had
better experience and can recommend some remedy?

Here is an example of an input org file:

 | Image type | Low contrast| High contrast   |
 |+-+-|
 | Gray   | file:lc.jpg | file:hc.jpg |
 |+-+-|
 | Binary | file:lc-bin.jpg | file:hc-bin.jpg |
 |+-+-|

All the images are 200x200 pixels.

Regards,
Dov


Re: [O] [OT] djvu?

2015-05-31 Thread Dov Grobgeld
A number of years back I was very excited about DJVU and used it to
compress my scanned documents. But at a certain point did I realize that
scanned bitmaps (as well as TeX'd documents width pk fonts) in PDF were
just as small, and I stopped using it, as PDF is much more widely
available. I'm not sure if the almost equal sizes of djvu and postscript
were because bad djvu compressor or because the PDF compressors improved at
some point. I would be interested to hear if someone else has other
experience.

Regards,
Dov


On Sun, May 31, 2015 at 1:41 PM, Martin Schöön martin.sch...@gmail.com
wrote:

 Anyone using djvu?
 http://en.wikipedia.org/wiki/DjVu
 http://www.djvu.org/

 Just curious.

 --
 Martin Schöön

 http://hem.bredband.net/b262106/index.html



[O] How to export to pdf and link to other pdf-files?

2015-05-19 Thread Dov Grobgeld
What do I need to do to inhibit the inclusion of pdf files as graphics
files, when exporting an org file to pdf?

Ideally I would like to have links to referenced pdf files and not have
them treated as embedded graphics.

Thanks!
Dov


Re: [O] org-mode and python pandas

2015-04-28 Thread Dov Grobgeld
I returned to this issue recently and tried to get the ob-python to output
a table with a header, but didn't manage. Here is the code:

#+BEGIN_SRC python :colnames true
return [['','A','B','C'],
[0,0.628365,0.424279,0.619791],
[1,0.799666,0.527572,0.132928]]
#+END_SRC

#+RESULTS:
|   |A |B |C |
| 0 | 0.628365 | 0.424279 | 0.619791 |
| 1 | 0.799666 | 0.527572 | 0.132928 |

What I want is:

|   |A |B |C |
|---+--+--+--|
| 0 | 0.628365 | 0.424279 | 0.619791 |
| 1 | 0.799666 | 0.527572 | 0.132928 |

Is there any way to do that besides using the :results raw option?

Thanks!
Dov


On Wed, Jul 3, 2013 at 5:09 PM, Eric Schulte schulte.e...@gmail.com wrote:

 Dov Grobgeld dov.grobg...@gmail.com writes:

  Thanks for the answers, but there is still something missing in order
  to get it to work. Part of it seems to be connected to the python
  parsing. E.g. the following translation of Eric's sh example doesn't
  output correctly with python:
 
 
  #+BEGIN_SRC python :results output
  print ,A,B,C
  0,0.628365,0.424279,0.619791
  1,0.799666,0.527572,0.132928
  2,0.837255,0.138906,0.408233
  3,0.388080,0.146212,0.575346
  
  #+END_SRC
 
  #+RESULTS:
  : ,A,B,C
  : 0,0.628365,0.424279,0.619791
  : 1,0.799666,0.527572,0.132928
  : 2,0.837255,0.138906,0.408233
  : 3,0.388080,0.146212,0.575346
 
 
  #+BEGIN_SRC python :results table
  return ,A,B,C
  0,0.628365,0.424279,0.619791
  1,0.799666,0.527572,0.132928
  2,0.837255,0.138906,0.408233
  3,0.388080,0.146212,0.575346
  
  #+END_SRC
 
  #+RESULTS:
  |
 ,A,B,C\n\n0,0.628365,0.424279,0.619791\n\n1,0.799666,0.527572,0.132928\n\n2,0.837255,0.138906,0.408233\n\n3,0.388080,0.146212,0.575346
  |
 
  It seems that the only way to get a table from python is by outputting
  a two dimensional python structure:
 
  #+BEGIN_SRC python
  return [[0,0.628365,0.424279,0.619791],
  [1,0.799666,0.527572,0.132928]]
  #+END_SRC
 
  #+RESULTS:
  | 0 | 0.628365 | 0.424279 | 0.619791 |
  | 1 | 0.799666 | 0.527572 | 0.132928 |
 
  This seems quite limiting
 

 In most cases this is what one wants when returning data from python
 code.  The following elisp defined a panda code block, which is just
 like python, only it assumes that the results will be these sort of
 human readable strings instead of python code.

 ;; -*- emacs-lisp -*-
 (defun org-babel-execute:panda (body params)
   (let ((results
  (org-babel-execute:python
   body (org-babel-merge-params '((:results . scalar))
 params
 (org-babel-result-cond (cdr (assoc :result-params params))
   results
   (let ((tmp-file (org-babel-temp-file sh-)))
 (with-temp-file tmp-file (insert results))
 (org-babel-import-elisp-from-file tmp-file)

 With the above evaluated the following works

 #+BEGIN_SRC panda
 return ,A,B,C
 0,0.628365,0.424279,0.619791
 1,0.799666,0.527572,0.132928
 2,0.837255,0.138906,0.408233
 3,0.388080,0.146212,0.575346
 
 #+END_SRC

 #+RESULTS:
 |   |A |B |C |
 | 0 | 0.628365 | 0.424279 | 0.619791 |
 | 1 | 0.799666 | 0.527572 | 0.132928 |
 | 2 | 0.837255 | 0.138906 | 0.408233 |
 | 3 |  0.38808 | 0.146212 | 0.575346 |

 
  Another related question is if there is any support for header tables?
  I.e. instead of this:
 
  |   |A |B |C |
  | 0 | 0.827817 | 0.664009 | 0.089161 |
  | 1 | 0.170031 | 0.729214 | 0.110918 |
  | 2 | 0.575918 | 0.863924 | 0.757536 |
  | 3 | 0.682722 | 0.774445 | 0.992041 |
 
  I want this:
 
  |   |A |B |C |
  |---+--+--+--|
  | 0 | 0.827817 | 0.664009 | 0.089161 |
  | 1 | 0.170031 | 0.729214 | 0.110918 |
  | 2 | 0.575918 | 0.863924 | 0.757536 |
  | 3 | 0.682722 | 0.774445 | 0.992041 |
 
  I guess that if I start playing around with the python ob module, it
  should be possible to get this working?
 

 See the :colnames header argument in the manual.

 Best,

 
  Regards,
  Dov
 
  On Mon, Jul 1, 2013 at 8:04 PM, Rasmus ras...@gmx.us wrote:
  Achim Gratz strom...@nexgo.de writes:
 
  2. Add to pandas the option of globally influencing the text
  formatting so that it outputs something more parsable by org-mode.
 
  This sounds promising, if pandas support csv output that will be
  correctly parsed by Org-mode.
 
  The package already has CSV export, so one could use that.  I don't
 know
  if you could echo the result directly to the output, all examples
  revolve around putting the CSV into a file.  For Org, TSV output would
  be more natural.
 
  Something like:
 
  from pandas import DataFrame
  from numpy.random import rand
  from sys import stdout
  df = DataFrame(rand(10,3), columns = list('abc'))
  df
  df.to_csv(stdout, sep=\t, header = True, cols=(1,2))
 
  I was completely unable to get ob-python working this morning, so I
  haven't tested it.  I'm

[O] Embedded video in html-export

2014-10-13 Thread Dov Grobgeld
Is it currently possible to inline a video file in the html export? Right,
now I only get a link, while what I would like to have is:

video src=myvideo.ogv poster=myvideo.png loop=1 preload=auto
controls
Sorry, no video in this browser.
/video

Thanks,
Dov


Re: [O] Embedded video in html-export

2014-10-13 Thread Dov Grobgeld
Thanks! Works great!


On Mon, Oct 13, 2014 at 11:05 AM, Eric Abrahamsen e...@ericabrahamsen.net
wrote:

 Dov Grobgeld dov.grobg...@gmail.com writes:

  Is it currently possible to inline a video file in the html export?
  Right, now I only get a link, while what I would like to have is:
 
  video src=myvideo.ogv poster=myvideo.png loop=1 preload=auto
  controls
  Sorry, no video in this browser.
  /video

 Yup, you need to export as html5, and set the html5-fancy option to
 true. See the manual:

 (org) HTML doctypes





Re: [O] org-html5presentation

2014-03-25 Thread Dov Grobgeld
Rick Frankel's ox-slidy.el from:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-10/msg00781.html

also works really well for me. He is just to modest to let you know
himself. :-)

Regards,
Dov


On Tue, Mar 25, 2014 at 2:28 PM, Rustom Mody rustompm...@gmail.com wrote:

 On Tue, Mar 25, 2014 at 1:55 PM, Bastien b...@gnu.org wrote:
  Rustom Mody rustompm...@gmail.com writes:
 
  Bastien: Ive written to Takumi Kinjo
 
  Thanks!
 
  --
   Bastien

 Well I should mention that the link mentions Carsten as the author
 and Takumi (good deal lower) for 'modifications'.
 I let common sense (I have a modest supply) prevail over technicality
 so did not mention it earlier

 Takumi wrote back saying he will try to look into it over the weekend
 I wrote back suggesting that he may ask here for help on using the new
 export infra-structure.

 But I wonder whether it is necessary or whether org-reveal is good enough??

 Rusi

 --
 http://www.the-magus.in
 http://blog.languager.org




Re: [O] org-src-fontify-natively Was:Babel language support for Mathematica

2014-01-09 Thread Dov Grobgeld



On Thu, Jan 9, 2014 at 12:39 PM, Bastien b...@gnu.org wrote:

  (setq org-src-fontify-natively t)
 


Just to note that I have the flag turned off because of the bad
interaction between my use of variable-pitch mode in org-mode which is
picked up by the source fontifying. Unfortunately the source codes
fontifiers (at least python) do not cover all the source code
elements, but leave some elements to use the default font. And
non-aligned source code isn't pretty.

Regards,
Dov





Re: [O] Most Recent Org Update

2013-11-04 Thread Dov Grobgeld
I had the same problem after pulling from git yesterday and worked around
it by doing:

; This is a bug work around
(defun org-element-cache-reset (optional all) (interactive))

before requiring org.

Regards,
Dov



On Tue, Nov 5, 2013 at 4:51 AM, Vladimir Lomov lomov...@gmail.com wrote:

 Hello,
 ** Achim Gratz [2013-11-04 20:59:58 +0100]:

  Sam Flint writes:
   I pulled org from git just now, restarted Emacs, and got this error:
   Symbol's function definition is void: org-element-chache reset
   Any ideas why?

  You probably meant to type org-element-cache-reset... my guess is you
  didn't actually re-load Org after the Git pull.

 No, that call was introduced in commit
 0cecf32a0ae559266555b96668dc305710366c96
 by Nicolas Goaziou.

 I faced with the same problem; I started a fresh session of Emacs with
 Org-mode from git but Emacs stuck showing me that message (Symbol's
 function ...).

 I don't know Emacs Lisp very well but according to the commit now
 'org-footnote-section' must call 'org-element-cache-reset' at
 initialization time (:set line in defcustom of 'org-footnote-section')
 and exactly that causes a problem.

 The workaround I found is to set 'org-section-footnote' to nil _before_
 (require 'org) in .emacs.

  Regards,
  Achim.

 ---
 WBR, Vladimir Lomov

 --
 The net is like a vast sea of lutefisk with tiny dinosaur brains embedded
 in it here and there. Any given spoonful will likely have an IQ of 1, but
 occasional spoonfuls may have an IQ more than six times that!
 -- James 'Kibo' Parry




Re: [O] org-mode and python pandas

2013-07-03 Thread Dov Grobgeld
Thanks for the answers, but there is still something missing in order
to get it to work. Part of it seems to be connected to the python
parsing. E.g. the following translation of Eric's sh example doesn't
output correctly with python:


#+BEGIN_SRC python :results output
print ,A,B,C
0,0.628365,0.424279,0.619791
1,0.799666,0.527572,0.132928
2,0.837255,0.138906,0.408233
3,0.388080,0.146212,0.575346

#+END_SRC

#+RESULTS:
: ,A,B,C
: 0,0.628365,0.424279,0.619791
: 1,0.799666,0.527572,0.132928
: 2,0.837255,0.138906,0.408233
: 3,0.388080,0.146212,0.575346


#+BEGIN_SRC python :results table
return ,A,B,C
0,0.628365,0.424279,0.619791
1,0.799666,0.527572,0.132928
2,0.837255,0.138906,0.408233
3,0.388080,0.146212,0.575346

#+END_SRC

#+RESULTS:
| 
,A,B,C\n\n0,0.628365,0.424279,0.619791\n\n1,0.799666,0.527572,0.132928\n\n2,0.837255,0.138906,0.408233\n\n3,0.388080,0.146212,0.575346
|

It seems that the only way to get a table from python is by outputting
a two dimensional python structure:

#+BEGIN_SRC python
return [[0,0.628365,0.424279,0.619791],
[1,0.799666,0.527572,0.132928]]
#+END_SRC

#+RESULTS:
| 0 | 0.628365 | 0.424279 | 0.619791 |
| 1 | 0.799666 | 0.527572 | 0.132928 |

This seems quite limiting

Another related question is if there is any support for header tables?
I.e. instead of this:

|   |A |B |C |
| 0 | 0.827817 | 0.664009 | 0.089161 |
| 1 | 0.170031 | 0.729214 | 0.110918 |
| 2 | 0.575918 | 0.863924 | 0.757536 |
| 3 | 0.682722 | 0.774445 | 0.992041 |

I want this:

|   |A |B |C |
|---+--+--+--|
| 0 | 0.827817 | 0.664009 | 0.089161 |
| 1 | 0.170031 | 0.729214 | 0.110918 |
| 2 | 0.575918 | 0.863924 | 0.757536 |
| 3 | 0.682722 | 0.774445 | 0.992041 |

I guess that if I start playing around with the python ob module, it
should be possible to get this working?

Regards,
Dov

On Mon, Jul 1, 2013 at 8:04 PM, Rasmus ras...@gmx.us wrote:
 Achim Gratz strom...@nexgo.de writes:

 2. Add to pandas the option of globally influencing the text
 formatting so that it outputs something more parsable by org-mode.

 This sounds promising, if pandas support csv output that will be
 correctly parsed by Org-mode.

 The package already has CSV export, so one could use that.  I don't know
 if you could echo the result directly to the output, all examples
 revolve around putting the CSV into a file.  For Org, TSV output would
 be more natural.

 Something like:

 from pandas import DataFrame
 from numpy.random import rand
 from sys import stdout
 df = DataFrame(rand(10,3), columns = list('abc'))
 df
 df.to_csv(stdout, sep=\t, header = True, cols=(1,2))

 I was completely unable to get ob-python working this morning, so I
 haven't tested it.  I'm using python3, build in python mode and elpy.

 In any case, the csv route might be better, as Pandas doesn't print
 the table if it's too big (try changing 10 to 1000 above).

 --
 Powered by magic pixies!





Re: [O] Right-to-left text in org mode

2013-06-28 Thread Dov Grobgeld
You are right, I forgot about that. I also have (setq
bidi-paragraph-direction nil) in my org-mode-hook.

Regadrs,
Dov


On Wed, Jun 26, 2013 at 4:49 AM, Manuel GJT valh...@gmail.com wrote:
 It turns out that org mode does force directionality in its buffers. I found
 in org.el the line

 5308  (setq bidi-paragraph-direction 'left-to-right)

 However, bidi-paragraph-direction is always buffer local when set. That
 explains why switching to other mode does not help.

 The solution is to set bidi-paragraph-direction to nil in org buffers with
 mixed LTR and RTL texts. This, however, might change the alignment of some
 headings to right-aligned. But the bidi markers now work just fine, so it's
 just a matter of placing them wisely.

 I appreciate the time you took for this little discussion. It helped me get
 a clearer picture of the inner workings of bidi and emacs.


 Kind regards,

 Manuel GJT


 On Tue, Jun 25, 2013 at 2:03 AM, Dov Grobgeld dov.grobg...@gmail.com
 wrote:

 A work around seems to be to provide an empty line between the LTR and
 the RTL paragraph. I.e. instead of

 * this is ltr
 * THIS IS RTL

 do:

 * this is ltr

 * THIS IS RTL

 But you are correct that the wrapping of LTR paragraphs with RTL text
 is buggy. This bug seems to have nothing to do with org mode, but
 happens e.g. in text mode and fundamental mode as well. You should
 raise this issue on the emacs-list or file a bug with emacs.

 On Tue, Jun 25, 2013 at 7:27 AM, Manuel GJT valh...@gmail.com wrote:
  Specifically what additional information should I provide? This happens
  to
  me even without my .emacs loaded. I'm running Ubuntu 12.04 with
  m17n-(db/contrib), libm17n-(0/dev) installed.
 
  It seems that in org mode is forcing LTR in mixed-directionality texts
  since, for example, a heading with RTL text will not change the stars to
  be
  right-aligned, and the cursor's behavior in org mode is different than
  in a
  clean buffer.
 
  Perhaps you could show me how to ignore any previous paragraph settings
  other than with R-T-L MARK?
 
 
  Kind regards,
 
  Manuel GJT
 
 
  On Mon, Jun 24, 2013 at 12:49 PM, Dov Grobgeld dov.grobg...@gmail.com
  wrote:
 
  I was able to reproduce this behavior only with by forcing the
  paragraph direction to LTR or equivilantly by having a first strong
  LTR character in the beginning of the paragraph. Please provide more
  information about your environment, and someone might be able to help
  you.
 
  Regards,
  Dov
 
 
  On Mon, Jun 24, 2013 at 8:22 PM, Manuel GJT valh...@gmail.com wrote:
   Hello everyone,
  
   I need to work in an org buffer with both left-to-right and
   right-to-left
   text. Although the character directionality and composition works
   fine,
   when
   writing paragraphs with visual-line-mode on the lines get inverted,
   i.e.,
   the line
  
   ZYX CBA
  
   appears as
  
   ZYX
   CBA
  
   instead of
  
   CBA
   ZYX
  
   The section 22.20 Bidirectional Editing of the Emacs manual
   suggests
   forcing the directionality of the paragraph with RIGHT-TO-LEFT MARK,
   but
   this does not seem to work: even with such a character beginning the
   line,
   (current-bidi-paragraph-direction) returns left-to-right.
  
   The RTL MARK seems to work just fine in tables.
  
   When written in a clean text-mode buffer the same text appears with
   proper
   directionality. However switching from org-mode to text-mode does not
   correct directionality in said paragraphs. The issue persists even
   when
   visiting the file with emacs -Q.
  
   org-version 8.0.3, same issue with v. 7.9.4
  
   Your help is much appreciated.
  
   --
   Manuel GJT
 
 
 
 
  --
  Manuel GJT




 --
 Manuel GJT



[O] org-mode and python pandas

2013-06-27 Thread Dov Grobgeld
Has anyone used org-mode with the python pandas package? Pandas is in
a certain way an alternative to R, but with the (for me) familiar
syntax of python. See: http://pandas.pydata.org/

Pandas is very much built to be used interactively, and it outputs its
data in space separated tabular format. E.g. in ipython:

In [1]: import pandas as pd
In [2]: import numpy as np

In [3]: pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
Out[3]:
  A B C
0  0.628365  0.424279  0.619791
1  0.799666  0.527572  0.132928
2  0.837255  0.138906  0.408233
3  0.388080  0.146212  0.575346

Unfortunately this doesn't output as nicely when used from org-mode:

#+BEGIN_SRC python
import pandas as pd
import numpy as np

return pd.DataFrame(np.random.random((4,3)), columns=list('ABC'))
#+END_SRC

#+RESULTS:
: A B C
: 0  0.827817  0.664009  0.089161
: 1  0.170031  0.729214  0.110918
: 2  0.575918  0.863924  0.757536
: 3  0.682722  0.774445  0.992041

while I would like to have:

|   |A |B |C |
|---+--+--+--|
| 0 | 0.827817 | 0.664009 | 0.089161 |
| 1 | 0.170031 | 0.729214 | 0.110918 |
| 2 | 0.575918 | 0.863924 | 0.757536 |
| 3 | 0.682722 | 0.774445 | 0.992041 |

The question is how to get this? Here are a few ideas:

1. Write a general filter in the org-mode elisp than uses heuristics
to recognize ascii aligned tables and change these to org-tables.
2. Add to pandas the option of globally influencing the text
formatting so that it outputs something more parsable by org-mode.
3. Create a special language pandas that recognize the ascii aligned
tables and saves the need to import pandas and np?
4. And the obvious approach of writing a python function that writes a
org-mode parsable table and always call it as part of the return.

Which is the preferable approach? Any other ideas?

Regards,
Dov



Re: [O] Right-to-left text in org mode

2013-06-25 Thread Dov Grobgeld
A work around seems to be to provide an empty line between the LTR and
the RTL paragraph. I.e. instead of

* this is ltr
* THIS IS RTL

do:

* this is ltr

* THIS IS RTL

But you are correct that the wrapping of LTR paragraphs with RTL text
is buggy. This bug seems to have nothing to do with org mode, but
happens e.g. in text mode and fundamental mode as well. You should
raise this issue on the emacs-list or file a bug with emacs.

On Tue, Jun 25, 2013 at 7:27 AM, Manuel GJT valh...@gmail.com wrote:
 Specifically what additional information should I provide? This happens to
 me even without my .emacs loaded. I'm running Ubuntu 12.04 with
 m17n-(db/contrib), libm17n-(0/dev) installed.

 It seems that in org mode is forcing LTR in mixed-directionality texts
 since, for example, a heading with RTL text will not change the stars to be
 right-aligned, and the cursor's behavior in org mode is different than in a
 clean buffer.

 Perhaps you could show me how to ignore any previous paragraph settings
 other than with R-T-L MARK?


 Kind regards,

 Manuel GJT


 On Mon, Jun 24, 2013 at 12:49 PM, Dov Grobgeld dov.grobg...@gmail.com
 wrote:

 I was able to reproduce this behavior only with by forcing the
 paragraph direction to LTR or equivilantly by having a first strong
 LTR character in the beginning of the paragraph. Please provide more
 information about your environment, and someone might be able to help
 you.

 Regards,
 Dov


 On Mon, Jun 24, 2013 at 8:22 PM, Manuel GJT valh...@gmail.com wrote:
  Hello everyone,
 
  I need to work in an org buffer with both left-to-right and
  right-to-left
  text. Although the character directionality and composition works fine,
  when
  writing paragraphs with visual-line-mode on the lines get inverted,
  i.e.,
  the line
 
  ZYX CBA
 
  appears as
 
  ZYX
  CBA
 
  instead of
 
  CBA
  ZYX
 
  The section 22.20 Bidirectional Editing of the Emacs manual suggests
  forcing the directionality of the paragraph with RIGHT-TO-LEFT MARK, but
  this does not seem to work: even with such a character beginning the
  line,
  (current-bidi-paragraph-direction) returns left-to-right.
 
  The RTL MARK seems to work just fine in tables.
 
  When written in a clean text-mode buffer the same text appears with
  proper
  directionality. However switching from org-mode to text-mode does not
  correct directionality in said paragraphs. The issue persists even when
  visiting the file with emacs -Q.
 
  org-version 8.0.3, same issue with v. 7.9.4
 
  Your help is much appreciated.
 
  --
  Manuel GJT




 --
 Manuel GJT



Re: [O] Right-to-left text in org mode

2013-06-24 Thread Dov Grobgeld
I was able to reproduce this behavior only with by forcing the
paragraph direction to LTR or equivilantly by having a first strong
LTR character in the beginning of the paragraph. Please provide more
information about your environment, and someone might be able to help
you.

Regards,
Dov


On Mon, Jun 24, 2013 at 8:22 PM, Manuel GJT valh...@gmail.com wrote:
 Hello everyone,

 I need to work in an org buffer with both left-to-right and right-to-left
 text. Although the character directionality and composition works fine, when
 writing paragraphs with visual-line-mode on the lines get inverted, i.e.,
 the line

 ZYX CBA

 appears as

 ZYX
 CBA

 instead of

 CBA
 ZYX

 The section 22.20 Bidirectional Editing of the Emacs manual suggests
 forcing the directionality of the paragraph with RIGHT-TO-LEFT MARK, but
 this does not seem to work: even with such a character beginning the line,
 (current-bidi-paragraph-direction) returns left-to-right.

 The RTL MARK seems to work just fine in tables.

 When written in a clean text-mode buffer the same text appears with proper
 directionality. However switching from org-mode to text-mode does not
 correct directionality in said paragraphs. The issue persists even when
 visiting the file with emacs -Q.

 org-version 8.0.3, same issue with v. 7.9.4

 Your help is much appreciated.

 --
 Manuel GJT



[O] Emacs completion on file:xyz links?

2013-04-26 Thread Dov Grobgeld
I often find reference files in org-files and then do the following
sequence:

* Press Ctrl-x Ctrl-f
* Navigate to the requested file by the emacs and completion
* Press Ctrl-a Ctrl-k to copy
* Press Ctrl-g to get out of file-open
* Paste with ctrl-y

I was wondering if anyone has written code so that pressing [TAB] within a
file:/ link would do emacs completion in place?

Thanks!
Dov


[O] org-kill-line

2013-04-26 Thread Dov Grobgeld
I don't like the use of kill-visual-line in org-kill-mode as it creates
non-predictable behavior when recording keyboard macros, as the display
width will influence the result of running the macro. Does anyone have a
suggestion of how to get around this? Right now I redefined
kill-visual-line to kill-line, as I didn't want to touch the org-mode
sources, but it seems to be an overkill (pun intended :-).

Regards,
Dov


[O] org-src-notify-natively and variable-pitch-mode interaction

2013-04-26 Thread Dov Grobgeld
 I am typically using variable-pitch-mode=t when editing org-files. But
embedded source code I would like to have in a fixed-pitch font. This works
well when org-src-notify-natively is nil, but when turned on, part of the
source code syntax highlightening (in my case python) is also turned into
using variable pitch font. I realize this is because neither org-mode nor
the syntax highlightening engine have a full cover of the various semantic
parts, but both rely on the default font for part of their markup. Is there
any way to work around this?

Thanks!
Dov


Re: [O] Emacs completion on file:xyz links?

2013-04-26 Thread Dov Grobgeld
Ok, I can make do with that. Thanks.


On Fri, Apr 26, 2013 at 11:52 AM, Suvayu Ali fatkasuvayu+li...@gmail.comwrote:

 On Fri, Apr 26, 2013 at 10:15:42AM +0300, Dov Grobgeld wrote:
  I often find reference files in org-files and then do the following
  sequence:
 
  * Press Ctrl-x Ctrl-f
  * Navigate to the requested file by the emacs and completion
  * Press Ctrl-a Ctrl-k to copy
  * Press Ctrl-g to get out of file-open
  * Paste with ctrl-y
 
  I was wondering if anyone has written code so that pressing [TAB] within
 a
  file:/ link would do emacs completion in place?

 It does that already.  Use C-c C-l to insert a link, when prompted for
 the type, say file: RET.  Then you can use the usual emacs completeion
 interface to get filename completeion.

 What is missing though is completion when editing an existing link.
 IMO, that would be a worthy feature request.

 Cheers,

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Python code for producing Org tables

2012-12-24 Thread Dov Grobgeld
Nice! I've needed that often. But please add licensing information to
the code to make clear in what contexts it may be used.

Regards,
Dov

On Mon, Dec 24, 2012 at 3:12 PM, Bastien b...@altern.org wrote:

 Hi François,

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

  I do not know, and should check indeed.  Yet, even then, it does not
  mean Org tables could not do better than standard practice! :-)

 Would you like something like

 | 3.1 |
 | 3.1415 |

 be aligned/modified as

 | 3.1000 |
 | 3.1415 |

 ?

 I personally wouldn't like this, but I'm curious.

  If so, this is a nice Elisp challenge for anyone willing to
  implement it :)
 
  I'd tackle it myself, yet if I do it before a few weeks, it'd mean I'm
  toying rather than doing what I should rather be doing...  Sigh!

 Don't worry, once you'll dive into `org-table-align' chances are that
 you will feel like working instead of toying :)

 Bonnes fêtes !

 --
  Bastien




[O] Different faces for different flavors of org-mode files

2012-10-21 Thread Dov Grobgeld
I wonder if anyone has written a solution for changing the face by some
kind of style-sheet that is set according to the type (or flavor) of the
org-mode file?

My main org-mode file is a journal where 1-star always is used to the
current date. I therefore like to have it small, e.g. 100% non-bold. 2-star
is 140% though.

On the other hand, when writing non-journal files, I would like to have
1-star as e.g. 160% to indicate a title.

Does someone have any idea of how to implement this?

Thanks!
Dov


[O] Making formatting of links in tables inheriting org-table

2012-06-29 Thread Dov Grobgeld
I like to use a variable font for my org-notebooks, which works very
nicely. But since tables are aligned by fixed number of characters, I use a
fixed font for tables. The problem is when I add a link within a table. The
link then gets the face 'org-link' and not 'org-table'. Is there any
posibility to apply the the attributes of the faces of both 'org-table' *and
* 'org-link' in that order to receive both properties, so that links
outside of tables are shown in variable fonts and links in tables in a
fixed font?

Thanks!
Dov


[O] bug#11710: 24.1.50; Bidi attributes are not exported in org-mode html output

2012-06-15 Thread Dov Grobgeld
On Thu, Jun 14, 2012 at 10:42 PM, Eli Zaretskii
  [stuff deleted]

 Did you customize Emacs to dynamically determine the paragraph
 direction in Org buffers?  By default they are forced to be
 left-to-right.

Yes, I changed that. Org-mode appears to me to work fine in dynamic
Bidi mode, so I don't understand the reasoning that it was turned off
by default.

  [stuff deleted]
 To the Org maintainers: the resolved paragraph direction at character
 position N in the current buffer can be retrieved like this:

  (save-excursion
    (goto-char N)
    (current-bidi-paragraph-direction))

Ok, thanks. Perhaps I'll have a go at it on my own.

Regards,
Dov





[O] bug#11700: bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2012-06-15 Thread Dov Grobgeld
On Thu, Jun 14, 2012 at 10:37 PM, Eli Zaretskii e...@gnu.org wrote:
 Date: Thu, 14 Jun 2012 21:10:46 +0300
 From: Dov Grobgeld dov.grobg...@gmail.com
 Cc: 11...@debbugs.gnu.org
 [stuff deleted]
 I tried inserting tabs into the buffer before the vertical bars, but
 after reordering it still didn't come out right.

 ??? What exactly did you try?  You need to have a TAB before and after
 each '|' that's between the cells (the outer ones do not need a TAB).
 Like this (you should see this correctly in Emacs 24.1; move cursor
 with C-f to see the logical order):

 ‎|      אבגד    |       הוזחטי     |

 Isn't this what you wanted?

Yes. Great! This is indeed what I wanted. My mistake was that I tried
it with a tab character before OR after the vertical bar. This
solution should be really simple to implement in org-mode as it means
that instead of joining the table columns with spacevbarspace
as is currently done, you just need to use tabvbartab as well
as setting the tab width to 1.

But I just wonder, is there any other character (preferably white
space character) with the same end-of-segment-boundary properties as
tab, in case tab is used for something else in org-mode? Or is it
possible to take an arbitrary character, e.g. U+E0020, and bless it
with end-of-segment boundary properties and then use that in the
org-mode buffer?

As a side note, I really like the idea of end of segment separator,
and I wasn't aware of it when I wrote fribidi a long time ago. I
wonder if the semantics of the emacs segment separator follows the
Unicode Bidi Algorithm?





[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2012-06-14 Thread Dov Grobgeld
Do you think that you can provide some lisp code that builds the
buffer contents and the display properties for the three options that
ou refered to as an illustration?

I tried inserting tabs into the buffer before the vertical bars, but
after reordering it still didn't come out right.

Regards,
Dov

On Thu, Jun 14, 2012 at 6:10 AM, Eli Zaretskii e...@gnu.org wrote:
 Date: Wed, 13 Jun 2012 22:26:35 +0300
 From: Dov Grobgeld dov.grobg...@gmail.com

 Imagine you have a buffer with the following logical contents (using the
 convention that capitals are RTL characters).

 | abcdef | abc |
 | ABCDEF | ABC |

 I would like this to be displayed as:

 | abcdef | abc |
 | FEDCBA | CBA |

 The problem is that I want to each column of the table to be isolated
 (with regards to bidi influence) from other columns in the table. (Of
 course we also want to choose the table direction, but that is a
 different and solvable issue.) If there is no such separation, which
 is the behaviour currently get in emacs HEAD, then the resulting
 rendered buffer is:

 | abcdef | abc |
 | CBA | FEDCBA |

 Is this even solvable in the current emacs bidi model?

 Yes, it is.  The solution involves putting segment separators between
 the table columns.  These could be TAB characters or a display
 property whose value is (space . :width N) or (space . :align-to COL).

 Org maintainers, please ask if you need help in fixing this.





Re: [O] Inline LaTeX fragments in emacs buffer

2012-05-14 Thread Dov Grobgeld
Thanks for the help. It makes my coursera ml-class notes easier to read.

One issue I had when I tried exporting to HTML with the dvnpng option the
following equation:

\[
J(\theta) = - \frac{1}{m} \left[\sum_{i=1} ^m y^{(i)} \log
h_\theta(x^{(i)})+(1-y^{(i)})\log(1-h_\theta(x^{(i)}))\right]
  + \frac{\lambda}{2m}\sum_{j=1} ^n \theta_j ^2
\]

in the png output I got the following trailing text:ORG-LIST-END-MARKER .
Is this a known bug?

Regards,
Dov

On Sun, May 13, 2012 at 8:55 PM, Darlan Cavalcante Moreira 
darc...@gmail.com wrote:


 org-preview-latex-fragment is really great but what is even better is that
 it also works outside org-mode! This makes my life a lot easier.

 I set C-c P as a global key-binding for org-preview-latex-fragment and
 C-c p to org-ctrl-c-ctrl-c. Then I can preview equations all equations in
 ANY buffer with C-u C-u C-c P. It's great to write equations in comments
 of some programming buffer (no matter which programming language) and being
 able to render the equations right there.

 --
 Darlan

 At Sun, 13 May 2012 00:46:51 +0200,
 Daimrod daim...@gmail.com wrote:
 
  Dov Grobgeld dov.grobg...@gmail.com writes:
 
   Is there any way of getting org-mode to display inline LaTeX fragments
   in the emacs buffer? E.g. I would like to be able to type:
  
   The size of the hypotenuse is $\sqrt{a^2+b^2}$
  
   and then the buffer immediately shows:
  
   The size of the hypotenuse is √a²+b²
  
   where √a²+b² is a png image rendered via dvipng.
  
   I assume a toggle would switch between either seeing the formula or
   seeing the source of the formula, just like for the display of inline
   images. Also, pressing a backspace when the cursor is at the end of
   the formula should erase the trailing $ sign, and turn off image
   display of the formula, just like for [[links][name]].
  
   Has anything like this been implemented?
  
   Thanks!
   Dov
 
  Yes, you can produce a preview image with C-c C-x C-l.
 
  See
  (info (org) Previewing LaTeX fragments)
  and
  (info (org) Embedded LaTeX)
 
 
 




Re: [O] Inline LaTeX fragments in emacs buffer

2012-05-14 Thread Dov Grobgeld
I got it. Org-mode erroneously interpreted the + sign on the second row as
a list token. Rearranging the latex text so that it does not start with -
or + is a workaround.

On Mon, May 14, 2012 at 5:47 PM, Dov Grobgeld dov.grobg...@gmail.comwrote:

 Thanks for the help. It makes my coursera ml-class notes easier to read.

 One issue I had when I tried exporting to HTML with the dvnpng option the
 following equation:

 \[
 J(\theta) = - \frac{1}{m} \left[\sum_{i=1} ^m y^{(i)} \log
 h_\theta(x^{(i)})+(1-y^{(i)})\log(1-h_\theta(x^{(i)}))\right]
   + \frac{\lambda}{2m}\sum_{j=1} ^n \theta_j ^2
 \]

 in the png output I got the following trailing text:ORG-LIST-END-MARKER .
 Is this a known bug?

 Regards,
 Dov

 On Sun, May 13, 2012 at 8:55 PM, Darlan Cavalcante Moreira 
 darc...@gmail.com wrote:


 org-preview-latex-fragment is really great but what is even better is that
 it also works outside org-mode! This makes my life a lot easier.

 I set C-c P as a global key-binding for org-preview-latex-fragment and
 C-c p to org-ctrl-c-ctrl-c. Then I can preview equations all equations
 in
 ANY buffer with C-u C-u C-c P. It's great to write equations in comments
 of some programming buffer (no matter which programming language) and
 being
 able to render the equations right there.

 --
 Darlan

 At Sun, 13 May 2012 00:46:51 +0200,
 Daimrod daim...@gmail.com wrote:
 
  Dov Grobgeld dov.grobg...@gmail.com writes:
 
   Is there any way of getting org-mode to display inline LaTeX fragments
   in the emacs buffer? E.g. I would like to be able to type:
  
   The size of the hypotenuse is $\sqrt{a^2+b^2}$
  
   and then the buffer immediately shows:
  
   The size of the hypotenuse is √a²+b²
  
   where √a²+b² is a png image rendered via dvipng.
  
   I assume a toggle would switch between either seeing the formula or
   seeing the source of the formula, just like for the display of inline
   images. Also, pressing a backspace when the cursor is at the end of
   the formula should erase the trailing $ sign, and turn off image
   display of the formula, just like for [[links][name]].
  
   Has anything like this been implemented?
  
   Thanks!
   Dov
 
  Yes, you can produce a preview image with C-c C-x C-l.
 
  See
  (info (org) Previewing LaTeX fragments)
  and
  (info (org) Embedded LaTeX)
 
 
 





[O] Inline LaTeX fragments in emacs buffer

2012-05-12 Thread Dov Grobgeld
Is there any way of getting org-mode to display inline LaTeX fragments in
the emacs buffer? E.g. I would like to be able to type:

The size of the hypotenuse is $\sqrt{a^2+b^2}$

and then the buffer immediately shows:

The size of the hypotenuse is √a²+b²

where √a²+b² is a png image rendered via dvipng.

I assume a toggle would switch between either seeing the formula or seeing
the source of the formula, just like for the display of inline images.
Also, pressing a backspace when the cursor is at the end of the formula
should erase the trailing $ sign, and turn off image display of the
formula, just like for [[links][name]].

Has anything like this been implemented?

Thanks!
Dov


Re: [O] Fast linking to files in private git repos through a hyperlink

2012-04-26 Thread Dov Grobgeld
Thanks for your suggestion Bastien, but unfortunately it does not directly
map to the shortcut that I implemented in my package. In my *old* syntax:

git:repo::file.txt

file.txt is a search pattern for a *file* with in the symbolic repo repo
which maps to a real repo through the hash variable my-org-repos. The whole
idea was that I wanted to be able to use the symbolic name as a shortcut.
In addition file.txt is not the path of a file in the repo, but a search
pattern for a file in the repo. In case of duplicates the user is prompted
to interactively resolve the file. In addition I would also like to add a
search pattern for a string in the file.

My problem is how to merge this syntax with the org-git-link.el which uses
the syntax

git:/home/user/repo/data/results.png::nobelprize

where /home/.../results.png is the name of the path to a file and
nobelprize is the name of a tag.

Both my linking and the org-git-linking are two different equally valid use
cases. My problem is how to merge both these use cases under a single
syntax.

Regards,
Dov

On Thu, Apr 26, 2012 at 17:00, Bastien b...@gnu.org wrote:

 Hi Dov,

 Dov Grobgeld dov.grobg...@gmail.com writes:

  Thanks for the link. I wasn't aware of that package. I see that I
  have a conflict in syntax as I used double colon for indicating the
  git repo while org-git-link.el used double colon for search pattern.

 The double colon is standard in Org for indicating the search pattern,
 please use it this way too.

  Thus to join the packages I need to change the syntax. Which of the
  following would make more sense:
 
 git:@repo:file-in-repo::pattern-in-file
 git://repo/file-in-repo::pattern-in-file
 
  or perhaps some other syntax? Suggestions?

 git:[user@?][repo-server]:[git-repo-itself]::[search-pattern]

 When user is set, the repo-server URL won't have a protocol
 (git will be used by default as a protocol.)

 When user is not set, the repo-server may contain git:// or
 http:// as the protocol.

 But I didn't test your packing, so I'm maybe shooting in the
 dark for this syntax suggestion.

 HTH,

 --
  Bastien



Re: [O] Fast linking to files in private git repos through a hyperlink

2012-04-21 Thread Dov Grobgeld
Thanks for the link. I wasn't aware of that package. I see that I have a
conflict in syntax as I used double colon for indicating the git repo while
org-git-link.el used double colon for search pattern. Thus to join the
packages I need to change the syntax. Which of the following would make
more sense:

   git:@repo:file-in-repo::pattern-in-file
   git://repo/file-in-repo::pattern-in-file

or perhaps some other syntax? Suggestions?

Regards,
Dov

On Fri, Apr 20, 2012 at 15:01, Bastien b...@altern.org wrote:

 Hi Dov,

 Dov Grobgeld dov.grobg...@gmail.com writes:

  I thought I would share the following hack that I did with git.
 
  In my org-mode notebook I often find myself references files that
  reside in various private git repos. So far I have referenced these
  either by just writing their name or giving a full path. But giving
  the full path is disruptive and if the repo moves it will no longer
  work. So I added a hack to make the following hyperlink work
  git:myrepo::myfile . When opening it the following happens:
 
  - myrepo is looked up in the emacs hash my-git-repos and mapped to
  the path of a git repo root.
  - git-find-file-in-repo searches for the the file myfile in the the
  repo repo
 
  Here's the code for org-git-hyperlink.el:

 Nice.

 Can you try to merge these features with contrib/lisp/org-git-link.el
 from the current repo?

 Thanks!

 --
  Bastien



[O] Fast linking to files in private git repos through a hyperlink

2012-04-19 Thread Dov Grobgeld
I thought I would share the following hack that I did with git.

In my org-mode notebook I often find myself references files that reside in
various private git repos. So far I have referenced these either by just
writing their name or giving a full path. But giving the full path is
disruptive and if the repo moves it will no longer work. So I added a hack
to make the following hyperlink work git:myrepo::myfile . When opening it
the following happens:

- myrepo is looked up in the emacs hash my-git-repos and mapped to the path
of a git repo root.
- git-find-file-in-repo searches for the the file myfile in the the repo
repo

Here's the code for org-git-hyperlink.el:

(require 'org)

(org-add-link-type git 'org-git-hyperlink-open)

(defun org-git-hyperlink-open (path)
  Visit the file in learning-git
  (let* ((parts (split-string path ::))
 (repo-name (car parts))
 (filename (cadr parts))
 (repo (gethash repo-name my-git-repos))
 )
(git-find-file-in-repo repo filename)))
(org-git-hyperlink-open learning::PointPatternMatching.py)
;;; org-learning.el ends here

(provide 'org-git-hyperlink)
;;; org-git-hyperlink.el ends here

The code for git-find-file-in-repo is here:

https://github.com/hjz/emacs/blob/master/jz/git-find-file.el

with the following addition:

(defun git-find-file-in-repo (root file-name)
  Prompt with a completing list of all files in the project to find one.
  (interactive)
  (let* ((project-files (ffip-project-files root))
 (files (delete-dups (mapcar 'car project-files)))
 (file-paths (delq 'nil (mapcar '(lambda (file-cons)
   (when (string= file-name (car
file-cons))
 (cdr file-cons)))
project-files)))
 (file-path (if (cdr file-paths)
(ffip-completing-read Disambiguate:  file-paths)
  (car file-paths
(find-file (concat root file-path

Regards,
Dov


Re: [O] HTML slides

2012-04-19 Thread Dov Grobgeld
There is also https://github.com/dov/org-slidy , which I wrote since I like
to be able to scroll my slides which S5 does not allow. It would be even
cooler to create a package for creating HTML5 slideshows straight from
org-mode, e.g. like http://slides.html5rocks.com/#table-of-contents or
http://imakewebthings.com/deck.js .

Regards,
Dov

On Thu, Apr 19, 2012 at 10:13, BernardH 
gmane.emacs.orgm...@bernard-hugueney.org wrote:

 Hi,

 First and foremost, thank you for making such a great emacs mode !
 Whatever I'm doing with orgmode (and I do as much as possible in orgmode
 !), it
 is always a joy.

 Recently, i've been switching to orgmode for my presentations.
 I'm a happy user of [[https://github.com/eschulte/org-S5][org-S5]] but I
 just
 stumbled upon
 [[https://github.com/relevance/org-html-slideshow][org-html-slideshow]].
 I have the utmost respect for their respective authors (of org-S5 for
 obvious reasons, of org-html-slideshow for Clojure contributions) and
 now I have a hard time deciding which one to choose.

 Does anyone have experience with any / both of them ?
 How would you make the choice ?

 Thanks for any advice !

 Best Regards,

 Bernard






Re: [O] Question about org-table

2012-04-05 Thread Dov Grobgeld
I assume that your problem is due the long names in the column named
protein. You can have org-table clip the columns to a more reasonable
length by adding a row that contains e.g. 20 in the column to clip. This
will clip the column to 20 characters. You can still edit the full column
contents by doing ~C-c `~.

Thus add the following new row in the beginning or the end of the table:

||| 20 |
||

move to 20 and press C-c C-c.

See: http://orgmode.org/manual/Column-width-and-alignment.html

Regards,
Dov

On Thu, Apr 5, 2012 at 07:31, Rodolfo Aramayo raram...@tamu.edu wrote:

 People,

 I am trying to use the powerful org-table features of org-mode to solve a
 simple problem
 I have imported a table from excel in both cvs and tab-delimited formats
 and converted the region to table

 the table looks like this:

 ##
 | Entry | Entry name | Protein names | Gene names | Length
 |

 | Q01284 | 2NPD_NEUCR | Nitronate monooxygenase (EC 1.13.12.16)
 (2-nitropropane dioxygenase) (2-NPD) (Nitroalkane oxidase) | ncd-2
 G17A4.200 NCU03949 | 378 |
 | P05195 | 3DHQ_NEUCR | Catabolic 3-dehydroquinase (cDHQase) (EC 4.2.1.10)
 (3-dehydroquinate dehydratase) | qa-2 NCU06023 | 173
 |
 | Q7SDX3 | 3HAO_NEUCR | 3-hydroxyanthranilate 3,4-dioxygenase (EC
 1.13.11.6) (3-hydroxyanthranilate oxygenase) (3-HAO) (3-hydroxyanthranilic
 acid dioxygenase) (HAD) (Biosynthesis of nicotinic acid
 protein 1) | bna-1 NCU03282 | 180
 |

 | P07046 | 3SHD_NEUCR | 3-dehydroshikimate dehydratase (DHS dehydratase)
 (DHSase) (EC 4.2.1.-) | qa-4 NCU06024 | 359
 |


 ##
 but as soon as I try to align the columns, then org-table introduces a
 myriad of spaces where there were previously none
 Why is this happening?
 What am I doing wrong?

 I want to use org-mode for Bioinformatics and teach students to use it as
 a tool, but I cannot do it unless things work seamless on my hands

 Any help will be much appreciated

 --Rodolfo Aramayo, PhD



Re: [O] org-babel-C-ensure-main-wrap fails unless I add exit(0)

2012-04-05 Thread Dov Grobgeld
Sure. They should be equivalent. (In C++ return is prefered as it calls
destructors. But anyone relying on this when using C++ in org-mode should
imnsho get a permanent ban from ever using C/C++ ;-).

Regards,
Dov

On Thu, Apr 5, 2012 at 17:56, Eric Schulte eric.schu...@gmx.com wrote:

 Dov Grobgeld dov.grobg...@gmail.com writes:

  Oops. I sawthat  I wrote do not get any error though I meant do not
 get
  any resulting output.
 

 Would this alternate version work (without requiring stdlib.h)?

 (defun org-babel-C-ensure-main-wrap (body)
  Wrap body in a \main\ function call if none exists.
  (if (string-match ^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*) body)
  body
(format int main() {\n%s\nreturn(0);\n}\n body)))

 Thanks,

 
  On Wed, Apr 4, 2012 at 11:13, Dov Grobgeld dov.grobg...@gmail.com
 wrote:
 
  When running a babel C session under Linux/gcc I do not get any error
  unless I add exit(0) as part of the C-code snippet. For some to me not
  understood reason my program exits with error code=4, which is caught by
  org-babel-eval and the printed output is not inserted into my buffer . I
  solved this by adding `#include stdlib.h` and `exit(0);` as part of
  org-babel-C-ensure-main-wrap .
 
  Should I prepare this as patch?
 
  Regards,
  Dov
 
 

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



[O] org-babel-C-ensure-main-wrap fails unless I add exit(0)

2012-04-04 Thread Dov Grobgeld
When running a babel C session under Linux/gcc I do not get any error
unless I add exit(0) as part of the C-code snippet. For some to me not
understood reason my program exits with error code=4, which is caught by
org-babel-eval and the printed output is not inserted into my buffer . I
solved this by adding `#include stdlib.h` and `exit(0);` as part of
org-babel-C-ensure-main-wrap .

Should I prepare this as patch?

Regards,
Dov


Re: [O] org-babel-C-ensure-main-wrap fails unless I add exit(0)

2012-04-04 Thread Dov Grobgeld
Oops. I sawthat  I wrote do not get any error though I meant do not get
any resulting output.

On Wed, Apr 4, 2012 at 11:13, Dov Grobgeld dov.grobg...@gmail.com wrote:

 When running a babel C session under Linux/gcc I do not get any error
 unless I add exit(0) as part of the C-code snippet. For some to me not
 understood reason my program exits with error code=4, which is caught by
 org-babel-eval and the printed output is not inserted into my buffer . I
 solved this by adding `#include stdlib.h` and `exit(0);` as part of
 org-babel-C-ensure-main-wrap .

 Should I prepare this as patch?

 Regards,
 Dov




Re: [O] org mode in press

2012-01-28 Thread Dov Grobgeld
I would also like to thank you for this great article and org-mode in
general. I learned a few things about variables and chaining that I did not
know about. Since I discovered org-mode, I have come to rely upon it as my
extended memory for professional as well as domestic ideas and problems
that I encounter. I keep one big notes.org file in which my first level
headlines is the current date, and my second order headline usually
contains a Done/Todo which is a checklist of things that I have to do. I
also love the embedded code (though I wish it was possible to syntax
highlight it!), external links, and tables.

Thanks again!
Dov

On Sat, Jan 28, 2012 at 18:18, Thomas S. Dye t...@tsdye.com wrote:

 Aloha Christian,

 Thanks for your comments.  It is great to have feedback.

 Christian Wittern cwitt...@gmail.com writes:

  I think this is an excellent article, introducing an aspect of
  org-mode, which I think fills a gap that no other software I know of
  comes even close to approach.  I already started mentioning it in
  conversations and am sure it will be very useful to many members of
  the academic community.
 
  Just to make sure I could answer any follow up questions, I downloaded
  the replication bundle and started installing the dependencies.  I
  encountered a few problems and hope this is the right place to discuss
  them.  BTW, I am working with this on a Mac OS X 10.6 machine.
 
  Most of the dependencies I already had or  installed them from
  macports.  One problem I encountered was with installing the RSQLite
  package.  Executing the installation command from the README file did
  not work because of permission issues, the command needs to run with
  superuser rights.  Is it possible to give these rights to commands run
  from babel?  Since I did not find a way to do that, I installed from
  the R commandline, where I found that the name of the package is
  RSQLite, not 'RSQlite' as given in the readme file.
 
  The one dependency I could not solve was the 'dot' executable.  I
  assume this is an interpreter for the dot language, for which it seems
  the program on the Mac is named graphviz.  However, I am not sure how
  to make that work with org/babel.  Should I simply symlink to
  graphviz?  Or is there a babel variable to be set?  This is a point
  that probably needs some explanation, at least for Mac users (I
  realize that the articel might not have been intended as such a
  general introduction with details for all common OSses, but it would
  be nice if this can be gradually supplemented).
 
  One last remark; since this is an online publication, I think using
  proper fontification for the examples and org source code would be
  even more appealing, especially for people who encounter org for the
  first time.

 Could you be more specific here?  It might be obvious to others, but I
 don't understand what you mean by proper fontification.

 All the best,
 Tom

 
  Keep up the excellent work!!
 
  Christian
 
 
 
  On 2012-01-27 23:43, Eric Schulte wrote:
  Hopefully this will serve as the canonical introduction to working with
  code blocks in Org-mode.
 
  As we acknowledge in the paper this work would not have been possible
  without the ideas and feedback of the Org-mode community, so thanks all!
 
  Nick Dokosnicholas.do...@hp.com  writes:
 
  Andreas Lehaandreas.l...@med.uni-goettingen.de  wrote:
 
  Hi all,
 
  this just came into my inbox:
  http://www.jstatsoft.org/v46/i03
 
  Great work!  Big thanks to the authors.
 
  I remember reading it with great pleasure back when Eric posted it to
  the list: beautiful stuff. I look forward to rereading it.
 
  Congratulations!
 
  Nick
 
 

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




Re: [O] org-src-fontify-natively (was: org-mode in the press)

2012-01-28 Thread Dov Grobgeld
Great! That must be a new addition that I missed. It is not perfect though,
as I use a variable font for org-mode, which is inherited by the embedded
source code block when I turn on org-src-fontify-natively . Is there any
way of preventing that so blocks are always in e.g. Inconsolata?

I found that the block background color may be changed by
org-block-background which is nice to make a visual distinction of source
code sections!

Regards,
Dov

On Sat, Jan 28, 2012 at 19:06, Eric Schulte eric.schu...@gmx.com wrote:


  I also love the embedded code (though I wish it was possible to syntax
  highlight it!),

 It is possible, just add the following to your Emacs configuration.

 (setq org-src-fontify-natively t)

 Cheers,

  external links, and tables.
 
  Thanks again!
  Dov
 
  On Sat, Jan 28, 2012 at 18:18, Thomas S. Dye t...@tsdye.com wrote:
 
  Aloha Christian,
 
  Thanks for your comments.  It is great to have feedback.
 
  Christian Wittern cwitt...@gmail.com writes:
 
   I think this is an excellent article, introducing an aspect of
   org-mode, which I think fills a gap that no other software I know of
   comes even close to approach.  I already started mentioning it in
   conversations and am sure it will be very useful to many members of
   the academic community.
  
   Just to make sure I could answer any follow up questions, I downloaded
   the replication bundle and started installing the dependencies.  I
   encountered a few problems and hope this is the right place to discuss
   them.  BTW, I am working with this on a Mac OS X 10.6 machine.
  
   Most of the dependencies I already had or  installed them from
   macports.  One problem I encountered was with installing the RSQLite
   package.  Executing the installation command from the README file did
   not work because of permission issues, the command needs to run with
   superuser rights.  Is it possible to give these rights to commands run
   from babel?  Since I did not find a way to do that, I installed from
   the R commandline, where I found that the name of the package is
   RSQLite, not 'RSQlite' as given in the readme file.
  
   The one dependency I could not solve was the 'dot' executable.  I
   assume this is an interpreter for the dot language, for which it seems
   the program on the Mac is named graphviz.  However, I am not sure how
   to make that work with org/babel.  Should I simply symlink to
   graphviz?  Or is there a babel variable to be set?  This is a point
   that probably needs some explanation, at least for Mac users (I
   realize that the articel might not have been intended as such a
   general introduction with details for all common OSses, but it would
   be nice if this can be gradually supplemented).
  
   One last remark; since this is an online publication, I think using
   proper fontification for the examples and org source code would be
   even more appealing, especially for people who encounter org for the
   first time.
 
  Could you be more specific here?  It might be obvious to others, but I
  don't understand what you mean by proper fontification.
 
  All the best,
  Tom
 
  
   Keep up the excellent work!!
  
   Christian
  
  
  
   On 2012-01-27 23:43, Eric Schulte wrote:
   Hopefully this will serve as the canonical introduction to working
 with
   code blocks in Org-mode.
  
   As we acknowledge in the paper this work would not have been possible
   without the ideas and feedback of the Org-mode community, so thanks
 all!
  
   Nick Dokosnicholas.do...@hp.com  writes:
  
   Andreas Lehaandreas.l...@med.uni-goettingen.de  wrote:
  
   Hi all,
  
   this just came into my inbox:
   http://www.jstatsoft.org/v46/i03
  
   Great work!  Big thanks to the authors.
  
   I remember reading it with great pleasure back when Eric posted it
 to
   the list: beautiful stuff. I look forward to rereading it.
  
   Congratulations!
  
   Nick
  
  
 
  --
  Thomas S. Dye
  http://www.tsdye.com
 
 

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



Re: [O] org-src-fontify-natively (was: org-mode in the press)

2012-01-28 Thread Dov Grobgeld
I investigated this and found that this may almost be fixed by doing:

;; Make all font-lock faces fonts use inconsolata
(dolist (face '(font-lock-builtin-face
font-lock-comment-delimiter-face
font-lock-comment-face
font-lock-constant-face
font-lock-doc-face
font-lock-function-name-face
font-lock-keyword-face
font-lock-negation-char-face
font-lock-preprocessor-face
font-lock-regexp-grouping-backslash
font-lock-regexp-grouping-construct
font-lock-string-face
font-lock-type-face
font-lock-variable-name-face
font-lock-warning-face))
  (set-face-attribute face nil :family my-default-family))

But unfortunately not fully, because both source code (at least in python)
and org-mode make use of the default font. And since I change this at
org-mode startup to the variable-pitch the result is that I inherit this
in the source code blocks as well.

A solution would be that all org-mode faces would inherit a common
org-mode-face. You could then customize this font to a variable-pitch
without using the ~variable-pitch-mode~ command. Is this feasible?

Regards,
Dov


On Sat, Jan 28, 2012 at 19:30, Dov Grobgeld dov.grobg...@gmail.com wrote:

 Great! That must be a new addition that I missed. It is not perfect
 though, as I use a variable font for org-mode, which is inherited by the
 embedded source code block when I turn on org-src-fontify-natively . Is
 there any way of preventing that so blocks are always in e.g. Inconsolata?

 I found that the block background color may be changed by
 org-block-background which is nice to make a visual distinction of source
 code sections!

 Regards,
 Dov

 On Sat, Jan 28, 2012 at 19:06, Eric Schulte eric.schu...@gmx.com wrote:


  I also love the embedded code (though I wish it was possible to syntax
  highlight it!),

 It is possible, just add the following to your Emacs configuration.

 (setq org-src-fontify-natively t)

 Cheers,

  external links, and tables.
 
  Thanks again!
  Dov
 
  On Sat, Jan 28, 2012 at 18:18, Thomas S. Dye t...@tsdye.com wrote:
 
  Aloha Christian,
 
  Thanks for your comments.  It is great to have feedback.
 
  Christian Wittern cwitt...@gmail.com writes:
 
   I think this is an excellent article, introducing an aspect of
   org-mode, which I think fills a gap that no other software I know of
   comes even close to approach.  I already started mentioning it in
   conversations and am sure it will be very useful to many members of
   the academic community.
  
   Just to make sure I could answer any follow up questions, I
 downloaded
   the replication bundle and started installing the dependencies.  I
   encountered a few problems and hope this is the right place to
 discuss
   them.  BTW, I am working with this on a Mac OS X 10.6 machine.
  
   Most of the dependencies I already had or  installed them from
   macports.  One problem I encountered was with installing the RSQLite
   package.  Executing the installation command from the README file did
   not work because of permission issues, the command needs to run with
   superuser rights.  Is it possible to give these rights to commands
 run
   from babel?  Since I did not find a way to do that, I installed from
   the R commandline, where I found that the name of the package is
   RSQLite, not 'RSQlite' as given in the readme file.
  
   The one dependency I could not solve was the 'dot' executable.  I
   assume this is an interpreter for the dot language, for which it
 seems
   the program on the Mac is named graphviz.  However, I am not sure how
   to make that work with org/babel.  Should I simply symlink to
   graphviz?  Or is there a babel variable to be set?  This is a point
   that probably needs some explanation, at least for Mac users (I
   realize that the articel might not have been intended as such a
   general introduction with details for all common OSses, but it would
   be nice if this can be gradually supplemented).
  
   One last remark; since this is an online publication, I think using
   proper fontification for the examples and org source code would be
   even more appealing, especially for people who encounter org for the
   first time.
 
  Could you be more specific here?  It might be obvious to others, but I
  don't understand what you mean by proper fontification.
 
  All the best,
  Tom
 
  
   Keep up the excellent work!!
  
   Christian
  
  
  
   On 2012-01-27 23:43, Eric Schulte wrote:
   Hopefully this will serve as the canonical introduction to working
 with
   code blocks in Org-mode.
  
   As we acknowledge in the paper this work would not have been
 possible
   without the ideas and feedback of the Org-mode community, so thanks
 all!
  
   Nick Dokosnicholas.do...@hp.com  writes:
  
   Andreas Lehaandreas.l...@med.uni-goettingen.de  wrote

[O] Error in the Tables in HTML export section of the manual

2011-12-11 Thread Dov Grobgeld
In the example of Tables in HTML export the example sais:

 #+ATTR_HTML: border=2 rules=all frame=all

This is wrong HTML syntax. It should be:

 #+ATTR_HTML: border=2 rules=all frame=border

Regards,
Dov


Re: [O] Different face for org-table fields with formulas

2011-12-05 Thread Dov Grobgeld
I had a look at the org-mode sources and found that this was quite trivial
to implement on the source level. E.g. the following patch embeds the
output of an org formula in ~~ to make it org-verbatim. This is easily
changed to another couple of characters that may then be set in
org-emphasis-alist to whatever formatting I fancy.

index edcdbe1..9ad01d4 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2572,7 +2572,7 @@ $1-%s\n orig formula form0 form))
 (message )))
 (if (listp ev) (setq fmt nil ev #ERROR))
 (org-table-justify-field-maybe
- (if fmt (format fmt (string-to-number ev)) ev))
+ (format ~%s~ (if fmt (format fmt (string-to-number ev)) ev)))
 (if (and down ( ndown 0) (looking-at .*\n[ \t]*|[^-]))
 (call-interactively 'org-return)
   (setq ndown 0)))



On Sun, Dec 4, 2011 at 09:15, Dov Grobgeld dov.grobg...@gmail.com wrote:

 Has anyone hacked up the use of using a different face for org-table
 fields with formulas. This would be useful for quickly realizing what are
 inputs and outputs in a org spreadsheet. Currently I do this by adding the
 formatting ;~%.4f~ to my formulas. But it would be nicer if this was a
 settable property.

 Thanks!
 Dov




[O] Different face for org-table fields with formulas

2011-12-03 Thread Dov Grobgeld
Has anyone hacked up the use of using a different face for org-table fields
with formulas. This would be useful for quickly realizing what are inputs
and outputs in a org spreadsheet. Currently I do this by adding the
formatting ;~%.4f~ to my formulas. But it would be nicer if this was a
settable property.

Thanks!
Dov


[O] Idea, configurable markup

2011-09-19 Thread Dov Grobgeld
I got the following idea regarding the use of markup characters in org-mode.
Currently it is possible to use *bold*, /italic/ and ~verbose~ and a few
other markups. I would have liked to have this extended as follows:

   - Allow the toggling of the display of the formatting characters, *, ~,
   /, etc.
   - Allow a system that allows the user to invent his own formatting. E.g.
   «variable», 〈function〉, $math$, ⌞string⌟, or whatever the user fancies. All
   these modes should be defined in an org-mode variable and the display
   attributes should be configurable, just like any other custom org-mode font.
   If the user wants to expand beyond ASCII it should be up to him.
   - Alternately, use a system like varvariable/var where the tag var
   is user definable, just like the magic characters above. The display of the
   tags should be toggable. Just like for [file:foo.bar] where the [] character
   are hidden, should the tags be hidden until someone erases one of the two
   delimiters.

Note that this is nothing more than ideas at the moment, and I'll probably
never get around to implement any of it. Still I thought I'd share it if
someone would like to have a go.

Regards,
Dov


Re: [O] org-edit-file ?

2011-07-21 Thread Dov Grobgeld
I'm not sure that emacs is the best tool to e.g. generate a template png
file of a given size and given background, or a svg file. I still don't feel
that any of the proposed solutions solves the file:foo.svg edit scenario,
where foo.svg does not exist yet. Also I would rather differentiate between
opening a few for viewing and opening a file for editing, as e.g. eog and
inkview are good for viewing, whereas gimp and inkscape are better for
editing.

Regards,
Dov

On Thu, Jul 21, 2011 at 12:32, Bastien b...@altern.org wrote:

 Hi Dov,

 Jambunathan K kjambunat...@gmail.com writes:

  have a a new command org-edit-file that would:
 
  If the file does not exist, copy a skeleton file to the filename
  or generate the skeleton file by an emacs-function or by calling
  an external application.

 Such a functionality belongs to Emacs itself rather than Org-mode.
 Are you aware of existing templating facilities?

  http://emacs-template.sourceforge.net/

  Call the configured editor application on the new file.
  If invoked with Ctrl-u , allow the user to specify what editor to
  run on the file, e.g. inkscape, or killustrator on svg files.
 
  Does something like this already exists?
 
  Start from C-h f org-open-file.

 Indeed!

 Best,

 --
  Bastien



[O] org-edit-file ?

2011-07-20 Thread Dov Grobgeld
I just thought of an idea that I wonder if someone has implemented.

While writing my journal I find myself wanting to insert a graphics file,
e.g. a svg file and I write *file:foo.svg* . After having written the name
I  enter inkscape to create the contents of the file. To do that I have to
run inkscape manually and eventually doing saveas and navigate to the
correct directory to save the file. So my idea is to have a a new command
org-edit-file that would:

   - If the file does not exist, copy a skeleton file to the filename or
   generate the skeleton file by an emacs-function or by calling an external
   application.
   - Call the configured editor application on the new file.
   - If invoked with Ctrl-u , allow the user to specify what editor to run
   on the file, e.g. inkscape, or killustrator on svg files.

Does something like this already exists?

Regards,
Dov


Re: [O] print booklet from orgmode

2011-05-17 Thread Dov Grobgeld
You might also want to have a look at the following scripts that I wrote
lots of years ago that allow creating a booklet of an arbitrary postscript
file. They might be broken though after all these years. Please let me know
of any problems. See:

http://imagic.weizmann.ac.il/~dov/freesw/impose+/index.html

Regards,
Dov

On Tue, May 17, 2011 at 09:36, Christian Egli christian.e...@sbs.ch wrote:

 Matt Lundin m...@imapmail.org writes:

  Marc Spitzer mspit...@gmail.com writes:

  http://www.toodledo.com/booklet.php
 
  Does org mode have such a feature?
 
  Here's an old post with a script to generate something similar. I have
  no idea whether it still works:
 
  http://permalink.gmane.org/gmane.emacs.orgmode/3910

 As far as I know it should still work and is included in the
 contrib/scripts directory under the name of org2hpda (see

 http://orgmode.org/w/?p=org-mode.git;a=blob;f=contrib/scripts/org2hpda;hb=HEAD
 ).

 I guess if you also wanted to have the top tasks you need to enhance the
 script somewhat, i.e. invoke an agenda view in Emacs, export and include
 it in the booklet. Let me know if you have any problems.

 Thanks
 Christian

 --
 Christian Egli
 Swiss Library for the Blind, Visually Impaired and Print Disabled
 Grubenstrasse 12, CH-8045 Zürich, Switzerland





[Orgmode] Orgmode and Unicode characters

2010-12-06 Thread Dov Grobgeld
Even though this announcement looks very cool, this again reminded me of
something I've been thinking off when using orgmode. And that is the use of
unicode characters. With the latest versions of emacs that support unicode
and with rich fonts such as DejaVu Monospace, it is as easy to use unicode
characters as ascii. What I was thinking of is that the current ascii
graphics of e.g. tables could automatically be switched to box drawing
characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
pressing C-c or Tab. Other characters that could be used are automatic
replacement of leading asterisks to various bullets. Each indentation level
could be given a different bullets. E.g. *==▸, **==●, etc. I'm sure that
arrows and various brackets may also be useful for various contexts.

Of course the use of these characters would be configurable and would be
turned off automatically for buffers that are not UTF-8 encoded.

Perhaps I'll one day learn the inner workings of org-mode sufficiently to do
this myself, but if there is someone who meanwhile wants to pick up the
idea, you're welcome!

Regards,
Dov

On Mon, Dec 6, 2010 at 09:05, Nathan Neff nathan.n...@gmail.com wrote:

 Much easier to read, and I love the nesting/indenting of
 sub-headings.

 http://nateneff.com/   - Need to understand 
 org-mode-clockreport-rules.htmlhttp://nateneff.com/org-mode-clockreport-rules.html

 --Nate

 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Orgmode and Unicode characters

2010-12-06 Thread Dov Grobgeld
The way I see it, within org-mode you wouldn't have to change anything in
your input, but C-c C-c or other hot keys would do the change automatically.
But I really don't mind if the underlying buffer stays the same, but only
the display changes.

Secondly, typing Unicode characters is pretty easy in emacs through its
input modes. I have recently working on a special input mode for the
key-starved N900 keyboard and it is really simple through quail. For box
characters, you may e.g. use input mode rfc1345 through C-\ rfc1345, and
then type:

drhhdl
vv vv
urhhul

which results in:
┌─┐
│ │
└─┘
Obviously the display of these fancy characters is only syntactic suger, but
so is the use of font colors in the buffer.

Regards,
Dov

On Mon, Dec 6, 2010 at 16:58, Eric Schulte schulte.e...@gmail.com wrote:

 My only worry on this front is that I know how to type | and - for
 tables, and how to type * for headings, but I don't have an easy way
 to type utf8 characters.

 If Org-mode starts using exotic utf8 characters which can not easily be
 typed from outside of Org-mode then it loses some of the it's all plain
 text appeal.

 I agree with Darlan that something using Emacs display functionality
 (like used by org-pretty-entities) could be preferable because it would
 preserve the underlying text.

 Best -- Eric

 Darlan Cavalcante Moreira darc...@gmail.com writes:

  If changing the actual character in the file is be the best option (maybe
  it could cause problems for the exporters), then an approach similar to
  org-pretty-entities could be used for this.
 
  --
  Darlan
 
  At Mon, 6 Dec 2010 11:19:55 +0200,
  Dov Grobgeld dov.grobg...@gmail.com wrote:
 
  Even though this announcement looks very cool, this again reminded me of
  something I've been thinking off when using orgmode. And that is the use
 of
  unicode characters. With the latest versions of emacs that support
 unicode
  and with rich fonts such as DejaVu Monospace, it is as easy to use
 unicode
  characters as ascii. What I was thinking of is that the current ascii
  graphics of e.g. tables could automatically be switched to box drawing
  characters (http://en.wikipedia.org/wiki/Box-drawing_characters) when
  pressing C-c or Tab. Other characters that could be used are automatic
  replacement of leading asterisks to various bullets. Each indentation
 level
  could be given a different bullets. E.g. *==▸, **==●, etc. I'm sure
 that
  arrows and various brackets may also be useful for various contexts.
 
  Of course the use of these characters would be configurable and would be
  turned off automatically for buffers that are not UTF-8 encoded.
 
  Perhaps I'll one day learn the inner workings of org-mode sufficiently
 to do
  this myself, but if there is someone who meanwhile wants to pick up the
  idea, you're welcome!
 
  Regards,
  Dov
 
  On Mon, Dec 6, 2010 at 09:05, Nathan Neff nathan.n...@gmail.com
 wrote:
 
   Much easier to read, and I love the nesting/indenting of
   sub-headings.
  
   http://nateneff.com/   - Need to understand
 org-mode-clockreport-rules.html
 http://nateneff.com/org-mode-clockreport-rules.html
  
   --Nate
  
   ___
   Emacs-orgmode mailing list
   Please use `Reply All' to send replies to the list.
   Emacs-orgmode@gnu.org
   http://lists.gnu.org/mailman/listinfo/emacs-orgmode
  
 
  ___
  Emacs-orgmode mailing list
  Please use `Reply All' to send replies to the list.
  Emacs-orgmode@gnu.org
  http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Generated images in buffer

2010-11-28 Thread Dov Grobgeld
Thanks! So it possible for LaTeX, but not for other image generators. That's
a bit unfair. How difficult would it be to generalize this so that it would
support any image generator?

Regards,
Dov

On Sun, Nov 28, 2010 at 09:34, Jeff Horn jrhorn...@gmail.com wrote:

 On Sun, Nov 28, 2010 at 2:04 AM, Dov Grobgeld dov.grobg...@gmail.com
 wrote:
  The same idea could be used for any system generating images, e.g. LaTeX
  formulas, asymptote, a python script using cairo, etc.

 I think evaluating Babel code blocks can insert output into your org-file.

 Also, I regularly use =C-c C-x C-l= to display rendered LaTeX
 equations in-buffer. That keystroke only displays the current
 subtree's equations. With a prefix, it will generate previews for the
 entire document.

 Best,
 Jeff

 --
 Jeffrey Horn
 Graduate Lecturer and PhD Student in Economics
 George Mason University

 (704) 271-4797
 jh...@gmu.edu
 jrhorn...@gmail.com

 http://www.failuretorefrain.com/jeff/

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Generated images in buffer

2010-11-28 Thread Dov Grobgeld
Thanks! This is exactly what I was looking for. And indeed it is as easy to
output a graph from python (or any other language) as it is from ditaa:

* A ditaa image
#+begin_src ditaa :file example.png
+-+
| cBLU|
| |
|++
||cPNK|
|||
+++
#+end_src

#+results:
[[file:example.png]]
* A Python image
#+begin_src python :file circle.png
import cairo,math, os

width, height = 256,256
surface = cairo.ImageSurface (cairo.FORMAT_ARGB32, width, height)
ctx = cairo.Context (surface)
ctx.set_source_rgb(0,0,0)
ctx.rectangle(0,0,width,height)
ctx.fill()
ctx.set_source_rgb(1,1,1)
ctx.move_to(width/2,height/2)
ctx.arc(width/2,height/2,width*0.25,0,math.pi*2)
ctx.fill()
surface.write_to_png(circle.png)
#+end_src

#+results:

[[file:circle.png]]

* A matplotlib graph from http://matplotlib.sourceforge.net

#+begin_src python :file graph.png
from pylab import *

t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s, linewidth=1.0)

xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
savefig(graph.png,dpi=50)
#+end_src

#+results:

[[file:graph.png]]

I'm wondering over one thing though. When exporting to HTML, the ditaa
source code is omitted, but the python source code is included. Is there any
way of controlling this in begin_src?

Thanks!
Dov


On Sun, Nov 28, 2010 at 19:27, Dan Davison dandavis...@gmail.com wrote:

  (add-hook 'org-babel-after-execute-hook
(lambda () (org-display-inline-images nil t)))

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Generated images in buffer

2010-11-27 Thread Dov Grobgeld
I'm still feel quite a newbie to org-mode and I've been looking for a way to
include dependent images within the emacs buffer, but I still haven't
found it.

As an example, assume that I have manully created a diagram with ditaa code,
and once I am finishede diting  I'd like to press a keystroke e.g. Ctrl-C
Ctrl-C and have the contents change to the generated output image, and the
ditaa code will be hidden. When subsequently navigating to the image there
should be some indicator that this is a generated image and some keystroke
should allow turning the image back to its source code.

The same idea could be used for any system generating images, e.g. LaTeX
formulas, asymptote, a python script using cairo, etc.

Similarly if the source code is svg I might not want to display the source
code at all (which might be large), but would like to invoke inkscape to
edit the svg data. This is better done by referencing the svg as an external
image, instead of having it inline, but I would still like to easily invoke
an editor application from within emacs with a simple keystroke.

So is this currently possible?

Thanks,
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Error running ditaa

2010-11-23 Thread Dov Grobgeld
When running ditaa on Linux fedora 12 through java, I get the following
errors:

java -jar /usr/share/java/ditaa.jar -r -S /tmp/org-ditaa27392h-V
blue_fd02b5c06d6a5cb80eaf27098c3c490dc81326ce.png
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
Exception in thread main java.lang.NoClassDefFoundError:
org/apache/commons/cli/ParseException
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.cli.ParseException
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
Could not find the main class:
org.stathissideris.ascii2image.core.CommandLineConverter. Program will exit.

This can be taken care of by using the shell script that comes with ditaa,
i.e.:

ditaa  -r -S /tmp/org-ditaa27392h-V

But to do this from within emacs I need to patch org-exp-blocks.el as
follows:

-(unless (file-exists-p org-ditaa-jar-path)
- (error (format Could not find ditaa.jar at %s org-ditaa-jar-path)))
:
-(message (concat java -jar  org-ditaa-jar-path   args  
data-file   out-file))
-(shell-command (concat java -jar  org-ditaa-jar-path   args  
data-file   out-file)))
+(message (concat ditaa  args   data-file   out-file))
+(shell-command (concat ditaa  args   data-file   out-file)))

(You also need to erase the checking for the existance of dita.jar)

Wouldn't it make more sense to replace the variable org-ditaa-jar-path with
a new variable org-ditaa-command that by default contains java -jar
/old/value/of/org-ditaa-jar-path? This would allow replacing it with a
shell script. Would a patch be accepted, or do you prefer to remain backward
compatible?

On a related question. Since there is quite a lot of common code between
org-export-blocks-format-dot and org-export-blocks-format-ditaa (especially
if my patch is accepted), wouldn't it make sense to create a
org-export-blocks-format-meta that take all the differences between the
various export-blocks as parameters? This would simplify adding additional
org-export-blocks.

Regards,
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Why are src_perl{} immediately executed?

2010-11-14 Thread Dov Grobgeld
Ok. Thanks for clarifying it. The documentation isn't clear on this issue.

Regards,
Dov

On Sun, Nov 14, 2010 at 18:03, Eric Schulte schulte.e...@gmail.com wrote:

 Hi Dov,

 That is correct, there is no method of highlighting inline code blocks,
 the begin_src constructs are just for evaluation of inline code.

 You can customized the `org-babel-default-inline-header-args' to inhibit
 the execution of inline code blocks on export.

 Best -- Eric

 Dov Grobgeld dov.grobg...@gmail.com writes:

  From the documentation I see now difference between inline and multi-line
  behavior. Note that I did not wish to evaluate the code at all but just
 have
  inline syntax highlighting in my html export. Is src_perl{foo()} for
  evaluation only and not for source highlighting?
 
  Thanks,
  Dov
 
  On Sun, Nov 14, 2010 at 04:49, Noorul Islam noo...@noorul.com wrote:
 
  On Sun, Nov 14, 2010 at 3:34 AM, Dov Grobgeld dov.grobg...@gmail.com
  wrote:
   From the documentation it seems like a statement such as
 src_perl{foo()}
  are
   inline version of the multi line:
  
   #+src_perl
   foo();
   #+end_src
  
   But when exporting the org file to html I get the question Evaluate
 this
   perl code on your system for the inline version, but not for the
  multiline
   version. Is this a bug or did I miss something?
  
 
 
  You can customize this with the variable org-confirm-babel-evaluate
 
  Thanks and Regards
  Noorul
 
  ___
  Emacs-orgmode mailing list
  Please use `Reply All' to send replies to the list.
  Emacs-orgmode@gnu.org
  http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Why are src_perl{} immediately executed?

2010-11-13 Thread Dov Grobgeld
From the documentation it seems like a statement such as src_perl{foo()} are
inline version of the multi line:

#+src_perl
foo();
#+end_src

But when exporting the org file to html I get the question Evaluate this
perl code on your system for the inline version, but not for the multiline
version. Is this a bug or did I miss something?

Thanks!
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Why are src_perl{} immediately executed?

2010-11-13 Thread Dov Grobgeld
From the documentation I see now difference between inline and multi-line
behavior. Note that I did not wish to evaluate the code at all but just have
inline syntax highlighting in my html export. Is src_perl{foo()} for
evaluation only and not for source highlighting?

Thanks,
Dov

On Sun, Nov 14, 2010 at 04:49, Noorul Islam noo...@noorul.com wrote:

 On Sun, Nov 14, 2010 at 3:34 AM, Dov Grobgeld dov.grobg...@gmail.com
 wrote:
  From the documentation it seems like a statement such as src_perl{foo()}
 are
  inline version of the multi line:
 
  #+src_perl
  foo();
  #+end_src
 
  But when exporting the org file to html I get the question Evaluate this
  perl code on your system for the inline version, but not for the
 multiline
  version. Is this a bug or did I miss something?
 


 You can customize this with the variable org-confirm-babel-evaluate

 Thanks and Regards
 Noorul

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-htmlslidy

2010-11-12 Thread Dov Grobgeld
org-htmlslidy is an org-mode html export option that outputs the result in
HTML Slidy format, see: http://www.w3.org/Talks/Tools/Slidy2/#%281%29 .

The work in progress may be downloaded from:

https://github.com/dov/org-slidy

Note that the resulting output may be heavily modified by supplying
additional css setup. E.g. the following header to an org file may be used
to choose the color and icons used on the W3C pages (you have to download
them locally as well).

#+STYLE: link rel='stylesheet' href='blue.css' type='text/css'  / link
rel='stylesheet' href='dov.css' type='text/css'  /
#+BIND: org-htmlslidy-html-preamble-footer h1A perl test/h1
#+BIND: org-export-html-preamble div class='background slanty'img
src='graphics/w3c-logo-slanted.jpg' alt='slanted W3C logo' //divdiv
class='background'img alt='' id='head-icon' src='graphics/icon-blue.png'
//a/object/div

Thanks a lot to the author of org-s5, Yann Hodique! org-htmlslidy is just a
slight modification of his module.

Regards,
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: s5 presentation

2010-11-11 Thread Dov Grobgeld
Great! Thanks! Finally got it working.

Next question. Is it possible to get syntax highlighting in s5/org? This
might be more related to s5 than to s5-org though.

#+SETUPFILE: s5.org
#+TITLE: Perl
#+AUTHOR: Dov Grobgeld
#+BIND: org-s5-html-preamble-footer h1A perl test/h1

* Perl
- A simple perl program

#+begin_src perl
  #!/usr/bin/perl
  while() {
  print $.: $_;
  }
#+end_src

* Thanks
Bye bye!

Thanks,
Dov

On Thu, Nov 11, 2010 at 12:31, Yann Hodique yhodi...@vmware.com wrote:

  Dov == Dov Grobgeld dov.grobg...@gmail.com writes:

  Thanks for your code, and for your help.
  I don't know what I did yesterday, but today, I got queried whether to
 allow
  BIND values in the buffer, and I then  managed to see s5-demo.org in S5
 mode
  in my browser, but something is messed up in the display. I see the first
  slide, but in a layer below it, the html text appears, and thus I have
 two
  layers of text which, one which scrolls (below) and one static (on top).
 I
  checked it with two firefox versions and two S5 versions but the problem
  remains. I put the resulting html file at:

  http://imagic.weizmann.ac.il/~dov/s5test/s5-demo.htmlhttp://imagic.weizmann.ac.il/%7Edov/s5test/s5-demo.html

  Do you have any idea of what wrong?

 After a quick look, it would seem that you're missing jquery.js and
 org-slides.js in your /~dov/s5test/ui directory

 Or maybe they're here, and there is a permission problem with those
 files ?

 In any case 
 http://imagic.weizmann.ac.il/~dov/s5test/ui/jquery.jshttp://imagic.weizmann.ac.il/%7Edov/s5test/ui/jquery.jsgives
 a 404 error. Same for org-slides.js

 The consequence is that S5 is activated, but the document is not
 transformed correctly to fit into the expected model (hence the garbage
 display)

 Hope this helps,

 Yann.

 --
 How simple things were when our Messiah was only a dream.

  -- STILGAR, Naib of Sietch Tabr


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: s5 presentation

2010-11-11 Thread Dov Grobgeld
Thanks. Indeed after installing htmlize did the html export contain the
proper css formatting for keyword highlighting. But the generated html
(neither in s5 org mode nor in normal html mode) does not contain the
corresponding css for the syntax highllighted attributes (e.g. .org-string ,
.org-keyword, etc). But this is already outside the scope of s5-org and I'll
ask this in a separate question.

Regards,
Dov

On Thu, Nov 11, 2010 at 13:34, Yann Hodique yhodi...@vmware.com wrote:

  Dov == Dov Grobgeld dov.grobg...@gmail.com writes:

  Great! Thanks! Finally got it working.
  Next question. Is it possible to get syntax highlighting in s5/org? This
  might be more related to s5 than to s5-org though.

 Sure, but it's actually an org-mode question :)

  #+SETUPFILE: s5.org
  #+TITLE: Perl
  #+AUTHOR: Dov Grobgeld
  #+BIND: org-s5-html-preamble-footer h1A perl test/h1

  * Perl
  - A simple perl program

  #+begin_src perl
#!/usr/bin/perl
while() {
print $.: $_;
}
  #+end_src

 Well, it just works for me. The HTML export takes care of highlighting
 code blocks (probably using htmlize or something similar). Then org-s5
 doesn't transform at all those parts of the document.

 In your case I'd say that probably the source code exporter might fail
 for whatever reason. Is it doing the right thing for regular HTML
 export ?

 Alternately, I might have configured something somewhere to have code
 highlighting enabled, but I can't remember :) (and definitely not
 anything specific to org-s5). Anyway I suspect the problem is more on
 the org-mode side this time, whatever it is.

 Yann.

 --
 One uses power by grasping it lightly.  To grasp with too much force is to
 be
 taken over by power, thus becoming its victim.

  -- Bene Gesserit Axiom


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-mode and htmlslidy

2010-11-11 Thread Dov Grobgeld
In looking for the perfect slide show generation from org-mode I have so far
checked the following and found that they have serious problems:

   - epresenter - Keyboard gets stuck, little control over display.
   - org-s5 - No support for pages overflowing, e.g. when showing a long
   slides I would like to scroll

Looking around the net I found the following javascript that seems that it
could do the job:

http://www.w3.org/Talks/Tools/Slidy2/#%283%29

How difficult would it be to connect it to org-mode? Am I right that it
would simply be a relatively small rewrite of org-s5.el?

Regards,
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode and htmlslidy

2010-11-11 Thread Dov Grobgeld
Thanks. Didn't know that. But it seems like you are then placed in the
beginning of the html-page and have to search for the position of the slide
that you were at. Not something that you are likely to want to do in the
middle of a presentation. (This might make the audience long for
PowerPoint...)

Regards,
Dov

On Thu, Nov 11, 2010 at 15:08, Christian Moe m...@christianmoe.com wrote:

 On 11/11/10 1:48 PM, Dov Grobgeld wrote:

 * org-s5 - No support for pages overflowing, e.g. when showing a

  long slides I would like to scroll


 You can toggle s5 between slide view and ordinary web page view in the
 midst of a presentation.

 This also helps the audience realize that you're using something /way/
 cooler than Powerpoint...
 :)

 Yours,
 Christian


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode and htmlslidy

2010-11-11 Thread Dov Grobgeld
Does beamer and impressive support scrolling? I assume not as beamer is
LaTeX based which also uses fixed paper size. The paradigm of fixed size
slides is imho a remnant from a time when slides were hardware and placed
on a overhead projector. I see no reason why shouldn't be able to scroll a
long slide during a presentation if you can't fit it all on a single screen
full.

Regards,
Dov

On Thu, Nov 11, 2010 at 15:17, John Hendy jw.he...@gmail.com wrote:



 On Thu, Nov 11, 2010 at 6:48 AM, Dov Grobgeld dov.grobg...@gmail.comwrote:

 In looking for the perfect slide show generation from org-mode I have so
 far checked the following and found that they have serious problems:

- epresenter - Keyboard gets stuck, little control over display.
- org-s5 - No support for pages overflowing, e.g. when showing a long
slides I would like to scroll

 What about beamer? To date I haven't found anything I like as much! It
 just seems to do about everything... even if that means hunting down the
 occasional obscure code to force it to do my will!

 You can combine it with impressive! and do some fantastic things during
 presentations: http://impressive.sourceforge.net/


 John

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode and htmlslidy

2010-11-11 Thread Dov Grobgeld
On Thu, Nov 11, 2010 at 15:38, John Hendy jw.he...@gmail.com wrote:


 What about prezi, then? No orgmode integration but seems to be the least
 powerpoint-ish and reminiscent of the olden days? http://prezi.com/


You've got any idea of how to conceptually map a orgmode document into the
non-linear mode of prezi?  It certainly supports scrolling, though.

Dov



 John


 Regards,
 Dov


 On Thu, Nov 11, 2010 at 15:17, John Hendy jw.he...@gmail.com wrote:



 On Thu, Nov 11, 2010 at 6:48 AM, Dov Grobgeld dov.grobg...@gmail.comwrote:

 In looking for the perfect slide show generation from org-mode I have so
 far checked the following and found that they have serious problems:

- epresenter - Keyboard gets stuck, little control over display.
- org-s5 - No support for pages overflowing, e.g. when showing a
long slides I would like to scroll

 What about beamer? To date I haven't found anything I like as much! It
 just seems to do about everything... even if that means hunting down the
 occasional obscure code to force it to do my will!

 You can combine it with impressive! and do some fantastic things during
 presentations: http://impressive.sourceforge.net/


 John




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode and htmlslidy

2010-11-11 Thread Dov Grobgeld
In principle I agree with you 99percent of the time, as descrete slides define 
the pace of the lecture, but at the same time I'm against arbitrary 
limitations. And not being able to scroll is imho such a limitation. Here are a 
couple of examples that I believe justifies scrolling:

* A code listing. Splitting up a listing between two pages looses contents.
* A tall graph, e.g a flow chart.

In this sence I think that htmlslidy is better than s5.
-- 
Sent from my Nokia N900

- Original message -
 If you want scrolling, why don't you simply make a presentation using
 HTML with Org-mode? I mean, just show someone a webpage or two?
 
 Please understand I'm only curious, not hostile. To me, I just don't
 see why you'd want to combine presentations and scrolling... to me,
 the advantage of presentations is their fixed size. It forces me to
 focus on key points due to the limited real estate on each slide.
 
 Why not just make an outline in HTML (with all the pretty charts and
 graphs inserted) and project your talking points on a screen?
 
 On Thu, Nov 11, 2010 at 8:25 AM, Dov Grobgeld dov.grobg...@gmail.com
 wrote:
  Does beamer and impressive support scrolling? I assume not as beamer is
  LaTeX based which also uses fixed paper size. The paradigm of fixed
  size slides is imho a remnant from a time when slides were hardware
  and placed on a overhead projector. I see no reason why shouldn't be
  able to scroll a long slide during a presentation if you can't fit it
  all on a single screen full.
  
  Regards,
  Dov
  
  On Thu, Nov 11, 2010 at 15:17, John Hendy jw.he...@gmail.com wrote:
   
   
   On Thu, Nov 11, 2010 at 6:48 AM, Dov Grobgeld
   dov.grobg...@gmail.com wrote:

In looking for the perfect slide show generation from org-mode I
have so far checked the following and found that they have serious
problems:

epresenter - Keyboard gets stuck, little control over display.
org-s5 - No support for pages overflowing, e.g. when showing a long
slides I would like to scroll
   
   What about beamer? To date I haven't found anything I like as much!
   It just seems to do about everything... even if that means hunting
   down the occasional obscure code to force it to do my will!
   You can combine it with impressive! and do some fantastic things
   during presentations: http://impressive.sourceforge.net/
   
   John
  
  ___
  Emacs-orgmode mailing list
  Please use `Reply All' to send replies to the list.
  Emacs-orgmode@gnu.org
  http://lists.gnu.org/mailman/listinfo/emacs-orgmode
  
  
 
 
 
 -- 
 Jeffrey Horn
 Graduate Lecturer and PhD Student in Economics
 George Mason University
 
 (704) 271-4797
 jh...@gmu.edu
 jrhorn...@gmail.com
 
 http://www.failuretorefrain.com/jeff/

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] org-mode and htmlslidy

2010-11-11 Thread Dov Grobgeld
I tried warping s5-org this morning into slidy-org and I finally got it to
work with one small remaining problem. In the resulting HTML I have:

div id=outline-container-2 class=outline-2

which I want to change to:

div id=outline-container-2 class=class

What is the best way of changing that? I saw that s5-org is using some
jquery rewrites of the xml tree. Is that the best way of solving it? Is
there a possibility of doing this change directly in org-mode without
javascript?

Thanks!
Dov

On Fri, Nov 12, 2010 at 04:27, Jeff Horn jrhorn...@gmail.com wrote:

  * A code listing. Splitting up a listing between two pages looses
 contents.
  * A tall graph, e.g a flow chart.

 These are great examples of the point of being able to scroll. In
 fact, I haven't needed to do either of these yet in my lectures, so I
 didn't realize the value of scrolling.

 But if scrolling and zooming are essential... well, those are already
 built into the browser, so why not just use HTML (or org-mode
 translated to HTML)?

 You can always break up a slide by creating different pages and link
 them all together. I guess linking is the value added of something
 like slidy...

 --
 Jeffrey Horn
 Graduate Lecturer and PhD Student in Economics
 George Mason University

 (704) 271-4797
 jh...@gmu.edu
 jrhorn...@gmail.com

 http://www.failuretorefrain.com/jeff/

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Demote a tree while narrowing?

2010-11-10 Thread Dov Grobgeld
Is it possible to connect narrowing to tree demoting? I'm not sure that I'm
using the right terminology so I'll give an example.

Entire journal:

* 2010
** Jan
*** 2011-01-03 Mon
 Todays agenda
* Do this
* Do that
 Meeting
*** 2011-01-04 Tue
 Todays agenda
* Do this
* Do that
 Meeting

Let's say that I'm narrowing to 2011-01-04 Tue, I'd prefer seeing it like
this:

* 2011-01-04 Tue
** Todays agenda
*** Do this
*** Do that
** Meeting

Thanks!
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] s5 presentation

2010-11-10 Thread Dov Grobgeld
I tried to get the s5 presentation mode from
https://github.com/sigma/org-s5running, but I'm missing something. I
followed all the steps in the README,
but how do you generate the S5:ified html? I tried simply doing [C-c C-e b]
but it did not open up in s5 mode. What am I missing? Should the generated
html contain the contents of preamble in org-s5.el? It does not.

Thanks!
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: s5 presentation

2010-11-10 Thread Dov Grobgeld
Thanks for your code, and for your help.

I don't know what I did yesterday, but today, I got queried whether to allow
BIND values in the buffer, and I then  managed to see s5-demo.org in S5 mode
in my browser, but something is messed up in the display. I see the first
slide, but in a layer below it, the html text appears, and thus I have two
layers of text which, one which scrolls (below) and one static (on top). I
checked it with two firefox versions and two S5 versions but the problem
remains. I put the resulting html file at:

http://imagic.weizmann.ac.il/~dov/s5test/s5-demo.html

Do you have any idea of what wrong?

Thanks!
Dov

On Thu, Nov 11, 2010 at 02:53, Yann Hodique yann.hodi...@gmail.com wrote:

  Dov == Dov Grobgeld dov.grobg...@gmail.com writes:

  I tried to get the s5 presentation mode from
  https://github.com/sigma/org-s5running, but I'm missing something. I
  followed all the steps in the README,
  but how do you generate the S5:ified html? I tried simply doing [C-c C-e
 b]
  but it did not open up in s5 mode. What am I missing? Should the
 generated
  html contain the contents of preamble in org-s5.el? It does not.

 Hi,

 I'm the author of this little hack, so first thanks for your interest :)
 You're right, the goal is to have it work by just exporting to html, so
 C-c C-e b should just work.

 I suspect that you might have not inserted the magic line
 ,
 | #+SETUPFILE: s5.org
 `
 at the beginning of the file you're trying to export as s5.

 Re-reading the README, I must admit it's far from being clear that the
 magic comes from there... (will fix that immediately)

 Does that help ?

 Yann.

 --
 There is no escape--we pay for the violence of our ancestors. 

  -- from The Collected Sayings of Muad'Dib by the Princess Irulan


 ___
 Emacs-orgmode mailing list
 Please use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Migrating my current work flow to org-mode

2010-11-08 Thread Dov Grobgeld
Hello,

During the last few days I have learned about org-mode and I'm starting to
plan how to change my current work flow to org-mode. My current work flow is
as follows:

* At the beginning of every new day I create a horizontal line and a time
stamp.
* I use mediawiki == headers == for headers and * for bulleted items.

Here is the typical view for two days:

-
Monday 2010-11-08 09:49

Worked: 8:00-17:15

== Done/Todo ==

* Add parameter somewhere so that energy graphs take into account that only
part of the panel receives radiation. Do this in run_specific_site.py.
* Teach Alex about python.

== Meeting with Alex and Betty ==

* Todo: run simulation for Tumbaktu.
:
-
Tuesday 2010-11-09 8:31

Worked: 8:17-

== Engine changes ==

* All these will be changed to vectorMatrix  M[panel*2]
** ground_collect_matrix Ok
** sky_diffuse_matrix Ok
** sky_beam_matrix Ok
--

So now I am trying to figure out how to map this into org-mode. Here are
some observations and questions:

   - The horizontal rule is ok in paragraph mode.
   - The timestamp is ok by doing C-c .
   - But the worked line doesn't work if I try to use C-c C-x TAB as it
   complains Before first headline. I could turn the row into a header or
   just insert plain text. Is there a more elegant solution? I don't want to
   have the worked line indexed. Note that the worked line is used at the
   end of the month to summarize the amount of work hours.
   - Is there any way of separating headers from items? I like the
   non-symmetry of the == syntax for headers and * for items, but I guess I
   can get used to that.
   - At my previous work place I used the same notebook file for more than
   10years(!) of notes, and needless to say it got to be very big (around 100k
   lines). Can org-mode handle that size files?
   - How can I customize the exported HTML? E.g. I don't like the table of
   contents or the numbering of headers.

But alltogether org-mode looks great! I'm looking forward to use it both on
my desktop and in emacs on my N900.

Thanks,
Dov
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode