Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Carsten Dominik
Hi,

can someone please summarize this discussion for me and tell me what action is 
required?

Thank you!

- Carsten

On 29.8.2013, at 20:25, Skip Collins skip.coll...@gmail.com wrote:

 Jambunathan K kjambunat...@gmail.com wrote:
 After I do an ODT export, many ox-odt variables are duplicated with
 old variable names:
| [-]-\ Group Org Export ODT
|  |  |--- Option Org Odt Schema Dir
|  |  |--- Option Org Odt Content Template File
 
 Above ones come from NEW exporter, ox-odt.el
 
|  |  |--- Option Org Export Odt Schema Dir
|  |  |--- Option Org Export Odt Content Template File
 
 Above ones come from LEGACY exporter.  Not used by ox-odt.el.
 
 This is confusing but the behaviour is expected and NOT BUGGY.
 
 Thank you for clarifying a confusing situation. I am not sure why I
 assumed that the org-export-odt variables were the newer ones.
 
 Suggestion for maintainers: a new, separate customization group, with
 appropriate pointers in the documentation, would be helpful.
 




Re: [O] Invalid specification of styles.xml: nil

2013-08-31 Thread Jambunathan K
Luca Ferrari fluca1...@infinito.it writes:

 Hi all,
 when exporting to OpenOffice using a ott file as template I get the
 error Invalid specification of styles.xml: nil, even if I placed the
 property
 #+ODT_STYLES_FILE: /home/luca/letter.ott
 in the org file. Regular exports to ODT works out of the box, of course!

 What am I missing?

The double quotes.  See the following section in the manual.

(info (org) Applying custom styles)


 Thanks,
 Luca



Re: [O] don't show author and date on odt export?

2013-08-31 Thread Jambunathan K
Matt Price mopto...@gmail.com writes:

 On Mon, Aug 26, 2013 at 2:49 PM, Matt Price mopto...@gmail.com wrote:

 I'm trying to figure out how best to tell org not to display my name
 and the date at the top of the page when it exports document.
 Currently, it seems I can do htis by setting

 #+OPTIONS: author:nil date:nil

 However, this also removes the relevant info from the file metadata.
 I would prefer to somehow change the export template so that these
 lines aren't produced.  Anyone know if that's possible? Would I have
 to modify ox-odt.el directly -- and is that hard to do?  It looks like
 the relevant lines in that file are around 1488-1541.  I'm a little
 loathe to modify the code directly though, as I like to just git pull
 from the master branch...

 I realize I also don't quite understand how to preformat the header
 and footer of each page.  I feel like this should be possible, as at
 least some footer info is generated by default (page number in centre
 of footer).  But despite some inspection of both ox-odt.el and the
 styles.xml and content.xml of my exported document, I can't figure out
 how the content of the footer is determined.

With a page style applied, click on the footer, insert a pagenumber
field and save the document.  The resulting changes will be stored in
the styles.xml under

Do you see text:page-number down below?

  office:master-styles
style:master-page style:name=Standard style:page-layout-name=Mpm1
  style:footer
text:p text:style-name=MP1text:page-number 
text:select-page=current
/text:page-number/text:p
  /style:footer
/style:master-page

.
  /office:master-styles

Use ODT_STYLES_FILE and the newly created ott file to pick up new
header/footer configuration.


 Thanks again!
 Matt



Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Jambunathan K

Skip Collins skip.coll...@gmail.com writes:

 I started digging into this when I noticed some odd behavior while
 using ODT export. I think I am stuck using the older, buggier ox-odt
 and my setup is mixing two versions of org.

Your settings seem OK to me.

 1) an odt file is generated (good)

This is what matters!

 Explicitly setting org-export-backends, org-export-odt-schema-dir, and
 org-export-odt-styles-file in minimalinit.el has no effect. These
 variables seem to be superseded when ox-odt is invoked.

org-export-odt-*   = These are LEGACY settings. IGNORE THEM.
org-odt= Settings used by NEW exporter, ox-odt.el

 I immediately browse the ODT customization options showing that all
 variables are prefixed with org-export-odt-. 

You will see that 

M-x customize-group RET org-export-odt RET

shows variables with both the prefixes `org-export-odt-*' and
`org-odt-*'.  It is the later one that you should use.

Seeing both the old and new custom variables is NORMAL and nothing to
worry about.  You will similar behaviour for other exporters - latex and
html - as well.  This mixing up of LEGACY and NEW variables will go away
with Emacses that have new ox-odt.el. 

If the new variables are not seen do

M-x load-library RET ox-odt RET

Also remember to add odt to 

   M-x customize-variable RET org-export-backends RET


 2) These Emacs messages appear (bad):
 Debug (ox-odt): Searching for OpenDocument styles files...
 Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times]
 Debug (ox-odt): Trying /usr/local/share/emacs/etc/styles/...
 Debug (ox-odt): Trying /usr/local/share/emacs/site-lisp/org/etc/styles/...
 Debug (ox-odt): Trying /Applications/Emacs.app/Contents/Resources/etc/org/...

The *BEST* way to pick the right styles file is to set the
`org-odt-data-dir' directly.

I have the following setting in my .emacs

(setq org-odt-data-dir ~/src/org-mode/etc/)

OrgOdtStyles.xml is under styles/ subdir of that dir.

Modify the above variable according to your setting.

 The newer org, which I intend to completely supplant the version that
 comes with Emacs, was installed with prefix /usr/local/share using the
 'make up2' command.

make is what sets up `org-odt-data-dir' for you.  In your setting check
the value of `org-odt-data-dir' and make sure that the OrgOdtStyles.xml
file is available where the ODT exporter looks for it.

Ping Achim Gratz if you think make is not doing the right thing.

Btw, (I think) you will get the right behaviour if you do

make install

 Debug (ox-odt): Using styles under
 /Applications/Emacs.app/Contents/Resources/etc/org/

The above directory is `data-directory' of Vanilla Emacs.

 Debug (ox-odt): Searching for OpenDocument schema files...
 Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times]
 Debug (ox-odt): No OpenDocument schema files installed

Absence of schema files is just a normal warning.  A user need not
bother about it.





Re: [O] Changing page style in odt export

2013-08-31 Thread Jambunathan K
Vikas Rawal vikasli...@agrarianresearch.org writes:

 I have a wide table in my org document which I want on a separate
 landscape page in between the document. In my style file, I have a
 page style Landscape. Normally, in Libreoffice, I insert a page
 break with Landscape page style before the table, and another page
 break with Default page style after the table. How would one do it
 in org mode to get the same behaviour on exporting to odt?

Attached the wrong files.

LibreOffice takes some time to display the Table within a Text Box
within a Landscape page.  If you hover over the table a bit it becomes
visible.  This is the behaviour on LibreOffice 4.0.

-
Pagebreaks created via #+PAGEBREAK are a mere expedience.  These
create extraneous empty paragraphs which take up extra space.  A
typographer will chide you for resorting to such underhanded means to
create pagebreaks.

As an expedient, it has it's uses.  See `org-odt-special-block' for a
realistic example of how pagebreak can be to service.

#+ATTR_ODT: :style Text_20_body_20_bold
The right way to create pagebreaks is to create new styles -
custom or automatic - that set the before/after pagebreak
of an element (a paragraph, table etc).

For example, consider pagebreaks created as below.

Text in first page.

#+ATTR_ODT: :style OrgPageBreakDefault
#+PAGEBREAK:

This text goes in next page.

Now look at the page that is introduced with forced page
break.  You will realize that the first line of text in that
page is a bit displaced [fn:1] from other pages created by
LibreOffice.  A keen eye will definitely catch this
aberration.



Textboxes an be used for centering tables etc horizontally
and vertically within a page.

In the example below, a landscape and centered table is
created in the middle of what is essentially a portrait
document.

Leading text.

#+ATTR_ODT: :style OrgPageBreakLandscape
#+PAGEBREAK:

#+ATTR_ODT: :width 5 :style OrgPageImage :anchor page
#+BEGIN_TEXTBOX
| a  | b  |
| e  | f  |
#+END_TEXTBOX

#+ATTR_ODT: :style OrgPageBreakDefault
#+PAGEBREAK:

-

You can customize paragraphs - standalone one and those occurring
within lists - using `:style' and `:p-style' attributes.  Try out
the following example and see for yourself what you can achieve.

#+ATTR_ODT: :style OrgBulletedList :p-style Text_20_body_20_bold
1. N1
   1. N11
   2. N12
2. N2
   #+ATTR_ODT: :style OrgNumberedList :p-style Preformatted_20_Text
   * B21

   * B22
 - B221

   First paragraph.

   #+ATTR_ODT: :style OrgBibliographyList :p-style Text_20_body
   1. one
   2. two
   3. three

   #+ATTR_ODT: :style Text_20_body_20_indent
   Second paragraph.

 - B222
   * B23
3. N3

* Footnotes

[fn:1] Does anyone know how to clearout the extraneous space created
by the pagebreak?
--


 Vikas



parstyles-and-pagebreaks.odt
Description: application/vnd.oasis.opendocument.text


Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Jambunathan K


Skip Collins skip.coll...@gmail.com writes:

 After I do an ODT export, many ox-odt variables are duplicated with
 old variable names:
 | [-]-\ Group Org Export ODT
 |  |  |--- Option Org Odt Schema Dir
 |  |  |--- Option Org Odt Content Template File

Above ones come from NEW exporter, ox-odt.el

 |  |  |--- Option Org Export Odt Schema Dir
 |  |  |--- Option Org Export Odt Content Template File

Above ones come from LEGACY exporter.  Not used by ox-odt.el.

 I think this is a bug. Can someone confirm? 

Not a bug.  This is expected on Emacses that don't ship with ox-odt.el.
Currently none of the Emacses has ox-odt.el.  So everyone - even those
with the right installation - will see it.

This is confusing but the behaviour is expected and NOT BUGGY.

Talk to Org maintainers (may be Nicolas Goaziou) and request that *ALL*
the new exporters - latex, html, odt, blah - all use a new defgroup for
their variables.

 This is apparently caused by interference from an old version of
 org-mode that is bundled inside my OS X Emacs.app. How can I
 completely disable the old version?

It has nothing to do with mixed installation.  Seeing mixed variables
is normal and nothing to worry about.



[O] (error Stack overflow in equal)

2013-08-31 Thread Jambunathan K

Export the below file to ODT.  You will see the following stacktrace.

Debugger entered--Lisp error: (error Stack overflow in equal)
  gethash(((table (:type org :attr_odt (:style \GriddedTable\) :parent)) . 
0))
  org-export-table-cell-width((table-cell (:parent (table-row (:type standard 
 )
  org-odt-table-cell((table-cell ))
  org-export-data((table-cell ))

Just to remind you, the table is created on fly by manipulating the
tree.  Using an `eq' as predicate in `org-export-table-cell-width'
solves the problem.  I am not sure this would be the right fix though. 

The last I have seen/worked (which is long time back), there was no
caching.

ps: If you aren't seeing the above trace in org repo, just pull from my
repo.

Web URL: http://repo.or.cz/w/org-mode/org-kjn.git
Pull URL: http://repo.or.cz/r/org-mode/org-kjn.git

#+ATTR_ODT: :list-table t
- Row 1
  - 1.1
  - 1.2
  - 1.3
- Row 2
  - 2.1
  - 2.2
  - 2.3

#+ATTR_ODT: :list-table t
- Row 3
  - 3.1
  - 3.2
  - 3.3
- Row 4
  - 4.1
  - 4.2
  - 4.3


Re: [O] don't show author and date on odt export?

2013-08-31 Thread Jambunathan K
Matt Price mopto...@gmail.com writes:

 Hi,

 I'm trying to figure out how best to tell org not to display my name
 and the date at the top of the page when it exports document.
 Currently, it seems I can do htis by setting

 #+OPTIONS: author:nil date:nil

 However, this also removes the relevant info from the file metadata.
 I would prefer to somehow change the export template so that these
 lines aren't produced.  Anyone know if that's possible? Would I have
 to modify ox-odt.el directly -- and is that hard to do?  It looks like
 the relevant lines in that file are around 1488-1541.  I'm a little
 loathe to modify the code directly though, as I like to just git pull
 from the master branch...

I have difficulty grasping what you are saying here.  You are talking
about meta.xml and content.xml.

You want title and author in ... and don't want title and author in 

Better still, on what counts is the current arrangement unsatisfactory.
i.e., what is your use-case?

 Thanks!
 Matt



Re: [O] Carriage return in macro

2013-08-31 Thread Jambunathan K
Tim wiskey5al...@gmail.com writes:

 At Mon, 26 Aug 2013 12:16:53 +0200,
 Nicolas Goaziou wrote:
  Is there any way to have carriage returns within the text of the
  macro ?
 
 No, there isn't. Macros target small substitutions.
 
  I have already tried using the #+BEGIN_ODT...#+END_ODT construct, but that
  *really* messes with the format of the text within it.
 
 What do you mean? I don't know odt exporter very well, but contents of
 the block should be included as-is.
 
 If I put several lines into an #+BEGIN_ODT..#+END_ODT block, all whitespace 
 formating is lost.  A list like

 - List one
 - List two
 - List three 

 becomes

 - List one - List two - List three

 This is why I started puting the formatting on each line, and rather than 
 type all of the text:p... on every line, i created a macro.  Ill just stick
 with that i guess... still better than using a word processer ;-) 

 Thanks
 Tim

The attached document shows how you can attach custom styles to
standalone paragraphs and the paragraph within lists.  You can export
with and without ATTR_ODT lines and see whether it offers what you want.

The changes are available from my git repository at 

Web URL:  http://repo.or.cz/w/org-mode/org-kjn.git
Pull URL: http://repo.or.cz/r/org-mode/org-kjn.git

Note that the above URL is my own repository and not the official
Orgmode's.

I am CCing Nicolas.  Just in case...

 --


parstyles.odt
Description: application/vnd.oasis.opendocument.text
* COMMENT Simple paragraphs

Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

#+ATTR_ODT: :style Text_20_body_20_indent
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

#+ATTR_ODT: :style Text_20_body_20_bold
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

* COMMENT Paragraphs in Simple list

1. L1N1
2. L1N4
3. L1N5

#+ATTR_ODT: :p-style Text_20_body_20_bold
1. L1N1
2. L1N4
3. L1N5

* Paragraphs in Complex list

#+ATTR_ODT: :style OrgBulletedList :p-style Text_20_body_20_bold
1. N1
   1. N11
   2. N12
2. N2
   #+ATTR_ODT: :style OrgNumberedList :p-style Preformatted_20_Text
   * B21

   * B22
 - B221

   First paragraph.

   #+ATTR_ODT: :style OrgBibliographyList :p-style Text_20_body
   1. one
   2. two
   3. three

   #+ATTR_ODT: :style Text_20_body_20_indent
   Second paragraph.

 - B222
   * B23
3. N3




Re: [O] Changing page style in odt export

2013-08-31 Thread Jambunathan K
Vikas Rawal vikasli...@agrarianresearch.org writes:

 I have a wide table in my org document which I want on a separate
 landscape page in between the document. In my style file, I have a
 page style Landscape. Normally, in Libreoffice, I insert a page
 break with Landscape page style before the table, and another page
 break with Default page style after the table. How would one do it
 in org mode to get the same behaviour on exporting to odt?

 Vikas

The attached document should be self-explanatory.  Pull my changes from

Web URL: http://repo.or.cz/w/org-mode/org-kjn.git
Pull URL: http://repo.or.cz/r/org-mode/org-kjn.git

Note that the above URL is NOT orgmode.org URL.

---

* COMMENT Simple paragraphs

Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

#+ATTR_ODT: :style Text_20_body_20_indent
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

#+ATTR_ODT: :style Text_20_body_20_bold
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

* COMMENT Paragraphs in Simple list

1. L1N1
2. L1N4
3. L1N5

#+ATTR_ODT: :p-style Text_20_body_20_bold
1. L1N1
2. L1N4
3. L1N5

* Paragraphs in Complex list

#+ATTR_ODT: :style OrgBulletedList :p-style Text_20_body_20_bold
1. N1
   1. N11
   2. N12
2. N2
   #+ATTR_ODT: :style OrgNumberedList :p-style Preformatted_20_Text
   * B21

   * B22
 - B221

   First paragraph.

   #+ATTR_ODT: :style OrgBibliographyList :p-style Text_20_body
   1. one
   2. two
   3. three

   #+ATTR_ODT: :style Text_20_body_20_indent
   Second paragraph.

 - B222
   * B23
3. N3



---



parstyles.odt
Description: application/vnd.oasis.opendocument.text


Re: [O] How to set C-o back to open-line?

2013-08-31 Thread Carsten Dominik
Hi Christopher,

Would you like to prepare a patch to this effect?

- Carsten

On 17.5.2013, at 00:38, Christopher Allan Webber cweb...@dustycloud.org wrote:

 I really hate org-open-line... I can see why people might want it, but
 it's messed up my workflow.  I'd like to set C-o back.
 
 However, I have no idea what org-defkey is doing, but I expected this to
 work:
 
  (define-key org-mode-map (kbd C-o) 'open-line)
 
 it isn't working!
 
 How to get the standard-ol-open-line behavior back?
 




Re: [O] CDLaTeX (4.0) not working in Org mode (8.0.3)?

2013-08-31 Thread Carsten Dominik

On 20.5.2013, at 10:59, Omid omidl...@gmail.com wrote:

 Thanks. I confirm that this in fact solves the problem.


This is also fixed in CDLaTeX 4.6 at 
http://staff.science.uva.nl/~dominik/Tools/cdlatex

- Carsten

 
 
 On Mon, May 20, 2013 at 3:57 AM, Longmin WANG longminw...@gmail.com wrote:
 
 
 On Mon, May 20, 2013 at 11:14 AM, Omid omidl...@gmail.com wrote:
 I see the following strange behavior from Org-CDLaTeX (OCDL).
 
 Outside a * heading it works. Inside a * heading (or anything under that) it 
 does NOT work. What can be causing this?
 
 Here is a minimal example:
 
 # Org CDLaTeX (OCDL) works here (at least does not issue an error)
 \[
 x^2
 \]
 
 * heading
 ** subheading
# Org CDLaTeX (OCDL) does NOT work here. Pressing ^ (caret) or _
# (underscore) causes the following error to appear in *Messages*
# buffer:
# 
# call-interactively: Symbol's value as variable is void:
# last-command-char
\[
x
\]
# Same error here.
\begin{align*}
x
\end{align*}
 
 
 last-command-char should be changed to last-command-event in cdlatex.el. 
 
 -- 
 Longmin Wang (http://wanglm.droppages.com/)
 Nankai University, 94 Weijin Road, Tianjin 300071, P. R. China
 



Re: [O] Switch org-agenda-get-* defuns to operate on date ranges

2013-08-31 Thread Carsten Dominik
Hi Jörg,

I think it would be feasible to write such a modification.

- Carsten

On 20.5.2013, at 15:36, Jonas Hörsch co...@online.de wrote:

 hello everyone,
 
 i've just started to use calfw to get a nice calendar-like display of my
 agenda. unfortunately i was slighly dismayed at the build-up speed
 easily exceeding a few seconds on my not so packed schedule. profiling
 into the code i found that the problem mainly is:
 
 there exists only the possibility to retrieve agenda data for one day
 day, org-agenda.el's org-agenda-get-day-entries, rather than for a range
 of days. this makes it necessary to loop over --get-day-entries to collect
 all entries to show in the monthly calendar.
 
 --get-day-entries for its part has to parse (basically regex-search
 through) the respective org agenda file completely on each invocation;
 effectively done by org-agenda-get-{todos,blocks,sexps,...}.
 
 i imagine it is quite feasible to implement
 (defun org-agenda-get-entries (file beg end rest args) ...)
 to sift through FILE but once and return an alist like
 ((date . (entry1 entry2 ..)) ..)
 containing all entries between dates BEG and END, inclusive.
 
 neglecting the extra overhead for sorting entries into the alist, this
 promises to speed up typical weekly agenda collection by a factor of 7
 and calfw even by a factor of approx. 30, shouldn't it?
 
 before i start a local branch to try myself on this refactoring work,
 i'd welcome a few comments, why i should be likely to fail or succeed!
 
 cheers,
 jonas
 
 




Re: [O] Counter-intuitive behavior of org-insert-heading

2013-08-31 Thread Carsten Dominik
Hi Matt,

is this problem fixed now, or still present?

Thanks!

- Carsten

On 20.5.2013, at 18:07, Matt Lundin m...@imapmail.org wrote:

 The following commit introduced a bug in org-insert-heading.
 
 commit 3449c6d001b8d261b104bc9dd42bf1290d74bc0b
 Author: Bastien Guerry b...@altern.org
 Date:   Thu Apr 11 00:35:31 2013 +0200
 
 org.el (org-insert-heading): Convert the current line into a headline
 
 * org.el (org-insert-heading-respect-content): Fix docstring.
 (org-insert-heading): When in a non-empty non-headline line,
 convert the current line into a headline.
 
 Thanks to Bernt Hansen for reporting this issue
 
 I have org-insert-heading-respect-content set to nil.
 
 Previously, when hit M-Ret at the end of a line, a new headline was
 created on the next line. Pressing return at the end of the line
 containing the date would result in a new headline, as expected. E.g.,
 
 * A heading
  [2013-05-20 Mon 11:02]
 
 ...would become
 
 * A heading
  [2013-05-20 Mon 11:02]
 * 
 
 ... with the cursor placed after the new asterisk
 
 And if the cursor was at the end of a folded headline, such as.
 
 * A heading...
 
 ...a new heading would be created as expected...
 
 * A heading...
 *
 
 With the commit above, however, the following happens when I hit the
 cursor at the end of the line:
 
 * A heading
 * [2013-05-20 Mon 11:02]
 
 And with a folded headline, the same thing happens. When the cursor is 
 placed after the invisible section and I hit M-Ret:
 
 * A heading...
 
 ...unfolds and becomes...
 
 * A heading
 * [2013-05-20 Mon 11:02]
 
 Best,
 Matt
 
 




Re: [O] faster agenda with properties support disabled (no org-refresh-properties)

2013-08-31 Thread Bastien
Hi all,

Carsten Dominik carsten.domi...@gmail.com writes:

 I have implemented a different version of the patch.  Please take a look at 
 the new variable
 org-agenda-ignore-drawer-properties.

Great -- could someone document this on this page?
http://orgmode.org/worg/agenda-optimization.html

Thanks!

-- 
 Bastien



Re: [O] [PATCH] org.el: Don't flyspell check within source code blocks

2013-08-31 Thread Carsten Dominik

On 25.5.2013, at 09:17, Trevor Murphy trevor.m.mur...@gmail.com wrote:

 
 Hi, list.
 
 I recently started using flyspell, but I wasn't pleased with the spell
 checking in my source code blocks.  After digging a bit for a
 solution, I found a post to the list with a nice solution[0].
 However, it seems no patch was ever submitted.  So, here goes.
 
 If there's a deeper reason this part of the code was never changed,
 please enlighten me.  I didn't see any further mailing list
 discussion, so I assumed it was still fair game.

Hi Trevor,

I would be worried that this has noticeable impact in Emacs performance during 
normal typing.  Are you a fst typist?  Have you noticed anything in this 
direction?

Thanks!

- Carsten


 
 Thanks,
 
 Trevor
 
 [0]: http://lists.gnu.org/archive/html/emacs-orgmode/2012-12/msg00764.html
 




Re: [O] [Attached] PDF documention for new exporter

2013-08-31 Thread Carsten Dominik
Hi THorsten,

have you made this available on Worg?

Thanks!

- Carsten

On 18.6.2013, at 10:58, Thorsten Jolitz tjol...@gmail.com wrote:

 
 Hi List, 
 
 I extracted the documentation parts of the core exporter libraries and
 converted them to pdf, so they might serve as an detailled reference for
 the new exporter, much more detailled than any tutorial could be (the pdf's
 are still impressive in size, some 50 and 80 pages). 
 
 ,
 | DISCLAIMER:
 | 
 | I did not go out of my way to produce these docs accurately and
 | complete, I just used 'outorg' to export to LaTeX and then ran some
 | replace commands and keyboard-macros on the .tex files. Things might
 | have gone wrong in some places, the resulting documents might be
 | incomplete or otherwise defective. But they might still be useful, so I
 | offer them here. When in doubt always refer to `ox.el' and
 | `org-elements.el' as reference.
 `
 
 org-element.pdfox.pdf
 
 -- 
 cheers,
 Thorsten
 




Re: [O] [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet

2013-08-31 Thread Carsten Dominik
Hi Peter,

Please remind me then.

Thank you!

- Carsten

On 20.6.2013, at 13:52, Peter Münster pmli...@free.fr wrote:

 On Thu, Jun 20 2013, Carsten Dominik wrote:
 
 The easiest solution is to simply do nothing, until Org drops support
 for Emacs 24.2 and earlier. The 'cl' library will be shipped with Emacs
 for a long time.
 
 BTW, which Emacs versions does Org support? Is this documented anywhere?
 
 No, but loosely, we have tried to support the current major version (i.e. 
 24) and
 the previous major version (i.e. 23)
 
 All right. Please apply this patch only later, when emacs 25 is out.
 
 -- 
   Peter
 
 




Re: [O] Bug: Messaging when moving in the agenda [7.9.2 (7.9.2-GNU-Emacs-24-3 @ /usr/share/emacs/24.2.50/lisp/org/)]

2013-08-31 Thread Carsten Dominik

On 6.8.2013, at 13:32, Michael Heerdegen michael_heerde...@web.de wrote:

 Hello,
 
 When I move around in the *Org Agenda* with up and down, the current
 outline path is displayed in the echo area, which is good.
 
 However, what is displayed gets also copied in the *Messages* buffer,
 which is not helpful, but clutters *Messages* with useless noise.
 
 So, IMHO `org-display-outline-path' should still display its stuff in
 the echo area, but prevent logging in *Messages*.  AFAIK, the way to do
 this is to bind `message-log-max' to nil.
 
 Can we please try to make some progress here?  I don't want to suggest a
 patch because I don't know the org code base well, but binding
 `message-log-max' to nil at one or two location should totally suffice.
 Who can help?

Mi Michael,

I believe I have done it in the right place now, please confirm.

Thanks

- Carsten

 
 
 Regards,
 
 Michael.
 
 




Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Achim Gratz
Carsten Dominik writes:
 can someone please summarize this discussion for me and tell me what action 
 is required?

There is nothing to do here.  The legacy defcustoms are built into
Emacs and are not easy to remove as there is no official interface to do
this.  I have code that tries to do clean things up, but it may have
unwanted side-effects depending on how the startup files are organized.
Eric Abrahamsen wanted to check some things but I haven't heard back.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] [patch][ox-latex] context-aware subscript

2013-08-31 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 I've just enclosed a quick patch (as in doesn't contain proper commit
 msg), but it's basically the previous patch minus the removal of \text
 in math plus some quick checks towards potential nasty filters.

 It works with the following test file, but let me know about more
 hair-pulling test cases, and/or filters.

Thanks for the patch. Here are a few comments.

 filter replace all$\beta_{\text{}}$\texttimes{}$_{\text{}}$   \\

We might be able to handle it more nicely, i.e. by skipping \text when
contents are empty.

 + (prev (org-export-get-previous-element entity info))
 + (next (org-export-get-next-element entity info))
 + (no-post-blanks-p (= (or (org-element-property :post-blank entity) 1) 
 0))
 + (no-pre-blanks-p (= (or (org-element-property :post-blank
 +
 (org-export-get-previous-element
 + entity info)) 1) 0))

A nil :post-blank property means 0, not 1. Also, you don't re-use PREV
in NO-PRE-BLANKS-P.

 + (scripts '(subscript superscript)))
 +(if (not (org-element-property :latex-math-p entity)) ent
 +  (concat
 +   (if (and no-pre-blanks-p
 + (memq (org-element-type prev) scripts)
 + (not (eq (org-export-data prev info) )))
 + $)
 +   ent
 +   (if (and no-post-blanks-p
 + (memq (org-element-type next) scripts)
 + (not (eq (org-export-data next info) )))
 + $)

I think this is problematic: if an entity needs to export both the
previous and the next object, what happens when we have two consecutive
entities? An infloop?

This is the difficult part of the problem.

 + (not (org-element-property :latex-math-p prev))

Sure, but I'd rather make a stricter check and also test PREV's type.


Regards,

-- 
Nicolas Goaziou



Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Christian Moe


 There is nothing to do here.  The legacy defcustoms are built into
 Emacs and are not easy to remove as there is no official interface to do
 this.  I have code that tries to do clean things up, but it may have
 unwanted side-effects depending on how the startup files are organized.

Hi, Achim

Could you give a pointer to your code? I'd like to try it.

Yours,
Christian






Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Carsten Dominik

On 31.8.2013, at 09:26, Achim Gratz strom...@nexgo.de wrote:

 Carsten Dominik writes:
 can someone please summarize this discussion for me and tell me what action 
 is required?
 
 There is nothing to do here.  The legacy defcustoms are built into
 Emacs and are not easy to remove as there is no official interface to do
 this.  I have code that tries to do clean things up, but it may have
 unwanted side-effects depending on how the startup files are organized.
 Eric Abrahamsen wanted to check some things but I haven't heard back.

Thank you very much Achim.

- Carsten

 
 
 Regards,
 Achim.
 -- 
 +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+
 
 SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
 http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
 
 




Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Jambunathan K

Carsten Dominik carsten.domi...@gmail.com writes:

 On 31.8.2013, at 09:26, Achim Gratz strom...@nexgo.de wrote:

 There is nothing to do here.

The new variables can and must be put in to a new groups.  

 Thank you very much Achim.

If you cannot kill someone just ostracize them.  Segregation CAN and
MUST be done.

Jambunathan K.



Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Jambunathan K

Best way to explain is with an example:

1. emacs -Q
2. eval this

(add-to-list 'load-path ~/src/org-mode/lisp/)
(require 'org-loaddefs)

  Ensure that there is org-loaddefs available from git path.

3. M-x load-library ox-odt.el

4. Ensure  (featurep 'org-odt) reports nothing.

5. M-x customize-group  org-export-odt.

6. See both legacy (org-export-odt-*) and new variables (org-odt-*)
being reported.



s/odt/latex/.  The result will be the same



What needs to happen:

Put new things in new groups.  I suggest org-export-ng or org-export-new
prefix for new exporter and backends.

Both the backend groups and the parent groups.



Long winded explanation:
---

Both the legacy and new exporters, declare SAME :group
'org-export-backend for but DIFFERENT user variables.  Similar looking
variables is NOT guaranteed to have same functionality.

Vanialla Emacs somehow tracks the custom variables and it's group
/even if/ legacy exporters are NOT in the load path.  So when new
exporter is loaded, the group displays BOTH the LEGACY and NEW
variables.

org-odt.el uses

(defgroup org-export-odt nil
  Options specific for ODT export of Org-mode files.
  :tag Org Export ODT
  :group 'org-export
  :version 24.1)


(defcustom org-export-odt-content-template-file nil
  Template file for \content.xml\.
The exporter embeds the exported content just before
\/office:text\ element.

If unspecified, the file named \OrgOdtContentTemplate.xml\
under `org-odt-styles-dir' is used.
  :type 'file
  :group 'org-export-odt
  :version 24.1)
)


ox-odt.el uses


(defgroup org-export-odt nil
  Options for exporting Org mode files to ODT.
  :tag Org Export ODT
  :group 'org-export)


(defcustom org-odt-content-template-file nil
  Template file for \content.xml\.
The exporter embeds the exported content just before
\/office:text\ element.

If unspecified, the file named \OrgOdtContentTemplate.xml\
under `org-odt-styles-dir' is used.
  :type '(choice (const nil)
 (file))
  :group 'org-export-odt
  :version 24.1)


Carsten Dominik carsten.domi...@gmail.com writes:

 Hi,

 can someone please summarize this discussion for me and tell me what action 
 is required?

 Thank you!

 - Carsten

 On 29.8.2013, at 20:25, Skip Collins skip.coll...@gmail.com wrote:

 Jambunathan K kjambunat...@gmail.com wrote:
 After I do an ODT export, many ox-odt variables are duplicated with
 old variable names:
| [-]-\ Group Org Export ODT
|  |  |--- Option Org Odt Schema Dir
|  |  |--- Option Org Odt Content Template File
 
 Above ones come from NEW exporter, ox-odt.el
 
|  |  |--- Option Org Export Odt Schema Dir
|  |  |--- Option Org Export Odt Content Template File
 
 Above ones come from LEGACY exporter.  Not used by ox-odt.el.
 
 This is confusing but the behaviour is expected and NOT BUGGY.
 
 Thank you for clarifying a confusing situation. I am not sure why I
 assumed that the org-export-odt variables were the newer ones.
 
 Suggestion for maintainers: a new, separate customization group, with
 appropriate pointers in the documentation, would be helpful.
 



Re: [O] Carriage return in macro

2013-08-31 Thread Jambunathan K

Nicolas

In the context of the example below (i.e., the way #+ATTR_ODT are used
/within/ the list) is it fair to say this:

A #+ATTR_ODT: can be attached only to a plain-list - Visually they
come before the first item of the top-level list or a nested list.

Using an #+ATTR_ODT line before a second or subsequent item will
result in splitting of the original list.

I just want to confirm my understanding of the /existing/ behaviour so
that I can extract maximum juice out of ox.el.

To avoid confusion: Opinions surrounding how comments and meta lines
influence the list structure doesn't bother me one way or the other.

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

 #+ATTR_ODT: :style OrgBulletedList :p-style Text_20_body_20_bold
 1. N1
1. N11
2. N12
 2. N2
#+ATTR_ODT: :style OrgNumberedList :p-style Preformatted_20_Text
* B21

* B22
  - B221

First paragraph.

#+ATTR_ODT: :style OrgBibliographyList :p-style Text_20_body
1. one
2. two
3. three

#+ATTR_ODT: :style Text_20_body_20_indent
Second paragraph.

  - B222
* B23
 3. N3



Re: [O] Carriage return in macro

2013-08-31 Thread Nicolas Goaziou
Hello,

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

 In the context of the example below (i.e., the way #+ATTR_ODT are used
 /within/ the list) is it fair to say this:

 A #+ATTR_ODT: can be attached only to a plain-list - Visually they
 come before the first item of the top-level list or a nested list.

 Using an #+ATTR_ODT line before a second or subsequent item will
 result in splitting of the original list.

 I just want to confirm my understanding of the /existing/ behaviour so
 that I can extract maximum juice out of ox.el.

That's correct: items cannot get affiliated keywords (see list of
exceptions at line 32 in org-element.el).


Regards,

-- 
Nicolas Goaziou



Re: [O] Very minor bug in undo applied to org table

2013-08-31 Thread Carsten Dominik

On 1.7.2013, at 19:24, Paul Stansell paulstans...@gmail.com wrote:

 Hello,
 
 This seems like a very minor bug, but I thought I'd report it anyway
 in case it has wider ramifications that I'm unaware of.
 
 Create an org file with the following lines:
 
 | 1 |
 #+TBLFM: $1=2
 
 Open it and type C-c C-c on the TBLFM line.  This replaces the '1' in
 the table with a '2'.  Now type C-_ (for undo).  Not only does the
 '2' revert to a '1', but a second line reading '#+TBLFM: $1=2' is
 inserted directly under the first.  An second C-_ removes this second
 TBLFM line.

Hi Paul,

this just means that two separate editing event get into the undo list.  I 
don't think
I know how to fix it.

- Carsten

 
 Regards,
 
 Paul
 
 PS. I'm using Emacs 24.2.1 and Org-mode release_8.0.3-331-gf7e6f1 and
 I tested with the minimal org-mode set-up from
 http://orgmode.org/manual/Feedback.html.
 




Re: [O] [PATCH] ox: add Simplified Chinese translations for `org-export-dictionary'

2013-08-31 Thread Carsten Dominik
Hi,

It seems that this has been applied.

- Carsten

On 2.7.2013, at 08:17, feng shu tuma...@gmail.com wrote:

 
 0001-ox-add-Simplified-Chinese-translations-for-org-expor.patch




[O] ATTENTION: Incompatible change

2013-08-31 Thread Carsten Dominik
Hi all,

I have now replaced both org-mac-message.el and org-mac-link-grabber.el with 
org-mac-link.el.  So after the next pull, you will have to change your setup to 
use this module instead of the others and use the new commands as well.  I 
would appreciate if you your try this soon, so that we can fix issue before the 
next release (very soon).

Thank you, and in particular thanks to Anthony Lander for doing the work.

- Carsten

P.S. Anthony, you promised to update the documentation.  It would be great if 
you could do that now.

Thank you!





Re: [O] [PATCH] Org attach: use vc to find the git dir if it exists

2013-08-31 Thread Carsten Dominik
Applied, thank you Remi.

- Carsten

On 12.8.2013, at 15:28, Rémi Vanicat vani...@debian.org wrote:

 Org attach use to fail to commit the attached file in git or git annex
 when the .git repository is not in the data sub-directory. 
 
 This new code will use vc-git to find the .git file, and from this do
 what is needed for committing file into git or git annex.
 
 ---
 lisp/org-attach.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
 
 diff --git a/lisp/org-attach.el b/lisp/org-attach.el
 index faefa6b..9bf3cda 100644
 --- a/lisp/org-attach.el
 +++ b/lisp/org-attach.el
 @@ -261,14 +261,15 @@ the ATTACH_DIR property) their own attachment 
 directory.
 (defun org-attach-commit ()
   Commit changes to git if `org-attach-directory' is properly initialized.
 This checks for the existence of a \.git\ directory in that directory.
 -  (let ((dir (expand-file-name org-attach-directory))
 - (changes 0))
 -(when (file-exists-p (expand-file-name .git dir))
 +  (let* ((dir (expand-file-name org-attach-directory))
 +  (git-dir (vc-git-root dir))
 +  (changes 0))
 +(when git-dir
   (with-temp-buffer
   (cd dir)
   (let ((have-annex
  (and org-attach-git-annex-cutoff
 - (file-exists-p (expand-file-name .git/annex dir)
 + (file-exists-p (expand-file-name annex git-dir)
 (dolist (new-or-modified
  (split-string
   (shell-command-to-string
 -- 
 1.8.4.rc2
 
 
 




Re: [O] [patch][ox-latex] context-aware subscript

2013-08-31 Thread Rasmus
Hi,

 Thanks for the patch. Here are a few comments.

Thanks for the comments.

 filter replace all$\beta_{\text{}}$\texttimes{}$_{\text{}}$   \\

 We might be able to handle it more nicely, i.e. by skipping \text when
 contents are empty.

Right, these should be removed due to spacing issues, it seems.
However, in this case the change is induced by a filter.  As such, Ox
doesn't know the final output when in the subscript function.  It's
not easy to predict the outcome of a filter before it's been applied.

What I do in the patch is that I apply the filters within the
function.  I don't like this approach as the doc says that filters are
applied ex post so it seems like cheating...  Also, filters using a
regexp with \text{whatever} wouldn't work.

So I'm not too optimistic about this particular apporach.

 +(prev (org-export-get-previous-element entity info))
 +(next (org-export-get-next-element entity info))
 +(no-post-blanks-p (= (or (org-element-property :post-blank entity) 1) 
 0))
 +(no-pre-blanks-p (= (or (org-element-property :post-blank
 +   
 (org-export-get-previous-element
 +entity info)) 1) 0))

 A nil :post-blank property means 0, not 1. Also, you don't re-use PREV
 in NO-PRE-BLANKS-P.

Right.  I wanted to check for the case where there is no next/previous
element.  But I was wrong.  Thanks.

 +(scripts '(subscript superscript)))
 +(if (not (org-element-property :latex-math-p entity)) ent
 +  (concat
 +   (if (and no-pre-blanks-p
 +(memq (org-element-type prev) scripts)
 +(not (eq (org-export-data prev info) )))
 +$)
 +   ent
 +   (if (and no-post-blanks-p
 +(memq (org-element-type next) scripts)
 +(not (eq (org-export-data next info) )))
 +$)

 I think this is problematic: if an entity needs to export both the
 previous and the next object, what happens when we have two consecutive
 entities? An infloop?

I agree, but I haven't been able to cause any nasty behavior. I've
probably neglected some case.  These works fine

  1. \alpha\beta_t : \alpha is not a subscript
  2. \alpha\beta_\xi\nu : runs OK recursively. 

On 2.: on my system I've tried with many entities (around 500).  It
works, but obviously it's slow due to the recursiveness.  This is very
nasty.  I don't know if some other mechanism can be derived, tho. . .


 +(not (org-element-property :latex-math-p prev))

 Sure, but I'd rather make a stricter check and also test PREV's type.

OK.

–Rasmus


Test file

#+BEGIN_SRC Org
* filters  :noexport:

#+begin_src emacs-lisp
  (defun test-filter (script backend info)
(when (org-export-derived-backend-p backend 'latex)
  (if  (string-match a script)  script)))

  (defun test-filter2 (script backend info)
(when (org-export-derived-backend-p backend 'latex)
  (replace-regexp-in-string zz  script)))

  (add-to-list 'org-export-filter-subscript-functions
 'test-filter)
  (add-to-list 'org-export-filter-subscript-functions
 'test-filter2)

#+end_src

#+RESULTS:
| test-filter2 | test-filter |

* test 1

|  | mathp | text   |
|--+---+|
| merge maybe  | \alpha\beta_t | \alpha\times_t |
| long merge maybe | \alpha\beta_tv\xi | \alpha\times_tv\xi |
| filter drop  | \alpha\beta_abc   | \alpha\times_abc   |
| filter replace all   | \alpha\beta_zz| \alpha\times_zz|
| filter replace parts | \alpha\beta_zz\xi | \alpha\times_zz\xi |
#+END_SRC

Approximate output

  mathptext   
   
=
merge maybe   $\alpha$$\beta_{\text{t}}$   
$\alpha$\texttimes{}$_{\text{t}}$ 
long merge maybe  $\alpha$$\beta_{\text{tv}\xi}$   
$\alpha$\texttimes{}$_{\text{tv}\xi}$
filter drop   $\alpha$$\beta$  $\alpha$\texttimes{}   
   
filter replace all$\alpha$$\beta$  $\alpha$\texttimes{}   
   
filter replace parts  $\alpha$$\beta_{\xi}$
$\alpha$\texttimes{}$_{\xi}$  

From ebb7eb32b8ff18b9ff2c9d8686df1cdc6ed28bfb Mon Sep 17 00:00:00 2001
From: rasmus ras...@gmx.us
Date: Thu, 29 Aug 2013 12:18:00 +0200
Subject: [PATCH] maybe merge subscript and mathp entity with some checks

---
 lisp/ox-latex.el | 51 +++
 1 file changed, 39 insertions(+), 12 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 1fe918a..cc8ac80 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1234,9 +1234,26 @@ holding contextual information.  See `org-export-data'.
   Transcode an 

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Carsten Dominik

On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 
 Hi,
 
 I have rewritten org-insert-heading, because it had become an unmaintainable 
 beast.
 Please follow up in this thread if you find problems with the new 
 implementation.
 Very likely there will be bugs, but now I am at least confident they can be 
 fixed.
 
 - Carsten
 
 Awesome! Thanks very much for doing this. Will report back with bugs.

I take it none have been found?

- Carsten

 
 E
 
 




Re: [O] org-attach should detect git also higher in the filesystem

2013-08-31 Thread Carsten Dominik
Hi Thomas,

I think this has been fixed today with 

http://orgmode.org/w/org-mode.git?p=org-mode.git;a=commit;h=2c38c3acc0b5d1cb3bb26f45829d711bb6f4009c

Could you please check if this is correct?

Thank you.

- Carsten

On 5.8.2013, at 23:58, Thomas Koch tho...@koch.ro wrote:

 Hi,
 
 I tested org-attach with the org file being inside a git repo. I observed 
 that 
 the auto-commit feature of org-attach seems to work only if the data 
 directory 
 is the root of a git repo (detected by looking for a .git folder in the data 
 folder).
 
 I'd like however to have the org file in the git repo too and the data folder 
 being a sub-folder of the git repo. Actually I'd also like to use git-annex 
 here.
 
 Some options of git rev-parse might be helpful here instead of coding the 
 repo 
 detection check by hand in elisp: 
 
 --show-toplevel
   Show the absolute path of the top-level directory.
 
 --is-inside-work-tree
   When the current working directory is inside the work tree of the 
 repository print true, otherwise false.
 
 What do you think?
 
 Regards,
 
 Thomas Koch, http://www.koch.ro
 



Re: [O] mac-message for Growl 2

2013-08-31 Thread Carsten Dominik
Hi Iain,

org-mac-message has just been replaced by org-mac-link.
You you please re-evaluate if your problem still exists (probably yes - if so, 
please provide a new patch).

Thank you!

- Carsten

On 4.8.2013, at 22:39, Iain Houston m...@iainhouston.me wrote:

 I encountered a few problems with org-mac-mail bundled with emacs 24.3.1; 
 some errors interfacing with Growl (2.1) so the patch below works for me and 
 I wondered whether it would be of use to anyone else.
 
 I adapted the insertion of flagged mail to look at all active mail accounts 
 rather than having to name any particular one.
 
 This is how I use org-mac-message: and below is the patch.
 
 (require 'org)
 (load org-mac-message)
 (global-set-key [(shift f10)] (lambda() (interactive)
(progn
  (find-file-noselect 
 ~/Dropbox/org/refile.org)
  (org-mac-message-insert-flagged refile.org 
 Flagged mail
 
 
 diff --git a/org-mac-message.el b/org-mac-message.el
 index 5df68f5..be2a654 100644
 --- a/org-mac-message.el
 +++ b/org-mac-message.el
 @@ -95,86 +95,89 @@ This will use the command `open' with the message URL.
 return theLinkList as string\n
 end tell)))
 
 -(defun as-get-flagged-mail ()
 -  AppleScript to create links to flagged messages in Mail.app.
 -  (do-applescript
 -   (concat
 -;; Is Growl installed?
 -tell application \System Events\\n
 -set growlHelpers to the name of every process whose creator type 
 contains \GRRR\\n
 -if (count of growlHelpers)  0 then\n
 -set growlHelperApp to item 1 of growlHelpers\n
 -else\n
 -set growlHelperApp to \\\n
 -end if\n
 -end tell\n
 -
 -;; Get links
 -tell application \Mail\\n
 -set theMailboxes to every mailbox of account \ org-mac-mail-account 
 \\n
 -set theLinkList to {}\n
 -repeat with aMailbox in theMailboxes\n
 -set theSelection to (every message in aMailbox whose flagged status = 
 true)\n
 -repeat with theMessage in theSelection\n
 -set theID to message id of theMessage\n
 -set theSubject to subject of theMessage\n
 -set theLink to \message://\  theID  \::split::\  theSubject  
 \\n\\n
 -copy theLink to end of theLinkList\n
 -
 -;; Report progress through Growl
 -;; This double tell idiom is described in detail at
 -;; http://macscripter.net/viewtopic.php?id=24570 The
 -;; script compiler needs static knowledge of the
 -;; growlHelperApp.  Hmm, since we're compiling
 -;; on-the-fly here, this is likely to be way less
 -;; portable than I'd hoped.  It'll work when the name
 -;; is still GrowlHelperApp, though.
 -if growlHelperApp is not \\ then\n
 -tell application \GrowlHelperApp\\n
 -tell application growlHelperApp\n
 -set the allNotificationsList to {\FlaggedMail\}\n
 -set the enabledNotificationsList to allNotificationsList\n
 -register as application \FlaggedMail\ all notifications 
 allNotificationsList default notifications enabledNotificationsList icon of 
 application \Mail\\n
 -notify with name \FlaggedMail\ title \Importing flagged message\ 
 description theSubject application name \FlaggedMail\\n
 -end tell\n
 -end tell\n
 -end if\n
 -end repeat\n
 -end repeat\n
 -return theLinkList as string\n
 -end tell)))
 +(defun  as-get-flagged-mail ()
 + AppleScript to create links to flagged messages in all Mail.app 
 accounts
 + ;; Revised use of Growl interface and no need for variable 
 org-mac-mail-account
 + (do-applescript
 +  (concat
 +   ;; Is Growl running? Use API as recommended at 
 http://growl.info/documentation/applescript-support.php 
 +   tell application \System Events\\n
 +   set growlIsRunning to (count of (every process whose bundle 
 identifier is \com.Growl.GrowlHelperApp\))  0\n
 +   end tell\n
 +
 +   set theLinkList to {}\n
 +   set isNotRegisteredToGrowl to true\n
 +   tell application \Mail\\n
 +   set theAccountList to the name of every account\n
 +   repeat with theMailAccount in theAccountList\n
 +   set theMailboxes to every mailbox of account theMailAccount\n
 +   repeat with aMailbox in theMailboxes\n
 +   set theSelection to (every message in aMailbox whose flagged status 
 = true)\n
 +   repeat with theMessage in theSelection\n
 +   set theID to message id of theMessage\n
 +   set theSubject to subject of theMessage\n
 +   set theLink to \message://\  theID  \::split::\  theSubject  
 \\n\\n
 +   copy theLink to end of theLinkList\n
 +   
 +   if growlIsRunning then\n
 +   tell application id \com.Growl.GrowlHelperApp\\n
 +   if isNotRegisteredToGrowl then\n
 +   set the allNotificationsList to {\FlaggedMail\}\n
 +   set the enabledNotificationsList to allNotificationsList\n
 +   register as application \FlaggedMail\ all notifications 
 allNotificationsList default 

Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Nicolas Goaziou
Hello,

Carsten Dominik carsten.domi...@gmail.com writes:

 On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 
 Hi,
 
 I have rewritten org-insert-heading, because it had become an 
 unmaintainable beast.
 Please follow up in this thread if you find problems with the new 
 implementation.
 Very likely there will be bugs, but now I am at least confident they can be 
 fixed.
 
 - Carsten
 
 Awesome! Thanks very much for doing this. Will report back with bugs.

 I take it none have been found?

Not really a bug, but I find some behaviour surprising: when at a the
beginning of a regular text line, there is no way to create a headline
just above it. In the following example:

  XCursor is at X

Neither M-RET, C-u M-RET, C-RET nor C-u C-RET can do it. Is it intended?

Also in this case, I think C-RET should create the new headline _after_
the subtree, since that's its whole point anyway, AFAIU.

Eventually, it seems that behaviour towards empty lines is a bit
unpredictable. In the following example, M-RET will be behave
differently on each blank line between Paragraph and H2. C-RET will be
consistent. Note: I have `auto' as value for `heading' key in
`org-blank-before-new-entry'.

  * H1

Paragraph



  * H2

IMO, using M-RET and C-RET should be as smooth an experience as
possible.

I also suggest to write function specifications as tests in test-org.el.


Regards,

-- 
Nicolas Goaziou



Re: [O] koma letter exporter: changing the priority of options

2013-08-31 Thread Alan Schmitt
Hi Rasmus,

alan.schm...@polytechnique.org writes:

 alan.schm...@polytechnique.org writes:

 I tried to fix it in the updated attached patch. I set a default value
 of foldmarks-not-set to the predicate that detects if it is set in the
 file, then I compare its contents. This assumes that the user will not
 give this literal value to the option.

 The attached version is updated to apply cleanly on master (after
 applying your other patches).

I've pushed this. Please don't hesitate to send suggestions to improve
it, or report if it does not work as expected.

Best,

Alan



Re: [O] [patch][ox-latex] context-aware subscript

2013-08-31 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 What I do in the patch is that I apply the filters within the
 function

Why is that? `org-export-data' already takes care of filters. These
calls are redundant.

 Also, filters using a regexp with \text{whatever} wouldn't work.

I don't get it.

 +   (scripts '(subscript superscript)))
 +(if (not (org-element-property :latex-math-p entity)) ent
 +  (concat
 +   (if (and no-pre-blanks-p
 +   (memq (org-element-type prev) scripts)
 +   (not (eq (org-export-data prev info) )))
 +   $)
 +   ent
 +   (if (and no-post-blanks-p
 +   (memq (org-element-type next) scripts)
 +   (not (eq (org-export-data next info) )))
 +   $)

 I think this is problematic: if an entity needs to export both the
 previous and the next object, what happens when we have two consecutive
 entities? An infloop?

 I agree, but I haven't been able to cause any nasty behavior. I've
 probably neglected some case.  These works fine

   1. \alpha\beta_t : \alpha is not a subscript
   2. \alpha\beta_\xi\nu : runs OK recursively.

There's still some infloop smell around this code. Perhaps with
something like the following (untested):

  A_b^c

 On 2.: on my system I've tried with many entities (around 500).  It
 works, but obviously it's slow due to the recursiveness.This is very
 nasty.  I don't know if some other mechanism can be derived, tho. . .

`org-export-data' caches its results, so calling it more than once on
the same object/element isn't really costly.

 +  (let* ((ent (org-element-property :latex entity))
 +  (prev (org-export-get-previous-element entity info))
 +  (next (org-export-get-next-element entity info))
 +  (no-post-blanks-p (= (or (org-element-property :post-blank entity) 0) 
 0))

aka `zerop' (slightly easier to read).

 +  (no-pre-blanks-p (= (or (org-element-property :post-blank prev) 0) 0))


Ditto.

 +  (scripts '(subscript superscript)))
 +
 +(if (not (org-element-property :latex-math-p entity)) ent
 +  (concat
 +   (if (and no-pre-blanks-p
 + (memq (org-element-type prev) scripts)
 + ;; check if nil
 + (org-export-data prev info))
 + $)
 +   ent
 +   (if (and no-post-blanks-p
 + (memq (org-element-type next) scripts)
 + ;; check if nil
 + (org-export-data next info))

You don't need to check for nil. `org-export-data' returns nil when the
element or object is ignored. But `org-export-get-previous-element'
never returns ignored objects or elements.

 +(let ((out (or (org-export-filter-apply-functions
 +org-export-filter-subscript-functions
 +(org-export-data obj info)
 +info) )))

See above.

Thanks again.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch][org-entities] More symbols

2013-08-31 Thread Rasmus
Nicolas Goaziou n.goaz...@gmail.com writes:

 2. HTML symbols have been tested in Firefox.  In a few cases I
couldn't find a pretty name (like pi;) in which case I've
supplied the unicode number (like 960;).  Is that OK?  (E.g. can
Org produce non-uft8 HTML?)

 I think it can: see `org-html-coding-system'. It may be wiser to avoid
 these symbols altogether.

OK.  The only ones remaining are 

(smiley \\smiley{} nil #9786; :-) :-) ☺)
(blacksmile \\blacksmiley{} nil #9787; :-) :-) ☻)
(sad \\frownie{} nil #9785; :-( :-( ☹)


 Any additional package needed must be added to
 `org-latex-default-packages-alist', which means that the package will be
 loaded in every LaTeX export. So, this is clearly not OK for packages
 like kpfonts.

OK, they should all work.

 I also fixed some
inconsistencies.  E.g. loz was loaded diamond even though loz is
defined in amssymb and ~ and \tilde produced different results
(the latter produces the irritating \~{} often observed among
(social science?) university professors...).

 Sounds good.

 + (preccurlyeq \\preccurlyeq t prcue; [precedes or equal]
 [precedes or equal] ≼)

 This one is LaTeX specific, it may be more appropriate in
 `org-entities-user'.

There are many X-specific entities. . .  E.g. lArr is html specific.
One important feature of entities is that unicode symbols can be
displayed in buffer.  If you feel strongly about it, I can remove
them.

–Rasmus

From 17c722aab3e94db069884cb8dba1103ff7b6c9a9 Mon Sep 17 00:00:00 2001
From: rasmus ras...@gmx.us
Date: Sun, 18 Aug 2013 17:42:33 +0200
Subject: [PATCH] More org-entities.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* org-entities.el (org-entities): Add support for ell, imath, jmath,
varphi, varpi, aleph, gimel, beth, dalet, cdots, S (§), dag, ddag,
colon, therefore, because, triangleq, leq, geq, lessgtr, lesseqgtr,
ll, lll, gg, ggg, prec, preceq, preccurleyeq, succ, succeq,
succurleyeq, setminus, nexist(s), mho, check, frown, diamond.  Changes loz,
vert, checkmark, smile and tilde.
---
 lisp/org-entities.el | 59 
 1 file changed, 50 insertions(+), 9 deletions(-)

diff --git a/lisp/org-entities.el b/lisp/org-entities.el
index a1519b0..638da78 100644
--- a/lisp/org-entities.el
+++ b/lisp/org-entities.el
@@ -154,6 +154,9 @@ packages to be loaded, add these packages to `org-latex-packages-alist'.
 (real \\Re t real; R R ℜ)
 (image \\Im t image; I I ℑ)
 (weierp \\wp t weierp; P P ℘)
+(ell \\ell t ell; ell ell ℓ)
+(imath \\imath t imath; [dotless i] dotless i ı)
+(jmath \\jmath t jmath; [dotless j] dotless j ȷ)
 
 ** Greek
 (Alpha A nil Alpha; Alpha Alpha Α)
@@ -203,6 +206,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'.
 (upsilon \\upsilon t upsilon; upsilon upsilon υ)
 (Phi \\Phi t Phi; Phi Phi Φ)
 (phi \\phi t phi; phi phi φ)
+(varphi \\varphi t varphi; varphi varphi ɸ)
 (Chi X nil Chi; Chi Chi Χ)
 (chi \\chi t chi; chi chi χ)
 (acutex \\acute x t acute;x 'x 'x 푥́)
@@ -212,10 +216,15 @@ packages to be loaded, add these packages to `org-latex-packages-alist'.
 (Omega \\Omega t Omega; Omega Omega Ω)
 (omega \\omega t omega; omega omega ω)
 (piv \\varpi t piv; omega-pi omega-pi ϖ)
+(varpi \\varpi t piv; omega-pi omega-pi ϖ)
 (partial \\partial t part; [partial differential] [partial differential] ∂)
 
 ** Hebrew
 (alefsym \\aleph t alefsym; aleph aleph ℵ)
+(aleph \\aleph t aleph; aleph aleph ℵ)
+(gimel \\gimel t gimel; gimel gimel ℷ)
+(beth \\beth t beth; beth beth ב)
+(dalet \\daleth t daleth; dalet dalet ד)
 
 ** Dead languages
 (ETH \\DH{} nil ETH; D Ð Ð)
@@ -226,6 +235,7 @@ packages to be loaded, add these packages to `org-latex-packages-alist'.
 * Punctuation
 ** Dots and Marks
 (dots \\dots{} nil hellip; ... ... …)
+(cdots \\cdots{} t ctdot; ... ... ⋯)
 (hellip \\dots{} nil hellip; ... ... …)
 (middot \\textperiodcentered{} nil middot; . · ·)
 (iexcl !` nil iexcl; ! ¡ ¡)
@@ -253,20 +263,23 @@ packages to be loaded, add these packages to `org-latex-packages-alist'.
 * Other
 ** Misc. (often used)
 (circ \\^{} nil circ; ^ ^ ˆ)
-(vert \\vert{} t #124; | | |)
+(vert \\vert{} t vert; | | |)
 (brvbar \\textbrokenbar{} nil brvbar; | ¦ ¦)
+(S \\S nil sect; paragraph § §)
 (sect \\S nil sect; paragraph § §)
 (amp \\ nil amp;   )
 (lt \\textless{} nil lt;   )
 (gt \\textgreater{} nil gt;   )
-(tilde \\~{} nil tilde; ~ ~ ~)
+(tilde \\textasciitilde{} nil ~ ~ ~ ~)
 (slash / nil / / / /)
 (plus + nil + + + +)
 (under \\_ nil _ _ _ _)
 (equal = nil = = = =)
 (asciicirc \\textasciicircum{} nil ^ ^ ^ ^)
 (dagger \\textdagger{} nil dagger; [dagger] [dagger] †)
+(dag \\dag{} nil dagger; [dagger] [dagger] †)
 (Dagger \\textdaggerdbl{} nil Dagger; 

Re: [O] koma letter exporter: changing the priority of options

2013-08-31 Thread Rasmus

Hi Alan,

Alan Schmitt alan.schm...@polytechnique.org writes:

 I tried to fix it in the updated attached patch. I set a default value
 of foldmarks-not-set to the predicate that detects if it is set in the
 file, then I compare its contents. This assumes that the user will not
 give this literal value to the option.

 The attached version is updated to apply cleanly on master (after
 applying your other patches).

 I've pushed this. Please don't hesitate to send suggestions to improve
 it, or report if it does not work as expected.

Great, it'll serve for now.  It shouldn't case any breaks.

–Rasmus 

-- 
C is for Cookie



[O] [patch] Remove dependency on latexsym (was: [patch][org-entities] More symbols)

2013-08-31 Thread Rasmus

Hi,

 Nicolas Goaziou n.goaz...@gmail.com writes:

 As a rule of thumb, I think we should avoid requiring new packages for
 org-entities.

It's easy to remove the decency of latexsym as it only defines a very
limited number of symbols (see texdoc latexsym).  Using amssymb
symbols will even look better IMO, but check this document:

#+BEGIN_SRC Org
#+latex:\Huge
  - [ ] x
  - [-] x
  - [X] x
#+begin_latex
  \begin{itemize}
  \item $\square$ x
  \item $\boxminus$ x
  \item $\boxtimes$ x
  \end{itemize}
#+end_latex
#+END_SRC

Obviously, it requires the removal of Diamond (my entity patch) and
Box (this patch)

–Rasmus

From 613f28f3bc5d2a6e35093b0a6f33d9b6ec393458 Mon Sep 17 00:00:00 2001
From: rasmus ras...@gmx.us
Date: Sat, 31 Aug 2013 18:15:12 +0200
Subject: [PATCH 2/2] Remove dependency on latexsym.

* ox-latex.el (org-latex-item): Use square as unchecked symbol.
* org.el (org-latex-default-packages-alist): Remove latexsym.

Use amssymb symbols to reduce required packages.
---
 lisp/org.el  | 5 ++---
 lisp/ox-latex.el | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 572b797..90fdfee 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3832,7 +3832,6 @@ header, or they will be appended.
 ( textcomp  t)
 ( marvosym  t)
 ( wasysym   t)
-( latexsym  t)
 ( amssymb   t)
 ( amstext   nil)
 ( hyperref  nil)
@@ -3847,7 +3846,7 @@ Org mode to function properly:
 
 - inputenc, fontenc:  for basic font and character selection
 - amstext: for subscript and superscript
-- textcomp, marvosymb, wasysym, latexsym, amssym: for various
+- textcomp, marvosymb, wasysym, amssymb: for various
   symbols used for interpreting the entities in `org-entities'.
   You can skip some of these packages if you don't use any of the
   symbols in it.
@@ -7653,7 +7652,7 @@ This is important for non-interactive uses of the command.
 	   (t
 	(goto-char (point-at-eol))
 	(insert \n)))
-	  
+
 	  ;; Insert the new heading
 	  (insert stars)
 	  (just-one-space)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 1fe918a..e1173ef 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1561,7 +1561,7 @@ contextual information.
 			 (1- count)
 	 (checkbox (case (org-element-property :checkbox item)
 		 (on $\\boxtimes$ )
-		 (off $\\Box$ )
+		 (off $\\square$ )
 		 (trans $\\boxminus$ )))
 	 (tag (let ((tag (org-element-property :tag item)))
 		;; Check-boxes must belong to the tag.
-- 
1.8.4



-- 
If you can mix business and politics wonderful things can happen!


Re: [O] Some orgtbl doc issues

2013-08-31 Thread Rustom Mody
Well clearly the radio tables section reads better now. Further comments
inline.
Before that some general comments.

The Python list thread starting here
http://mail.python.org/pipermail/python-list/2013-July/653164.html

As you will see some python programmers (including emacsers!) seem to have
a need for something like this and dont seem to know about org. And by
extension one may assume other languages than python also. In short this
seems to be a general need.

So what is written below should be taken less from my own pov -- I am
hardly an org power-user but still a user -- than from the pov of a general
emacser -- a programmer who uses emacs and knows next to nothing about org


On Fri, Aug 30, 2013 at 10:16 PM, Carsten Dominik carsten.domi...@gmail.com
 wrote:

 Hi Rustom,

 thanks for this.

 On 16.8.2013, at 16:30, Rustom Mody rustompm...@gmail.com wrote:

  Ive recently been poking around in orgtbl mode and encountered some
  issues.  Not sure how much is my own lack of understanding and how
  much there are some little doc issues.
 
  1 Option names dont match
  =
 
   - Its orgtbl-radio-table-templates in emacs
   - Its orgtbl-radio-tables in doc Appendix A.6.2

 Fixed, thanks.

 
 
  2 Receiving string
  ==
 
   - Seems to be RECEIVE ORGTBL

 It is BEGIN RECEIVE ORGTBL followed by a table name.  As the example in
 the manual shows.  Does this have to be more explicit?

   - String seems to be hardwired. Which may be ok if its by design.

 Yes, hardwired by design.


Not a problem in itself.

It becomes a problem in connection with the dfault value of
org-radio-table-templates which contains many instances of

BEGIN RECEIVE ORGTBL %n

and thereby suggests that that is changeable


   - Not clear what is the relation of this string and
 orgtbl-radio-templates

 The templates insert a BEGIN RECEIVE/END RECEIVE table template with
 *proper commenting* around it in different programming modes.
 I improved this in the docs.

   - I find 1 space is fixed between RECEIVE and ORGTBL. Multiple
  allowed between ORGTBL and table-name

 OK, I have removed this restriction.

   - Its not clear from the doc whether its RECEIVE ORGTBL or
   /* RECEIVE ORGTBL

 That depends on the programming mode.  The documentation says that the
 lines must be comments in the current mode, I would think that this is
 clear enough.


Some languages (eg Python) have no multiline comment but have a multiline
string which is also ok to use



   - Subtle interaction between # in org and host mode comment char -- #
 in python, shell etc -- could do with some elaboration

 Can you propose something for the documentation?

 
 
  3 hook system
  =
 
   - What are the hooks for orgtbl?
   - How do the org hooks relate to the orgtbl hooks?
   - Note: orgtbl is for those who are not otherwise using orgmode

 What to you mean?  Mode hooks, or hooks for specific functionality of the
 table?  If table commands run hooks, the corresponding orgtbl commands will
 do so as well, because they simply call the table functions in an
 environment where the proper keys bindings are not accessible.


As I said at start of this mail, we are looking at orgtbl for otherwise
non-org users.
For that audience I was exploring whether vanilla org would work OTB
ie without any of my org-settings
also not the latest but one bundled with emacs

Since at that point I really could not understand
orgtbl-radio-table-templates and thought it had to be set I asked. As it
appears now, it works without any customization so the point is moot.
Nevertheless the general question is: If a non-org user of orgtbl needs to
set up minor-mode specific customization where is it to be done?


 orgtbl-mode is a standard minor mode and has `orgtbl-mode-hook', similar
 to all other minor modes.  See the documentation of define-minor-mode.  Do
 you feel the manual should say so?  It does not document many other hooks
 in org either, because there are too many.


 
  4 Long header line
  ==
 
   I could not figure out how to split a long
   :#+ORGTBL: SEND...  line

 It cannot be split.


There are programming related organizations for which something like
80-char lines is really not negotiable!
So I hope this can be considered as a feature request of course a very
minor one

Regards

 - Carsten



Speaking generally, maybe someone should respond to that python list thread.
It can be me however someone more org-knowledgeable may be more appropriate
:-)

Thanks and regards
Rusi

-- 

http://blog.languager.org


Re: [O] [BUG] hline handling in ob-ruby

2013-08-31 Thread Eric Schulte
Sorry about the delay in replying, apparently gmail has decided to
redirect large chunks of the Org-mode mailing list into my spam folder.
Perhaps it would be better to not use my @gmx account in the future.

Please do go ahead and apply this patch.  Thanks for porting this
solution over from ob-python, and sorry again about the delay!

Rick Frankel r...@rickster.com writes:

 Eric-

 There is a bug in ob-ruby --- if an literal 'hline is passed into
 (e.g., :hline no) a ruby block, the execution fails due to an
 incorrect datatype (this is not an issue in any other language). The
 patch provided in
 http://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00316.html
 (and reattached here), applies the solution used in ox-python to
 handle the issue. An alternative solution is ok too :).

 I would be glad to apply the patch myself, but since you are the owner
 of the file i would appreciate you ok before proceeding.

 tia,
 rick

 From 4ae86a04680bcf671d43bb0b70bfddd083b743b2 Mon Sep 17 00:00:00 2001
 From: Rick Frankel r...@rickster.com
 Date: Thu, 15 Aug 2013 14:43:51 -0400
 Subject: [PATCH] Handle literal 'hline arguments passed to ruby. Solution
  shamelessly copied from ob-python.

 * lisp/ob-ruby.el: New customizations `org-babel-ruby-hline-to' and
   `org-babel-ruby-nil-to'
 (org-babel-ruby-var-to-ruby): Convert incoming 'hlines.
 (org-babel-ruby-table-or-string): Convert outgoing nils.
 ---
  lisp/ob-ruby.el | 26 --
  1 file changed, 24 insertions(+), 2 deletions(-)

 diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el
 index 20fb418..d15d288 100644
 --- a/lisp/ob-ruby.el
 +++ b/lisp/ob-ruby.el
 @@ -50,6 +50,20 @@
  (defvar org-babel-ruby-command ruby
Name of command to use for executing ruby code.)
  
 +(defcustom org-babel-ruby-hline-to nil
 +  Replace hlines in incoming tables with this when translating to ruby.
 +  :group 'org-babel
 +  :version 24.4
 +  :package-version '(Org . 8.0)
 +  :type 'string)
 +
 +(defcustom org-babel-ruby-nil-to 'hline
 +  Replace 'nil' in ruby tables with this before returning.
 +  :group 'org-babel
 +  :version 24.4
 +  :package-version '(Org . 8.0)
 +  :type 'string)
 +
  (defun org-babel-execute:ruby (body params)
Execute a block of Ruby code with Babel.
  This function is called by `org-babel-execute-src-block'.
 @@ -115,13 +129,21 @@ Convert an elisp value into a string of ruby source code
  specifying a variable of the same value.
(if (listp var)
(concat [ (mapconcat #'org-babel-ruby-var-to-ruby var , ) ])
 -(format %S var)))
 +(if (equal var 'hline)
 + org-babel-ruby-hline-to
 +  (format %S var
  
  (defun org-babel-ruby-table-or-string (results)
Convert RESULTS into an appropriate elisp value.
  If RESULTS look like a table, then convert them into an
  Emacs-lisp table, otherwise return the results as a string.
 -  (org-babel-script-escape results))
 +  ((lambda (res)
 + (if (listp res)
 +  (mapcar (lambda (el) (if (equal el 'nil)
 +   org-babel-ruby-nil-to el))
 +  res)
 +   res))
 +   (org-babel-script-escape results)))
  
  (defun org-babel-ruby-initiate-session (optional session params)
Initiate a ruby session.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] odt export version conflict on emacs for mac os x

2013-08-31 Thread Achim Gratz
Christian Moe writes:
 Could you give a pointer to your code? I'd like to try it.

Here it is again:

--8---cut here---start-8---
;;
;; Kill any old org remnants
;;

;; clean load-path
(setq load-path
  (delq nil (mapcar
 (function (lambda (p)
 (unless (string-match lisp/org$ p)
   p)))
 load-path)))
;; remove property lists to defeat cus-load and remove autoloads
(mapatoms (function  (lambda (s)
   (let ((sn (symbol-name s)))
 (when (string-match ^\\(org\\|ob\\|ox\\)-? sn)
   (setplist s nil)
   (when (autoloadp s)
 (unintern s)))
--8---cut here---end---8---

After this Emacs should behave like it had never heard of Org at all.
As I said, use at your own risk - the intention is to do this as early
as possible, before any other initializations have taken place so that
these then can set up Org on a clean slate.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] #+CALL and remote execution

2013-08-31 Thread Eric Schulte
Kel Chan k...@sfu.ca writes:

 Hi list,

 I'm implementing an executable worksheet in org and wonder if I can call a 
 source block with a :dir arguments.

 It doesn't seem orgmode support this out of the box. I tried #+CALL:
 ping-network()[:results values replace :dir /posiadmin@10.161.25.37:]
 and noticed two problems: the :dir argument was ignored and only the
 first row of output was shown in #+RESULT block.

 any ideas for workarounds?


Indeed it is possible to pass the :dir header argument through a call
line.  See the description of call line syntax in the manual.

#+name: where
#+begin_src sh
  pwd
#+end_src

#+RESULTS: where
: /tmp

Call the above from somewhere else.

#+call: where[:dir /]()

#+RESULTS:
: /

Cheers,


 cheers,
 kel


-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



[O] clocktable column order e.g. :properties at rightmost position?

2013-08-31 Thread Jeff Kowalczyk
Is there a way to configure column order in clocktable output? I have a
workable way to display TAGS now for clocked task now, but the width of
multiply-tagged items will make the clocktable output less usable. I'd
prefer to move it over to the right-most position:

: #+BEGIN: clocktable :maxlevel 2 :scope file :emphasize nil :block today 
: :link nil :indent nil :properties (TAGS)
: #+CAPTION: Clock summary at [2013-08-31 Sat 09:25], 
:for Saturday, August 31, 2013.
: | TAGS  | Headline   | Time   |  |
: |---+++--|
: |   | *Total time*   | *1:05* |  |
: |---+++--|
: |   | 2013-08-31 Sat   | 1:05   |  |
: |   | TODO db query test || 0:18 |
: |   | TODO time-tracking-tools   || 0:26 |
: | :foo:bar: | DONE jsmith re: new idea   || 0:15 |
: | :bar: | DONE article attack driven defense...  || 0:06 |
: #+END:

The option:

: :formatter A function to format clock data and insert into the buffer.

sounds promising if it could advise the existing function without
reimplementing large parts of it. I'm searching for :formatter
documentation and examples, haven't found any direct references yet.

Secondary question: with the today and yesterday tracking clocktables
I'm using, can I configure formatting of the string:
for Saturday, August 31, 2013. as a normal org timestamp:
for [2013-08-31 Sat].?

Thanks,
Jeff





[O] [bug] orgtbl-mode conflicts with ecomplete (a address completion of mesaage mode)

2013-08-31 Thread Gregor Zattler
Dear org-mode Developers,

i followed the advice in the org-mode manual to use orgtbl-mode
in message-mode buffers (see: (info (org)Orgtbl mode) or
[[info:org#Orgtbl%20mode][info:org#Orgtbl mode]] ), this is nice.

Since today i also want to use ecompletion for addresses in
email headers in message-mode as described in 
(info (message)Mail Aliases) or
[[info:message#Mail%20Aliases][info:message#Mail Aliases]].

Sadly orgtbl-mode somehow disables ecomplete.  Without
orgtbl-mode if one types a part of an email address in an address
header line ecomplete shows list of possible addresses which is
shrinking while one types.  This does not happen if orgtbl-mode
is enabled.

How to reproduce:

1) save the attached file to ~/.ecompleterc

   be sure not to overwrite your own ~/.ecompleterc!

2) do

   emacs -q -nw --eval (setq message-mail-alias-type 'ecomplete) --eval 
'(message-mail)'

   cursor is in the To: -address header.  

2a) type e 

minibuffer shows three matching addresses.  These are narrowed
down while you type c h o.  You might chosse one of the
matching addresses with M-n RET.

2b) kill Emacs.

3) do instead:

   emacs -q -nw --eval (setq message-mail-alias-type 'ecomplete) --eval 
(add-hook 'message-mode-hook 'turn-on-orgtbl) --eval '(message-mail)'

   cursor is in the To: -address header.  

3a) type e 

minimuffer shows nothing...


3b) kill Emacs.



It would be great if this conflict could be fixed.  Otherwise the
conflict could be documented in the Conflicts section of Org-mode
(info (org)Conflicts) or [[info:org#Conflicts]] like this:

--- org.texi2013-09-01 00:41:15.125828086 +0200
+++ org.texi-Orgtbl-ecomplete-conflict-documented   2013-09-01 
00:40:56.101430317 +0200
@@ -16414,6 +16414,18 @@
 to have other replacement keys, look at the variable
 @code{org-disputed-keys}.
 
+@item @file{ecomplete.el} by Lars Magne Ingebrigtsen @email{larsi@@gnus.org}
+@cindex @file{ecomplete.el}
+
+Ecomplete provides ``electric'' address completion in address header
+lines in message buffers.  Sadly Orgtbl mode cuts ecompletes power
+supply: No completion happens when Orgtbl mode is enabled in message
+buffers while entering text in address header lines.  If one wants to
+use ecomplete one should @emph{not} follow the advice to automagically
+turn on Orgtbl mode in message buffers (see @ref{Orgtbl mode}), but
+instead---after filling in the message headers---turn on Orgtbl mode
+manually when needed in the messages body.
+
 @item @file{filladapt.el} by Kyle Jones
 @cindex @file{filladapt.el}
 



Thanks for your attention, Gregor
((mail
(e...@tu-berlin.de 1 1377964945.0 Echo e...@tu-berlin.de)
(telegr...@gmx.net 6 1377974143.0 Gregor Zattler telegr...@gmx.net)
(emacs-orgmode@gnu.org 6 1377974143.0 Org-mode mailing list 
emacs-orgmode@gnu.org)
))

[O] Bug [w/patch]: TODO blocking doesn't work across files with different TODO keyword sets

2013-08-31 Thread Josh Berry
Hi list,

Some of my agenda files use custom TODO keywords (set through a
#+SETUPFILE), and some use the standard TODO | DONE keywords.  I recently
discovered that TODO blocking is broken in the files which use custom
keywords.

It turns out the org-not-done-heading-regexps variable was global instead
of buffer-local like the other *-regexp variables; this appears to be due
to a typo in org.el.

I think the blocker hook
(org-block-todo-from-children-or-siblings-or-parent) was picking up the
global value (set by one of the factory-default buffers, which got opened
last) and applying it to buffers with my custom TODO keywords, so it was
not correctly identifying some headlines as TODO headlines.

The patch below corrects the typo and fixes TODO blocking in my
custom-keyword files.  I hope you find it useful.  (BTW, I quickly ran
through the other make-variable-buffer-local invocations in org.el, and
didn't see any more typos of this nature.)

Thanks,
Josh

diff --git a/lisp/org.el b/lisp/org.el
index 97b5365..985dd74 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4602,7 +4602,7 @@ Otherwise, these types are allowed:
 (make-variable-buffer-local 'org-not-done-regexp)
 (defvar org-not-done-heading-regexp nil
   Matches a TODO headline that is not done.)
-(make-variable-buffer-local 'org-not-done-regexp)
+(make-variable-buffer-local 'org-not-done-heading-regexp)
 (defvar org-todo-line-regexp nil
   Matches a headline and puts TODO state into group 2 if present.)
 (make-variable-buffer-local 'org-todo-line-regexp)


Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Eric Abrahamsen
Carsten Dominik carsten.domi...@gmail.com writes:

 On 8.8.2013, at 09:41, Eric Abrahamsen e...@ericabrahamsen.net wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 
 Hi,
 
 I have rewritten org-insert-heading, because it had become an 
 unmaintainable beast.
 Please follow up in this thread if you find problems with the new 
 implementation.
 Very likely there will be bugs, but now I am at least confident they can be 
 fixed.
 
 - Carsten
 
 Awesome! Thanks very much for doing this. Will report back with bugs.

 I take it none have been found?

 - Carsten


Nope, I've been using this heavily and haven't seen anything surprising.
I do confirm Nicolas' observations on whitespace, though...

E




Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Samuel Wales
I've found four, but they are minor.  In capture, you can create a
blank line with m-ret at the top.Repeated invocation creates invalid
headlines.  There is no c-ret way to create a headline above the first
child.  M-ret is slow.

On 8/31/13, Carsten Dominik carsten.domi...@gmail.com wrote:
 I take it none have been found?

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] org-insert-heading rewritten from scratch

2013-08-31 Thread Samuel Wales
Clarification: it is no more slow than the original and it fixes bugs.
 Just answering your question about whether there are any bugs.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.