Re: [O] \input causes conflict with LaTeX equation preview

2014-10-21 Thread Nicolas Goaziou
Hello,

Ken Mankoff mank...@gmail.com writes:

 * On 2014-10-20 at 18:26, Rasmus wrote:
 Ken Mankoff mank...@gmail.com writes:

 I have

 #+LATEX_HEADER: \input{preamble}

 in an Org file. When I try to preview equations, it does not work
 because \input{preamble} is exported to the equation preview
 preamble, but no file preamble.tex is exported. The preamble.tex
 file is not needed just to preview an equation.

 Can anyone suggest a work-around?

 \IfFileExists{./preamble.tex}{true}{false}

 Etoolbox has a number of nice tests for more sophisticated
 conditioning.


 Works great. Thank you.

See also

 #+LATEX_HEADER_EXTRA: \input{preamble}


Regards,

-- 
Nicolas Goaziou



Re: [O] # of parameters of `org-latex-format-headline-function'

2014-10-21 Thread Sebastien Vauban
Nick Dokos wrote:
 Sebastien Vauban writes:

 During the summer, the number of parameters of the
 `org-latex-format-headline-function' changed from 5 to 6: addition of
 `info'.

 The new version of my private formatting function is:

   ;; function for formatting the headline's text
   (setq org-latex-format-headline-function
 'my/org-latex-format-headline)

   ;; markup for TODO keywords and for tags, as a printf format
   (defun my/org-latex-format-headline (todo todo-type priority text tags 
 info)
 Default function for formatting the headline's text.
 ...)


 How can I support both versions of Org?  Do I have to test the Org
 version number, or is there a more clever way?

 Make info an optional parameter in your function: recent org will call
 it with a non-nil info, old org will call it without an info parameter
 (which I believe will make it nil inside your function).

 Untested.

Tested. Works perfectly. Thank you!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [PATCH] org.el: Fix bindings of and for calendar scrolling

2014-10-21 Thread Sebastien Vauban
Marco Wahl wrote:
 Find a fix for the bindings of  and  for calendar scrolling for Emacs
 25.  The fix is necessary because Emacs 25 dropped some aliases in the
 calendar lib, in particular those that have been bound to  and .

 diff --git a/lisp/org.el b/lisp/org.el
 index 2b5603c..7f4be6b 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -16285,10 +16285,10 @@ So these are more for recording a certain 
 time/date.
(message )))
  (org-defkey map 
  (lambda () (interactive)
 -  (org-eval-in-calendar '(scroll-calendar-left 1
 +  (org-eval-in-calendar '(calendar-scroll-left 1

Can't you simply write 'calendar-scroll-left ?

  (org-defkey map 
  (lambda () (interactive)
 -  (org-eval-in-calendar '(scroll-calendar-right 1
 +  (org-eval-in-calendar '(calendar-scroll-right 1

Same here?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [PATCH] org.el: Fix bindings of and for calendar scrolling

2014-10-21 Thread Marco Wahl
Hello Sebastien,

Sebastien Vauban sva-n...@mygooglest.com
writes:

 Marco Wahl wrote:
 Find a fix for the bindings of  and  for calendar scrolling for Emacs
 25.  The fix is necessary because Emacs 25 dropped some aliases in the
 calendar lib, in particular those that have been bound to  and .

 diff --git a/lisp/org.el b/lisp/org.el
 index 2b5603c..7f4be6b 100644
 --- a/lisp/org.el
 +++ b/lisp/org.el
 @@ -16285,10 +16285,10 @@ So these are more for recording a certain 
 time/date.
(message )))
  (org-defkey map 
  (lambda () (interactive)
 -  (org-eval-in-calendar '(scroll-calendar-left 1
 +  (org-eval-in-calendar '(calendar-scroll-left 1

 Can't you simply write 'calendar-scroll-left ?

No.  This is because org-eval-in-calendar expects a form and not just a
variable.

Your idea to simplyfy the call by dropping the '1' --- i.e. writing
'(calendar-scroll-left) --- sounds good to me.  OTOH there are many
similar lines in org-read-date-minibuffer-local-map which all use the
'1' explicitly.  So I think it would be rather irritating to drop the
'1' in just two locations.


Best regards,  Marco
-- 
http://www.wahlzone.de
GPG: 0x0A3AE6F2




[O] Omitting title in odt-export

2014-10-21 Thread hack writer
Hi there,

I have problems omitting the OrgTitle from an exported odt-document. Through 
the following preamble in my .org-file I am able to omit most of the default 
title/author/etc. information at the beginning of the .odt-document:

#+ODT_STYLES_FILE: /path/to/template.ott
#+TITLE: 
#+DATE:
#+AUTHOR:
#+OPTIONS: ':nil *:t -:t ::t :t H:3 \n:nil ^:t arch:headline
#+OPTIONS: author:nil c:nil creator:comment d:(not LOGBOOK) date:nil e:t
#+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil stat:t tags:t
#+OPTIONS: tasks:t tex:t timestamp:t toc:t todo:t |:t
#+CREATOR: 
#+DESCRIPTION:
#+EXCLUDE_TAGS: noexport
#+KEYWORDS:
#+LANGUAGE: de
#+SELECT_TAGS: export
#+BEGIN_ODT
//
// .odt stuff in here
//
#+END_ODT

but there are still two empty paragraphs at the beginning of my file. When 
looking at the source code of the odt-file (content.xml) the empty paragraphs 
are

text:p text:style-name=OrgTitle
text:title/text:title/text:p
text:p text:style-name=OrgTitle/

before my real text begins.

So how can I get rid of these empty paragraphs (I already tried things like 
title:nil but they didn't work)?



Re: [O] [ox-latex] How to force ALL captions below their referents?

2014-10-21 Thread Eric S Fraga
On Friday, 17 Oct 2014 at 22:08, Nicolas Goaziou wrote:
 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 If we want to preserve backward-compatibility, t, nil and a list of
 types (e.g. '(table src-block)) should suffice. No need for an alist.

 Still on my ToDo list but I'm not there yet. Feel free to beat me to it
 if you want.

 Done. Feedback welcome.

Nicolas,

the changes seem to work just fine.  Thanks.

However, I think it would make sense to make '(table) (at least) the
default for captions above to have some form of backward compatibility?
The change caught me by surprise...

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



Re: [O] Captions below figures in LaTeX export

2014-10-21 Thread Rasmus
Hi,

Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 I would like to put the caption command after includegraphics.  Is that
 possible?  I tried reordering the #+caption: line without success.

If you are using a very recent version of Org, you could check
`org-latex-caption-above'.  Example:

(let ((org-latex-caption-above nil))
  (with-temp-buffer
(insert #+name: fig:ads-glw-plot
 #+caption: \\BtoDh events measured using the GLW, and ADS methods.
 #+attr_latex: :width 0.9\\linewidth :placement [!ht]
 [[file:ali/ADS_GLW_Fig2_Fig4.pdf]])
(org-mode) (org-latex-export-as-latex nil nil nil t)))

Hope it helps,
Rasmus

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




Re: [O] Omitting title in odt-export

2014-10-21 Thread Nick Dokos
hack writer g...@bookhacker.org writes:


 I have problems omitting the OrgTitle from an exported
 odt-document. Through the following preamble in my .org-file I am able
 to omit most of the default title/author/etc. information at the
 beginning of the .odt-document:

 #+ODT_STYLES_FILE: /path/to/template.ott

 #+TITLE: 
 #+DATE:

 #+AUTHOR:

 #+OPTIONS: ':nil *:t -:t ::t :t H:3 \n:nil ^:t arch:headline
 #+OPTIONS: author:nil c:nil creator:comment d:(not LOGBOOK) date:nil e:t

 #+OPTIONS: email:nil f:t inline:t num:t p:nil pri:nil stat:t tags:t
 #+OPTIONS: tasks:t tex:t timestamp:t toc:t todo:t |:t

 #+CREATOR: 
 #+DESCRIPTION:

 #+EXCLUDE_TAGS: noexport
 #+KEYWORDS:

 #+LANGUAGE: de
 #+SELECT_TAGS: export

 #+BEGIN_ODT
 //
 // .odt stuff in here
 //
 #+END_ODT

 but there are still two empty paragraphs at the beginning of my file. When 
 looking at the source code of the odt-file (content.xml) the empty paragraphs 
 are

 text:p text:style-name=OrgTitle
 text:title/text:title/text:p
 text:p text:style-name=OrgTitle/

 before my real text begins.

 So how can I get rid of these empty paragraphs (I already tried things like 
 title:nil but they didn't work)?


You need to update your org to a version that includes the following
commit:

,
| commit 91175a31ee73d10f61a57a290dd588fa484be1f2
| Author: Nicolas Goaziou n.goaz...@gmail.com
| Date:   Fri Mar 28 10:08:56 2014 +0100
| 
| ox-odt: Ignore blank titles
| 
| * lisp/ox-odt.el (org-odt-template): Ignore blank titles.
`

The current maint branch (from git, tarball or ELPA package) includes
it. So does the bleeding-edge master branch. But the version that came
with your emacs probably does not.

-- 
Nick




[O] org-class and headers

2014-10-21 Thread Joseph Le Roux
Dear orgmode users,

First let me express my gratitude to the developers and maintainers for
such a wonderful piece of software!


I am a professor and I use org-class to schedule my lectures. It is very
useful to organize these repeated events and take into account holidays.
But inevitably in the academic world, some lectures get cancelled,
postponed, or moved to another day. In this case org-class does not
provide an efficient way to cancel and/or reschedule lectures. Another
issue I have is the inability to mark one class as DONE and still have
the remaining classes marked as TODO, and more generally to organize
notes and sort them by class sessions. Has any orgmode user ever solved
this problem ?


I've been thinking about this and I've come up with a possible solution.
Could org-class be modified in order to generate a list of headers, one
for each session of the class? These headers could then be independently
rescheduled at will. And of course each header could have its own
content. Any thought on how to implement this?

Cheers,

-- 
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux



Re: [O] Org-mode Habit with Varying Description

2014-10-21 Thread Samuel Loury
Hi,
Eric Abrahamsen e...@ericabrahamsen.net writes:

 I've been (very gradually) working on something I'm calling org-log, for
 just this sort of situation -- a library that would possibly go
 underneath org-habit and maybe even org-clock. It would look like:

 * Read book
   :LOGBOOK:
   - Note taken on [2014-10-20 Mon 10:33] \\
 PAGES: 49
   - Note taken on [2014-10-20 Mon 10:32] \\
 PAGES: 150
   :END:

 When adding notes (or state-change log notes) the user would be prompted
 to record values for the key(s) already existing in the logbook (in this
 case, PAGES). Multiple key-value pairs would be possible. Generic tables
 could be created for a heading, with more specialized tables with
 user-defined column formulas and all that.

 Add unit manipulation/calculation from the calc-units package, and I
 think this could be a nice extension to Org.

 I originally started thinking of this while translating a novel. I had a
 certain number of characters to translate, and a certain deadline. What
 I wanted was a single heading where I logged my progress, and a
 reporting facility that said given today's date and how many characters
 you've already done, you'll need to average XXX characters per day to
 hit the deadline. I envisioned a gnuplot table that showed
 actual-characters-per-day against the shifting
 average-characters-per-day.

That is a very interesting idea. Do you think we could see your actual
work?

-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


pgpfBBpIgK_2X.pgp
Description: PGP signature


[O] 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-21 Thread Fabrice Niessen
Hello,

On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
8.3beta, I can very often freeze Emacs when clocking into a task, or
when editing the timestamps found in the LOGBOOK drawer.

I've run Emacs under GDB, and can send a video of it, where you also see
that Emacs takes 100% of the CPU. Though, I can only send it on request,
as it contains information in my Org buffers which I don't want to see
public.

Info from GDB:

--8---cut here---start-8---
$ cd bin
$ gdb ./emacs.exe
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-pc-cygwin.
Type show configuration for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type help.
Type apropos word to search for commands related to word...
/cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
No symbol table is loaded.  Use the file command.
Reading symbols from ./emacs.exe...done.
(gdb) set debugexceptions 1
(gdb) run
Starting program: /cygdrive/c/Program Files (x86)/emacs-24.4/bin/emacs.exe
[New Thread 7692.0x18e8]
gdb: Target exception EXCEPTION_BREAKPOINT at 0x772f04d2
[New Thread 7692.0x2564]
[New Thread 7692.0x26cc]
[New Thread 7692.0x2abc]
[New Thread 7692.0xe98]
[Thread 7692.0xe98 exited with code 1]
[New Thread 7692.0x20c]
[Thread 7692.0x20c exited with code 1]
[New Thread 7692.0x1964]
[Thread 7692.0x1964 exited with code 1]
[New Thread 7692.0x1b6c]
[Thread 7692.0x1b6c exited with code 1]
[New Thread 7692.0x2758]
[Thread 7692.0x2758 exited with code 1]
[New Thread 7692.0x16dc]
[Thread 7692.0x16dc exited with code 1]
[New Thread 7692.0x1df0]
[Thread 7692.0x1df0 exited with code 1]
[New Thread 7692.0xe8]
[Thread 7692.0xe8 exited with code 1]
[New Thread 7692.0x1cd4]
[Thread 7692.0x1cd4 exited with code 1]
[New Thread 7692.0xf98]
[Thread 7692.0xf98 exited with code 1]
[New Thread 7692.0x267c]
[Thread 7692.0x267c exited with code 1]
[New Thread 7692.0x1e88]
[New Thread 7692.0x2158]
[New Thread 7692.0x2314]
[Thread 7692.0x2314 exited with code 1]
[New Thread 7692.0x21b4]
[Thread 7692.0x21b4 exited with code 1]
[New Thread 7692.0x2124]
[Thread 7692.0x2124 exited with code 1]
[New Thread 7692.0x1c1c]
[Thread 7692.0x1c1c exited with code 1]
[New Thread 7692.0x2a88]
[Thread 7692.0x2a88 exited with code 1]
[New Thread 7692.0x2624]
[Thread 7692.0x2624 exited with code 1]
[New Thread 7692.0x1c5c]
[Thread 7692.0x1c5c exited with code 1]
[New Thread 7692.0xf5c]
[Thread 7692.0xf5c exited with code 1]
[New Thread 7692.0x1ec4]
[Thread 7692.0x1ec4 exited with code 1]
[New Thread 7692.0x2078]
[Thread 7692.0x2078 exited with code 1]
[New Thread 7692.0x27d8]
[Thread 7692.0x27d8 exited with code 1]
[New Thread 7692.0x2910]
[Thread 7692.0x2910 exited with code 1]
[New Thread 7692.0x2bf8]
[Thread 7692.0x2bf8 exited with code 1]
[New Thread 7692.0x264c]
[New Thread 7692.0x2760]
[New Thread 7692.0x1d00]
[New Thread 7692.0x2810]
[Thread 7692.0x2810 exited with code 1]
[New Thread 7692.0x1a1c]
[Thread 7692.0x1a1c exited with code 1]
[New Thread 7692.0x1878]
[Thread 7692.0x1e88 exited with code 0]
[New Thread 7692.0x217c]
[Thread 7692.0x217c exited with code 1]
[New Thread 7692.0x1a28]
[Thread 7692.0x1a28 exited with code 1]
[New Thread 7692.0x241c]
[Thread 7692.0x1878 exited with code 0]
[Thread 7692.0x1d00 exited with code 0]
[New Thread 7692.0x1c9c]
[Thread 7692.0x1c9c exited with code 1]
[New Thread 7692.0x189c]
[Thread 7692.0x241c exited with code 0]
[New Thread 7692.0x15e8]
[Thread 7692.0x15e8 exited with code 1]
[New Thread 7692.0x1794]
[Thread 7692.0x1794 exited with code 1]
[New Thread 7692.0x22b0]
[Thread 7692.0x22b0 exited with code 1]
[New Thread 7692.0x2574]
[Thread 7692.0x2574 exited with code 1]
[New Thread 7692.0x2b20]
[Thread 7692.0x2b20 exited with code 1]
[New Thread 7692.0x204c]
[Thread 7692.0x204c exited with code 1]
[New Thread 7692.0x26c0]
[Thread 7692.0x26c0 exited with code 1]
[New Thread 7692.0x160c]
[Thread 7692.0x160c exited with code 1]
[New Thread 7692.0xf60]
[Thread 7692.0xf60 exited with code 1]
[New Thread 7692.0x1f1c]
[Thread 7692.0x1f1c exited with code 1]
[New Thread 7692.0x200]

... Trying C-c and al. ...

[Thread 7692.0x26cc exited with code 1]
[Thread 7692.0x264c exited with code 1]
[Thread 7692.0x2158 exited with code 1]
[Thread 7692.0x2abc exited with code 1]
[Thread 7692.0x2760 exited with code 1]
[Thread 7692.0x189c exited with code 1]
[Thread 7692.0x200 exited with code 1]
[Thread 7692.0x2564 exited with code 1]
[Inferior 1 (process 7692) exited with code 01]
(gdb) (gdb) Quit
(gdb)
--8---cut 

Re: [O] org-class and headers

2014-10-21 Thread Rasmus
Hi,

Joseph Le Roux joseph.le.r...@gmail.com writes:

 I am a professor and I use org-class to schedule my lectures. It is very
 useful to organize these repeated events and take into account holidays.
 But inevitably in the academic world, some lectures get cancelled,
 postponed, or moved to another day. In this case org-class does not
 provide an efficient way to cancel and/or reschedule lectures. Another
 issue I have is the inability to mark one class as DONE and still have
 the remaining classes marked as TODO, and more generally to organize
 notes and sort them by class sessions. Has any orgmode user ever solved
 this problem ?

If a class is canceled you can drop that week from the line and puts a
time stamp for the new one below.  In the following week 12 is dropped
and a replacement class is scheduled on 2014-03-18.

* class
2014-03-18 Tue 11:00-13:00
%%(org-class 2014 02 24 2014 03 25 1 12) class 11:00-13:00

 I've been thinking about this and I've come up with a possible solution.
 Could org-class be modified in order to generate a list of headers, one
 for each session of the class? These headers could then be independently
 rescheduled at will. And of course each header could have its own
 content. Any thought on how to implement this?

Will `org-clone-subtree-with-time-shift' do what you want?

Hope it helps,
Rasmus

-- 
Don't panic!!!




Re: [O] org-lookup formula missing

2014-10-21 Thread Chris Drane
No, that does not do anything. I see the macro that is supposed to define
the functions in my org-table.el, so I don't think version is an issue. Org
is 7.9.3f. Emacs is 24.3.1.

On Mon, Oct 20, 2014 at 6:39 PM, Rasmus ras...@gmx.us wrote:

 Hi,

 Chris Drane csdr...@gmail.com writes:

  For some reason, the org-lookup formula [1] are not available to me. I
  don't see anything that I'm supposed to enable to have access to them,
 and
  I don't think there's anything in my config that would be blocking them.
  Does anyone know why this might be?

 In my Org-mode version 8.3beta (release_8.3beta-422-gb54ad3 @
 /usr/share/emacs/site-lisp/org/) they are defined in org-table.el.

 Are the functions available when you explictly require that file?

 M-: (require 'org-table) RET

 —Rasmus

 --
 Together we will make the possible totay impossible!





[O] How to get to the link destination?

2014-10-21 Thread Marcin Borkowski
Hi all,

as in the subject.  I want to do something /at the destination of the
link/ the point is at (more precisely: get some text property of that
place).  This is what I came up with:

(save-excursion
  (org-open-at-point)
  (get-text-property (point) :some-property))

Is there a better/faster way, especially knowing that the link is an
internal one?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] org-lookup formula missing

2014-10-21 Thread Rasmus
Chris Drane csdr...@gmail.com writes:

 No, that does not do anything. I see the macro that is supposed to define
 the functions in my org-table.el, so I don't think version is an issue. Org
 is 7.9.3f. Emacs is 24.3.1.

This version of Org is outdated.  Can you try a newer version and see
if the problem persists?  

Emacs 24.4 has Org 8.2-something.

—Rasmus

-- 
Governments should be afraid of their people




Re: [O] Getting lots of Emacs crashes

2014-10-21 Thread Noah Slater
Thanks. I have done that now. They told me to upgrade my Emacs. I have
done so. We'll see what happens. :)

On 13 October 2014 17:54, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 Noah Slater nsla...@apache.org writes:

 Is there anything else I could provide that would help? It's still
 happening to me occasionally.

 An ECM for the infloop could help. If it segfaults, however, it is
 probably outside of Lisp scope and you should report it to the Emacs
 development team.


 Regards,

 --
 Nicolas Goaziou



-- 
Noah Slater
https://twitter.com/nslater



Re: [O] org-class and headers

2014-10-21 Thread Joseph Le Roux
Rasmus ras...@gmx.us writes:

 Hi,

 Joseph Le Roux joseph.le.r...@gmail.com writes:

 I am a professor and I use org-class to schedule my lectures. It is very
 useful to organize these repeated events and take into account holidays.
 But inevitably in the academic world, some lectures get cancelled,
 postponed, or moved to another day. In this case org-class does not
 provide an efficient way to cancel and/or reschedule lectures. Another
 issue I have is the inability to mark one class as DONE and still have
 the remaining classes marked as TODO, and more generally to organize
 notes and sort them by class sessions. Has any orgmode user ever solved
 this problem ?

 If a class is canceled you can drop that week from the line and puts a
 time stamp for the new one below.  In the following week 12 is dropped
 and a replacement class is scheduled on 2014-03-18.

 * class
 2014-03-18 Tue 11:00-13:00
 %%(org-class 2014 02 24 2014 03 25 1 12) class 11:00-13:00

Yes of course, another timestamp! Great, now I can reschedule a 
postponed/cancelled lecture.



 I've been thinking about this and I've come up with a possible solution.
 Could org-class be modified in order to generate a list of headers, one
 for each session of the class? These headers could then be independently
 rescheduled at will. And of course each header could have its own
 content. Any thought on how to implement this?

 Will `org-clone-subtree-with-time-shift' do what you want?


Thanks for the pointer, it could be very handy in my use-case, but this
function copies the org-class as is for all clones. I would like to
generate a list of headers, one for each session (with the actual date
of the session). Maybe I will try to see how org-class computes all the
dates, then I can clone the header with the appropriate time-shift/new
date.


 Hope it helps,
 Rasmus

Thank you for your help,
Joseph


-- 
Joseph Le Roux

RCLN, LIPN, Université Paris 13
Tel: +33 (0) 1 49 40 40 81
Fax: +33 (0) 1 48 26 51 12
URL: http://lipn.univ-paris13.fr/~leroux



[O] Announcement: org-one-to-many

2014-10-21 Thread Marcin Borkowski
Hi all,

a long time ago I asked here about a way to split an Org file into a
bunch of smaller ones.  One of the answers I got was that the tricky
part is maintaining internal links in a reasonable way.

It is probably overoptimistic on my side, but it seems that this problem
is solved now.  The code is not very elegant, and I will be actively
working on it (I want to write an org-to-e-learning exporter, based on
the HTML one, and this is a small part of that effort), but here it is
for testing/review/bug reports/feature requests/any other kind of
feedback.

And here it is: https://github.com/mbork/org-one-to-many

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] electric-indent-mode in Emacs 25 not indenting in Org

2014-10-21 Thread Andrew Burgess
* William Denton w...@pobox.com [2014-10-15 22:13:16 -0400]:

 I noticed something odd with electric-indent-mode, which I had enabled, and
 which is on by default in 24.4.

I think the problem is with the calls to `newline' within org-return.

The code for `newline' was changed so that non-interactive calls don't
run the post-self-insert-hook, the result is that the
electric-indent-post-self-insert-function is not called.

HTH
Andrew



Re: [O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-21 Thread Eli Zaretskii
 From: Fabrice Niessen fni-n...@pirilampo.org
 Date: Tue, 21 Oct 2014 14:47:16 +0200
 
 On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
 8.3beta, I can very often freeze Emacs when clocking into a task, or
 when editing the timestamps found in the LOGBOOK drawer.
 
 I've run Emacs under GDB, and can send a video of it, where you also see
 that Emacs takes 100% of the CPU. Though, I can only send it on request,
 as it contains information in my Org buffers which I don't want to see
 public.

Is that video worth watching?  I mean, what could a video of a frozen
Emacs tell?

 $ gdb ./emacs.exe
 GNU gdb (GDB) 7.8

This GDB session brings no useful info.  Please follow the method
described in etc/DEBUG under If the symptom of the bug is that Emacs
fails to respond.

Thanks.



Re: [O] Org-mode Habit with Varying Description

2014-10-21 Thread Michael Brand
Hi Daya

On Mon, Oct 20, 2014 at 4:33 PM, Daya Atapattu atapat...@gmail.com wrote:
 I like to schedule studying a book:  It would be scheduled as Read pages
 100-125.  Then the next day it should read Read pages 126-150.  The
 description of the habit varies; org-mode picks that up sequentially from a
 list.

Once I was using this simple solution for a continuous burn down task,
adapted to your example:

* Burn down
%%(when (and (not (org-date 2014 10 20)) (calendar-date-equal date
(calendar-current-date))) (message Read book until page %d 19:00 (*
25 (- (calendar-absolute-from-gregorian date)
(calendar-absolute-from-gregorian '(10 15 2014))

Note that %%( has to start on the first column and that the rest
could be moved partially or as a whole into a function call for easier
maintenance.

19:00 is an optional time of day.

2014 10 20 ( MM DD) is a poor man's DONE (which I use mainly for
diary-float) and has to be set manually to today after the part of
today has been done to let the task disappear from the agenda view of
today.

10 15 2014 (MM DD ) is the start date. Can also be used as an
end date for a countdown by swapping the subtraction operands.

calendar-date-equal is used to show it only for the day of today in an
agenda view showing also tomorrow etc.

Instead of using the number to print with %d it can easily be used to
do a lookup in a variable containing a list of whatever which can not
be computed directly like e. g. the headings of the book chapters.

Inspired by Worg Add sunrise/sunset times to the agenda, currently
http://orgmode.org/worg/org-hacks.html#sec-2-10

Michael



Re: [O] 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-21 Thread Eric Abrahamsen
Fabrice Niessen fni-n...@pirilampo.org
writes:

 Hello,

 On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
 8.3beta, I can very often freeze Emacs when clocking into a task, or
 when editing the timestamps found in the LOGBOOK drawer.

I've gotten something looking like that from time to time (more often in
the early days of the Org caching mechanism), and sending SIGUSR2 to the
frozen emacs would reveal that it was in the midst of something
flyspell-related. You don't appear to be running flyspell, but I'll
guess that Org's timers are clashing with somebody else's timers.

Not very helpful, I know.

 I've run Emacs under GDB, and can send a video of it, where you also see
 that Emacs takes 100% of the CPU. Though, I can only send it on request,
 as it contains information in my Org buffers which I don't want to see
 public.

 Info from GDB:

 $ cd bin
 $ gdb ./emacs.exe
 GNU gdb (GDB) 7.8
 Copyright (C) 2014 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 and show warranty for details.
 This GDB was configured as i686-pc-cygwin.
 Type show configuration for configuration details.
 For bug reporting instructions, please see:
 http://www.gnu.org/software/gdb/bugs/.
 Find the GDB manual and other documentation resources online at:
 http://www.gnu.org/software/gdb/documentation/.
 For help, type help.
 Type apropos word to search for commands related to word...
 /cygdrive/d/Users/fni/.gdbinit:19: Error in sourced command file:
 No symbol table is loaded.  Use the file command.
 Reading symbols from ./emacs.exe...done.
 (gdb) set debugexceptions 1
 (gdb) run
 Starting program: /cygdrive/c/Program Files (x86)/emacs-24.4/bin/emacs.exe
 [New Thread 7692.0x18e8]
 gdb: Target exception EXCEPTION_BREAKPOINT at 0x772f04d2
 [New Thread 7692.0x2564]
 [New Thread 7692.0x26cc]
 [New Thread 7692.0x2abc]
 [New Thread 7692.0xe98]
 [Thread 7692.0xe98 exited with code 1]
 [New Thread 7692.0x20c]
 [Thread 7692.0x20c exited with code 1]
 [New Thread 7692.0x1964]
 [Thread 7692.0x1964 exited with code 1]
 [New Thread 7692.0x1b6c]
 [Thread 7692.0x1b6c exited with code 1]
 [New Thread 7692.0x2758]
 [Thread 7692.0x2758 exited with code 1]
 [New Thread 7692.0x16dc]
 [Thread 7692.0x16dc exited with code 1]
 [New Thread 7692.0x1df0]
 [Thread 7692.0x1df0 exited with code 1]
 [New Thread 7692.0xe8]
 [Thread 7692.0xe8 exited with code 1]
 [New Thread 7692.0x1cd4]
 [Thread 7692.0x1cd4 exited with code 1]
 [New Thread 7692.0xf98]
 [Thread 7692.0xf98 exited with code 1]
 [New Thread 7692.0x267c]
 [Thread 7692.0x267c exited with code 1]
 [New Thread 7692.0x1e88]
 [New Thread 7692.0x2158]
 [New Thread 7692.0x2314]
 [Thread 7692.0x2314 exited with code 1]
 [New Thread 7692.0x21b4]
 [Thread 7692.0x21b4 exited with code 1]
 [New Thread 7692.0x2124]
 [Thread 7692.0x2124 exited with code 1]
 [New Thread 7692.0x1c1c]
 [Thread 7692.0x1c1c exited with code 1]
 [New Thread 7692.0x2a88]
 [Thread 7692.0x2a88 exited with code 1]
 [New Thread 7692.0x2624]
 [Thread 7692.0x2624 exited with code 1]
 [New Thread 7692.0x1c5c]
 [Thread 7692.0x1c5c exited with code 1]
 [New Thread 7692.0xf5c]
 [Thread 7692.0xf5c exited with code 1]
 [New Thread 7692.0x1ec4]
 [Thread 7692.0x1ec4 exited with code 1]
 [New Thread 7692.0x2078]
 [Thread 7692.0x2078 exited with code 1]
 [New Thread 7692.0x27d8]
 [Thread 7692.0x27d8 exited with code 1]
 [New Thread 7692.0x2910]
 [Thread 7692.0x2910 exited with code 1]
 [New Thread 7692.0x2bf8]
 [Thread 7692.0x2bf8 exited with code 1]
 [New Thread 7692.0x264c]
 [New Thread 7692.0x2760]
 [New Thread 7692.0x1d00]
 [New Thread 7692.0x2810]
 [Thread 7692.0x2810 exited with code 1]
 [New Thread 7692.0x1a1c]
 [Thread 7692.0x1a1c exited with code 1]
 [New Thread 7692.0x1878]
 [Thread 7692.0x1e88 exited with code 0]
 [New Thread 7692.0x217c]
 [Thread 7692.0x217c exited with code 1]
 [New Thread 7692.0x1a28]
 [Thread 7692.0x1a28 exited with code 1]
 [New Thread 7692.0x241c]
 [Thread 7692.0x1878 exited with code 0]
 [Thread 7692.0x1d00 exited with code 0]
 [New Thread 7692.0x1c9c]
 [Thread 7692.0x1c9c exited with code 1]
 [New Thread 7692.0x189c]
 [Thread 7692.0x241c exited with code 0]
 [New Thread 7692.0x15e8]
 [Thread 7692.0x15e8 exited with code 1]
 [New Thread 7692.0x1794]
 [Thread 7692.0x1794 exited with code 1]
 [New Thread 7692.0x22b0]
 [Thread 7692.0x22b0 exited with code 1]
 [New Thread 7692.0x2574]
 [Thread 7692.0x2574 exited with code 1]
 [New Thread 7692.0x2b20]
 [Thread 7692.0x2b20 exited with code 1]
 [New Thread 7692.0x204c]
 [Thread 7692.0x204c exited with code 1]
 [New Thread 7692.0x26c0]
 [Thread 7692.0x26c0 exited with code 1]
 [New Thread 7692.0x160c]
 [Thread 7692.0x160c exited with code 1]
 [New Thread 7692.0xf60]
 [Thread 7692.0xf60 exited with code 1]
 [New Thread 7692.0x1f1c]
 [Thread 7692.0x1f1c exited 

Re: [O] Announcement: org-one-to-many

2014-10-21 Thread Eric Abrahamsen
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 Hi all,

 a long time ago I asked here about a way to split an Org file into a
 bunch of smaller ones.  One of the answers I got was that the tricky
 part is maintaining internal links in a reasonable way.

 It is probably overoptimistic on my side, but it seems that this problem
 is solved now.  The code is not very elegant, and I will be actively
 working on it (I want to write an org-to-e-learning exporter, based on
 the HTML one, and this is a small part of that effort), but here it is
 for testing/review/bug reports/feature requests/any other kind of
 feedback.

 And here it is: https://github.com/mbork/org-one-to-many

Oooh, cool. I'll look forward to reading it!




Re: [O] 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2014-10-21 Thread Thorsten Jolitz
Eric Abrahamsen e...@ericabrahamsen.net writes:

 Fabrice Niessen fni-n...@pirilampo.org
 writes:

Hello,

 On Windows 8, with Emacs 24.4.1 (from Dani) and Org mode version
 8.3beta, I can very often freeze Emacs when clocking into a task, or
 when editing the timestamps found in the LOGBOOK drawer.

 I've gotten something looking like that from time to time (more often in
 the early days of the Org caching mechanism), and sending SIGUSR2 to the
 frozen emacs would reveal that it was in the midst of something
 flyspell-related. You don't appear to be running flyspell, but I'll
 guess that Org's timers are clashing with somebody else's timers.

 Not very helpful, I know.

I just crashed

,
| GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
|  of 2014-06-11 on var-lib-archbuild-staging-x86_64-jgc
`

again today while refiling an Org task, but I already reported this a
few weeks ago to the Emacs maintainers and it seems I have a stripped
binary that does not deliver useful backtrace info. I don't use
flyspell and I'm on Archlinux.

Not very helpful, I know.

-- 
cheers,
Thorsten




Re: [O] Org-mode Habit with Varying Description

2014-10-21 Thread Eric Abrahamsen
Samuel Loury konubi...@gmail.com writes:

 Hi,
 Eric Abrahamsen e...@ericabrahamsen.net writes:

 I've been (very gradually) working on something I'm calling org-log, for
 just this sort of situation -- a library that would possibly go
 underneath org-habit and maybe even org-clock. It would look like:

 * Read book
   :LOGBOOK:
   - Note taken on [2014-10-20 Mon 10:33] \\
 PAGES: 49
   - Note taken on [2014-10-20 Mon 10:32] \\
 PAGES: 150
   :END:

 When adding notes (or state-change log notes) the user would be prompted
 to record values for the key(s) already existing in the logbook (in this
 case, PAGES). Multiple key-value pairs would be possible. Generic tables
 could be created for a heading, with more specialized tables with
 user-defined column formulas and all that.

 Add unit manipulation/calculation from the calc-units package, and I
 think this could be a nice extension to Org.

 I originally started thinking of this while translating a novel. I had a
 certain number of characters to translate, and a certain deadline. What
 I wanted was a single heading where I logged my progress, and a
 reporting facility that said given today's date and how many characters
 you've already done, you'll need to average XXX characters per day to
 hit the deadline. I envisioned a gnuplot table that showed
 actual-characters-per-day against the shifting
 average-characters-per-day.

 That is a very interesting idea. Do you think we could see your actual
 work?

Actual work?! Perhaps I gave the wrong impression :)

All I've got now are a function that finds the logbook, and another that
parses the log items and normalizes them: extracts the TODO
states/timestamps/key-values and sets them as properties on the items
themselves. Then you've got a pretty good basis from which to do
reporting.

Hooking into note-taking and todo state-change logging to prompt for
values should be easy.

I don't know yet how to approach the reporting part, mostly because I
haven't sat down and thought about how this would be most useful. It
will also require reading org-clock and org-habit in detail -- clearly
reporting to a table like they do is the right way to go.

How to get the most out of the data? I was thinking of having
COLUMN_FORMULA and TABLE_FORMULA properties on the heading. When you
report from the heading, each key in the logbook data creates a table
column. Each column formula property creates another column, populated
by that formula (presumably calculated from the data columns). Then the
table formula gets slapped on to the bottom of it, and the whole thing
runs.

So if you had a heading like this:

* TODO Anneal galoshes
  :LOGBOOK:
  GALOSHES: 15; CLOCK: [2014-10-15 Wed 09:07]--[2014-10-15 Wed 17:10] =  8:03
  GALOSHES: 13; CLOCK: [2014-10-14 Tue 08:50]--[2014-10-14 Tue 16:30] =  7:40
  GALOSHES: 14; CLOCK: [2014-10-13 Mon 09:30]--[2014-10-13 Mon 17:06] =  7:36
  :END:

You'd end up with a table with two data columns. Then you could have a
COLUMN_FORMULA property that created a third column, displaying galoshes
annealed per hour. And a TABLE_FORMULA property that did... something...
with all that information.

In a sense, it's a bit like column view, except using logbook data
rather than property values.

I'm just thinking out loud -- I'm probably not the right one to make
this as useful as it can be. But I don't see any reason why we shouldn't
do this!

Eric




Re: [O] Exponents / subscripts

2014-10-21 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Fabrice Popineau fabrice.popin...@supelec.fr writes:

 Given that it is only a matter of presentation, does that mean it could be
 changed ?
 If yes, I can try to give it a shot.

 If you mean that a^bc should be equivalent to a^{b}c, then I think it is
 superior in its current state.

 As I understand Fabrice's mail, it's only about display of scripts in
 Org buffers (when org-pretty-entities-include-sub-superscripts is
 non-nil).  So rather than displaying

 (+)   \(a^nb^n\)

 as

   \(aⁿᵇⁿ\)

 it would be displayed as

 (*)   \(aⁿbⁿ\)

 Of course, it /only/ makes sense to change how it is displayed in
 math-mode, for which (*) is the more accurate depiction of (+).

If we're talking about math mode, then I think no overlay should be
added on them, and let `org-toggle-inline-images' display them
correctly. IOW, \(a^nb^n\) should be displayed as \(a^nb^n\).

It is, IMO, a bug in the current fontification, in which sub/superscript
handling leaks over math snippets.


Regards,

-- 
Nicolas Goaziou



Re: [O] [ox-latex] How to force ALL captions below their referents?

2014-10-21 Thread Nicolas Goaziou
Hello,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 However, I think it would make sense to make '(table) (at least) the
 default for captions above to have some form of backward compatibility?
 The change caught me by surprise...

If we change `org-latex-caption-above', then it will no longer match
`org-latex-table-caption-above', which will introduce another class of
backward compatibility problems.


Regards,

-- 
Nicolas Goaziou



Re: [O] Announcement: org-one-to-many

2014-10-21 Thread Marcin Borkowski

On 2014-10-21, at 18:10, Eric Abrahamsen wrote:

 Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 Hi all,

 a long time ago I asked here about a way to split an Org file into a
 bunch of smaller ones.  One of the answers I got was that the tricky
 part is maintaining internal links in a reasonable way.

 It is probably overoptimistic on my side, but it seems that this problem
 is solved now.  The code is not very elegant, and I will be actively
 working on it (I want to write an org-to-e-learning exporter, based on
 the HTML one, and this is a small part of that effort), but here it is
 for testing/review/bug reports/feature requests/any other kind of
 feedback.

 And here it is: https://github.com/mbork/org-one-to-many

 Oooh, cool. I'll look forward to reading it!

Thanks, but don't expect too much, I'm still learning Elisp.  I'll be
thankful for your feedback!

My idea to solve the problem of links is that I first mark the parts
which will be exported to various files using text property
:otm-filename, then walk all the internal links (in reverse order, which
is important, since I first gather them in a list, so I don't want to
mess the begin/end positions of the links) and change them according to
that property of their destination (unless they point to the same
portion, in which case they stay the same), and only then split the file
(again using the text property).  This might not be the most elegant
thing in the world, but it seems to work.

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] Paper Size for Exported LaTeX

2014-10-21 Thread Kenneth Jacker
[ Org-mode version 8.3beta (release_8.3beta-175-g59cd25 ]

First time I've used the LaTeX exporting ...

I have a hunch the default paper size is A4.
Margins are *way* too wide ...

How do I change it to letter?

I tried a few things, but they don't seem to be changing anything!


Thanks for your help,
-- 
Prof Kenneth H Jacker (ret)   k...@cs.appstate.edu
Computer Science Dept www.cs.appstate.edu/~khj
Appalachian State Univ
Boone, NC  28608  USA


  



[O] [Bug] org-indent-mode underindents body in variable-pitch-mode

2014-10-21 Thread Tobias Getzner
Hello,

After updating to Emacs 24.4 and org-mode 20141020, I’ve noticed that
org-indent-mode now underindents item bodies when variable-pitch-mode is
used. I. e., in the following document, «lorem», «ipsum», and «etc.» will
fall successively short of the item’s respective indent level.

* first
lorem
** second
ipsum
*** third
etc.

My last working version was 20140915 on Emacs 24.3.

Kind regards,
Tobias





Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread John Hendy
On Oct 21, 2014 1:05 PM, Kenneth Jacker k...@be.cs.appstate.edu wrote:

 [ Org-mode version 8.3beta (release_8.3beta-175-g59cd25 ]

 First time I've used the LaTeX exporting ...

 I have a hunch the default paper size is A4.
 Margins are *way* too wide ...


Default latex tends to look like that, so you'd be better off viewing the
document properties from your viewer to verify.

If it's a4, I set mine when I installed latex via texlive, but you can set
it via your org doc:
-http://en.m.wikibooks.org/wiki/LaTeX/Page_Layout

There's been some other posts on the ML about making PDF export look
better. Example:
- http://comments.gmane.org/gmane.emacs.orgmode/85428

That has my setup a few posts in which I'm pretty happy with.

John

 How do I change it to letter?

 I tried a few things, but they don't seem to be changing anything!


John


 Thanks for your help,
 --
 Prof Kenneth H Jacker (ret)   k...@cs.appstate.edu
 Computer Science Dept www.cs.appstate.edu/~khj
 Appalachian State Univ
 Boone, NC  28608  USA






Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Thomas S. Dye
Aloha Kenneth,

Kenneth Jacker k...@be.cs.appstate.edu writes:

 [ Org-mode version 8.3beta (release_8.3beta-175-g59cd25 ]

 First time I've used the LaTeX exporting ...

 I have a hunch the default paper size is A4.
 Margins are *way* too wide ...

 How do I change it to letter?

 I tried a few things, but they don't seem to be changing anything!

I think this will do what you want:

#+LATEX_CLASS_OPTIONS: [letterpaper]

hth,
Tom

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



[O] Can org show live charts?

2014-10-21 Thread Tom
Reading the documentation it is not clear for me if live
charts are supported.

By live chart I mean having a table data and below that
an inserted image in the buffer which shows the data rendered
from the table, and the image is updated automatically every time
the the table is changed (and, say, emacs is idle for a while).

So I'm not talking about exporting, but having the live rendered
chart image right in the buffer,

Can org do this? I don't see any technical obstacles, but
I haven't seen this explicitly mentioned in the docs, that's
why I'm asking.




Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Kenneth Jacker
  tsd Aloha Kenneth,

Hello!  (Reminds me of the three months I lived on Kauai ...)

  tsd I think this will do what you want:
  tsd
  tsd#+LATEX_CLASS_OPTIONS: [letterpaper]

That was one of the things I tried before posting to the ML.

Saw no difference in the margins, etc.


Thanks for your comments!

  -Kenneth



Re: [O] Exponents / subscripts

2014-10-21 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rasmus ras...@gmx.us writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Fabrice Popineau fabrice.popin...@supelec.fr writes:

 Given that it is only a matter of presentation, does that mean it could be
 changed ?
 If yes, I can try to give it a shot.

 If you mean that a^bc should be equivalent to a^{b}c, then I think it is
 superior in its current state.

 As I understand Fabrice's mail, it's only about display of scripts in
 Org buffers (when org-pretty-entities-include-sub-superscripts is
 non-nil).  So rather than displaying

 (+)   \(a^nb^n\)

 as

   \(aⁿᵇⁿ\)

 it would be displayed as

 (*)   \(aⁿbⁿ\)

 Of course, it /only/ makes sense to change how it is displayed in
 math-mode, for which (*) is the more accurate depiction of (+).

 If we're talking about math mode, then I think no overlay should be
 added on them, and let `org-toggle-inline-images' display them
 correctly. IOW, \(a^nb^n\) should be displayed as \(a^nb^n\).

 It is, IMO, a bug in the current fontification, in which sub/superscript
 handling leaks over math snippets.

I disagree.

org-toggle-inline-images and fontification of *scripts is are
complements at best.

org-toggle-inline-images is slow and inconvenient for anything but
finished documents.  Had preview-latex supported Org I'd maybe agree,
but I disagree strongly at this time.

sub/superscript works well with entities and makes it very easy to
edit math and get approximate live feedback.

IOW and IMO, the bug, if any, is the fontification of superscript in
math.

—Rasmus

-- 
To err is human. To screw up 10⁶ times per second, you need a computer



Re: [O] org-class and headers

2014-10-21 Thread Rasmus
Joseph Le Roux joseph.le.r...@gmail.com writes:

 Rasmus ras...@gmx.us writes:

 Hi,

 Joseph Le Roux joseph.le.r...@gmail.com writes:

 I am a professor and I use org-class to schedule my lectures. It is very
 useful to organize these repeated events and take into account holidays.
 But inevitably in the academic world, some lectures get cancelled,
 postponed, or moved to another day. In this case org-class does not
 provide an efficient way to cancel and/or reschedule lectures. Another
 issue I have is the inability to mark one class as DONE and still have
 the remaining classes marked as TODO, and more generally to organize
 notes and sort them by class sessions. Has any orgmode user ever solved
 this problem ?

 If a class is canceled you can drop that week from the line and puts a
 time stamp for the new one below.  In the following week 12 is dropped
 and a replacement class is scheduled on 2014-03-18.

 * class
 2014-03-18 Tue 11:00-13:00
 %%(org-class 2014 02 24 2014 03 25 1 12) class 11:00-13:00

 Yes of course, another timestamp! Great, now I can reschedule a 
 postponed/cancelled lecture.



 I've been thinking about this and I've come up with a possible solution.
 Could org-class be modified in order to generate a list of headers, one
 for each session of the class? These headers could then be independently
 rescheduled at will. And of course each header could have its own
 content. Any thought on how to implement this?

 Will `org-clone-subtree-with-time-shift' do what you want?


 Thanks for the pointer, it could be very handy in my use-case, but this
 function copies the org-class as is for all clones. I would like to
 generate a list of headers, one for each session (with the actual date
 of the session). Maybe I will try to see how org-class computes all the
 dates, then I can clone the header with the appropriate time-shift/new
 date.

Maybe I'm misunderstanding you, but I think
`org-clone-subtree-with-time-shift' already does this.  Or do you need
to change the name of the headline?

Here's an example:

(with-temp-buffer
  (insert * class
2014-10-22 mié 13:00-15:00)
  (goto-char (point-min))
  (org-clone-subtree-with-time-shift 5 +1w)
  ;; ignore this
  (let ((str (buffer-string)))
 (set-text-properties 0 (length str) nil str) str))
= 
* class
2014-10-22 mié 13:00-15:00
* class
2014-10-29 mié 13:00-15:00
* class
2014-11-05 mié 13:00-15:00
* class
2014-11-12 mié 13:00-15:00
* class
2014-11-19 mié 13:00-15:00
* class
2014-11-26 mié 13:00-15:00


g
-- 
I feel emotional landscapes they puzzle me




Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Nick Dokos
Kenneth Jacker k...@be.cs.appstate.edu writes:

 [ Org-mode version 8.3beta (release_8.3beta-175-g59cd25 ]

 First time I've used the LaTeX exporting ...

 I have a hunch the default paper size is A4.
 Margins are *way* too wide ...

 How do I change it to letter?

 I tried a few things, but they don't seem to be changing anything!


 Thanks for your help,

This may be a TeX installation default. If it is indeed the case
that it is using A4 (check it with pdfinfo on linux, check properties
in Acrobat Reader on windows), then you have to change the default.

On linux, run texconfig in a terminal, choose PAPER, choose Letter.

Nick






Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Kenneth Jacker
  ndokos This may be a TeX installation default.

Apparently, 'letter' is the default.

  ndokos If it is indeed the case that it is using A4 (check it with
  ndokos pdfinfo on linux, ...

Good suggestion.  I used 'pdfinfo' on the generated PDF file and saw
(among other output) this:

Page size:  612 x 792 pts (letter)

So, I guess I need to explicitly change the L/R and top/bottom margins.

Here's what I do using emacs/latex without Org:

 \setlength{\textheight}{9.25in}
 \setlength{\textwidth}{6.75in}
 \setlength{\oddsidemargin}{0in}
 \setlength{\evensidemargin}{0in}
 \setlength{\topmargin}{-0.6in}

Can I just put the above somewhere near the beginning of my .org file?
Or, is there a better way?  ;-)

Sorry if dumb questions, but am trying to figure out the org/latex
approach ...

Thanks for the 'pdfinfo' tip ... 

-Kenneth



Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Thomas S. Dye
Aloha Kenneth,

Kenneth Jacker k...@be.cs.appstate.edu writes:

   ndokos This may be a TeX installation default.

 Apparently, 'letter' is the default.

   ndokos If it is indeed the case that it is using A4 (check it with
   ndokos pdfinfo on linux, ...

 Good suggestion.  I used 'pdfinfo' on the generated PDF file and saw
 (among other output) this:

 Page size:  612 x 792 pts (letter)

 So, I guess I need to explicitly change the L/R and top/bottom margins.

 Here's what I do using emacs/latex without Org:

  \setlength{\textheight}{9.25in}
  \setlength{\textwidth}{6.75in}
  \setlength{\oddsidemargin}{0in}
  \setlength{\evensidemargin}{0in}
  \setlength{\topmargin}{-0.6in}

 Can I just put the above somewhere near the beginning of my .org file?
 Or, is there a better way?  ;-)

If you want to achieve what you do using LaTeX without Org mode, then
this should work:

#+LATEX_HEADER: \setlength{\textheight}{9.25in}
#+LATEX_HEADER: \setlength{\textwidth}{6.75in}
...

hth,
Tom

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



Re: [O] Can org show live charts?

2014-10-21 Thread John Kitchin
I think the answer is sort of. I am no idle timer guru, and this code
would probably not do what you want except for this file. The idea is to
have a named table, use it as a data source in a named code block that
generates the image. Then, make an elisp function that goes to that code
block and run it, and set an idle timer to run the elisp function. I
have this in my init file:

;; refresh images after running a block
(add-hook 'org-babel-after-execute-hook
  (lambda () (org-display-inline-images nil t)))

which refreshes inline images after each execution. This works, but it
might take some tinkering to get your idle time ok. 1 second was much
too low, 5 seconds is not too bad, although there is a notable lag when
the graph is made, and the buffer moves around a bit. there is no error
checking for data in the table, so if it crashes the plotting block, you
get an error.

* live graphics in org-mode

#+tblname: tbldata
|   x |   y |
|-+-|
|   1 |   1 |
|   1 |   0 |
|   2 |   4 |
|   3 |   5 |
| 0.2 | 0.3 |


#+RESULTS: make-table-graph
#+BEGIN_SRC org
[[1, 1], [1, 0], [2, 4], [3, 5], [0.2, 0.3]]
[[./live-chart.png]]
#+END_SRC

* Code

#+NAME: make-table-graph
#+BEGIN_SRC python :var data=tbldata :results org
import matplotlib.pyplot as plt
plt.plot([x[0] for x in data], [x[1] for x in data])
plt.savefig('live-chart.png')
print data
print '[[./live-chart.png]]'
#+END_SRC

Now, for the elisp part.

#+BEGIN_SRC emacs-lisp
(defun update-graph ()
  (save-excursion
(goto-char (point-min))
(re-search-forward #\\+NAME: make-table-graph)
(forward-line 2)
(org-babel-execute-src-block)))

(defvar my-timer nil)

(setq my-timer (run-with-idle-timer
5 ; idle for this many seconds
t ; repeat indefinitely
'update-graph))
#+END_SRC

#+RESULTS:
: [nil 0 5 0 t update-graph nil idle 0]

#+BEGIN_SRC emacs-lisp
(cancel-timer my-timer)
#+END_SRC

Tom adatgyu...@gmail.com writes:

 Reading the documentation it is not clear for me if live
 charts are supported.

 By live chart I mean having a table data and below that
 an inserted image in the buffer which shows the data rendered
 from the table, and the image is updated automatically every time
 the the table is changed (and, say, emacs is idle for a while).

 So I'm not talking about exporting, but having the live rendered
 chart image right in the buffer,

 Can org do this? I don't see any technical obstacles, but
 I haven't seen this explicitly mentioned in the docs, that's
 why I'm asking.




-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



Re: [O] How to get to the link destination?

2014-10-21 Thread John Kitchin
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

that looks like a great way to me!

 Hi all,

 as in the subject.  I want to do something /at the destination of the
 link/ the point is at (more precisely: get some text property of that
 place).  This is what I came up with:

 (save-excursion
   (org-open-at-point)
   (get-text-property (point) :some-property))

 Is there a better/faster way, especially knowing that the link is an
 internal one?

 Best,

-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Andreas Kiermeier
Hi Kenneth,

I believe the reason for the large margins are based on readability (long
lines are harder). Having said that, I've also found them a bit 'odd' and
maybe that's because I'm so used to Microsoft Word's default margins of 1in
all around.

Anyway, if you prefer to specify margins directly, rather than calculating
them via \textwidth, you can also use the geometry package, e.g.

#+LATEX_HEADER: \usepackage[various options]{geometry}

Cheers,
AK


Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Marcin Borkowski

On 2014-10-22, at 00:08, Kenneth Jacker wrote:

 So, I guess I need to explicitly change the L/R and top/bottom margins.

 Here's what I do using emacs/latex without Org:

  \setlength{\textheight}{9.25in}
  \setlength{\textwidth}{6.75in}
  \setlength{\oddsidemargin}{0in}
  \setlength{\evensidemargin}{0in}
  \setlength{\topmargin}{-0.6in}

 Can I just put the above somewhere near the beginning of my .org file?
 Or, is there a better way?  ;-)

Please don't do this!  There /is/ a better way.  What you're doing is
very low-level; the canonical way to change such settings is to use the
geometry package.  Quoting from http://www.ctan.org/pkg/geometry :

--8---cut here---start-8---
The package provides an easy and flexible user interface to customize
page layout, implementing auto-centering and auto-balancing mechanisms
so that the users have only to give the least description for the page
layout. For example, if you want to set each margin 2cm without header
space, what you need is just \usepackage[margin=2cm,nohead]{geometry}.

The package knows about all the standard paper sizes, so that the user
need not know what the nominal ‘real’ dimensions of the paper are, just
its standard name (such as a4, letter, etc.).
--8---cut here---end---8---

Protip: if you're on a Linux system, typing texdoc geometry at the
terminal will give you the docs for this package.  (I don't know whether
this works with Windows or Mac.)

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] Paper Size for Exported LaTeX

2014-10-21 Thread Brady Trainor
Andreas Kiermeier andreas.kierme...@gmail.com writes:


 #+LATEX_HEADER: \usepackage[various options]{geometry}


Here is an example I am using to cram a lot of lists/notes onto a peice of 
paper to fold into eighths. 

#+BEGIN_SRC org
#+LaTeX_CLASS_OPTIONS: [landscape]
#+LaTeX_HEADER: 
\usepackage[top=.1in,bottom=.125in,left=0in,right=.125in]{geometry}
#+LaTeX_HEADER: \usepackage{amssymb} % for org checkboxes - $\square$
#+LaTeX_HEADER: \usepackage{nopageno}% no page number
#+LaTeX_HEADER: \usepackage{multicol}% slice page into arbitrary columns
#+LaTeX_HEADER: \setlength\columnsep{.35in}  % set column separation
#+LaTeX_HEADER: \usepackage{paralist}% reduce spacing in lists
#+LaTeX_HEADER: \let\itemize\compactitem
#+LATEX_HEADER: \let\enumerate\compactenum
#+LATEX_HEADER: \let\description\compactdesc
#+LaTeX_HEADER: \let\centering\relax % prevent centering of tables
#+TITLE:
#+END_SRC

(I setup TeXLive to default to letter.)

I originally started with a uniform 

: #+LaTeX_HEADER: \usepackage[margin=.125in]{geometry}

but had to massage out the edges due to the printer (or something?) adding a 
margin on the left, and basically use a ruler to get the column separation to 
work in concert. 

I also throw in 

#+BEGIN_SRC org
#+BEGIN_LaTeX
\begin{multicols*}{4}
#+END_LaTeX
#+END_SRC

The `*' is for allowing uneven heights of columns. 

To break a column, I use 

: \vfill
: \columnbreak

--
Brady




[O] Org Babel Clojure No Prettyprint

2014-10-21 Thread Prathyush
Hi,

I was trying to use org-babel-clojure to pretty print a collection and found
out that it always evaluated to:

Code block produced no output.

Here's some sample code:

#+begin_src clojure :results pp
(println Hello)
#+end_src

Similar issue was reported few weeks back and I guess it could be related
to the API change that broke it as mentioned here:
http://lists.gnu.org/archive/html/emacs-orgmode/2014-10/msg00100.htmle




[O] Extra empty line at the top of the page when tangling.

2014-10-21 Thread Ivanov Dmitry
Code:

#+BABEL: :cache yes :tangle yes :noweb yes

#+NAME: top_block
#+begin_src perl :tangle test.pl :noweb tangle
  #!/usr/bin/perl

  use strict;
  use warnings;

  open(my $fh, , test.txt)
  or die cannot open  file name: $!;
  output-all
  close($fh);
#+end_src

#+NAME: output-all
#+begin_src perl
  while (my $line = $fh) {
  print $line;
  }
#+end_src

Outputs a perl file, where the 1-st line is blank. What should I do to
remove it?