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

2012-06-05 Thread Forian Schmaus
Hans-Peter Deifel  gmx.de> writes:

> 
> 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:

Thanks, that is exactly what I was looking for. Works like a charm here.

Florian




Re: [O] Problems exporting Org code blocks in LaTeX

2012-06-05 Thread Sebastien Vauban
Hello,

> I want to show (in Beamer slides) how to write an Org table [...].
>
> 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!

Here a compilable ECM, for the sake of ease:

--8<---cut here---start->8---
#+TITLE: Org code in slide
#+DATE:  2012-06-04 Mon

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1

#+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:   columns=flexible,
#+BEAMER_HEADER_EXTRA:   keepspaces=true
#+BEAMER_HEADER_EXTRA: }

* Contexte

- 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 -- that's the
  purpose of the above =BEAMER_HEADER_EXTRA= lines.

- I then 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.

* ECM

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

I can't get it properly exported to LaTeX, because the line =ATTR_LaTeX= is
*removed from the published code block* (compare the Org source of the code
block with what's shown in the PDF).
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] showing standard references (e.g. column B) in tables using C-c }

2012-06-05 Thread Stephen Eglen

When using C-c } in a table, the columns are labelled $1, $2, etc.  How
can I get them labelled as "A", "B" etc, as in the figure 

http://orgmode.org/worg/images/bzg/reference_visualization.jpg

Thanks, Stephen



Re: [O] showing standard references (e.g. column B) in tables using C-c }

2012-06-05 Thread Carsten Dominik
Hi Stephen,

On 5.6.2012, at 12:23, Stephen Eglen wrote:

> 
> When using C-c } in a table, the columns are labelled $1, $2, etc.  How
> can I get them labelled as "A", "B" etc, as in the figure 
> 
> http://orgmode.org/worg/images/bzg/reference_visualization.jpg
> 
> Thanks, Stephen
> 

this would be

(sets org-table-use-standard-references t)

Cheers

- Carsten



[O] python/babel inline images

2012-06-05 Thread henry atting
Hi,

I do not succeed in generating an inline image as a result of a
python code block. The code itself works, C-c C-c generates the
according picture, but only in my home directory. The code block:

-*- org-babel-python-command: "python3" -*-
#+begin_src python
import csv
import matplotlib.pyplot as plot
x = []
y = []
csv_reader = csv.reader(open('csv_data.csv'))
for line in csv_reader:
x.append(int(line[0]))
y.append(float(line[1]))
plot.plot(x, y, label=r'exp', color='green')
plot.legend(loc='lower right')
plot.savefig("exp_csv.svg")
#+end_src

It tried different combinations of `:exports results', `:results
file', `:file filename'


-- 
http://literaturlatenight.de




Re: [O] LaTeX export -- Table with align option

2012-06-05 Thread Eric Fraga
Sebastien Vauban  writes:

> 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

Actually, it's not the @ expressions as such that cause the problems,
it's the spaces you are trying to introduce within them, causing the org
parser to terminate the alignment term too soon.  Two solutions below.

[...]

> #+ATTR_LaTeX: align=r@{ : }r@{ }l

[...]

> gets INCORRECTLY translated to:
>
> #+begin_src latex
> \begin{tabular}{r@{}

[...]


I know this isn't pretty but you could use

  #+ATTR_LaTeX: align=r@{\hspace{1em}:\hspace{1em}}r@{\hspace{1em}}l

changing the 1em to whatever amount of space you actually want; probably
1ex is more likely...

The following also works but although it looks simpler here (in an
email), I don't like how Org hides the ~s in the first column
specification as it (incorrectly) interprets them as a verbatim style.

  #+ATTR_LaTeX: align=r@{~:~}r@{~}l

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.11-14-g4b0121




[O] Use [org-latex] or [org-e-latex] for exporter problems

2012-06-05 Thread Jambunathan K

Please use [org-latex] or [org-e-latex] while reporting exporter
problems.  Likewise for other exporters.

If you are exporting with old exporter, export once with the new
exporter also, just for the fun of it.  More importantly report problems
or inconsistencies.  This will immensely help to improve the current
backends and associated infrastructure.
-- 



Re: [O] LaTeX export -- Table with align option

2012-06-05 Thread Sebastien Vauban
Hi Eric,

Eric Fraga wrote:
> Sebastien Vauban  writes:
>> 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
>
> Actually, it's not the @ expressions as such that cause the problems,
> it's the spaces you are trying to introduce within them, causing the org
> parser to terminate the alignment term too soon.  Two solutions below.
>
>> #+ATTR_LaTeX: align=r@{ : }r@{ }l
>> gets INCORRECTLY translated to:
>>
>> #+begin_src latex
>> \begin{tabular}{r@{}
>
> I know this isn't pretty but you could use
>
>   #+ATTR_LaTeX: align=r@{\hspace{1em}:\hspace{1em}}r@{\hspace{1em}}l
>
> changing the 1em to whatever amount of space you actually want; probably
> 1ex is more likely...
>
> The following also works but although it looks simpler here (in an
> email), I don't like how Org hides the ~s in the first column
> specification as it (incorrectly) interprets them as a verbatim style.
>
>   #+ATTR_LaTeX: align=r@{~:~}r@{~}l

I had tried backslashing the space, but that did not help. Your examples do
help working around the problem.

Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Use [org-latex] or [org-e-latex] for exporter problems

2012-06-05 Thread Sebastien Vauban
Hi Jambunathan,

Jambunathan K wrote:
> Please use [org-latex] or [org-e-latex] while reporting exporter
> problems.  Likewise for other exporters.

This was code for Beamer slides, hence using the old LaTeX exporter.

> If you are exporting with old exporter, export once with the new
> exporter also, just for the fun of it.

Converted the Beamer slideware to a document:

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

#+LaTeX_CLASS: article
#+LaTeX_HEADER: \lstdefinelanguage{org}{%
#+LaTeX_HEADER:   morekeywords={:results, :session, :var, :noweb, :exports},
#+LaTeX_HEADER:   sensitive=false,
#+LaTeX_HEADER:   morestring=[b]",
#+LaTeX_HEADER:   morecomment=[l]{\#},
#+LaTeX_HEADER: }
#+LaTeX_HEADER: \lstset{%
#+LaTeX_HEADER:   mathescape=false,
#+LaTeX_HEADER:   columns=flexible,
#+LaTeX_HEADER:   keepspaces=true
#+LaTeX_HEADER: }

* Contexte

- 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 -- that's the
  purpose of the above =BEAMER_HEADER_EXTRA= lines.

- I then 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.

* ECM

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

I can't get it properly exported to LaTeX, because the line =ATTR_LaTeX= is
*removed from the published code block* (compare the Org source of the code
block with what's shown in the PDF).
--8<---cut here---end--->8---

- Same problem with the old exporter
- It works with the new one -- but N/A yet for slides; anyway, this is good
  news.

> More importantly report problems or inconsistencies. This will immensely
> help to improve the current backends and associated infrastructure.

That, I clearly do (and will still do)...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] python/babel inline images

2012-06-05 Thread Brett Viren
henry atting  writes:

> I do not succeed in generating an inline image as a result of a
> python code block. The code itself works, C-c C-c generates the
> according picture, but only in my home directory. The code block:

Could you not just follow the block with a hand-written link to the
output file?  Then, when it becomes available toggle "C-c C-x C-v" (once
or twice) or "M-x org-display-inline-images" once.

Maybe also rewrite the Python to place the output SVG in a directory
associated with your ORG file so that link can be relative.  I simply
use an env. var. to locate where my plots should output.

I'm an org-newbie so maybe there are better ways.

-Brett.


pgpZ7AoYIND5t.pgp
Description: PGP signature


[O] Variable naming (old vs new exporter)

2012-06-05 Thread Sebastien Vauban
Hello,

A quick question about the future of the exporters:

when the new exporter will be (more) integrated into Org,

- will the old ones be removed?

- will the packages be renamed?

- will the variables be renamed (for example, from
  `org-e-html-preamble-format' to `org-html-preamble-format')?

Just to know whether we have to duplicate variables during this transition
period (if we want to use both with the same outputs) or not.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Use [org-latex] or [org-e-latex] for exporter problems

2012-06-05 Thread Jambunathan K

> This was code for Beamer slides, hence using the old LaTeX exporter.

Why not use [beamer] or [org-beamer] in addition to other tags that
might be required?
-- 



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

2012-06-05 Thread Mike Fitzgerald
Took the suggestion to run edebug.
A couple of observations:

1) CAPTURE-journal buffer opens around line 485 but is is killed shortly
after
without the user (me) doing anything (just spacebar to step thru the code)

 (if (and (buffer-base-buffer (current-buffer))
  (string-match "\\`CAPTURE-" (buffer-name)))
 (kill-buffer (current-buffer))) ;killed here

2) Then later
The defen stops around line 491 of org-capture.el
 (error "Capture template `%s': %s"
(org-capture-get :key)
(nth 1 error

Any insight?

Thanks

Mike

On Tue, Jun 5, 2012 at 9:07 AM, Mike Fitzgerald  wrote:

> This part works as described:
>
> "start capture, I get another window where
> I'm presented with an "*Org Select*" buffer that offers me the available
> choices"
>
> However, this part does not work as expected:
> "when I select one of those I select one of those, I get a
> "CAPTURE-foo.org" buffer"
>
> I would expect:
> A) new buffer would be created
> and
> B) EMACS would switch to it
> and
> C) Some message with value to the user
>
> B and C do not happen.  A happens but I need to manually switch to it
>
> I get a message that has little value:
> "Capture template `j': org-called-interactively-p"
>
> I have never used the working version of capture (this is it), but I have
> used
> remember a little and seem to recall it gives a message something
> like "C-c C-c" to finish.  I don't get any thing like this.
>
> This makes me think that a defun stopped somewhere that it was
> non designed to.
>
> The buffer that is created is and I an able to switch to is journal.org.
> This does not seem like a temp buffer, rather it seems like the final
> destination.
>
> Whatever defun sends "Capture template `j': org-called-interactively-p"
> seems to have stopped abnormally.
>
> This is my org setup near the top of my .emacs
>
> (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/")
> (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/")
> (require 'org-install)
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> (define-key global-map "\C-cl" 'org-store-link)
> (define-key global-map "\C-ca" 'org-agenda)
> (setq org-log-done t)
>
> (setq 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-capture binding
> ;(global-set-key "\C-c-c" 'org-capture)
> (global-set-key [(control c) (c)] 'org-capture)
>
>
> Does this look OK?
>
> Thanks
>
> Mike
>
>
> On Mon, Jun 4, 2012 at 10:56 PM, Nick Dokos  wrote:
>
>> Mike Fitzgerald  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)

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

2012-06-05 Thread Eric Schulte
Hans-Peter Deifel  writes:

> 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

Thanks for this patch, I've just applied it.

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



Re: [O] python/babel inline images

2012-06-05 Thread Eric Schulte
henry atting  writes:

> Hi,
>
> I do not succeed in generating an inline image as a result of a
> python code block. The code itself works, C-c C-c generates the
> according picture, but only in my home directory. The code block:
>
> -*- org-babel-python-command: "python3" -*-
> #+begin_src python
> import csv
> import matplotlib.pyplot as plot
> x = []
> y = []
> csv_reader = csv.reader(open('csv_data.csv'))
> for line in csv_reader:
>   x.append(int(line[0]))
>   y.append(float(line[1]))
> plot.plot(x, y, label=r'exp', color='green')
> plot.legend(loc='lower right')
> plot.savefig("exp_csv.svg")
> #+end_src
>
> It tried different combinations of `:exports results', `:results
> file', `:file filename'

I'm not python expert, but the code block should be run in your current
directory, e.g., the following outputs the current working path expected
for me.

#+begin_src sh
  pwd
#+end_src

If you want to explicitly pass the current directory to your code block
as an argument, you could try something like the following

#+begin_src python :var mydir=(file-name-directory (buffer-file-name))
  return mydir
#+end_src

Hope this helps,

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



Re: [O] Difficulty of using Org mode

2012-06-05 Thread Stephen Eglen

As Yihui was following up to an email of mine about Org mode on the ESS
(emacs speaks statistics list), I will email him to find out if I can
see what issues he had.  For the record: I also found learning Org mode
quite challenging, and I consider myself a diehard Emacs person.  I
guess if you were to ask me what I found difficult, was that it was
quite overwhelming knowing where to start.  (So I started small by
learning the agenda features...)

Stephen


Michael Hannon  writes:

> Bastien  wrote:
>
>>Michael Hannon  writes:
>>
>>> Hi, folks.  Just FYI:
>>>
>>> - Forwarded Message -
From: Yihui Xie 
To: Stephen Eglen 
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




[O] org-mobile-push: copying read-only files

2012-06-05 Thread Stephen Eglen

If I have an org mode file that is read-only (e.g. because I've checked
it in to RCS) in my org-agenda, when I do M-x org-mobile-push (from my
desktop machine to dropbox) the 2nd time I get a permission denied error
from (org-mobile-copy-agenda-files) -- this is because there is already
a read-only copy in the Dropbox folder.  FOr now I'm deleting the
read-only files in Dropbox and restarting, but anyone else got a better
solution?

Stephen



[O] MobileOrg for Android question about calendar integration

2012-06-05 Thread Stephen Eglen
Hi,
I love the new MobileOrg Android app, especially the Calendar
integration.  

A quick question: if I sync on the android app, I see new org agenda
items in the phone's Calendar.  Do those items sync back from my phone
to appear also on the web at google.com/calendar?   For now, my
org-generated items are on the phone, but not the web application.

Thanks, Stephen



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

2012-06-05 Thread Nick Dokos
Mike Fitzgerald  wrote:

> --0016e6dee7746941fa04c1ba62e3
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Took the suggestion to run edebug.
> A couple of observations:
> 
> 1) CAPTURE-journal buffer opens around line 485 but is is killed shortly
> after
> without the user (me) doing anything (just spacebar to step thru the code)
> 
>  (if (and (buffer-base-buffer (current-buffer))
>   (string-match "\\`CAPTURE-" (buffer-name)))
>  (kill-buffer (current-buffer))) ;killed here
> 
> 2) Then later
> The defen stops around line 491 of org-capture.el
>  (error "Capture template `%s': %s"
> (org-capture-get :key)
> (nth 1 error
> 
> Any insight?
> 

Can you please do M-x toggle-debug-on-error and run it? I hope that that
will generate a backtrace: if so, please post it here.

Are you installing org from the git repository or is this a bundled
version?  Please do C-u M-x org-version RET when you are composing mail,
so that the version will be incorporated into the mail message.

If you are installing from git, it might be worth it to just clean up
everything and try again from scratch, noting any problems that
arise. This might be quicker and easier than debugging a broken install.

Nick

> Thanks
> 
> Mike
> 
> On Tue, Jun 5, 2012 at 9:07 AM, Mike Fitzgerald  wrote:
> 
> > This part works as described:
> >
> > "start capture, I get another window where
> > I'm presented with an "*Org Select*" buffer that offers me the available
> > choices"
> >
> > However, this part does not work as expected:
> > "when I select one of those I select one of those, I get a
> > "CAPTURE-foo.org" buffer"
> >
> > I would expect:
> > A) new buffer would be created
> > and
> > B) EMACS would switch to it
> > and
> > C) Some message with value to the user
> >
> > B and C do not happen.  A happens but I need to manually switch to it
> >
> > I get a message that has little value:
> > "Capture template `j': org-called-interactively-p"
> >
> > I have never used the working version of capture (this is it), but I have
> > used
> > remember a little and seem to recall it gives a message something
> > like "C-c C-c" to finish.  I don't get any thing like this.
> >
> > This makes me think that a defun stopped somewhere that it was
> > non designed to.
> >
> > The buffer that is created is and I an able to switch to is journal.org.
> > This does not seem like a temp buffer, rather it seems like the final
> > destination.
> >
> > Whatever defun sends "Capture template `j': org-called-interactively-p"
> > seems to have stopped abnormally.
> >
> > This is my org setup near the top of my .emacs
> >
> > (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/")
> > (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/")
> > (require 'org-install)
> > (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> > (define-key global-map "\C-cl" 'org-store-link)
> > (define-key global-map "\C-ca" 'org-agenda)
> > (setq org-log-done t)
> >
> > (setq 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-capture binding
> > ;(global-set-key "\C-c-c" 'org-capture)
> > (global-set-key [(control c) (c)] 'org-capture)
> >
> >
> > Does this look OK?
> >
> > Thanks
> >
> > Mike
> >
> >
> > On Mon, Jun 4, 2012 at 10:56 PM, Nick Dokos  wrote:
> >
> >> Mike Fitzgerald  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 updat

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

2012-06-05 Thread Mike Fitzgerald
Org-mode version 7.8.11

Downloaded a zip file, not a GIT user.

Backtrace from a non-edebug run attached.

Thanks

Mike

On Tue, Jun 5, 2012 at 10:35 AM, Nick Dokos  wrote:

> Mike Fitzgerald  wrote:
>
> > --0016e6dee7746941fa04c1ba62e3
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > Took the suggestion to run edebug.
> > A couple of observations:
> >
> > 1) CAPTURE-journal buffer opens around line 485 but is is killed shortly
> > after
> > without the user (me) doing anything (just spacebar to step thru the
> code)
> >
> >  (if (and (buffer-base-buffer (current-buffer))
> >   (string-match "\\`CAPTURE-" (buffer-name)))
> >  (kill-buffer (current-buffer))) ;killed here
> >
> > 2) Then later
> > The defen stops around line 491 of org-capture.el
> >  (error "Capture template `%s': %s"
> > (org-capture-get :key)
> > (nth 1 error
> >
> > Any insight?
> >
>
> Can you please do M-x toggle-debug-on-error and run it? I hope that that
> will generate a backtrace: if so, please post it here.
>
> Are you installing org from the git repository or is this a bundled
> version?  Please do C-u M-x org-version RET when you are composing mail,
> so that the version will be incorporated into the mail message.
>
> If you are installing from git, it might be worth it to just clean up
> everything and try again from scratch, noting any problems that
> arise. This might be quicker and easier than debugging a broken install.
>
> Nick
>
> > Thanks
> >
> > Mike
> >
> > On Tue, Jun 5, 2012 at 9:07 AM, Mike Fitzgerald 
> wrote:
> >
> > > This part works as described:
> > >
> > > "start capture, I get another window where
> > > I'm presented with an "*Org Select*" buffer that offers me the
> available
> > > choices"
> > >
> > > However, this part does not work as expected:
> > > "when I select one of those I select one of those, I get a
> > > "CAPTURE-foo.org" buffer"
> > >
> > > I would expect:
> > > A) new buffer would be created
> > > and
> > > B) EMACS would switch to it
> > > and
> > > C) Some message with value to the user
> > >
> > > B and C do not happen.  A happens but I need to manually switch to it
> > >
> > > I get a message that has little value:
> > > "Capture template `j': org-called-interactively-p"
> > >
> > > I have never used the working version of capture (this is it), but I
> have
> > > used
> > > remember a little and seem to recall it gives a message something
> > > like "C-c C-c" to finish.  I don't get any thing like this.
> > >
> > > This makes me think that a defun stopped somewhere that it was
> > > non designed to.
> > >
> > > The buffer that is created is and I an able to switch to is
> journal.org.
> > > This does not seem like a temp buffer, rather it seems like the final
> > > destination.
> > >
> > > Whatever defun sends "Capture template `j': org-called-interactively-p"
> > > seems to have stopped abnormally.
> > >
> > > This is my org setup near the top of my .emacs
> > >
> > > (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/")
> > > (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/")
> > > (require 'org-install)
> > > (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> > > (define-key global-map "\C-cl" 'org-store-link)
> > > (define-key global-map "\C-ca" 'org-agenda)
> > > (setq org-log-done t)
> > >
> > > (setq 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-capture binding
> > > ;(global-set-key "\C-c-c" 'org-capture)
> > > (global-set-key [(control c) (c)] 'org-capture)
> > >
> > >
> > > Does this look OK?
> > >
> > > Thanks
> > >
> > > Mike
> > >
> > >
> > > On Mon, Jun 4, 2012 at 10:56 PM, Nick Dokos 
> wrote:
> > >
> > >> Mike Fitzgerald  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

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

2012-06-05 Thread Nick Dokos
Nick Dokos  wrote:

> Mike Fitzgerald  wrote:
> 
> > 1) CAPTURE-journal buffer opens around line 485 but is is killed shortly
> > after
> > without the user (me) doing anything (just spacebar to step thru the code)
> > 
> >  (if (and (buffer-base-buffer (current-buffer))
> >   (string-match "\\`CAPTURE-" (buffer-name)))
> >  (kill-buffer (current-buffer))) ;killed here
> > ...
> 
> Can you please do M-x toggle-debug-on-error and run it? I hope that that
> will generate a backtrace: if so, please post it here.
> 

That's probably not enough: the above code is inside a condition-case, and
the documentation of condition-case says

,
| ...  If the special
| condition name `debug' is present in this list, it allows another
| condition in the list to run the debugger if `debug-on-error' and the
| other usual mechanisms says it should (otherwise, `condition-case'
| suppresses the debugger).
`

So you might have to modify org-capture.el slightly to actually get a
backtrace:

--8<---cut here---start->8---
  ...
  (condition-case error
  (org-capture-place-template)
;;; add debug to the list temporarily
((error quit debug)
 (if (and (buffer-base-buffer (current-buffer))
  (string-match "\\`CAPTURE-" (buffer-name)))
 (kill-buffer (current-buffer)))
 (set-window-configuration (org-capture-get :return-to-wconf))
 (error "Capture template `%s': %s"
(org-capture-get :key)
(nth 1 error
  ...
--8<---cut here---end--->8---

Nick



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

2012-06-05 Thread Nick Dokos
Mike Fitzgerald  wrote:

> Org-mode version 7.8.11
> 
> Downloaded a zip file, not a GIT user.

Where did you get the zip file?

> 
> Backtrace from a non-edebug run attached.
> 

Yup - not useful: the condition-case has stripped all useful information.
You will need to modify org-capture.el as described in my previous message
and try again.

Nick




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

2012-06-05 Thread Mike Fitzgerald
As requested.

Thanks

Mike

On Tue, Jun 5, 2012 at 10:55 AM, Nick Dokos  wrote:

> Mike Fitzgerald  wrote:
>
> > Org-mode version 7.8.11
> >
> > Downloaded a zip file, not a GIT user.
>
> Where did you get the zip file?
>
> >
> > Backtrace from a non-edebug run attached.
> >
>
> Yup - not useful: the condition-case has stripped all useful information.
> You will need to modify org-capture.el as described in my previous message
> and try again.
>
> Nick
>
>
Debugger entered--Lisp error: (invalid-function org-called-interactively-p)
  org-called-interactively-p(interactive)
  org-paste-subtree(4 #("* %?\nEntered on [2012-06-05 Tue 11:04]\n" 0 5 
(fontified nil) 5 16 (fontified nil) 16 17 (fontified nil) 17 37 (fontified 
nil) 37 38 (fontified nil) 38 39 (fontified nil)) for-yank)
  (let* ((txt ...) (reversed ...) (target-entry-p ...) level beg end file) 
(cond (... ...) (... ... ...) (t ... ... ...)) (org-capture-empty-lines-before) 
(setq beg (point)) (org-capture-verify-tree txt) (org-paste-subtree level txt 
(quote for-yank)) (org-capture-empty-lines-after 1) 
(org-capture-position-for-last-stored beg) (outline-next-heading) (setq end 
(point)) (org-capture-mark-kill-region beg (1- end)) (org-capture-narrow beg 
(1- end)) (goto-char beg) (if (re-search-forward "%\\?" end t) (replace-match 
"")))
  org-capture-place-entry()
  (cond ((member* type ...) (org-capture-place-entry)) ((eql type ...) 
(org-capture-place-table-line)) ((eql type ...) (org-capture-place-plain-text)) 
((eql type ...) (org-capture-place-item)) ((eql type ...) 
(org-capture-place-item)))
  (case type ((nil entry) (org-capture-place-entry)) (table-line 
(org-capture-place-table-line)) (plain (org-capture-place-plain-text)) (item 
(org-capture-place-item)) (checkitem (org-capture-place-item)))
  (let* ((template ...) (type ...)) (case type (... ...) (table-line ...) 
(plain ...) (item ...) (checkitem ...)))
  org-capture-place-template()
  (condition-case error (org-capture-place-template) ((error quit debug) (if 
... ...) (set-window-configuration ...) (error "Capture template `%s': %s" ... 
...)))
  (if (equal goto 0) (org-capture-insert-template-here) (condition-case error 
(org-capture-place-template) (... ... ... ...)) (if (and ... ...) 
(condition-case nil ... ...)) (if (org-capture-get :immediate-finish) 
(org-capture-finalize nil)))
  (cond ((equal entry "C") (customize-variable ...)) ((equal entry "q") (error 
"Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) 
(org-capture-put :original-buffer orig-buf :original-file ... 
:original-file-nondirectory ... :annotation annotation :initial initial) 
(org-capture-put :default-time ...) (org-capture-set-target-location) 
(condition-case error ... ...) (setq org-capture-clock-keep ...) (if ... ... 
... ... ...)))
  (let* ((orig-buf ...) (annotation ...) (initial ...) (entry ...)) (when 
(stringp initial) (remove-text-properties 0 ... ... initial)) (when (stringp 
annotation) (remove-text-properties 0 ... ... annotation)) (cond (... ...) (... 
...) (t ... ... ... ... ... ... ... ...)))
  (cond ((equal goto ...) (org-capture-goto-target)) ((equal goto ...) 
(org-capture-goto-last-stored)) (t (let* ... ... ... ...)))
  org-capture(nil)
  call-interactively(org-capture nil nil)


[O] [org-e-html] New HTML exporter has an extra blank line in pre sections

2012-06-05 Thread Bernt Hansen
Hi,

I noticed that the new exporter has one extra blank line in the output
of source and example blocks while the old exporter does not.

Regards,
Bernt

--8<---cut here---end--->8---
* Test export

#+begin_src sql
  SELECT * FROM some_table
#+end_src

#+begin_example
  Example text goes here
#+end_example
--8<---cut here---end--->8---

,[ old exporter output ]
| SELECT * FROM some_table
| 
| 
| ...
| 
| Example text goes here
| 
`
* new exporter
[2012-06-05 Tue 12:41]

,[ new exporter ]
| SELECT * FROM some_table
| 
| 
| 
| ...
| 
| 
| Example text goes here
| 
| 
`



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

2012-06-05 Thread Nick Dokos
Mike Fitzgerald  wrote:

> Debugger entered--Lisp error: (invalid-function org-called-interactively-p)
>   org-called-interactively-p(interactive)
>   org-paste-subtree(4 #("* %?\nEntered on [2012-06-05 Tue 11:04]\n" 0 5 
> (fontified nil) 5 16 (fontified nil) 16 17 (fontified nil) 17 37 (fontified 
> nil) 37 38 (fontified nil) 38 39 (fontified nil)) for-yank)
>   (let* ((txt ...) (reversed ...) (target-entry-p ...) level beg end file) 
> (cond (... ...) (... ... ...) (t ... ... ...)) 
> (org-capture-empty-lines-before) (setq beg (point)) (org-capture-verify-tree 
> txt) (org-paste-subtree level txt (quote for-yank)) 
> (org-capture-empty-lines-after 1) (org-capture-position-for-last-stored beg) 
> (outline-next-heading) (setq end (point)) (org-capture-mark-kill-region beg 
> (1- end)) (org-capture-narrow beg (1- end)) (goto-char beg) (if 
> (re-search-forward "%\\?" end t) (replace-match "")))
>   org-capture-place-entry()
>   (cond ((member* type ...) (org-capture-place-entry)) ((eql type ...) 
> (org-capture-place-table-line)) ((eql type ...) 
> (org-capture-place-plain-text)) ((eql type ...) (org-capture-place-item)) 
> ((eql type ...) (org-capture-place-item)))
>   (case type ((nil entry) (org-capture-place-entry)) (table-line 
> (org-capture-place-table-line)) (plain (org-capture-place-plain-text)) (item 
> (org-capture-place-item)) (checkitem (org-capture-place-item)))
>   (let* ((template ...) (type ...)) (case type (... ...) (table-line ...) 
> (plain ...) (item ...) (checkitem ...)))
>   org-capture-place-template()
>   (condition-case error (org-capture-place-template) ((error quit debug) (if 
> ... ...) (set-window-configuration ...) (error "Capture template `%s': %s" 
> ... ...)))
>   (if (equal goto 0) (org-capture-insert-template-here) (condition-case error 
> (org-capture-place-template) (... ... ... ...)) (if (and ... ...) 
> (condition-case nil ... ...)) (if (org-capture-get :immediate-finish) 
> (org-capture-finalize nil)))
>   (cond ((equal entry "C") (customize-variable ...)) ((equal entry "q") 
> (error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) 
> (org-capture-put :original-buffer orig-buf :original-file ... 
> :original-file-nondirectory ... :annotation annotation :initial initial) 
> (org-capture-put :default-time ...) (org-capture-set-target-location) 
> (condition-case error ... ...) (setq org-capture-clock-keep ...) (if ... ... 
> ... ... ...)))
>   (let* ((orig-buf ...) (annotation ...) (initial ...) (entry ...)) (when 
> (stringp initial) (remove-text-properties 0 ... ... initial)) (when (stringp 
> annotation) (remove-text-properties 0 ... ... annotation)) (cond (... ...) 
> (... ...) (t ... ... ... ... ... ... ... ...)))
>   (cond ((equal goto ...) (org-capture-goto-target)) ((equal goto ...) 
> (org-capture-goto-last-stored)) (t (let* ... ... ... ...)))
>   org-capture(nil)
>   call-interactively(org-capture nil nil)

[I hope Achim Gratz takes a look at this: he would have a much better
handle on what exactly is going wrong here - in particular, emacs on
windows is a black box to me]

org-called-interactively-p is in org-macs.el - it's probably the case
that your autoloads are not up to date (or perhaps non-existent). Can
you tell us exactly what zip file you got and how you installed it?

In any case, try

(load-library "org-macs")

and then try the capture again: it probably will work this time (or
you'll get a different error). This is not meant either as a solution or
as a workaround: it is just meant to provide a data point about what is
wrong and what exactly you need to do to restore sanity, so there is
some ways to go yet.

Nick

PS For reference, here is what Mike posted earlier about his org
initialization:

,
| This is my org setup near the top of my .emacs
|
| (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/")
| (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/")
| (require 'org-install)
| (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
| (define-key global-map "\C-cl" 'org-store-link)
| (define-key global-map "\C-ca" 'org-agenda)
| (setq org-log-done t)
|
| (setq 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-capture binding
| ;(global-set-key "\C-c-c" 'org-capture)
| (global-set-key [(control c) (c)] 'org-capture)
`



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

2012-06-05 Thread Mike Fitzgerald
*Setup*
-I performed my org-mode update by downloading org-7.8.11.zip
Then extracting using something like
   rt click, "extract here"

I also ran a defun that I found on wiki pages with the subject
"Compiling without make"

(defun my/compile-org(&optional directory)
  "Compile all *.el files that come with org-mode."
  (interactive)


*RUN Result*
Without restarting Emacs I run
m-: (load-library "org-macs")
followed by org-capture
Result:
-Behavior was exactly the same bug we have been discussing (did not change).

Here is the backtrace.

Thanks

Mike







On Tue, Jun 5, 2012 at 12:01 PM, Nick Dokos  wrote:

> Mike Fitzgerald  wrote:
>
> > Debugger entered--Lisp error: (invalid-function
> org-called-interactively-p)
> >   org-called-interactively-p(interactive)
> >   org-paste-subtree(4 #("* %?\nEntered on [2012-06-05 Tue 11:04]\n" 0 5
> (fontified nil) 5 16 (fontified nil) 16 17 (fontified nil) 17 37 (fontified
> nil) 37 38 (fontified nil) 38 39 (fontified nil)) for-yank)
> >   (let* ((txt ...) (reversed ...) (target-entry-p ...) level beg end
> file) (cond (... ...) (... ... ...) (t ... ... ...))
> (org-capture-empty-lines-before) (setq beg (point))
> (org-capture-verify-tree txt) (org-paste-subtree level txt (quote
> for-yank)) (org-capture-empty-lines-after 1)
> (org-capture-position-for-last-stored beg) (outline-next-heading) (setq end
> (point)) (org-capture-mark-kill-region beg (1- end)) (org-capture-narrow
> beg (1- end)) (goto-char beg) (if (re-search-forward "%\\?" end t)
> (replace-match "")))
> >   org-capture-place-entry()
> >   (cond ((member* type ...) (org-capture-place-entry)) ((eql type ...)
> (org-capture-place-table-line)) ((eql type ...)
> (org-capture-place-plain-text)) ((eql type ...) (org-capture-place-item))
> ((eql type ...) (org-capture-place-item)))
> >   (case type ((nil entry) (org-capture-place-entry)) (table-line
> (org-capture-place-table-line)) (plain (org-capture-place-plain-text))
> (item (org-capture-place-item)) (checkitem (org-capture-place-item)))
> >   (let* ((template ...) (type ...)) (case type (... ...) (table-line
> ...) (plain ...) (item ...) (checkitem ...)))
> >   org-capture-place-template()
> >   (condition-case error (org-capture-place-template) ((error quit debug)
> (if ... ...) (set-window-configuration ...) (error "Capture template `%s':
> %s" ... ...)))
> >   (if (equal goto 0) (org-capture-insert-template-here) (condition-case
> error (org-capture-place-template) (... ... ... ...)) (if (and ... ...)
> (condition-case nil ... ...)) (if (org-capture-get :immediate-finish)
> (org-capture-finalize nil)))
> >   (cond ((equal entry "C") (customize-variable ...)) ((equal entry "q")
> (error "Abort")) (t (org-capture-set-plist entry)
> (org-capture-get-template) (org-capture-put :original-buffer orig-buf
> :original-file ... :original-file-nondirectory ... :annotation annotation
> :initial initial) (org-capture-put :default-time ...)
> (org-capture-set-target-location) (condition-case error ... ...) (setq
> org-capture-clock-keep ...) (if ... ... ... ... ...)))
> >   (let* ((orig-buf ...) (annotation ...) (initial ...) (entry ...))
> (when (stringp initial) (remove-text-properties 0 ... ... initial)) (when
> (stringp annotation) (remove-text-properties 0 ... ... annotation)) (cond
> (... ...) (... ...) (t ... ... ... ... ... ... ... ...)))
> >   (cond ((equal goto ...) (org-capture-goto-target)) ((equal goto ...)
> (org-capture-goto-last-stored)) (t (let* ... ... ... ...)))
> >   org-capture(nil)
> >   call-interactively(org-capture nil nil)
>
> [I hope Achim Gratz takes a look at this: he would have a much better
> handle on what exactly is going wrong here - in particular, emacs on
> windows is a black box to me]
>
> org-called-interactively-p is in org-macs.el - it's probably the case
> that your autoloads are not up to date (or perhaps non-existent). Can
> you tell us exactly what zip file you got and how you installed it?
>
> In any case, try
>
> (load-library "org-macs")
>
> and then try the capture again: it probably will work this time (or
> you'll get a different error). This is not meant either as a solution or
> as a workaround: it is just meant to provide a data point about what is
> wrong and what exactly you need to do to restore sanity, so there is
> some ways to go yet.
>
> Nick
>
> PS For reference, here is what Mike posted earlier about his org
> initialization:
>
> ,
> | This is my org setup near the top of my .emacs
> |
> | (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/contrib/lisp/")
> | (add-to-list 'load-path "~/.emacs.d/org/org-7.8.11/lisp/")
> | (require 'org-install)
> | (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> | (define-key global-map "\C-cl" 'org-store-link)
> | (define-key global-map "\C-ca" 'org-agenda)
> | (setq org-log-done t)
> |
> | (setq org-capture-templates
> |
> |   '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")
> |  "

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

2012-06-05 Thread Achim Gratz
Nick Dokos writes:
> [I hope Achim Gratz takes a look at this: he would have a much better
> handle on what exactly is going wrong here - in particular, emacs on
> windows is a black box to me]

Thanks for the flowers, but I don't think I've got any more clues than
you on the issue.

The OP said he's been byte-compiling org by hand.  He's on 23.3, which
(IIRC) means that the base org that comes with Emacs is a 6.36 or so
version.  AFAIR, org-called-interactively-p got implemented as a
compatibility macro some time after that release.  So my best guess is
that there's a mismatch between the autoloads that come with Emacs (no
org-called-interactively-p for instance) and his installation.  If so,
things should start to work if he simply loads _all_ files in the org
directory (org-reload isn't enough if a feature had never been loaded
before).

It would probably be easiest to just install a working make on his
machine and build org with that.  If that's a no-go, make sure
lisp/org-install.el does not exist already, enter the following into the
*Scratch* buffer (adjust the path to the org directory)

(let ((generated-autoload-file "/path/to/org-mode/lisp/org-install.el"))
  (update-directory-autoloads "/path/to/org-mode/lisp"))

and then execute that (C-j or C-x C-e with the cursor after the last
paren).


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

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




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

2012-06-05 Thread Nick Dokos
Mike Fitzgerald  wrote:

> Setup
> -I performed my org-mode update by downloading org-7.8.11.zip

from orgmode.org? or somewhere else?

> Then extracting using something like
>    rt click, "extract here"
> 
> I also ran a defun that I found on wiki pages with the subject
> "Compiling without make"
> 

On which wiki page? What is the complete code?

> (defun my/compile-org(&optional directory)
>   "Compile all *.el files that come with org-mode."
>   (interactive)
> 

Clean up all the .elc files and don't do that: try to run without
compiling. I suspect (without any evidence to back up my suspicion) that
this is a half-assed step that messes up the install somehow.

> 
> RUN Result
> Without restarting Emacs I run
> m-: (load-library "org-macs")
> followed by org-capture
> Result:
> -Behavior was exactly the same bug we have been discussing (did not change).
> 
What does C-h f org-called-interactively-p RET say?

I'm worried about the fact that org-called-interactively-p is a macro and that
the compilation you are doing is not quite kosher and somehow interacts badly
with the macro-ness.

Nick



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

2012-06-05 Thread Nick Dokos
Nick Dokos  wrote:

> Mike Fitzgerald  wrote:
> 
> > Setup
> > -I performed my org-mode update by downloading org-7.8.11.zip
> 
> from orgmode.org? or somewhere else?
> 

I've now downloaded the zip file from

   http://orgmode.org/org-7.8.11.zip,

unpacked it in ~/.emacs.d and started an emacs with a minimal init file:
 
 emacs -q -l ~/src/minimal.emacs/minimal.org.el

where minimal.org.el contains:

--8<---cut here---start->8---
;;; -*- mode: emacs-lisp -*-
(add-to-list 'load-path (expand-file-name "~/.emacs.d/org-7.8.11/lisp"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/org-7.8.11/contrib/lisp"))

(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))

(setq org-fontify-emphasized-text nil)
(require 'org-install)

(setq debug-on-error t)
(setq debug-on-quit t)
(setq eval-expression-print-length nil)
(setq eval-expression-print-level nil)

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)

(require 'org-capture)

(setq 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")))
--8<---cut here---end--->8---

I did *not* byte-compile anything and capture works with no problems.

Nick







Re: [O] Difficulty of using Org mode

2012-06-05 Thread suvayu ali
Hi,

On Tue, Jun 5, 2012 at 5:09 PM, Stephen Eglen  wrote:
> I guess if you were to ask me what I found difficult, was that it was
> quite overwhelming knowing where to start.  (So I started small by
> learning the agenda features...)

IMO the reason many have this problem because they think "I need to know
everything Org-mode can do" or "I want to customise Org-mode" from the
very beginning.

The way I went about it was to get an overview of the capabilities from
Worg and start using only the features I needed (in my case note taking
and export). As I became more familiar, I delved into other features
(like agenda, babel) and customisation of the already familiar features
(e.g. custom export hooks, personalised colour theme etc).

Idea: Maybe this could be a nice entry on the FAQ, "Where do I start?".
Maybe even a dedicated page on the Worg Index page. Any volunteers?

:)

-- 
Suvayu

Open source is the future. It sets us free.



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

2012-06-05 Thread Achim Gratz
Nick Dokos writes:
> On which wiki page? What is the complete code?

Found it.  It's on Worg:

http://orgmode.org/worg/org-hacks.html

One of the more obvious problems is that it seems to compile the
autoloads file: that's a no-no.  The current master branch and hopefully
Org itself starting from the 7.9 release have UTILITIES/org-fixup.el,
which has (org-make-autoloads-compile) and other assorted functions that
can be used to do what make would otherwise be doing (make really calls
the lower level functions already).


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

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




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

2012-06-05 Thread Nick Dokos
Achim Gratz  wrote:

> Nick Dokos writes:
> > On which wiki page? What is the complete code?
> 
> Found it.  It's on Worg:
> 
> http://orgmode.org/worg/org-hacks.html
> 
> One of the more obvious problems is that it seems to compile the
> autoloads file: that's a no-no.  The current master branch and hopefully
> Org itself starting from the 7.9 release have UTILITIES/org-fixup.el,
> which has (org-make-autoloads-compile) and other assorted functions that
> can be used to do what make would otherwise be doing (make really calls
> the lower level functions already).
> 
> 

Thanks - I added a warning note to the hack. When the recipe is fixed,
we can delete the note again.

Nick



[O] GSoC -- org-sync

2012-06-05 Thread Aurélien Aptel
Hi all,

Since I've reached a usable point in my Google Summer of Code project
Org-sync, I'm posting to the ML to show my progress and to get some
feedback.

For those who don't know or don't remember, Org-sync is a tool to
synchronize parts of your document with external services in a generic
way. Each service is implemented is a backend of org-sync and
implements a common interface. The project focuses on online
bugtracking tools such as Github issues or Bugzilla. More background
info on worg at [1] and [2].

I've focused on Github as my first backend. Not all aspects of the
org-sync lib has been factored out and the interface is a bit blurry
(what belongs to org-sync? what belongs to the backend?). It will be
clearer once I implement a second backend.

Currently, the Github backend is usable. To try it:

1. You will need a recent copy of org-element.el, Nicolas Goaziou's
   new org-mode parser. If you don't have it, you can just download
   contrib/lisp/org-element.el [3] from the org-mode repo, visit it in
   emacs and run M-x eval-buffer.

2. Org-sync, of course. Currently there's only one file, you can just
   download it from the tag v0.1 changeset [4], visit it in emacs and
   run M-x eval-buffer.

3. Open an org-document, or a new buffer in org-mode

4. Run M-x os-import RET github.com/octocat/Hello-World RET to import
   issues from Github test repo.

5. You can delete some entries and run M-x os-sync to download them
   again.

If you want to try the local-to-remote sync you'll need your own test repo.

1. Set the variable os-github-auth. For this you can run:

M-: RET (setq os-github-auth (cons "login" "passwd")) RET

2. Run M-x os-import RET /url/to/your/repo RET

3. Modify some entries and run M-x os-sync. Currently, there's no "success"
   message so you'll have to check online to make sure it worked.

That's all for the basic tutorial. You can find more at [2].

Known issues:

- Some field can't be synched.
- Updating tags or assignee doesn't work if it doesn't exists.
- The description is imported in Markdown syntax.
- Non-ascii chars are sent properly but are not fetched properly.
- The way logins are stored is simple for now but it will be
  enhanced later on.
- I sometime get a message like this few minutes after synching:
  "gnutls.c: [0] (Emacs) fatal error: The TLS connection was
  non-properly terminated." It has to do with https, ssl and url.el
  but other than that, I have no idea.
- There is not much error checking.


1: http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/org-sync/
2: 
http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/org-sync/backends.html
3: 
http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/org-element.el;hb=HEAD
4: http://orgmode.org/w/?p=org-sync.git;a=blob_plain;f=github.el;hb=HEAD



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

2012-06-05 Thread Achim Gratz
Nick Dokos writes:
> I did *not* byte-compile anything and capture works with no problems.

Yes.  Forget about the byte-compilation for a moment, it is really a red
herring... it works for you because you are running it with Emacs 24
(which does have an autoload for org-called-interactively-p already).
The thing that is missing for the OP is an autoloads file that matches
to the version of Org he's using.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] alignment of description list in Org and export old and new

2012-06-05 Thread Michael Brand
Hi Jambunathan, hi all

Jambunathan K  wrote:
> Tables allow for finer control and alignment.  Unfortunately, Org
> doesn't support multi-line tables.  To alleviate this, (Old) ODT
> exporter has a feature called as List-Tables [1].  This feature is not
> available with any other backends [2].
>
> I am attaching the Org file that uses list-tables and the corresponding
> output.

Thank you for showing my example as a list-table. The ODT export you
attached looks exactly how I imagined, with "same line" and "aligned".
For me the most important is how the Org buffer looks like and for
many cases I prefer something that has term and description on the
same line also in the Org buffer. Most associations in most of my
lists of associations have term and description short. Since they have
to be on their own line when put into a list-tables they then take
almost double the number of lines in my Org buffers.

For some years now I have been hacking associations this way:

  | cmd -o  | short term + short descr|
  | cmd --log-level=err | long term + short descr |
  | \ -o  | |
  | cmd --create| short term + long descr bla bla bla bla |
  | | \ bla bla bla bla bla bla bla bla bla   |
  | cmd --log-level=dbg | short term + long descr bla bla bla bla |
  | | \ bla bla bla bla bla bla bla bla bla   |

So far I could put up with some other disadvantages: It takes an extra
effort to edit the wrapping texts despite the help of M-RET
(org-table-wrap-region) and the manually added syntactic sugar "\" to
help in reading. And it is not well suited for export. Of course I
could narrow the table to get also the longer terms and descriptions
into a single cell but then I don't like the cells truncated in the
Org buffer and in the plain text Org file these rows become long and
misaligned.

Since the Org description list is perfect for that as long as only two
columns are needed, I prefer to follow this path, also to be better
prepared for optional export to various formats. I would "just" like
to have more alignment for description list in the Org buffer itself.

For this alignment with M-q (fill-paragraph) and C-c C-c on
description list I suggest a formatting cookie, similar to Org table
where "<19>" on any row narrows the column:
- when any item contains only "<>": align all descriptions to the
  widest term of the list
- when any item contains only "<19>": align all descriptions as if the
  widest term would be 19 wide, if necessary start the description on
  the next line to not hide the rest of a longer term
- when none of the items matches "^<[0-9]*>$": rearrange whitespace
  like now, which means without aligning

Example description lists for the three variants:

  - <>
  - cmd -o :: short term + short descr
  - cmd --log-level=err -o   :: long term + short descr
  - cmd --create   :: short term + long descr bla
  bla bla bla bla bla bla bla
  bla bla bla bla bla
  - cmd --log-level=dbg:: short term + long descr bla
  bla bla bla bla bla bla bla
  bla bla bla bla bla

  - <19>
  - cmd -o  :: short term + short descr
  - cmd --log-level=err -o  
:: long term + short descr
  - cmd --create:: short term + long descr bla bla bla bla bla
   bla bla bla bla bla bla bla bla
  - cmd --log-level=dbg :: short term + long descr bla bla bla bla bla
   bla bla bla bla bla bla bla bla

  - cmd -o :: short term + short descr
  - cmd --log-level=err -o   :: long term + short descr
  - cmd --create :: short term + long descr bla bla bla bla bla bla
bla bla bla bla bla bla bla
  - cmd --log-level=dbg :: short term + long descr bla bla bla bla bla
   bla bla bla bla bla bla bla bla

Similar to Org table, an item with only this formatting cookie would
be removed automatically when exporting.

The right border of the descriptions still is always according to the
buffer local variable fill-column.

Michael



[O] Updating info files

2012-06-05 Thread Mike Fitzgerald
Windows 7, EMACS 23.4

I tried this in my .emacs to update info files

;; Info directory
(add-to-list 'Info-default-directory-list
 (expand-file-name "~/.emacs.d/org-7.8.11/doc)"))

As recommended here.
http://orgmode.org/worg/org-faq.html

C-h i still brings up the old info files.

files are there:

org.pdf
rg.texi
rgcard.pdf
rgcard.tex
rgcard_letter.pdf
rgguide.pdf
rgguide.texi

Any suggestions?

Thanks

Mike

On Tue, Jun 5, 2012 at 2:40 PM, Nick Dokos  wrote:

> Mike Fitzgerald  wrote:
>
> > Great!
> > Followed your latest recommendations and all seems well.
> >
>
> Glad to hear it.
>
> > A couple of things:
> >
> > 1) The defun
> >
> > (defun my/compile-org(&optional directory)
> >   "Compile all *.el files that come with org-mode."
> >
> > is at http://orgmode.org/worg/org-hacks.html.
> >
>
> Yeah, Achim pointed it out, so I added a warning to stay away from it for
> now.
>
> > 2) The org mode update info on the net is confusing to me.
> >
>
> You might want to post a note to the list (as detailed as possible
> please!) about this. There is always room for improvement in this area.
>
> > 3) The command (require 'org-capture) does not appear anywhere on
> http://doc.norang.ca/org-mode.html#Capture
> > Which is the most offcical looking page has capture stuff.
> > Seems that it should be near the top.
> > Tried re-running without (require 'org-capture)  and it still works.
> > Another package must be loading it.
> >
>
> It's probably not necessary, just paranoia on my part.
>
> > 4) Is there a pain free way to get org mode info files updated?
> >
>
> My preference is to initialize the environment variable INFOPATH to point
> to the various directories that contain info files that I'm interested in
> (in addition to the standard ones). That might or might not work well for
> you on windows though.
>
> > 5) How 2 byte compile?
> > (perhaps it does not need byte compile, seems fast enough)
> >
>
> I almost always run without byte-compilation (mostly because I don't
> really use org-mode to its fullest potential, but I often end up
> debugging things: org-mode is more a hobby for me, not so much a
> productivity tool).
>
> You will probably want to learn enough about git and the repo eventually
> and use that to (frequently!) update your installation, because org is a
> fast moving target and eventually you will lust after the latest and
> greatest feature which only exists on the bleeding edge version; but
> that will mean that you probably will want to install a make tool on
> windows: it's too much of a pain otherwise.
>
> > Thanks 4 being responsive and a clean dispo.
> >
>
> Getting over the initial hump is the biggest obstacle new users face,
> so I try to help them do that.
>
> Nick
>


Re: [O] Updating info files

2012-06-05 Thread Nick Dokos
Mike Fitzgerald  wrote:

> Windows 7, EMACS 23.4
> 
> I tried this in my .emacs to update info files
>  
> ;; Info directory
> (add-to-list 'Info-default-directory-list
>  (expand-file-name "~/.emacs.d/org-7.8.11/doc)"))
> 
> As recommended here.
> http://orgmode.org/worg/org-faq.html
> 

The paren after "doc" is spurious: try deleting it. I'll check the FAQ
and correct it if necessary.

Nick

> C-h i still brings up the old info files.
> 
> files are there:
> 
> org.pdf
> rg.texi
> rgcard.pdf
> rgcard.tex
> rgcard_letter.pdf
> rgguide.pdf
> rgguide.texi
> 
> Any suggestions?
> 
> Thanks
> 
> Mike
> 
> On Tue, Jun 5, 2012 at 2:40 PM, Nick Dokos  wrote:
> 
> Mike Fitzgerald  wrote:
>
> > Great!
> > Followed your latest recommendations and all seems well.
> >
>
> Glad to hear it.
>
> > A couple of things:
> >
> > 1) The defun
> >
> > (defun my/compile-org(&optional directory)
> >   "Compile all *.el files that come with org-mode."
> >
> > is at http://orgmode.org/worg/org-hacks.html.
> >
>
> Yeah, Achim pointed it out, so I added a warning to stay away from it for 
> now.
>
> > 2) The org mode update info on the net is confusing to me.
> >
>
> You might want to post a note to the list (as detailed as possible
> please!) about this. There is always room for improvement in this area.
>
> > 3) The command (require 'org-capture) does not appear anywhere on 
> http://doc.norang.ca/org-mode.html#Capture
> > Which is the most offcical looking page has capture stuff.
> > Seems that it should be near the top.
> > Tried re-running without (require 'org-capture)  and it still works.
> > Another package must be loading it.
> >
>
> It's probably not necessary, just paranoia on my part.
>
> > 4) Is there a pain free way to get org mode info files updated?
> >
>
> My preference is to initialize the environment variable INFOPATH to point
> to the various directories that contain info files that I'm interested in
> (in addition to the standard ones). That might or might not work well for
> you on windows though.
>
> > 5) How 2 byte compile?
> > (perhaps it does not need byte compile, seems fast enough)
> >
>
> I almost always run without byte-compilation (mostly because I don't
> really use org-mode to its fullest potential, but I often end up
> debugging things: org-mode is more a hobby for me, not so much a
> productivity tool).
>
> You will probably want to learn enough about git and the repo eventually
> and use that to (frequently!) update your installation, because org is a
> fast moving target and eventually you will lust after the latest and
> greatest feature which only exists on the bleeding edge version; but
> that will mean that you probably will want to install a make tool on
> windows: it's too much of a pain otherwise.
>
> > Thanks 4 being responsive and a clean dispo.
> >
>
> Getting over the initial hump is the biggest obstacle new users face,
> so I try to help them do that.
>
> Nick
> 
> 
> 
> Alternatives:
> 
> 



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

2012-06-05 Thread Achim Gratz
Nick Dokos writes:
> Thanks - I added a warning note to the hack. When the recipe is fixed,
> we can delete the note again.

Fixed it up for good (hopefully).  Please check.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




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

2012-06-05 Thread Nick Dokos
Achim Gratz  wrote:

> Nick Dokos writes:
> > Thanks - I added a warning note to the hack. When the recipe is fixed,
> > we can delete the note again.
> 
> Fixed it up for good (hopefully).  Please check.
> 

The "no org-version.el" case  looks wrong with the unbalanced paren:

,
| emacs -batch -Q -L lisp -l ../UTILITIES/org-fixup \
| --eval 'org-make-org-version "7.8.11" "7.8.11-fake" "/path/to/odt/styles")'
`

Nick





[O] Taskjuggler and installation

2012-06-05 Thread Simon Thum

Hi all,

I am using org-mode's taskjuggler export on two machines (win7 standard 
emacs 23.3/linux emacs 23.4.2) with 99% identical configuartion. Except 
for one funny thing:


Taskjuggler export raises an undefined function on windows. Yes, I do 
require 'org-install, org-mode from identical sources (git-sync'ed). 
Linux is fine.


I am fixing this by adding a require 'org-taskjuggler, but that can't 
really be it. Any advice how to track this down?


Thanks in advance,

Simon



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

2012-06-05 Thread Achim Gratz
Nick Dokos writes:
> The "no org-version.el" case  looks wrong with the unbalanced paren:

Thanks.  Should be fixed now.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] if both schedule and deadline, appear only once in agenda

2012-06-05 Thread Mike McLean

On Jun 1, 2012, at 4:09 AM, Eric S Fraga wrote:

> SW  writes:
>> However, this is not what my question is about. My question relates to 
>> advance
>> warning that an item is scheduled in the future. I want to know on Friday 
>> that I
>> have scheduled a large project to start on Monday. That is, I would like to 
>> know
>> beforehand that I need to start working on a large project in a few days 
>> time.
> 
> One approach is to consider that "thinking about a large project about
> to start" is itself a task so you could look at adding a task for the
> Friday, when you first scheduled the large task for the Monday, to tell
> you start thinking...
> 
> This might sound silly but it can actually be quite useful if you get
> into the habit of thinking about such aspects when you schedule tasks.

I agree with this sentiment wholeheartedly. My default “project” org-capture 
template has a sub task for defining the project. You could setup your template 
in whatever way works for you. 

I used to use a version of the GTD Natural Planning model with bullets for 
Purpose, Principles, Vision, Outcome, etc. I have since simplified to a MadLibs 
user story format: 
http://www.mountaingoatsoftware.com/blog/advantages-of-the-as-a-user-i-want-user-story-template

If I know the broad outlines of project at the time of capture, I fill it all 
in with the capture template. If I do not yet have the project fully thought 
out, I add a TODO keyword to the “Project Definition” subheading. Depending on 
the project I add scheduled and/or deadline dates to the project itself and/or 
the Project Definition TODO. The relevant snippet from my org-capture is:

#+begin_src emacs-lisp
(setq org-capture-templates (quote (
("P" "project" entry (file "~/Documents/OrgMaster/org/refile.org") "* 
%?   :Project_Backlog: \n  %U\n** Project Definition\n- Summary\n  + As 
, I want  so \n- Completion Criteria (Don't do too 
much)\n  + \n" :clock-in t :clock-resume t)
)))
#+end_src

Since I have clocking as part of my capture template, I also record the time I 
spend writing the project requirements against the project -- when I refile the 
project that time moves with the refile to be charged against the broader 
desired outcome. I get quite a bit of quantified self information this way :)




Re: [O] org-capture and org-link-type for Outlook mail messages on Mac OSX

2012-06-05 Thread Mike McLean

On Jun 3, 2012, at 6:56 AM, Christopher J. White wrote:

> Hi Folks,
> 
> I thought I'd share a bit of hacking I've been doing over the last couple 
> days.
> 
> I had 2 basic needs:
>  * create a TODO entry associated with an email message
>  * include a clickable link back to that message in the entry
> 
> For work email I use Outlook on a Mac.  After some digging, I managed to 
> cobble together an AppleScript with some glue lisp that solves both of the 
> above.

Well, wow. I've had “write an Outlook / Org integration” on my TODO list for 
too long. I too use Outlook for Mac at work and will certainly be testing this 
over the next few days. Thank you!


Re: [O] Taskjuggler and installation

2012-06-05 Thread Nick Dokos
Simon Thum  wrote:

> Hi all,
> 
> I am using org-mode's taskjuggler export on two machines (win7 standard 
> emacs 23.3/linux emacs 23.4.2) with 99% identical configuartion. Except 
> for one funny thing:
>

What org-version? Do you byte-compile the code on both platforms?
 
> Taskjuggler export raises an undefined function on windows. Yes, I do 
> require 'org-install, org-mode from identical sources (git-sync'ed). 
> Linux is fine.
> 

What function?

> I am fixing this by adding a require 'org-taskjuggler, but that can't 
> really be it. Any advice how to track this down?
> 

M-x toggle-debug-on-error RET

and look at the backtrace to see what the call chain looks like.  A
missing autoload perhaps? Why exactly 23.3 on windows and 23.4.2 on
linux behave differently is a mystery, at least for now.

Nick




[O] [babel] Why #+name: is not a member of params?

2012-06-05 Thread Mikhail Titov
Hello!

I’d like to insert a comment into tangle output with a block name. I thought I 
could easily access it (like from org-babel-expand-body:XXX function) with

(cdr (assq :name params))

But apparently it does not work. When I do C-c C-v C-v trying to expand body, I 
get nil as it is not there.

Did I miss something?

I want that so each block appears in individual Matlab code cell [1].

[1] http://www.mathworks.com/help/techdoc/matlab_env/brqxeeu-259.html

Mikhail






Re: [O] python/babel inline images

2012-06-05 Thread William LÉCHELLE
At Tue, 05 Jun 2012 08:57:19 -0600,
Eric Schulte wrote:
> 
> henry atting  writes:
> 
> > Hi,
> >
> > I do not succeed in generating an inline image as a result of a
> > python code block. The code itself works, C-c C-c generates the
> > according picture, but only in my home directory. The code block:
> >
> > -*- org-babel-python-command: "python3" -*-
> > #+begin_src python
> > import csv
> > import matplotlib.pyplot as plot
> > x = []
> > y = []
> > csv_reader = csv.reader(open('csv_data.csv'))
> > for line in csv_reader:
> > x.append(int(line[0]))
> > y.append(float(line[1]))
> > plot.plot(x, y, label=r'exp', color='green')
> > plot.legend(loc='lower right')
> > plot.savefig("exp_csv.svg")
> > #+end_src
> >
> > It tried different combinations of `:exports results', `:results
> > file', `:file filename'
> 
> I'm not python expert, but the code block should be run in your current
> directory, e.g., the following outputs the current working path expected
> for me.
> 
> #+begin_src sh
>   pwd
> #+end_src
> 
> If you want to explicitly pass the current directory to your code block
> as an argument, you could try something like the following
> 
> #+begin_src python :var mydir=(file-name-directory (buffer-file-name))
>   return mydir
> #+end_src

I guess if it's a paths' problem, the python equivalent would be os.getcwd(),
from the os module, and a solution to have the picture in the right place
could be os.chdir(path) (or maybe plot.savefig can take a full path as an
argument), but I think the OP (and I'm very interested too) wants org-babel to
manage the python output somehow to inline the image automatically.

I don't see that possible, because I don't think the "results" of plot.savefig
is the value of the image, but rather an i/o operation somehow (and I may well
be wrong) (and nothing goes to stdout). But maybe to output a link could do ?

#+begin_src python :results output file
  <>
  path = "exp_csv.svg"
  plot.savefig(path)
  print path
#+end_src

HTH



Re: [O] [babel] Why #+name: is not a member of params?

2012-06-05 Thread Eric Schulte
"Mikhail Titov"  writes:

> Hello!
>
> I’d like to insert a comment into tangle output with a block name. I thought 
> I could easily access it (like from org-babel-expand-body:XXX function) with
>
> (cdr (assq :name params))
>
> But apparently it does not work. When I do C-c C-v C-v trying to expand body, 
> I get nil as it is not there.
>
> Did I miss something?
>
> I want that so each block appears in individual Matlab code cell [1].
>
> [1] http://www.mathworks.com/help/techdoc/matlab_env/brqxeeu-259.html
>
> Mikhail
>

Hi Mikhail,

The code block name is not a member of params.  Params only holds header
arguments, not other meta data like the name.  The code block name is
stored in the `info' list which is active while the code block is being
processed, so you could access it with something like the following,
although which is relying on an implementation detail that is not part
of the formal spec (i.e., cheating) and could change.

#+name: foo
#+begin_src emacs-lisp
  (nth 4 info)
#+end_src

#+RESULTS: foo
: foo

Best,

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



[O] Preprocessing on export

2012-06-05 Thread Alan L Tyree
I need to run some functions before exporting. This used to 
work:

(add-hook 'org-export-preprocess-hook 'alt/disable-plain-foonotes-and-
allow-brackets-hack)

but it has stopped. I also need to run some post export cleanup.

I seemed to have missed some change and can't seem to turn it up. Can 
anyone direct me to the correct variables/hooks?

Thanks,
Alan

-- 
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:172...@iptel.org




Re: [O] [babel] Why #+name: is not a member of params?

2012-06-05 Thread Mikhail Titov
> -Original Message-
> From: Eric Schulte [mailto:eric.schu...@gmx.com]
> Sent: Tuesday, June 05, 2012 7:42 PM
> To: Mikhail Titov
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] [babel] Why #+name: is not a member of params?
> 
> "Mikhail Titov"  writes:
> 
> > Hello!
> >
> > I’d like to insert a comment into tangle output with a block name. I thought
> I could easily access it (like from org-babel-expand-body:XXX function) with
> >
> > (cdr (assq :name params))
> >
> ...
> 
> The code block name is not a member of params.  Params only holds header
> arguments, not other meta data like the name.  The code block name is
> stored in the `info' list which is active while the code block is being
> processed, so you could access it with something like the following,
> although which is relying on an implementation detail that is not part
> of the formal spec (i.e., cheating) and could change.
> 
> #+name: foo
> #+begin_src emacs-lisp
>   (nth 4 info)
> #+end_src
> 
> #+RESULTS: foo
> : foo

Thank you, Eric!

Marvelous! It does what I want. I see its definition in ob.el .

M. 




Re: [O] python/babel inline images

2012-06-05 Thread Mikhail Titov
> -Original Message-
> From: emacs-orgmode-bounces+mlt=gmx...@gnu.org [mailto:emacs-orgmode-
> bounces+mlt=gmx...@gnu.org] On Behalf Of Eric Schulte
> Sent: Tuesday, June 05, 2012 9:57 AM
> To: henry atting
> Cc: emacs-orgmode@gnu.org
> Subject: Re: [O] python/babel inline images
> 
> I'm not python expert, but the code block should be run in your current
> directory, e.g., the following outputs the current working path expected
> for me.
> 
> #+begin_src sh
>   pwd
> #+end_src
> 
> If you want to explicitly pass the current directory to your code block
> as an argument, you could try something like the following
> 
> #+begin_src python :var mydir=(file-name-directory (buffer-file-name))
>   return mydir
> #+end_src
> 

I've noticed some inconsistency between various languages in this aspect.
For instance, ob-R starts session in proper working directory, while all
looks like everything (?) else does not.

Should not it be somewhat standardized? I think it make sense to always cd
to org doc folder.

M.




Re: [O] MobileOrg for Android question about calendar integration

2012-06-05 Thread Matthew Jones
Hey Stephen, glad you like the app!

As long as that calendar is set to sync then it will pull them into the web
based Google Calendar service.  The way that I made sure this would happen
is to create the calendar from the web interface and then make sure that is
synced to the phone... then go into the MobileOrg settings a select that
calendar specifically.  It all works like a champ... let me know if you
have any issues with it.

On Tue, Jun 5, 2012 at 11:19 AM, Stephen Eglen wrote:

> Hi,
> I love the new MobileOrg Android app, especially the Calendar
> integration.
>
> A quick question: if I sync on the android app, I see new org agenda
> items in the phone's Calendar.  Do those items sync back from my phone
> to appear also on the web at google.com/calendar?   For now, my
> org-generated items are on the phone, but not the web application.
>
> Thanks, Stephen
>
>


Re: [O] Smart Quotes Exporting

2012-06-05 Thread Mark E. Shoulson
Update on the smart-quotes patch.  Supports the odt exporter now too, 
which I think covers all the current major "new" exporters for which it 
is relevant (adding smart quotes to ASCII export is a contradiction in 
terms; should it be in the "publish" exporter?  It didn't look like it 
to me).


Added an options keyword, '"' (that is, the double-quote mark) to select 
smart quotes on/off, and a defcustom for customizing your default.  Set 
the default default [sic] to nil, though actually it might be reasonable 
to set it to t.  Slight touch-up to the regexps since last time, but 
they will definitely be subject to a lot of fine-tuning as more special 
cases are found that break them and ways to fix it are found (the 
close-quote still breaks on one of "/a/." or "/a./")


It's pretty good on the whole, though, usually guesses right.  I know 
there's some work being done on the odt exporter; hope this fits in well 
with it.


How does it look to you?

~mark

>From e6df2efd1a9ce36964a20fc06aa2a688acd87efb Mon Sep 17 00:00:00 2001
From: Mark Shoulson 
Date: Tue, 29 May 2012 23:01:12 -0400
Subject: [PATCH] Add `smart' quotes for onscreen display and for latex and
 html export

* lisp/org.el: Add `smart' quotes: custom variables to define
  regexps to recognize quotes, to define how and whether to
  display them, and org-fontify-quotes to display `smart-quote'
  characters when activated.

* contrib/lisp/org-export.el: Add function org-export-quotation-marks
  as a utility function usable by individual exporters to apply
  `smart' quotes.  Also add keyword '"' for customizing smart quotes,
  and custom default for it.

* contrib/lisp/org-e-latex.el: Replace org-e-latex-quotes custom with
  org-e-latex-quotes-replacements and make org-e-latex--quotation-marks
  use the org-export-quotation-marks function in org-export.el.

* contrib/lisp/org-e-html.el: Replace org-e-html-quotes custom with
  org-e-html-quotes-replacements and enable org-e-html--quotation-marks,
  using org-export-quotation-marks function in org-export.el.

* contrib/lisp/org-e-odt.el: Replace org-e-odt-quotes custom with
  org-e-odt-quotes-replacements and make org-e-odt--quotation-marks
  use org-export-quotations-marks function in org-export.el.
---
 contrib/lisp/org-e-html.el  |   57 
 contrib/lisp/org-e-latex.el |   67 ++---
 contrib/lisp/org-e-odt.el   |   68 ++---
 contrib/lisp/org-export.el  |   38 
 lisp/org.el |  101 +++
 5 files changed, 203 insertions(+), 128 deletions(-)

diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
index 4287a59..c49608d 100644
--- a/contrib/lisp/org-e-html.el
+++ b/contrib/lisp/org-e-html.el
@@ -1043,37 +1043,24 @@ in order to mimic default behaviour:
 
  Plain text
 
-(defcustom org-e-html-quotes
-  '(("fr"
- ("\\(\\s-\\|[[(]\\|^\\)\"" . "«~")
- ("\\(\\S-\\)\"" . "~»")
- ("\\(\\s-\\|(\\|^\\)'" . "'"))
-("en"
- ("\\(\\s-\\|[[(]\\|^\\)\"" . "``")
- ("\\(\\S-\\)\"" . "''")
- ("\\(\\s-\\|(\\|^\\)'" . "`")))
-  "Alist for quotes to use when converting english double-quotes.
-
-The CAR of each item in this alist is the language code.
-The CDR of each item in this alist is a list of three CONS:
-- the first CONS defines the opening quote;
-- the second CONS defines the closing quote;
-- the last CONS defines single quotes.
-
-For each item in a CONS, the first string is a regexp
-for allowed characters before/after the quote, the second
-string defines the replacement string for this quote."
+(defcustom org-e-html-smart-quote-replacements
+  '(("fr" "« " " »" "‘" "’" "’")
+("en" "“" "”" "‘" "’" "’")
+("de" "„" "“" "‚" "‘" "’"))
+  "What to export for `smart-quotes'.
+A list of five strings:
+ 1. Open double-quotes
+ 2. Close double-quotes
+ 3. Open single-quote
+ 4. Close single-quote
+ 5. Mid-word apostrophe"
   :group 'org-export-e-html
   :type '(list
-	  (cons :tag "Opening quote"
-		(string :tag "Regexp for char before")
-		(string :tag "Replacement quote "))
-	  (cons :tag "Closing quote"
-		(string :tag "Regexp for char after ")
-		(string :tag "Replacement quote "))
-	  (cons :tag "Single quote"
-		(string :tag "Regexp for char before")
-		(string :tag "Replacement quote "
+	  (string :tag "Open double-quotes"); "“"
+	  (string :tag "Close double-quotes")   ; "”"
+	  (string :tag "Open single-quote") ; "‘"
+	  (string :tag "Close single-quote"); "’"
+	  (string :tag "Mid-word apostrophe"))) ; "’"
 
  Compilation
 
@@ -1459,15 +1446,7 @@ This is used to choose a separator for constructs like \\verb."
   "Export quotation marks depending on language conventions.
 TEXT is a string containing quotation marks to be replaced.  INFO
 is a plist used as a communication channel."
-  (mapc (lambda(l)
-	  (let ((start 0))
-	(while (setq start (string-match (car l) text st

Re: [O] Documents for old versions of org-mode

2012-06-05 Thread François Pinard
suvayu ali  writes:

> For step by step instructions you can look in the following FAQ entries:
> 

Without being fully sure, and while the above procedure long worked
without problem for me, I think that more recently, I got rid of some
Org problems by also moving the Org bundled within Emacs out of the
way.  I'm tempted to presume it is unusual that this is ever needed.

François



[O] plain text best practice?

2012-06-05 Thread scrawler
howdy guys,

I want to use org-mode for writing documents that don't necessarily
have very many headings or sub-headings.

I could do:

* Chapter One
 lots of text
* Chapter Two
lots more text

or:

* Chapter One
  - lots of text
* Chapter Two
  - lots more text

or:

* Chapter One
** paragraph 1
   lots of text
** paragraph 2
   lots of text
* Chapter Two

...but I'm not sure which to use. It almost seems like the last format
is the best, but I don't want to type paragraph headings. Maybe the
first few words of the paragraph could be a heading after the fact, but
not as I write.

Apologies for such a basic question, but I how can I leverage org-mode
to just write? What do you do?

thanks






Re: [O] plain text best practice?

2012-06-05 Thread Christopher Schmidt
scraw...@gmail.com writes:

> * Chapter One
>   - lots of text
> * Chapter Two
>   - lots more text

These are lists (info "(org)Plain lists").  I do not think you want
that.

> * Chapter One
> ** paragraph 1
>lots of text
> ** paragraph 2
>lots of text
> * Chapter Two

This is exactly what org-indent-mode is for.  Check
(info "(org)Clean view").

Christopher



Re: [O] plain text best practice?

2012-06-05 Thread William LÉCHELLE
I'd go the first way if you don't need/use much markup, but if you want to
structure more deeply your document, you can have subheadings without actually
giving them a title (just the stars and a blank space are enough for a heading)

It's also a matter of what you want to do with the document, if you plan to
export it, the subheadings will change the result in ways you may like or 
dislike.

(You don't seem to have any usage of lists, so simply don't go for them.)

At Tue, 5 Jun 2012 22:38:13 -0500,
scraw...@gmail.com wrote:
> 
> howdy guys,
> 
> I want to use org-mode for writing documents that don't necessarily
> have very many headings or sub-headings.
> 
> I could do:
> 
> * Chapter One
>  lots of text
> * Chapter Two
> lots more text
> 
> or:
> 
> * Chapter One
>   - lots of text
> * Chapter Two
>   - lots more text
> 
> or:
> 
> * Chapter One
> ** paragraph 1
>lots of text
> ** paragraph 2
>lots of text
> * Chapter Two
> 
> ...but I'm not sure which to use. It almost seems like the last format
> is the best, but I don't want to type paragraph headings. Maybe the
> first few words of the paragraph could be a heading after the fact, but
> not as I write.
> 
> Apologies for such a basic question, but I how can I leverage org-mode
> to just write? What do you do?
> 
> thanks
> 
> 
> 
> 



Re: [O] plain text best practice?

2012-06-05 Thread Nick Dokos
scraw...@gmail.com wrote:

> howdy guys,
> 
> I want to use org-mode for writing documents that don't necessarily
> have very many headings or sub-headings.
> 
> I could do:
> 
> * Chapter One
>  lots of text
> * Chapter Two
> lots more text
> 
> or:
> 
> * Chapter One
>   - lots of text
> * Chapter Two
>   - lots more text
> 
> or:
> 
> * Chapter One
> ** paragraph 1
>lots of text
> ** paragraph 2
>lots of text
> * Chapter Two
> 
> ...but I'm not sure which to use. It almost seems like the last format
> is the best, but I don't want to type paragraph headings. Maybe the
> first few words of the paragraph could be a heading after the fact, but
> not as I write.
> 
> Apologies for such a basic question, but I how can I leverage org-mode
> to just write? What do you do?
> 

Use the first form. If you feel that the chapter needs to be split up,
use second level headings to split it up into sections. If a section
gets too big, use third-level headings for subsections. And so on...

Org-mode is not buying you much in this case: you can navigate easily
between chapters and you can hide the contents of all the other chapters
while leaving exposed the one you are working on. But it doesn't cost
anything either. And if you ever decide to publish the thing (on paper,
as a PDF on the web, as HTML on the web, etc.), you will be able to
trivially do it. So just write and don't sweat it too much.

Nick



Re: [O] plain text best practice?

2012-06-05 Thread Eric Abrahamsen
On Wed, Jun 06 2012, scraw...@gmail.com wrote:

> howdy guys,
>
> I want to use org-mode for writing documents that don't necessarily
> have very many headings or sub-headings.
>
> I could do:
>
> * Chapter One
>  lots of text
> * Chapter Two
> lots more text

Is there anything wrong with this approach? I've used Org for novel
translations, and do it just like this. If there are no logical
divisions within chapters you probably don't want additional markup, it
will just get in the way.

If navigation is the problem, getting accustomed to keybindings like C-c
C-n, C-c C-p, and C-c C-u can be very helpful. Also look at the
docstring for `org-cycle', and you might consider binding a few
outline-mode commands (like `hide-other') to your own keys, to help keep
navigation and visibility under control.

Keep it simple!

Eric

> or:
>
> * Chapter One
>   - lots of text
> * Chapter Two
>   - lots more text
>
> or:
>
> * Chapter One
> ** paragraph 1
>lots of text
> ** paragraph 2
>lots of text
> * Chapter Two
>
> ...but I'm not sure which to use. It almost seems like the last format
> is the best, but I don't want to type paragraph headings. Maybe the
> first few words of the paragraph could be a heading after the fact, but
> not as I write.
>
> Apologies for such a basic question, but I how can I leverage org-mode
> to just write? What do you do?
>
> thanks
>
>
>
>
>

-- 
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-06-06 on pellet
7.8.10




Re: [O] MobileOrg for Android question about calendar integration

2012-06-05 Thread Stephen Eglen
> As long as that calendar is set to sync then it will pull them into the web
> based Google Calendar service.  The way that I made sure this would happen
> is to create the calendar from the web interface and then make sure that is
> synced to the phone... then go into the MobileOrg settings a select that
> calendar specifically.  It all works like a champ... let me know if you
> have any issues with it.

Thanks Matt, I've got it working now.  (I created a new calendar just
for MobileOrg, and then the syncing worked a charm.)  Best wishes, Stephen