Re: [O] LaTeX export for numbered equations

2012-06-04 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 Hello,
 
 I'm trying to get numbered equations in Beamer, hence using the begin_equation
 block, but the formula is not correctly translated to LaTeX, and I have no
 clue why...
 
 Here an ECM:
 ... 
 - These should be numbered:
 
 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation
 
 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}
 #+end_equation
 ... 

The following workaround seems to be effective in both of these cases:

#+begin_equation
#+LATEX:  \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
#+end_equation

Nick




Re: [O] LaTeX export for numbered equations

2012-06-04 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 Hello,
 
 I'm trying to get numbered equations in Beamer, hence using the begin_equation
 block, but the formula is not correctly translated to LaTeX, and I have no
 clue why...
 


Confirmed (except that I have to comment out hyperref in order to
process the latex file - I get fatal errors otherwise), plus the new
exporter chokes on the same example with the appended backtrace.

Nick

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match(^[  ]*\\[\\(NO-\\)?DEFAULT-PACKAGES\\][ ]*\n? nil)
  (if (string-match ^[ ]*\\[\\(NO-\\)?DEFAULT-PACKAGES\\][ ]*\n? 
tpl) (setq rpl (if (or (match-end 1) (not def-pkg))  
(org-latex-packages-to-string def-pkg snippets-p t)) tpl (replace-match rpl t t 
tpl)) (if def-pkg (setq end (org-latex-packages-to-string def-pkg snippets-p
  (let (rpl (end )) (if (string-match ^[ 
]*\\[\\(NO-\\)?DEFAULT-PACKAGES\\][ ]*\n? tpl) (setq rpl (if (or 
(match-end 1) (not def-pkg))  (org-latex-packages-to-string def-pkg 
snippets-p t)) tpl (replace-match rpl t t tpl)) (if def-pkg (setq end 
(org-latex-packages-to-string def-pkg snippets-p (if (string-match 
\\[\\(NO-\\)?PACKAGES\\][ ]*\n? tpl) (setq rpl (if (or (match-end 1) (not 
pkg))  (org-latex-packages-to-string pkg snippets-p t)) tpl (replace-match 
rpl t t tpl)) (if pkg (setq end (concat end \n (org-latex-packages-to-string 
pkg snippets-p) (if (string-match \\[\\(NO-\\)?EXTRA\\][  ]*\n? tpl) 
(setq rpl (if (or (match-end 1) (not extra))  (concat extra \n)) tpl 
(replace-match rpl t t tpl)) (if (and extra (string-match \\S- extra)) (setq 
end (concat end \n extra (if (string-match \\S- end) (concat tpl \n 
end) tpl))
  org-splice-latex-header(nil ((AUTO inputenc t) (T1 fontenc t) ( 
fixltx2e nil) ( graphicx t) ( longtable nil) ( float nil) ( 
wrapfig nil) ( soul t) ( textcomp t) ( marvosym t) ( wasysym 
t) ( latexsym t) ( amssymb t) (pdfborder={0,0,0},colorlinks=true 
hyperref nil) \\tolerance=1000) (( minted t)) nil nil)
  (org-e-latex--guess-inputenc (org-splice-latex-header document-class-string 
org-export-latex-default-packages-alist org-export-latex-packages-alist nil 
(plist-get info :latex-header-extra)))
  (let* ((header (nth 1 (assoc class org-e-latex-classes))) 
(document-class-string (and (stringp header) (if class-options 
(replace-regexp-in-string ^[]*documentclass\\(\\[.*?\\]\\) 
class-options header t nil 1) header (org-e-latex--guess-inputenc 
(org-splice-latex-header document-class-string 
org-export-latex-default-packages-alist org-export-latex-packages-alist nil 
(plist-get info :latex-header-extra
  (org-element-normalize-string (let* ((header (nth 1 (assoc class 
org-e-latex-classes))) (document-class-string (and (stringp header) (if 
class-options (replace-regexp-in-string ^[  
]*documentclass\\(\\[.*?\\]\\) class-options header t nil 1) header 
(org-e-latex--guess-inputenc (org-splice-latex-header document-class-string 
org-export-latex-default-packages-alist org-export-latex-packages-alist nil 
(plist-get info :latex-header-extra)
  (let ((class (plist-get info :latex-class)) (class-options (plist-get info 
:latex-class-options))) (org-element-normalize-string (let* ((header (nth 1 
(assoc class org-e-latex-classes))) (document-class-string (and (stringp 
header) (if class-options (replace-regexp-in-string ^[   
]*documentclass\\(\\[.*?\\]\\) class-options header t nil 1) header 
(org-e-latex--guess-inputenc (org-splice-latex-header document-class-string 
org-export-latex-default-packages-alist org-export-latex-packages-alist nil 
(plist-get info :latex-header-extra))
  (concat (and (plist-get info :time-stamp-file) (format-time-string %% 
Created %Y-%m-%d %a %H:%M\n)) (let ((class (plist-get info :latex-class)) 
(class-options (plist-get info :latex-class-options))) 
(org-element-normalize-string (let* ((header (nth 1 (assoc class 
org-e-latex-classes))) (document-class-string (and (stringp header) (if 
class-options ... header (org-e-latex--guess-inputenc 
(org-splice-latex-header document-class-string 
org-export-latex-default-packages-alist org-export-latex-packages-alist nil 
(plist-get info :latex-header-extra)) 
\\providecommand{\\alert}[1]{\\textbf{#1}}\n (let ((sec-num (plist-get info 
:section-numbers))) (when (integerp sec-num) (format 
\\setcounter{secnumdepth}{%d}\n sec-num))) (let ((author (and (plist-get info 
:with-author) (let ((auth ...)) (and auth (org-export-data auth info) 
(email (and (plist-get info :with-email) (org-export-data (plist-get info 
:email) info (cond ((and author email (not (string=  email))) 
 (format \\author{%s\\thanks{%s}}\n author email)) (author (format 
\\author{%s}\n author)) (t \\author{}\n))) (let ((date (plist-get info 
:date))) (and date (format \\date{%s}\n date))) (format \\title{%s}\n 
title) (format \\hypersetup{\n  pdfkeywords={%s},\n  pdfsubject={%s},\n  

Re: [O] BUG: new exporter fails to export a source code with stars at bol

2012-06-04 Thread Bastien
Hi Yagnesh,

Yagnesh Raghava Yakkala h...@yagnesh.org writes:

   #+BEGIN_SRC elisp
 (message * one
 ** two)
   #+END_SRC

You can use 

#+BEGIN_SRC elisp
  (message * one\n** two)
#+END_SRC

HTH,

-- 
 Bastien



Re: [O] Difficulty of using Org mode

2012-06-04 Thread Bastien
Hi Michael,

Michael Hannon jm_han...@yahoo.com writes:

 Hi, folks.  Just FYI:

 - Forwarded Message -
From: Yihui Xie x...@yihui.name
To: Stephen Eglen s.j.eg...@damtp.cam.ac.uk 
Cc: ess-h...@r-project.org 
Sent: Saturday, June 2, 2012 3:08 PM
Subject: Re: [ESS] knitr
 
There is no point comparing markdown with org mode, and the answer
will be definitely this: org mode can beat markdown almost everywhere;
they are not even comparable. The point is that markdown was not
designed to provide new features; it was designed to be simple so it
intentionally discarded lots of features and people can learn it
quickly. I have tried a few times to learn org mode, and it is just
too complicated for me.

Well, it all boils down to disambiguate what learning Org means.

It is hard to say just from the message above.  If you can, please
redirect the OP to this list so that he feels guided in tasks he wants
to do with Org.

-- 
 Bastien



Re: [O] Talk about Org mode at a small hacker conference (GPN12)

2012-06-04 Thread Bastien
Hi Florian,

Florian Adamsky fa-orgm...@haktar.org writes:

 I will give a talk [fn:1] next weekend about Org mode at a small hacker
 conference in Germany: Gulaschprogrammiernacht 2012 [fn:2]. There will
 be around 300 people and I hope I can awake enthusiasm for Org mode. My
 talk will be recorded and I once I finished my slides I will put them on
 my web page. Just for your information. If somebody by chance is also
 there, I would love to drink a beer with you :-).

Looks great, let us know how it goes and send us materials when
available!

Schöne Grüße to german friends,

-- 
 Bastien



Re: [O] LaTeX export for numbered equations

2012-06-04 Thread Sebastien Vauban
Hi Nick,

Nick Dokos wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:
 
 I'm trying to get numbered equations in Beamer, hence using the
 begin_equation block, but the formula is not correctly translated to LaTeX,
 and I have no clue why...

 Confirmed (except that I have to comment out hyperref in order to process
 the latex file - I get fatal errors otherwise),

Weird. I do use hyperref...

 plus the new exporter chokes on the same example with the appended
 backtrace.

Regarding the new exporter (which I can't test -- I have problems when
activating it, still have to look why with emacs -Q and dichotomic search...),
IIRC Beamer is not supported (yet?).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] LaTeX export for numbered equations

2012-06-04 Thread Sebastien Vauban
Hi Nick,

Nick Dokos wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 I'm trying to get numbered equations in Beamer, hence using the 
 begin_equation
 block, but the formula is not correctly translated to LaTeX, and I have no
 clue why...
 
 Here an ECM:
 ... 
 - These should be numbered:
 
 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation
 
 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}
 #+end_equation
 ... 

 The following workaround seems to be effective in both of these cases:

 #+begin_equation
 #+LATEX:  \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation

I confirm your workaround is working in my case as well -- I would never have
thought doing that. Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Difficulty of using Org mode

2012-06-04 Thread Michael Hannon
Bastien b...@gnu.org wrote:

Michael Hannon jm_han...@yahoo.com writes:

 Hi, folks.  Just FYI:

 - Forwarded Message -
From: Yihui Xie x...@yihui.name
To: Stephen Eglen s.j.eg...@damtp.cam.ac.uk
Cc: ess-h...@r-project.org
Sent: Saturday, June 2, 2012 3:08 PM
Subject: Re: [ESS] knitr

There is no point comparing markdown with org mode, and the answer
will be definitely this: org mode can beat markdown almost everywhere;
they are not even comparable. The point is that markdown was not
designed to provide new features; it was designed to be simple so it
intentionally discarded lots of features and people can learn it
quickly. I have tried a few times to learn org mode, and it is just
too complicated for me.

 Well, it all boils down to disambiguate what learning Org means.


 It is hard to say just from the message above.  If you can, please redirect
 the OP to this list so that he feels guided in tasks he wants to do with
 Org.

Hi, Bastien.  I don't know this guy, but I don't think he's *trying* to learn
Org mode at this point.  He seems to be a very capable guy:

    http://yihui.name/

and is evidently the author of the R package knitr for literate programming.

I was just struck by the fact that a person of his evident ability would give
up on Org mode.  I can't say it has been all that easy for me to use Org mode,
and I'm sure there are Avogadro's number of things I still don't know about
it, but I've never viewed it is being *that* difficult.  Probably I've been
spoiled by all the help I've gotten from this enormously useful list.

There's no real action item for anybody here.  I speculate that this guy might
just have had more fun writing his own package than in learning somebody
else's.  But I don't see how it could hurt for the Org-mode community to keep
an eye out for usability issues.

-- Mike



Re: [O] [GSOC] Bugpile/iOrg weekly update (cont.)

2012-06-04 Thread Thorsten Jolitz
Thorsten Jolitz tjol...@googlemail.com writes:

[ups - wrong keystroke and the unfinished mail was sent]

 Hello List, 

 following a suggestion from Bastien, I will give a weekly update from
 now on about the state of things in my Google Summer of Code 2012
 project Bugpile/iOrg.

 Just to remind you whats it all about:

 ,-
 | Bugpile is a bugtracker for GNU Emacs Org-mode written in Emacs
 | Lisp. It will be developed during the Google Summer of Code 2012
 | (GSoC) as an example application for iOrg, a new framework for
 | building dynamic web applications.
 `-

 Since I have to deal with two things at the same time (the web framework
 iOrg and the example application bugpile), I chose the approach to
 develop bugpile and write the iOrg stuff whenever I feel there should be
 some framework functionality. I write down everything I do as an iOrg
 tutorial on Worg
  
 (http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/bugpile/i.html)

 I use a software engineering approach for the development, although this
 is rather untypical for the emacs world, but it has two big advantages:
 1. it guides people step by step through the development process, 

[continuation]

1. it guides people step by step through the development process, so
   even if they don't have a clear idea about how to structure and
   develop a web-application, they will never stare on a blank screen
   without knowing what to do next
2. it gives a clean structure to a project and organizes the sometimes
   many files involved, avoiding to get lost in an unmanageable mess.

I'm finished with the requirements analysis and the software
specification now. Some core functionality of the iOrg framework has
already be written (initialize, rename, update iOrg project), see the
git repo: 

,--
| git clone bugp...@orgmode.org:bugpile.git
`--

Since all the planning has been done using textbased PlantUML as drawing
tool, I want to automize the transformation from the software design to
implementation skeletons. Therefore I have to write functions that parse
the PlantUML source code and write the Elisp and Org files they
'describe' as a last step of the planification phase.

But the most important task for the upcoming week will be to write a
small (minimal) proof of concept that shows how to use Elnode, the Emacs
web-server by Nic Ferrier, to manipulate Org files via a web interface
(with html forms and buttons). 

-- 
cheers,
Thorsten




Re: [O] Organizing a collection of papers

2012-06-04 Thread BernardH
Victor Miller victorsmiller at gmail.com writes:

 
 I've just started using org-mode, and so far find it quite
 useful. I have a very large collection of technical papers in a
 directory tree, and I'd like to go through them and index them
 through org-mode. What I'd like is to have a way of going through
 them and look at the unannotated ones, and annotate them one by
 one. I imagine doing this by first making up a file of links like
 [[xxx.pdf][not done yet]], and then being presented with the not
 done ones, glancing at them and deciding how what annotations to
 put in. In addition I'd like to add tags. What I'd really like is
 to be able to make up new tags on the fly. Has anyone done
 anything like this in org-mode?
 
 Victor
 
 
Hi,
For organizing papers, I've recently found
[[http://www-public.it-sudparis.eu/~berger_o/weblog/2012/03/23/how-to-manage-and-export-bibliographic-notesrefs-in-org-mode/][an
interesting blog post]].
Actually doing it is still on my TODO list unfortunately.
However, the use-case seems common enough amongst orgmode users that
if something is recognized as best-practice, maybe an entry in
[[http://orgmode.org/worg/org-tutorials/][the worg tutorials section]] would be
warranted.

Best Regards,

B.





Re: [O] Publishing Org to Org?

2012-06-04 Thread suvayu ali
On Mon, Jun 4, 2012 at 3:58 AM, François Pinard pin...@iro.umontreal.ca wrote:
 My feeling is that ideally, Org should itself provide a standard Org
 exporter, as generic as it should be.

C-h f org-export-as-org [RET]

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Organizing a collection of papers

2012-06-04 Thread François Allisson
Hi Victor,

Le lundi 04 jun 2012 à 00:57:53 (+), Victor Miller a écrit :
 I've just started using org-mode, and so far find it quite
 useful. I have a very large collection of technical papers in a
 directory tree, and I'd like to go through them and index them
 through org-mode. What I'd like is to have a way of going through
 them and look at the unannotated ones, and annotate them one by
 one. I imagine doing this by first making up a file of links like
 [[xxx.pdf][not done yet]], 

The script dir2org.zsh (located in the contrib/scripts directory) may
be a good starting point for you.

It transforms (recursively) a directory and all its files into an Org
mode file reproducing the directory tree hierarchy with one headline
per file, and it creates automatically the links to the files.

Briefly, if your files are located in the directory ~/my-big-database
(and its sub-directories), just type:

- cd path-to-org-mode-distribution-directory/
- cd contrib/scripts
- zsh(if, like me, zsh is not your usual shell, you must call it,
  eventually install it; at the end, type exit to return to
  your favourite shell)
- ./dir2org.zsh ~/my-big-database  orgfile.org

And it's done. Your orgfile.org contains linked headlines for
all your files. You can then start playing with your files with all
the Org mode facilities (tags, ordering headlines, adding properties,
annotations, todos, etc.). HTH.

 and then being presented with the not
 done ones, glancing at them and deciding how what annotations to
 put in. In addition I'd like to add tags. What I'd really like is
 to be able to make up new tags on the fly. Has anyone done
 anything like this in org-mode?

I don't know what will be the better workflow to achieve this. I think
we are all looking for the best workflow to handle our electronic (and
non electronic) libraries. 

I cannot say yet what my workflow is, because I'm currently working on
it. FWIW, I /was/ handling my bibliographic resources in a big BibTeX
file, adding custom BibTeX fields for my personal needs. I can only
give hint whither I am going:

- a big biblio.org file with a lot of headlines (one per item),
  with three custom todo keyword (in a sequence TOREADLATER TOREAD |
  READ)

  - TOREAD: for items on which I still have something to do (read,
annotate, decide whether it is worth reading or not, or if I
should do something with it, etc.). These appear in my custom
agenda-view as a block name Currents readings.

  - TOREADLATER: idem. But these items do *not* appear in my custom
agenda-view.

  - READ: for items on which I'm done.

- each item has a name Author (year) Title of document, it contains
  tags as keywords, BibTeX properties (using org-bibtex.el), custom
  properties (physical location if not electronic, date of insert,
  etc.). It contains link to file (if file). And it contains my
  reading notes, quotes, comments, TODO items (if I have to check
  something, or discuss something with someone, I plan it). All this
  using sub-headings (for respecting chapters, or the papers
  structure, or other subdivision for my own needs. As this file is in
  my org-agenda-files, I can take advantage of all Org mode
  facilities.

I can export the whole database as a BibTeX file using only one
command (M-x org-bibtex, thanks to the excellent org-bibtex.el), and
can use it in my Org mode files (formerly LaTeX files), using the
(new) latex exporter.

I can also export a headline with the (new) exporter to share my notes
on one item with someone (and easily decide which parts of the notes
not to share with a few :noexport: headlines)

When I have free time (...) or when (I recommend doing this) I
scheduled reading hours in my week, I just call my custom agenda
command, showing me only TOREAD items, I'm one space key away from my
biblio.org file, and I can just fill my notes while reading.

I decided to restrict myself to 5 TOREAD keywords. Once a TOREAD is
done, it becomes READ and disappear from my agenda view. Once my
TOREAD list becomes empty, I decide which TOREADLATER becomes TOREAD
(again with the rule of 5). It helps me not starting dozens of things and
never finish them...

As for the capture of new items, I'm still working on it. I started to
use the command M-x org-bibtex-create for new items, and then
arrange manually my other needs, but I'm now in the process of
creating custom org-capture templates to better achieve my needs.

I would happily share a less confused state of my workflow when I'll
be more happy with it.

Sorry for being such OT.

 
 Victor
 
 

Good luck with your collection of papers,

Cheers,
François



Re: [O] LaTeX export for numbered equations

2012-06-04 Thread suvayu ali
Hey Seb,

On Mon, Jun 4, 2012 at 9:41 AM, Sebastien Vauban
wxhgmqzgw...@spammotel.com wrote:
 Hi Nick,

 Nick Dokos wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 I'm trying to get numbered equations in Beamer, hence using the 
 begin_equation
 block, but the formula is not correctly translated to LaTeX, and I have no
 clue why...

 Here an ECM:
 ...
 - These should be numbered:

 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation

 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}
 #+end_equation
 ...

 The following workaround seems to be effective in both of these cases:

 #+begin_equation
 #+LATEX:  \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation

 I confirm your workaround is working in my case as well -- I would never have
 thought doing that. Thanks!


I know it should work, but is there any particular reason you need to
use #+begin_equation .. #+end_equation ? The following seems to work for
me well.

  #+begin_latex
\begin{equation}
  \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
\end{equation}
  #+end_latex

If you want fontlocking you can even use

  #+begin_src latex :eval yes
\begin{equation}
  \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
\end{equation}
  #+end_src

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

2012-06-04 Thread Sebastien Vauban
Hello,

Thanks a lot Nick, François, Bastien... and Carsten who put me on right
tracks...

Sebastien Vauban wrote:
 These last days, I've observed that, whenever creating a new Org file (to be
 precise, when saving it), I'm asked:

 non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

 I'm then forced to answer `R' for the save to be done.

I found the responsible: the call to `dmj/org-remove-redundant-tags'[1] in the
`before-save-hook':

#+begin_src emacs-lisp
;; make sure that things are clean and always up-to-date
(add-hook 'before-save-hook
  '(lambda ()
 (when (eq major-mode 'org-mode)
   (dmj/org-remove-redundant-tags)
   (org-align-all-tags)
   (org-update-all-dblocks)
   (org-table-iterate-buffer-tables)
   )))
#+end_src

Without it, the above problem disappears.

Any idea on how to get that work done (i.e., removing redundant tags when
saving the file), without bringing the problem back to the scene?

Best regards,
  Seb

[1] See http://orgmode.org/worg/org-hacks.html#sec-1-7-1

-- 
Sebastien Vauban




Re: [O] non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

2012-06-04 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

 Hello,
 
 Thanks a lot Nick, Fran=C3=A7ois, Bastien... and Carsten who put me on right
 tracks...
 
 Sebastien Vauban wrote:
  These last days, I've observed that, whenever creating a new Org file (to=
  be
  precise, when saving it), I'm asked:
 
  non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?
 
  I'm then forced to answer `R' for the save to be done.
 
 I found the responsible: the call to `dmj/org-remove-redundant-tags'[1] in =
 the
 `before-save-hook':
 
 #+begin_src emacs-lisp
 ;; make sure that things are clean and always up-to-date
 (add-hook 'before-save-hook
   '(lambda ()
  (when (eq major-mode 'org-mode)
(dmj/org-remove-redundant-tags)
(org-align-all-tags)
(org-update-all-dblocks)
(org-table-iterate-buffer-tables)
)))
 #+end_src
 
 Without it, the above problem disappears.
 
 Any idea on how to get that work done (i.e., removing redundant tags when
 saving the file), without bringing the problem back to the scene?
 

Did you get a backtrace? I don't think you posted one here.  I looked at
the function you fingered and there is nothing in there to raise my
hackles (but maybe I'm blind: it wouldn't be the first time).  A
backtrace would be *much* more useful imo.

Nick







Re: [O] LaTeX export for numbered equations

2012-06-04 Thread Carsten Dominik

On 4.6.2012, at 08:14, Nick Dokos wrote:

 Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:
 
 Hello,
 
 I'm trying to get numbered equations in Beamer, hence using the 
 begin_equation
 block, but the formula is not correctly translated to LaTeX, and I have no
 clue why...
 
 Here an ECM:
 ... 
 - These should be numbered:
 
 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation
 
 #+begin_equation
 \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}
 #+end_equation
 ... 
 
 The following workaround seems to be effective in both of these cases:
 
 #+begin_equation
 #+LATEX:  \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
 #+end_equation

You just use

   \begin{equation}
   \frac{1}{\sqrt{2\pi\sigma^2}}e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
   \end{equation}

Entire LaTeX environments should be automatically
protected and passed through for LaTeX export.

- Carsten




 
 Nick
 
 




Re: [O] non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

2012-06-04 Thread Sylvain Rousseau
Hi,

i have the same problem. It appears that `org-map-entries' fails if the
file does not yet exist. A solution could be to add to
`dmj/org-remove-redundant-tags' a `file-exists-p' condition but you will
have to save twice to clean the file; another is to patch `org-map-entries'
that should succeed even if the file does not exist...


Sylvain.


Re: [O] non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

2012-06-04 Thread Sebastien Vauban
Hi Nick,

Nick Dokos wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:
 Sebastien Vauban wrote:
 These last days, I've observed that, whenever creating a new Org file (to
 be precise, when saving it), I'm asked:

 non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

 I'm then forced to answer `R' for the save to be done.
 
 I found the responsible: the call to `dmj/org-remove-redundant-tags'[1] in
 the `before-save-hook':
 
 #+begin_src emacs-lisp
 ;; make sure that things are clean and always up-to-date
 (add-hook 'before-save-hook
   '(lambda ()
  (when (eq major-mode 'org-mode)
(dmj/org-remove-redundant-tags)
(org-align-all-tags)
(org-update-all-dblocks)
(org-table-iterate-buffer-tables)
)))
 #+end_src
 
 Without it, the above problem disappears.
 
 Any idea on how to get that work done (i.e., removing redundant tags when
 saving the file), without bringing the problem back to the scene?

 Did you get a backtrace? I don't think you posted one here.  I looked at
 the function you fingered and there is nothing in there to raise my
 hackles (but maybe I'm blind: it wouldn't be the first time).  A
 backtrace would be *much* more useful imo.

Here is one, as you asked (weeks ago ;-():

--8---cut here---start-8---
Debugger entered: nil
  (progn (debug) (message non-existent agenda file %s. [R]emove from list or 
[A]bort? (abbreviate-file-name file)) (let ((r (downcase 
(read-char-exclusive (cond ((equal r 114) (org-remove-file file) (throw 
(quote nextfile) t)) (t (error Abort)
  (if (not (file-exists-p file)) (progn (debug) (message non-existent agenda 
file %s. [R]emove from list or [A]bort? (abbreviate-file-name file)) (let ((r 
(downcase (read-char-exclusive (cond ((equal r 114) (org-remove-file file) 
(throw (quote nextfile) t)) (t (error Abort))
  (when (not (file-exists-p file)) (debug) (message non-existent agenda file 
%s. [R]emove from list or [A]bort? (abbreviate-file-name file)) (let ((r 
(downcase (read-char-exclusive (cond ((equal r 114) (org-remove-file file) 
(throw (quote nextfile) t)) (t (error Abort)
  org-check-agenda-file(c:/home/sva/Projects/ttt.txt)
  (if (bufferp file) (set-buffer file) (org-check-agenda-file file) (set-buffer 
(org-get-agenda-file-buffer file)))
  (catch (quote nextfile) (if (bufferp file) (set-buffer file) 
(org-check-agenda-file file) (set-buffer (org-get-agenda-file-buffer file))) 
(widen) (setq bmp (buffer-modified-p)) (org-refresh-category-properties) (setq 
org-todo-keywords-for-agenda (append org-todo-keywords-for-agenda 
org-todo-keywords-1)) (setq org-done-keywords-for-agenda (append 
org-done-keywords-for-agenda org-done-keywords)) (setq 
org-todo-keyword-alist-for-agenda (append org-todo-keyword-alist-for-agenda 
org-todo-key-alist)) (setq org-drawers-for-agenda (append 
org-drawers-for-agenda org-drawers)) (setq org-tag-alist-for-agenda (append 
org-tag-alist-for-agenda org-tag-alist)) (save-excursion 
(remove-text-properties (point-min) (point-max) pall) (when 
org-agenda-skip-archived-trees (goto-char (point-min)) (while 
(re-search-forward rea nil t) (if (org-at-heading-p t) (add-text-properties 
(point-at-bol) (org-end-of-subtree t) pa (goto-char (point-min)) (setq re 
(format org-heading-keyword-regexp-format org-comment-string)) (while 
(re-search-forward re nil t) (add-text-properties (match-beginning 0) 
(org-end-of-subtree t) pc))) (set-buffer-modified-p bmp))
  (while (setq file (pop files)) (catch (quote nextfile) (if (bufferp file) 
(set-buffer file) (org-check-agenda-file file) (set-buffer 
(org-get-agenda-file-buffer file))) (widen) (setq bmp (buffer-modified-p)) 
(org-refresh-category-properties) (setq org-todo-keywords-for-agenda (append 
org-todo-keywords-for-agenda org-todo-keywords-1)) (setq 
org-done-keywords-for-agenda (append org-done-keywords-for-agenda 
org-done-keywords)) (setq org-todo-keyword-alist-for-agenda (append 
org-todo-keyword-alist-for-agenda org-todo-key-alist)) (setq 
org-drawers-for-agenda (append org-drawers-for-agenda org-drawers)) (setq 
org-tag-alist-for-agenda (append org-tag-alist-for-agenda org-tag-alist)) 
(save-excursion (remove-text-properties (point-min) (point-max) pall) (when 
org-agenda-skip-archived-trees (goto-char (point-min)) (while 
(re-search-forward rea nil t) (if (org-at-heading-p t) (add-text-properties 
(point-at-bol) (org-end-of-subtree t) pa (goto-char (point-min)) (setq re 
(format org-heading-keyword-regexp-format org-comment-string)) (while 
(re-search-forward re nil t) (add-text-properties (match-beginning 0) 
(org-end-of-subtree t) pc))) (set-buffer-modified-p bmp)))
  (save-restriction (while (setq file (pop files)) (catch (quote nextfile) (if 
(bufferp file) (set-buffer file) (org-check-agenda-file file) 

Re: [O] [bug] Assigning 0:00 to cell gives an error

2012-06-04 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
 Sebastien Vauban writes:

 Let's come back to time values:

   @2$2=1:23;t

 means, for me, that:

 - the value 1:23 should be assigned to the cell
 - that value should be formatted as a fraction.

 Hence, I'd expect to see `1.38' (and not `0:00').

 This works correctly now, thanks.

I confirm that the above case works correctly now, as shown here:

| Task| HH:MM |
|-+---|
| Foo |  1:23 |
| Bar |  1.38 |
| Nothing |  0:00 |
#+TBLFM: @2$2=1:23::@3$2=@2$2;t::@4$2=string(0:00)

Thanks.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [bug] Remote durations are considered as fractions

2012-06-04 Thread Sebastien Vauban
Hi,

May I bump up this thread (and its inlined, older, corollary)?

Best regards,
  Seb


Sebastien Vauban wrote:
 Sebastien Vauban wrote:
 Bastien wrote:
 Sebastien Vauban writes:

 I think this is it...

 Yes.. but in fact, this is precisely the difference between the `t' and the
 `T' flags - the latter displays seconds while the former display the output
 according to `org-table-duration-custom-format', which you can customize.
 Sorry I didn't mention this before.

 I have the impression you mixed, in the above, seconds with *fraction of*
 seconds:

 - the flag `T' currently means HH:MM:SS, while
 - the flag `t' currently means fractional time of hours (by default).

 As you say, `t' may be further customized:

 ┏
 ┃ org-table-duration-custom-format is a variable defined in 
 `org-table.el'.
 ┃ Its value is hours
 ┃ 
 ┃ Documentation:
 ┃ Format for the output of calc computations like $1+$2;t.
 ┃ The default value is 'hours, and will output the results as a
 ┃ number of hours.  Other allowed values are 'seconds, 'minutes and
 ┃ 'days, and the output will be a fraction of seconds, minutes or
 ┃ days.
 ┗

 Hence, you really have 5 cases:

 - t, fraction of days
 - t, fraction of hours
 - t, fraction of minutes
 - t, fraction of seconds
 - T, HH:MM:SS

 Those 5 cases are currently handled (in that order) in the following 
 function:

 (defun org-table-time-seconds-to-string (secs optional output-format)
   Convert a number of seconds to a time string.
 If OUTPUT-FORMAT is non-nil, return a number of days, hours,
 minutes or seconds.
   (let* ((secs0 (abs secs))
   (res
(cond ((eq output-format 'days)
   (format %.3f (/ (float secs0) 86400)))
  ((eq output-format 'hours)
   (format %.2f (/ (float secs0) 3600)))
  ((eq output-format 'minutes)
   (format %.1f (/ (float secs0) 60)))
  ((eq output-format 'seconds)
   (format %d secs0))
  (t (org-format-seconds %.2h:%.2m:%.2s secs0)
 (if ( secs 0) (concat - res) res)))

 My patch just addressed the HH:MM:SS format (that is, the `T' flag).
 It does not impact the fractional representation of time (the `t' flag).

 I just had to look at some table using time references :

 | 08:30 | 09:00 |
 | 09:30 |   |

 As the end time on the first line is equal to the beginning time on the second
 one, I try using a formula to copy the time:

 |  08:30 | 09:00 |
 | #ERROR |   |
 #+TBLFM: @2$1=@1$2

 The above does not work because Calc makes a division of 9 by 0, as -- by
 default, without an explicit format -- data is considered as numeric, right?

 Hence, I need to use the T flag, but this doesn't look right yet:

 |08:30 | 09:00 |
 | 09:00:00 |   |
 #+TBLFM: @2$1=@1$2;T

 This is what the above patch is supposed to solve.

 BTW, I tried other variants:

 1. replacing `:' by `h'

 | 08h30 | 09h00 |
 | 9 h00 |   |
 #+TBLFM: @2$1=@1$2

Weird that the 9 is moved away from the `h'. I can accept that the leading
0 is removed, though.

 2. ... and using a string format:

 | 8h30 | 9h00 |
 |9 |  |
 #+TBLFM: @2$1=@1$2;%s

Another weird results for me...

 Isn't there any way to say copy verbatim the contents of that field?

-- 
Sebastien Vauban




Re: [O] Publishing Org to Org?

2012-06-04 Thread François Pinard
suvayu ali fatkasuvayu+li...@gmail.com writes:

 On Mon, Jun 4, 2012 at 3:58 AM, François Pinard pin...@iro.umontreal.ca 
 wrote:

 My feeling is that ideally, Org should itself provide a standard Org
 exporter, as generic as it should be.

 C-h f org-export-as-org [RET]

Wow!  Thanks! :-)

François



[O] Exporting to PDF using Windows Emacs and Cygwin TexLive

2012-06-04 Thread Alexander Vorobiev
Hi,

I am trying to use Cygwin's TexLive for PDF generation. The problem is that
it does not seem to understand Windows paths:

This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011/Cygwin)
 \write18 enabled.
entering extended mode
! I can't find file `c:/alex/prj/test.tex'.

Is it possible to convert the path to the generated tex file to cygwin
format (via cygpath, etc or otherwise) before giving it to pdftex?

Unfortunately I can not use matching combinations of the applications
(i.e. cygwin emacs + texlive or windows emacs + say, miktex) where, I know,
the export would work seamlessly.

Thanks,
Alex


Re: [O] [GSoC] org-merge-driver weekly update

2012-06-04 Thread Robert Horn
Another area that would be nice to address is taking advantage of the
information in date-trees so assist with merging.  This is similar to
the logic around keeping headlines in order.  With date trees there is a
date and sometimes time tag to help.

In addition to the occurrence order, there is also an ordering constraint on 
date trees that can be used to determine the proper delta.  You can use the 
date and time information in the headlines to determine the proper sequencing.

For example, the delta/merger for two files of the form:
 File 1:
 * Year
 ** Year-Month
 *** Year-Month-Day
  Y-M-D-Time1 stuff1 ...
  Y-M-D-Time2 stuff2 ...
  Y-M-D-Time4 stuff4 ...
  Y-M-D-Time5 stuff5 ...
  Y-M-D-Time9 stuff9 ...
 File 2:
 * Year
 ** Year-Month
 *** Year-Month-Day
  Y-M-D-Time1 stuff1 ...
  Y-M-D-Time2 stuff2 ...
  Y-M-D-Time3 stuff3 ...
  Y-M-D-Time6 stuff6 ...
  Y-M-D-Time7 stuff7 ...

 Should be:
 * Year
 ** Year-Month
 *** Year-Month-Day
  Y-M-D-Time1 stuff1 ...
  Y-M-D-Time2 stuff2 ...
  Y-M-D-Time3 stuff3 ...
  Y-M-D-Time4 stuff4 ...
  Y-M-D-Time5 stuff5 ...
  Y-M-D-Time6 stuff6 ...
  Y-M-D-Time7 stuff7 ...
  Y-M-D-Time9 stuff9 ...

This time aware merge logic will apply similarly to all levels of the date tree.

Date trees are recognizable by the combination of headlines in this
format.  A date tree can occur anywhere in an org file, but it will
begin with a level one headline of the form * , etc.

R Horn
rjh...@alum.mit.edu



Re: [O] non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

2012-06-04 Thread Nick Dokos
Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

   (progn (debug) (message non-existent agenda file %s. [R]emove from list =
 or [A]bort? (abbreviate-file-name file)) (let ((r (downcase (read-char-exc=
 lusive (cond ((equal r 114) (org-remove-file file) (throw (quote nextfi=
 le) t)) (t (error Abort)
   (if (not (file-exists-p file)) (progn (debug) (message non-existent agen=
 da file %s. [R]emove from list or [A]bort? (abbreviate-file-name file)) (l=
 et ((r (downcase (read-char-exclusive (cond ((equal r 114) (org-remove-=
 file file) (throw (quote nextfile) t)) (t (error Abort))
   (when (not (file-exists-p file)) (debug) (message non-existent agenda fi=
 le %s. [R]emove from list or [A]bort? (abbreviate-file-name file)) (let ((=
 r (downcase (read-char-exclusive (cond ((equal r 114) (org-remove-file =
 file) (throw (quote nextfile) t)) (t (error Abort)
   org-check-agenda-file(c:/home/sva/Projects/ttt.txt)
   ...
   org-prepare-agenda-buffers((c:/home/sva/Projects/ttt.txt))
   ...
   org-map-entries((lambda nil (let ((alltags (split-string (or (org-entry-get 
 (point) ALLTAGS) ) :)) local inherited tag) (dolist (tag alltags) (if 
 (get-text-property 0 (quote inherited) tag) (push tag inherited) (push tag 
 local))) (dolist (tag local) (if (member tag inherited) (org-toggle-tag tag 
 (quote off)) t nil)
   ...
   my/org-remove-redundant-tags()
   (progn (my/org-remove-redundant-tags) (org-align-all-tags) (org-update-al=
 l-dblocks) (org-table-iterate-buffer-tables))
   (if (eq major-mode (quote org-mode)) (progn (my/org-remove-redundant-tags=
 ) (org-align-all-tags) (org-update-all-dblocks) (org-table-iterate-buffer-t=
 ables)))
   (when (eq major-mode (quote org-mode)) (my/org-remove-redundant-tags) (or=
 g-align-all-tags) (org-update-all-dblocks) (org-table-iterate-buffer-tables=
 ))
   (lambda nil (when (eq major-mode (quote org-mode)) (my/org-remove-redunda=
 nt-tags) (org-align-all-tags) (org-update-all-dblocks) (org-table-iterate-b=
 uffer-tables)))()
   run-hooks(before-save-hook)
   basic-save-buffer()
   save-buffer(1)
   call-interactively(save-buffer nil nil)
 

org-map-entries calls org-prepare-agenda-buffers like this:

(org-prepare-agenda-buffers
 (list (buffer-file-name (current-buffer

In turn, this calls org-check-agenda-file() and if the current buffer
has not been written out yet, this pops the question.

So there is a chicken-and-egg problem here, because you added the
function to the before-save hook. Not sure how to resolve it though.

Nick




Re: [O] non-existent agenda file ~/file.txt. [R]emove from list or [A]bort?

2012-06-04 Thread Sebastien Vauban
Hi Nick,

Nick Dokos wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com wrote:

   (progn (debug) (message non-existent agenda file %s. [R]emove from list =
 or [A]bort? (abbreviate-file-name file)) (let ((r (downcase (read-char-exc=
 lusive (cond ((equal r 114) (org-remove-file file) (throw (quote nextfi=
 le) t)) (t (error Abort)
   (if (not (file-exists-p file)) (progn (debug) (message non-existent agen=
 da file %s. [R]emove from list or [A]bort? (abbreviate-file-name file)) (l=
 et ((r (downcase (read-char-exclusive (cond ((equal r 114) (org-remove-=
 file file) (throw (quote nextfile) t)) (t (error Abort))
   (when (not (file-exists-p file)) (debug) (message non-existent agenda fi=
 le %s. [R]emove from list or [A]bort? (abbreviate-file-name file)) (let ((=
 r (downcase (read-char-exclusive (cond ((equal r 114) (org-remove-file =
 file) (throw (quote nextfile) t)) (t (error Abort)
   org-check-agenda-file(c:/home/sva/Projects/ttt.txt)
   ...
   org-prepare-agenda-buffers((c:/home/sva/Projects/ttt.txt))
   ...
   org-map-entries((lambda nil (let ((alltags (split-string (or
 (org-entry-get (point) ALLTAGS) ) :)) local inherited tag) (dolist
 (tag alltags) (if (get-text-property 0 (quote inherited) tag) (push tag
 inherited) (push tag local))) (dolist (tag local) (if (member tag inherited)
 (org-toggle-tag tag (quote off)) t nil)
   ...
   my/org-remove-redundant-tags()
   (progn (my/org-remove-redundant-tags) (org-align-all-tags) (org-update-al=
 l-dblocks) (org-table-iterate-buffer-tables))
   (if (eq major-mode (quote org-mode)) (progn (my/org-remove-redundant-tags=
 ) (org-align-all-tags) (org-update-all-dblocks) (org-table-iterate-buffer-t=
 ables)))
   (when (eq major-mode (quote org-mode)) (my/org-remove-redundant-tags) (or=
 g-align-all-tags) (org-update-all-dblocks) (org-table-iterate-buffer-tables=
 ))
   (lambda nil (when (eq major-mode (quote org-mode)) (my/org-remove-redunda=
 nt-tags) (org-align-all-tags) (org-update-all-dblocks) (org-table-iterate-b=
 uffer-tables)))()
   run-hooks(before-save-hook)
   basic-save-buffer()
   save-buffer(1)
   call-interactively(save-buffer nil nil)

 org-map-entries calls org-prepare-agenda-buffers like this:

   (org-prepare-agenda-buffers
(list (buffer-file-name (current-buffer

 In turn, this calls org-check-agenda-file() and if the current buffer
 has not been written out yet, this pops the question.

 So there is a chicken-and-egg problem here, because you added the
 function to the before-save hook. Not sure how to resolve it though.

I've opted for the solution proposed by Sylvain (test that the file exists):

#+begin_src emacs-lisp
(add-hook 'before-save-hook
  '(lambda ()
 (when (eq major-mode 'org-mode)
   (org-align-all-tags)
   (org-update-all-dblocks)
   (org-table-iterate-buffer-tables)
   (when (file-exists-p (buffer-file-name (current-buffer)))
 (my/org-remove-redundant-tags))
   )))
#+end_src

Redundant tags is something I won't do as soon as I create a file for the
first time. Hence, I consider this as really good enough, even if not
perfect.

Thanks for your help!

Best regards,
  Seb

-- 
Sebastien Vauban




[O] LaTeX export -- Table with align option

2012-06-04 Thread Sebastien Vauban
Hello,

I want to customize a bit the layout of a table, using the =align= parameter as
explained on http://orgmode.org/manual/Tables-in-LaTeX-export.html.

That works well for the first two common usages (see ECM) but not with
@-expressions (see, for example, on
https://en.wikibooks.org/wiki/LaTeX/Tables#.40-expressions)

* Table with normal spacing

#+ATTR_LaTeX: align=rrl
| Janvier | 1300 | \EUR |
| Février | 1280 | \EUR |
|-+--+--|
| Total   | 2580 | \EUR |
#+TBLFM: @3$2=vsum(@1..@2)

gets correctly translated to:

#+begin_src latex
\begin{tabular}{rrl}
 Janvier1300\EUR  \\
 Février1280\EUR  \\
\hline
 Total  4080\EUR  \\
\end{tabular}
#+end_src

* Table with no spacing

#+ATTR_LaTeX: align=r@{:}r@{}l
| Janvier | 1300 | \EUR |
| Février | 1280 | \EUR |
|-+--+--|
| Total   | 2580 | \EUR |
#+TBLFM: @3$2=vsum(@1..@2)

gets correctly translated to:

#+begin_src latex
\begin{tabular}{r@{:}r@{}l}
 Janvier1300\EUR  \\
 Février1280\EUR  \\
\hline
 Total  4080\EUR  \\
\end{tabular}
#+end_src

* Table with more spacing

#+ATTR_LaTeX: align=r@{ : }r@{ }l
| Janvier | 1300 | \EUR |
| Février | 1280 | \EUR |
|-+--+--|
| Total   | 2580 | \EUR |
#+TBLFM: @3$2=vsum(@1..@2)

gets INCORRECTLY translated to:

#+begin_src latex
\begin{tabular}{r@{}
 Janvier1300\EUR  \\
 Février1280\EUR  \\
\hline
 Total  4080\EUR  \\
\end{tabular}
#+end_src

which can't be compiled...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] new exporter

2012-06-04 Thread Achim Gratz
Achim Gratz writes:
 The way org-export is structured unfortunately produces circular
 dependencies due to the dispatcher and that prevents it from being
 compiled properly.

It appears the reason for this is rather the use of cl macros in the
dispatcher code.  Depending on where you require org-export and what is
already byte-compiled, things start to explode.  Nicolas, could you have
a look on what is going on there?


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

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] LaTeX export for numbered equations

2012-06-04 Thread Bastien


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

 Regarding the new exporter (which I can't test -- I have problems when
 activating it, still have to look why with emacs -Q and dichotomic search...),
 IIRC Beamer is not supported (yet?).

Yes, it is not.

-- 
 Bastien




[O] Bug: org-capture Does not take user to any new buffer

2012-06-04 Thread Mike Fitzgerald
To duplicate:

1) Run org-capture with C-c c
2) User is Promoted with the two templates expected
(copied the templates from the org-mode site)

3) Enter j for journal
4) Expect switch to new buffer
5) No switch occurs
Note that journal.org is open, but I need to switch to it

I expected EMACS to switch to a new buffer after choosing
the template.

Running GNU EMACS 23.3 on Win7

Org mode update byte compiled by hand (without make) using

   (defun my/compile-org(optional directory)
 Compile all *.el files that come with org-mode.
 (interactive)
   ;Found on a org-mode related page.

Thanks

Mike

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

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

Your bug report will be posted to the Org-mode mailing list.




Emacs  : GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600)
 of 2011-03-10 on 3249CTO
Package: Org-mode version 7.8.11

current state:
==
(setq
 org-log-done 'time
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '((t Todo entry (file+headline ~/org/gtd.org
Tasks)
  * TODO %?\n  %i\n  %a)
 (j Journal entry (file+datetree ~/org/journal.org)
  * %?\nEntered on %U\n  %i\n  %a)
 )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all append
local] 5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-babel-show-result-all
append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil)
 (export-comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil) (dot
org-export-blocks-format-dot nil))
 )


[O] [PATCH] Re: [babel] Relative path for dir header argument

2012-06-04 Thread Hans-Peter Deifel
On Di, Mai 29 2012, Hans-Peter Deifel wrote:
 Currently, the 'dir'-argument only understands absolute paths, because
 it simply sets default-directory.

 I think it would be quite useful to be able to specify paths relative to
 the default-directory of the buffer. What do you think?

I tried to implement exactly that by wrapping `dir' with
`expand-file-name'. So far, it works very well. Here is the patch:

---
 lisp/ob.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/ob.el b/lisp/ob.el
index d2d94b8..509bd41 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -524,7 +524,8 @@ block.
   (nth 1 info
 (dir (cdr (assoc :dir params)))
 (default-directory
-  (or (and dir (file-name-as-directory dir)) default-directory))
+  (or (and dir (file-name-as-directory (expand-file-name dir)))
+  default-directory))
 (org-babel-call-process-region-original
  (if (boundp 'org-babel-call-process-region-original)
  org-babel-call-process-region-original
-- 
1.7.8.6



[O] Problems exporting Org code blocks in LaTeX

2012-06-04 Thread Sebastien Vauban
Hello,

I want to show (in Beamer slides) how to write an Org table.

I first need to add Org as a language to the listings settings.

Then, I write an Org source block, which is exported to LaTeX... but not
fully... The line #+ATTR_LaTeX: align=rrl disappears from the exported code!

See ECM.

--8---cut here---start-8---
#+TITLE: Org code in slide
#+DATE:  2012-06-04 Mon
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) 
%4BEAMER_col(Col) %8BEAMER_extra(Extra)

#+BEAMER_HEADER_EXTRA: \lstdefinelanguage{org}{%
#+BEAMER_HEADER_EXTRA:   morekeywords={:results, :session, :var, :noweb, 
:exports},
#+BEAMER_HEADER_EXTRA:   sensitive=false,
#+BEAMER_HEADER_EXTRA:   morestring=[b],
#+BEAMER_HEADER_EXTRA:   morecomment=[l]{\#},
#+BEAMER_HEADER_EXTRA: }
#+BEAMER_HEADER_EXTRA: \lstset{%
#+BEAMER_HEADER_EXTRA:   mathescape=false
#+BEAMER_HEADER_EXTRA: }

* Table

Here's a simple but already powerful Org table:

#+begin_src org :exports code
,#+ATTR_LaTeX: align=rrl
,| Janvier | 1300 | \EUR |
,| Fevrier | 1280 | \EUR |
,|-+--+--|
,| Total   | 2580 | \EUR |
,#+TBLFM: @3$2=vsum(@1..@2)
#+end_src
--8---cut here---end---8---

I can't get it properly exported to LaTeX, because:

- the line ATTR_LaTeX is removed
- even with my mathescape=false, the $ is interpreted as math char

Best regards,
  Seb

-- 
Sebastien Vauban




[O] punch-in card for time tracking

2012-06-04 Thread Mehul Sanghvi
What I need to do is the following:

*  punch-in when I arrive at work

*  make a notation for one of the following:

* arrived late

* working from home

*  punch-out when I leave work

* be able to generate a report (weekly/monthly/quarterly) which shows

 * how many days I was in the office

 * how many days was I working from home

 * how many days I was late



Is this something I can get done using Org ?   How ?


cheers,

mehul
-- 
Mehul N. Sanghvi
email: mehul.sang...@gmail.com



Re: [O] punch-in card for time tracking

2012-06-04 Thread John Hendy
On Mon, Jun 4, 2012 at 8:40 PM, Mehul Sanghvi mehul.sang...@gmail.com wrote:
 What I need to do is the following:

    *  punch-in when I arrive at work

    *  make a notation for one of the following:

            * arrived late

            * working from home

    *  punch-out when I leave work

    * be able to generate a report (weekly/monthly/quarterly) which shows

             * how many days I was in the office

             * how many days was I working from home

             * how many days I was late



 Is this something I can get done using Org ?   How ?


Yes indeed (at least the first part). Second part shouldn't be that hard.

---( Approach 1: Clocking )---

Link to how to clock:
- http://orgmode.org/manual/Clocking-work-time.html

What I might do:
- Create headline for current month
- Create headline with current date
- Clock in when you get to work
- Clock out when you leave work

* June
** [2012-06-04 Mon] (C-c ! then return to create that time stamp)

- Now C-c C-x C-i to clock in on that headline
- When you leave, C-c C-x C-o clocks out
- If you're at home, do `C-c C-c home` to tag the headline with the tag :home:
- If you're late, do `C-c C-c late` to add the :late: tag

At the end of the month, you can create a clock table to view your time:
- http://orgmode.org/manual/The-clock-table.html#The-clock-table

You can also get the data out and simply figure out a criteria for
late/on-time with some other program. The clock table should be able
to tally your time for the month and you can count the number of
:home: tags perhaps.

I've asked on the list for grouping clock tables by tag and there was
some response:
- http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00219.html

--- (Approach 2: Date/time timestamps )---

You could just add date/time timestamps
- Add headline for month
- Add headline for day like above with C-c !
- Add time stamp for in with C-u C-c !
- Add time stamp out with C-u C-c !

* June
** [2012-06-04 Mon]
[2012-06-04 Mon 21:01]
[2012-06-04 Mon 21:02]


The tricky part for both comes with your second part, automating the
parsing of data. I was trying to get at something similar with my
quantified self request recently:
- http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg01344.html

Note my #4. I don't know of great ways to parse headlines and get out
timestamps into some sort of csv or data table for external analysis.
This would be fantastic.

The above should be quite usable for you, though. You can get a lot
from the clock table and shouldn't have a horrible time figuring out
how to count late/home/office tags if you use them. Someone can
probably chime in about using grep or some feature on the month's
headline to count some sort of occurrences.

Good luck!


Best regards,
John


 cheers,

        mehul
 --
 Mehul N. Sanghvi
 email: mehul.sang...@gmail.com




Re: [O] punch-in card for time tracking

2012-06-04 Thread Mehul Sanghvi
On Mon, Jun 4, 2012 at 10:05 PM, John Hendy jw.he...@gmail.com wrote:
 On Mon, Jun 4, 2012 at 8:40 PM, Mehul Sanghvi mehul.sang...@gmail.com wrote:
 What I need to do is the following:

    *  punch-in when I arrive at work

    *  make a notation for one of the following:

            * arrived late

            * working from home

    *  punch-out when I leave work

    * be able to generate a report (weekly/monthly/quarterly) which shows

             * how many days I was in the office

             * how many days was I working from home

             * how many days I was late



 Is this something I can get done using Org ?   How ?


 Yes indeed (at least the first part). Second part shouldn't be that hard.

 ---( Approach 1: Clocking )---

 Link to how to clock:
 - http://orgmode.org/manual/Clocking-work-time.html

 What I might do:
 - Create headline for current month
 - Create headline with current date
 - Clock in when you get to work
 - Clock out when you leave work

 * June
 ** [2012-06-04 Mon] (C-c ! then return to create that time stamp)

 - Now C-c C-x C-i to clock in on that headline
 - When you leave, C-c C-x C-o clocks out
 - If you're at home, do `C-c C-c home` to tag the headline with the tag :home:
 - If you're late, do `C-c C-c late` to add the :late: tag

 At the end of the month, you can create a clock table to view your time:
 - http://orgmode.org/manual/The-clock-table.html#The-clock-table

 You can also get the data out and simply figure out a criteria for
 late/on-time with some other program. The clock table should be able
 to tally your time for the month and you can count the number of
 :home: tags perhaps.

 I've asked on the list for grouping clock tables by tag and there was
 some response:
 - http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00219.html


John,

This option seems to make sense to me.  Thanks for the pointers
and help.


cheers,

mehul

-- 
Mehul N. Sanghvi
email: mehul.sang...@gmail.com



Re: [O] Bug: org-capture Does not take user to any new buffer

2012-06-04 Thread Nick Dokos
Mike Fitzgerald mikef...@gmail.com wrote:

 To duplicate:
 

I haven't tried specifically to duplicate your setup but org-capture
seems to work fine here.

 1) Run org-capture with C-c c
 2) User is Promoted with the two templates expected 
 (copied the templates from the org-mode site)
 
 3) Enter j for journal
 4) Expect switch to new buffer
 5) No switch occurs

So what happens instead? If I start capture, I get another window where
I'm presented with an *Org Select* buffer that offers me the available
choices and when I select one of those, I get a CAPTURE-foo.org buffer
for some value of foo.  This is actually an indirect buffer and the
text should be inserted into the target location already, so you can
look at ~/org/journal.org (or whatever) and see that it contains the
partial entry just started.  See the description of org-capture: C-h f
org-capture RET.

If I were you, I'd probably use edebug to step through the org-capture
function (and I'd forget about byte compiling anything until whatever
problem you have is identified and solved).

HTH,
Nick

 Note that journal.org is open, but I need to switch to it
 
 I expected EMACS to switch to a new buffer after choosing
 the template.
 
 Running GNU EMACS 23.3 on Win7
 
 Org mode update byte compiled by hand (without make) using
  
    (defun my/compile-org(optional directory)
  Compile all *.el files that come with org-mode.
      (interactive)
    ;Found on a org-mode related page.
 
 Thanks
 
 Mike
 
 Remember to cover the basics, that is, what you expected to happen and
 what in fact did happen.  You don't know how to make a good report?  See
 
  http://orgmode.org/manual/Feedback.html#Feedback
 
 Your bug report will be posted to the Org-mode mailing list.
 
 
 Emacs  : GNU Emacs 23.3.1 (i386-mingw-nt6.1.7600)
  of 2011-03-10 on 3249CTO
 Package: Org-mode version 7.8.11
 
 current state:
 ==
 (setq
  org-log-done 'time
  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
  org-speed-command-hook '(org-speed-command-default-hook 
 org-babel-speed-command-hook)
  org-metaup-hook '(org-babel-load-in-session-maybe)
  org-capture-templates '((t Todo entry (file+headline ~/org/gtd.org 
 Tasks)
               * TODO %?\n  %i\n  %a)
              (j Journal entry (file+datetree ~/org/journal.org)
               * %?\nEntered on %U\n  %i\n  %a)
              )
  org-after-todo-state-change-hook '(org-clock-out-if-current)
  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
  org-tab-first-hook '(org-hide-block-toggle-maybe 
 org-src-native-tab-command-maybe
           org-babel-hide-result-toggle-maybe)
  org-src-mode-hook '(org-src-babel-configure-edit-buffer 
 org-src-mode-configure-edit-buffer)
  org-confirm-shell-link-function 'yes-or-no-p
  org-export-first-hook '(org-beamer-initialize-open-trackers)
  org-agenda-before-write-hook '(org-agenda-add-entry-text)
  org-babel-pre-tangle-hook '(save-buffer)
  org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
 org-cycle-show-empty-lines
           org-optimize-window-after-visibility-change)
  org-export-preprocess-before-normalizing-links-hook 
 '(org-remove-file-link-modifiers)
  org-mode-hook '(#[nil \300\301\302\303\304$\207
            [org-add-hook change-major-mode-hook org-show-block-all append 
 local] 5]
          #[nil \300\301\302\303\304$\207
            [org-add-hook change-major-mode-hook org-babel-show-result-all 
 append local] 5]
          org-babel-result-hide-spec org-babel-hide-all-hashes)
  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
 org-babel-execute-safely-maybe)
  org-confirm-elisp-link-function 'yes-or-no-p
  org-export-interblocks '((src org-babel-exp-non-block-elements))
  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
  org-occur-hook '(org-first-headline-recenter)
  org-export-preprocess-before-selecting-backend-code-hook 
 '(org-beamer-select-beamer-code)
  org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
 org-beamer-auto-fragile-frames
                org-beamer-place-default-actions-for-lists)
  org-metadown-hook '(org-babel-pop-to-session-maybe)
  org-export-blocks '((src org-babel-exp-src-block nil)
          (export-comment org-export-blocks-format-comment t)
          (ditaa org-export-blocks-format-ditaa nil) (dot 
 org-export-blocks-format-dot nil))
  )
 
 
 
 Alternatives:
 
 



Re: [O] BUG: new exporter fails to export a source code with stars at bol

2012-06-04 Thread Yagnesh Raghava Yakkala

Hello Bastien.,

Bastien b...@gnu.org writes:

 #+BEGIN_SRC elisp
   (message * one\n** two)
 #+END_SRC

Yes, I could got around with that. Just wanted file a bug report. BTW old one
is exporting it fine.

Thanks.,
-- 
ఎందరో మహానుభావులు అందరికి వందనములు
YYR