[O] new exporter - subtree export and a few keywords

2012-12-18 Thread François Allisson
Dear org-mode users and developers,

The following concerns Nicolas' new exporter.^

I am totally seduced by the concept of export by subtree, and the
possibility to use properties to set the export options and parameters
(i.e. :EXPORT_TITLE:, :EXPORT_OPTIONS:, :EXPORT_LATEX_HEADER:, etc.).

I am wondering if all that could be done by exporting the whole document
can be done with exporting by subtree. So far, I am concerned by the
following keywords, that I used (here with examples):

#+LANGUAGE: ru

and

#+BIND: org-e-latex-title-command 

Can these be achieved by subtree export, or using another trick I am not
aware of?

Best,
François



Re: [O] new exporter - subtree export and a few keywords

2012-12-18 Thread Jambunathan K
François Allisson franc...@allisson.co writes:

 Dear org-mode users and developers,

 The following concerns Nicolas' new exporter.^

 I am totally seduced by the concept of export by subtree, and the
 possibility to use properties to set the export options and parameters
 (i.e. :EXPORT_TITLE:, :EXPORT_OPTIONS:, :EXPORT_LATEX_HEADER:, etc.).

 I am wondering if all that could be done by exporting the whole document
 can be done with exporting by subtree. So far, I am concerned by the
 following keywords, that I used (here with examples):


 #+LANGUAGE: ru


 and


 #+BIND: org-e-latex-title-command 


 Can these be achieved by subtree export, or using another trick I am not
 aware of?

No answer.  But I will share a trick.

Good way to answer such questions is to do this:

M-x find-library RET org-export RET
C-s EXPORT_

and with couple of more C-s es you will end up with something like.

, C-h v org-export-options-alist
| KEYWORD is a string representing a buffer keyword, or nil.  Each
|   property defined this way can also be set, during subtree
|   export, through an headline property named after the keyword
|   with the \EXPORT_\ prefix (i.e. DATE keyword and EXPORT_DATE
|   property).
`


 Best,
 François



-- 



[O] orgtbl-mode and markdown

2012-12-18 Thread Vegard Vesterheim
I had problems editing tables (using the minor mode orgtbl-mode) in
markdown files. 

To reproduce: 
 - visit an empty buffer in markdown mode
 - M-x orgtbl-mode
 - create a new table (C-c |)
 - try to edit a cell
 - observe that the edited text is misplaced at the end of the line

The following patch against 709bf92950fb3e9dd7425e01eb53eedad43c7262
seems to fix the problem

diff --git a/lisp/org-table.el b/lisp/org-table.el
index acad0bb..188a825 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -4233,10 +4233,10 @@ overwritten, and the table is not marked as requiring 
realignment.
t)
   (eq N 1)
   (looking-at [^|\n]*  +|))
-  (let (org-table-may-need-update)
-   (goto-char (1- (match-end 0)))
-   (backward-delete-char 1)
-   (goto-char (match-beginning 0))
+  (let ((org-table-may-need-update) (mb (match-beginning 0)) (me 
(match-end 0)))
+   (goto-char (1- me))
+   (delete-backward-char 1)
+   (goto-char mb)
(self-insert-command N))
 (setq org-table-may-need-update t)
 (let* (orgtbl-mode



Re: [O] orgtbl-mode and markdown

2012-12-18 Thread Carsten Dominik

On 18 dec. 2012, at 09:33, Vegard Vesterheim vegard.vesterh...@uninett.no 
wrote:

 I had problems editing tables (using the minor mode orgtbl-mode) in
 markdown files. 
 
 To reproduce: 
 - visit an empty buffer in markdown mode
 - M-x orgtbl-mode
 - create a new table (C-c |)
 - try to edit a cell
 - observe that the edited text is misplaced at the end of the line
 
 The following patch against 709bf92950fb3e9dd7425e01eb53eedad43c7262
 seems to fix the problem
 
 diff --git a/lisp/org-table.el b/lisp/org-table.el
 index acad0bb..188a825 100644
 --- a/lisp/org-table.el
 +++ b/lisp/org-table.el
 @@ -4233,10 +4233,10 @@ overwritten, and the table is not marked as requiring 
 realignment.
   t)
  (eq N 1)
  (looking-at [^|\n]*  +|))
 -  (let (org-table-may-need-update)
 - (goto-char (1- (match-end 0)))
 - (backward-delete-char 1)
 - (goto-char (match-beginning 0))
 +  (let ((org-table-may-need-update) (mb (match-beginning 0)) (me 
 (match-end 0)))
 + (goto-char (1- me))
 + (delete-backward-char 1)
 + (goto-char mb)
   (self-insert-command N))
 (setq org-table-may-need-update t)
 (let* (orgtbl-mode


This is really strange.  Does markdown mode define hooks which kick in on 
delete-backward-char and which to bad stuff with the match data?  Looks to me 
that this is a bug in markdown-mode, which should be reported to its authors.

- Carsten


Re: [O] orgtbl-mode and markdown

2012-12-18 Thread Vegard Vesterheim
On Tue, 18 Dec 2012 14:07:36 +0100 Carsten Dominik carsten.domi...@gmail.com 
wrote:

 On 18 dec. 2012, at 09:33, Vegard Vesterheim vegard.vesterh...@uninett.no 
 wrote:

 I had problems editing tables (using the minor mode orgtbl-mode) in
 markdown files. 
 
 To reproduce: 
 - visit an empty buffer in markdown mode
 - M-x orgtbl-mode
 - create a new table (C-c |)
 - try to edit a cell
 - observe that the edited text is misplaced at the end of the line
 
 The following patch against 709bf92950fb3e9dd7425e01eb53eedad43c7262
 seems to fix the problem
 
 diff --git a/lisp/org-table.el b/lisp/org-table.el
 index acad0bb..188a825 100644
 --- a/lisp/org-table.el
 +++ b/lisp/org-table.el
 @@ -4233,10 +4233,10 @@ overwritten, and the table is not marked as 
 requiring realignment.
  t)
 (eq N 1)
 (looking-at [^|\n]*  +|))
 -  (let (org-table-may-need-update)
 -(goto-char (1- (match-end 0)))
 -(backward-delete-char 1)
 -(goto-char (match-beginning 0))
 +  (let ((org-table-may-need-update) (mb (match-beginning 0)) (me 
 (match-end 0)))
 +(goto-char (1- me))
 +(delete-backward-char 1)
 +(goto-char mb)
  (self-insert-command N))
 (setq org-table-may-need-update t)
 (let* (orgtbl-mode


 This is really strange.  Does markdown mode define hooks which kick in
 on delete-backward-char and which to bad stuff with the match data?

Dunno. I just observed that (match-end 0) returned different results
immediately before and after (backward-delete-char 1). 

 Looks to me that this is a bug in markdown-mode, which should be
 reported to its authors.

Possibly, I am not proficient in elisp, hence the naive patch. But isn't
it good practise to copy the match positions immediately after matching
anyways? 

 - Vegard V -





Re: [O] orgtbl-mode and markdown

2012-12-18 Thread Carsten Dominik

On 18 dec. 2012, at 14:39, Vegard Vesterheim vegard.vesterh...@uninett.no 
wrote:

 On Tue, 18 Dec 2012 14:07:36 +0100 Carsten Dominik 
 carsten.domi...@gmail.com wrote:
 
 On 18 dec. 2012, at 09:33, Vegard Vesterheim vegard.vesterh...@uninett.no 
 wrote:
 
 I had problems editing tables (using the minor mode orgtbl-mode) in
 markdown files. 
 
 To reproduce: 
 - visit an empty buffer in markdown mode
 - M-x orgtbl-mode
 - create a new table (C-c |)
 - try to edit a cell
 - observe that the edited text is misplaced at the end of the line
 
 The following patch against 709bf92950fb3e9dd7425e01eb53eedad43c7262
 seems to fix the problem
 
 diff --git a/lisp/org-table.el b/lisp/org-table.el
 index acad0bb..188a825 100644
 --- a/lisp/org-table.el
 +++ b/lisp/org-table.el
 @@ -4233,10 +4233,10 @@ overwritten, and the table is not marked as 
 requiring realignment.
 t)
(eq N 1)
(looking-at [^|\n]*  +|))
 -  (let (org-table-may-need-update)
 -   (goto-char (1- (match-end 0)))
 -   (backward-delete-char 1)
 -   (goto-char (match-beginning 0))
 +  (let ((org-table-may-need-update) (mb (match-beginning 0)) (me 
 (match-end 0)))
 +   (goto-char (1- me))
 +   (delete-backward-char 1)
 +   (goto-char mb)
 (self-insert-command N))
(setq org-table-may-need-update t)
(let* (orgtbl-mode
 
 
 This is really strange.  Does markdown mode define hooks which kick in
 on delete-backward-char and which to bad stuff with the match data?
 
 Dunno. I just observed that (match-end 0) returned different results
 immediately before and after (backward-delete-char 1). 
 
 Looks to me that this is a bug in markdown-mode, which should be
 reported to its authors.
 
 Possibly, I am not proficient in elisp, hence the naive patch. But isn't
 it good practise to copy the match positions immediately after matching
 anyways? 

Well this is very safe - but if you have to assume that every elisp command 
does change match data behind your back, you would have to create a lot of 
extra code.  I think that you should report this to the markdown people.  I do 
not think we should have to make the change in org-mode.

I just checked markdown.el.  Below you can find a more complete description of 
what you can report to the markdown people:

Regards

- Carsten

Bug report for markdown.el
=

Markdown defines an after-change-function 
`markdown-check-change-for-wiki-link'.  This function is called after each 
buffer change.  The function contains a call to 
`markdown-fontify-region-wiki-links'.  If such a function would be called 
through the general font-lock stuff, the match data would be protected.  
However, here it is called directly from a change function.  So this function 
should protect match data explicitly:

[lisp] Sir? diff -u markdown.el{.orig,}
--- markdown.el.orig2012-12-18 15:28:18.0 +0100
+++ markdown.el 2012-12-18 15:46:50.0 +0100
@@ -1861,16 +1861,17 @@
 If a wiki link is found check to see if the backing file exists
 and highlight accordingly.
   (goto-char from)
-  (while (re-search-forward markdown-regex-wiki-link to t)
-(let ((highlight-beginning (match-beginning 0))
- (highlight-end (match-end 0))
- (file-name
-  (markdown-convert-wiki-link-to-filename (match-string 1
-  (if (file-exists-p file-name)
+  (save-match-data
+(while (re-search-forward markdown-regex-wiki-link to t)
+  (let ((highlight-beginning (match-beginning 0))
+   (highlight-end (match-end 0))
+   (file-name
+(markdown-convert-wiki-link-to-filename (match-string 1
+   (if (file-exists-p file-name)
+   (markdown-highlight-wiki-link
+highlight-beginning highlight-end markdown-link-face)
  (markdown-highlight-wiki-link
-  highlight-beginning highlight-end markdown-link-face)
-   (markdown-highlight-wiki-link
-highlight-beginning highlight-end markdown-missing-link-face)
+  highlight-beginning highlight-end markdown-missing-link-face))
 
 (defun markdown-extend-changed-region (from to)
   Extend region given by FROM and TO so that we can fontify all links.





Re: [O] Bibtex export

2012-12-18 Thread Bastien
Hi Mohamed,

mohamed mohamed.hi...@gmail.com writes:

 Is there any way to use something like :

 * Section a

 ...

 * Bibliography  [with some specific tag]
 \clearpage
 \bibliographystyle{acm}
 \bibliography{biblio.bib}

 My point is to avoid deleting the bibliography lines when deleting the 
 previous
 section (section a).

I'm not sure I understand.  In what condition does deleting 
* Section a will delete * Bibliography ?

-- 
 Bastien



Re: [O] Emacs 22 compatibility

2012-12-18 Thread Bastien
I think a reasonable expectation is to be fully compatible with
the last two major versions of GNU Emacs (23 and 24).  For Emacs 
22 and XEmacs, if we have people using these Emacsen, maybe they
can help?

I'm reluctant to drop support for Emacs 22/XEmacs as it would 
block those volunteers.

-- 
 Bastien



Re: [O] org-bullets extension

2012-12-18 Thread Bastien
Hi Jambunathan,

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

 (font-lock-add-keywords
  'org-mode `((\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)
   (0 (progn (compose-region
  (match-beginning 1) (match-end 1)
  (pcase (length (match-string 1))
(1 ?\u2219)
(2 ?\u2022)
(3 ?\u25c9)
(_ ?\u25CB)))
 nil)

This does convert all headlines characters (*+) to a single
unicode character.  Close to what many users are looking for,
but extending this snippet to handle converting several * 
characters would come closer.

Are you working on this?  If so, could this be a minor mode?

Thanks,

-- 
 Bastien



Re: [O] org-anywhere

2012-12-18 Thread Bastien
Hi,

Rasmus ras...@gmx.us writes:

 - scheduled and deadline dates cannot be stored in drawers

 That would be nice, yes. 

Just FYI, there is a plan for this.

 - I would like a org-remove-all-(flow)-guff option

 That would be nice.  

Patch welcome!

-- 
 Bastien



Re: [O] template, position search

2012-12-18 Thread Bastien
Hi Petro,

Petro x.pi...@gmail.com writes:

 (setq org-capture-templates
   '((t Todo entry (file+headline ~/org/tasks.org Tasks)
  * TODO %?\n  %i\n  %a)
   (n Note entry (file+datetree ~/org/notes.org)
  * %?\nEntered on %U\n  %i\n  %a)
   (a article note entry (file+function ~/org/scientific_notes.org 
 find-create-article-note-location)
  *** test %?\nEntered on %U\n )
   ))

Instead of 

  (file+function ~/org/scientific_notes.org
find-create-article-note-location) 

I'd use (function find-file-create-article-note-location)
then tell `find-file-create-article-note-location' to retrieve
(buffer-file-name) when on the pdf.

HTH,

-- 
 Bastien



Re: [O] capture template sexp

2012-12-18 Thread Bastien
Hi Skip,

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

 I have not been able to find good examples of how to use the %(sexp)
 construct in capture templates. I have a use case in which I would
 like to retrieve some information from the capture target file to
 include in the template. Can someone suggest a way construct a sexp
 that returns a regular expression found in the target file? Say I need
 to find the first headline that begins with the string * Topic:  and
 return the remainder of the line.

What did you try?

-- 
 Bastien



Re: [O] Removing items from lists with checkboxes

2012-12-18 Thread Bastien
Hi,

gifib...@arcor.de writes:

 If i have a list like:

 ** [/] Headin
- [ ] one
- [ ] two 

 I can add a new line with a checkbox with the command M-S-RET. The [/] is
 updated immediately. Is there a smarter way to remove items from the list,
 than C-k, C-c #?

No.

 I like to have a [0/0] when removing the last item. Is this possible?

No.  FWIW I think [/] is better than [0/0] in this case... if only
for mathematical reasons :)

-- 
 Bastien



Re: [O] org-anywhere

2012-12-18 Thread Bastien
Hi Tony,

tony day zygom...@gmail.com writes:

 I was thinking of the simpler magic which keeps tags on the far right.  An
 option where properties show up in the tag list like =:tag1:tag2:p:=. and
 then you can C-c C-c or cycle them back to full visibility.

FWIW, I would find this solution confusing, mixing tags and non-tags
with the same visual clues.

-- 
 Bastien



Re: [O] [PATCH] Nicer fontification for org-todo-list

2012-12-18 Thread Ingo Lohmar
Hi Bastien and all,

Is anything still to be fixed before the patch that I sent can be
applied?  I am curious since there was no reaction and no change in the
repo as far as I can tell...

Best
Ingo



Re: [O] texinfo back-end won't export to INFO

2012-12-18 Thread Bastien
Hi Thomas,

t...@tsdye.com (Thomas S. Dye) writes:

 Export to INFO fails to produce an output file.

 Export to TEXI works.  Running makeinfo on the texi file yields errors
 like this:

 /Users/dk/org/orgmanual//orgmanual.texi:171: `Exporting' has no Up field
 (perhaps incorrect sectioning?).

 If I run the texi file through (texinfo-all-menus-update), then makeinfo
 runs without error and produces an info file.

 Perhaps this step should be added to the texinfo back-end?

I think this calls for a new variable `org-export-after-rendering-hook'
which will operate after the final stage of the export process, in the
export buffer.  Filters are fine but their complexity is not useful here.

Then we could add 'texinfo-all-menus-update to this hook.

Nicolas, what do you think?

-- 
 Bastien



Re: [O] Export to Confluence wiki format

2012-12-18 Thread Bastien
Hi Sébastien,

Sébastien Delafond sdelaf...@gmail.com writes:

 I've put together a somewhat crude confluence exporter that's based on
 the new exporter (as of 7.9.2). For now it's hosted on github[1].

This is now in contrib.  Thanks!

-- 
 Bastien



Re: [O] export of #+INCLUDE appears broken with :exports results

2012-12-18 Thread Bastien
Hi Myles,

Myles English mylesengl...@gmail.com writes:

 Did you try with downcase for the TBLNAME keyword? I know it (all upper or
 down-case) was important at some point in time, but don't remember if this is
 still of importance.

 I have tried all those variations, and using #+name instead of #+tblname
 the only thing that makes a difference is removing :exports results.
 I think it a bug.

I confirm this bug -- I'll wait and see if nicolas can have a look for
the new exporter.  

Thanks,

-- 
 Bastien



Re: [O] Feature request: HTML export classes for real lists

2012-12-18 Thread Bastien
Hi Derek,

s...@blarg.net writes:

 But the exporter also uses HTML list elements in other contexts; the tags
 are overloaded.  This means you can't set up CSS definitions to tweak
 just real lists.  Can someone add class attributes to each of the
 dt, dd and li items in the above code block?  For example

 dt class=org-dt.../dt
 dd class=org-dd.../dd
 li class=org-li.../li

 or something similar.

I've implemented this in master for both the current exporter (famously
known as the old exporter) and the new exporter.  I think we should be
extra conservative and take care not to add useless classes/ids, but I
see the point in this case.

Thanks,

-- 
 Bastien



Re: [O] Emacs 22 compatibility

2012-12-18 Thread Achim Gratz
Bastien writes:
 I think a reasonable expectation is to be fully compatible with
 the last two major versions of GNU Emacs (23 and 24).

It would help if I managed to get Emacs 23 to compile Org… but since
some people on the list are still using Emacs23 and they don't report
problems I'm assuming it's rather something in my build ATM, although
I've built Emacs 23 with the same parameters before (just a different
compiler).

  For Emacs 22 and XEmacs, if we have people using these Emacsen, maybe
 they can help?

Emacs 22 is already broken in non-trivial ways AFAICS and the question
is if its worth the effort to unbreak it.  There are some things I've
looked at (like macro expansion inside a macro, as it is used in
org-odt) that should work, but apparently don't.  I have no idea if the
byte-code that is generated has a chance of working, but it looks quite
strange.  UTF-8 support is another sore point that currently shoots down
startup of the test suite if I interpret the error messages correctly.

I'm not sure which is the last version that fully works with Emacs 22,
even to find that out would take quite some time.

 I'm reluctant to drop support for Emacs 22/XEmacs as it would 
 block those volunteers.

I have somewhat more hope for XEmacs, although many of the newer
additions to Org would need to be reviewed for compatibility problems.


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] Feature request: HTML export classes for real lists

2012-12-18 Thread Eric Schulte
Bastien b...@altern.org writes:

 Hi Derek,

 s...@blarg.net writes:

 But the exporter also uses HTML list elements in other contexts; the
 tags
 are overloaded.  This means you can't set up CSS definitions to tweak
 just real lists.  Can someone add class attributes to each of the
 dt, dd and li items in the above code block?  For example

 dt class=org-dt.../dt
 dd class=org-dd.../dd
 li class=org-li.../li

 or something similar.

 I've implemented this in master for both the current exporter
 (famously known as the old exporter) and the new exporter.  I think
 we should be extra conservative and take care not to add useless
 classes/ids, but I see the point in this case.


Would it perhaps make sense to add classes to the un-normal use of these
tags outside of lists, rather than to their usage within lists?

I could see such an approach having a larger footprint in the code, but
resulting in smaller and arguably more meaningfully classed/tagged HTML
files.

Just a thought,

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



Re: [O] Javascript in postamble

2012-12-18 Thread Bastien
Hi Vikas,

Vikas Rawal vikasli...@agrarianresearch.org writes:

 For a website that I am producing using orgmode, I would like to
 insert a javascript code in the postamble to get a piwik installation
 to track traffic to the website.

 I am unable to add html markup/java script to :html-postamble in
 project alist. The documentation on postamble is too brief for me. Can
 anyone give an example?

Simply set `org-export-html-postamble' to a string containing your
javascript code (or :html-postamble in a publishing project.)

For the new exporter, see `org-e-html-postamble-format', which is a
template string that you can customize.

HTH,

-- 
 Bastien



Re: [O] orgtbl-mode and markdown

2012-12-18 Thread Achim Gratz
Carsten Dominik writes:
 Well this is very safe - but if you have to assume that every elisp
 command does change match data behind your back, you would have to
 create a lot of extra code.

Stefan Monnier advises the opposite (quote from
http://article.gmane.org/gmane.emacs.bugs/68688 ):

--8---cut here---start-8---
 Okay.  On second though: it wouldn't be very useful to use the match
 data set by these functions.  Why not save the match-data here once so
 that no caller has to ever worry about it?  Is there a general policy
 that this kinda thing shouldn't be done?

Yes, the general policy is: all functions should be presumed to trash
the match-data, except for a very few exceptions.
--8---cut here---end---8---


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] [PATCH] Nicer fontification for org-todo-list

2012-12-18 Thread Bastien
Hi Ingo,

Ingo Lohmar i.loh...@gmail.com writes:

 Is anything still to be fixed before the patch that I sent can be
 applied?  I am curious since there was no reaction and no change in the
 repo as far as I can tell...

I just applied a slightly modified version of your patch:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=0f3264f

I changed the commit log to mention New function, and I
used the org-agenda- prefix for this function.

Thanks again for this patch, sorry it took long to apply it.

Best,

-- 
 Bastien



Re: [O] Feature request: HTML export classes for real lists

2012-12-18 Thread Bastien
Eric Schulte schulte.e...@gmail.com writes:

 Would it perhaps make sense to add classes to the un-normal use of these
 tags outside of lists, rather than to their usage within lists?

 I could see such an approach having a larger footprint in the code, but
 resulting in smaller and arguably more meaningfully classed/tagged HTML
 files.

Agreed -- though I'm not sure what are the un-normal uses.  You mean 
in the table of content for example?

-- 
 Bastien



Re: [O] complex searches with org-sparse-tree

2012-12-18 Thread Bastien
Hi Sébastien,

Sebastian Fischmeister sfisc...@uwaterloo.ca writes:

 Is there a possibility to get a sparse tree for a more complex query?

Not right now.  For complex queries, you can use an agenda view.

HTH,

-- 
 Bastien



Re: [O] Bugs in org-cycle-internal-local?

2012-12-18 Thread Bastien
Hi Rémi,

Rémi Vanicat vani...@debian.org writes:

 I've tried to use visibility cycling in outline minor mode[1] with ruby,

I tried your minor mode with the minimal snippet you gave and it works
well here.  Could it be the version of org-mode you're using?

-- 
 Bastien



Re: [O] Extend (org-shiftcontrolup) and (org-shiftcontroldown) with numeric arguments?

2012-12-18 Thread Bastien
Hi Rainer and Nicolas,

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

 I think it would be a welcomed improvement, since there's already
 support for that in `org-timestamp-up' and `org-timestamp-down'. Do you
 want to do it?

I just implemented this.  It's now in master.

Thanks,

-- 
 Bastien



Re: [O] indentation across multiple source blocks

2012-12-18 Thread Bastien
Hi Tony,

Tony Day tonyday...@gmail.com writes:

 Is there an easy way to preserve indentation for a source block taking
 into account previous blocks?  

No.  Besides, I don't really see a good case where it would make sense
to split functions across code blocks... surely a lack of imagination :)

-- 
 Bastien



Re: [O] texinfo back-end won't export to INFO

2012-12-18 Thread Thomas S. Dye
Aloha Bastien,

Bastien b...@altern.org writes:

 Hi Thomas,

 t...@tsdye.com (Thomas S. Dye) writes:

 Export to INFO fails to produce an output file.

 Export to TEXI works.  Running makeinfo on the texi file yields errors
 like this:

 /Users/dk/org/orgmanual//orgmanual.texi:171: `Exporting' has no Up field
 (perhaps incorrect sectioning?).

 If I run the texi file through (texinfo-all-menus-update), then makeinfo
 runs without error and produces an info file.

 Perhaps this step should be added to the texinfo back-end?

 I think this calls for a new variable `org-export-after-rendering-hook'
 which will operate after the final stage of the export process, in the
 export buffer.  Filters are fine but their complexity is not useful here.

 Then we could add 'texinfo-all-menus-update to this hook.

 Nicolas, what do you think?

IIUC, Jonathan Leeche-Pepin fixed this in org-e-texinfo.el a while back.

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] texinfo back-end won't export to INFO

2012-12-18 Thread Nicolas Goaziou
Hello,

Bastien b...@altern.org writes:

 I think this calls for a new variable `org-export-after-rendering-hook'
 which will operate after the final stage of the export process, in the
 export buffer.  Filters are fine but their complexity is not useful here.

 Then we could add 'texinfo-all-menus-update to this hook.

 Nicolas, what do you think?

There is no such thing as an export buffer in the new exporter,
`org-export-as' produces a string.

Though, there is `org-export-filter-final-output-functions', which will
operate on the last string produced by `org-export-as'. You may create
a function that will insert that string in a buffer, apply
`texinfo-all-menus-update' and call `buffer-string', and add it to that
filter set.

Note that complexity of filters is the same as hook: you add functions
to a list. A filter function requires three arguments.


Regards,

-- 
Nicolas Goaziou



Re: [O] export of #+INCLUDE appears broken with :exports results

2012-12-18 Thread Nicolas Goaziou
Hello,

Bastien b...@altern.org writes:

 I have tried all those variations, and using #+name instead of #+tblname
 the only thing that makes a difference is removing :exports results.
 I think it a bug.

 I confirm this bug -- I'll wait and see if nicolas can have a look for
 the new exporter.  

I cannot reproduce this with the new exporter.


Regards,

-- 
Nicolas Goaziou



Re: [O] Cal-fw info file?

2012-12-18 Thread Bastien
Hi Johnny,

Johnny yggdra...@gmx.co.uk writes:

 I have seen cal-fw around, but not until now got around to play around
 with it to learn, it's a great initiative and nice extenstion! 

 However, I really enjoy having an info file around as a reference and
 would rather not refer to other loose files on the system. So I was
 wondering if there is a texinfo file already for cal-fw, or there is a
 plan/interest in developing one?

 Nonetheless, it's time to learn som texinfo, so I plunged ahead and
 created a skeleton from the available information. 

I see Masashi offered to merge your .texi in his repo... but I don't
see the calfw.texi in there -- hopefully you'll resent it and this will
end up in Masashi's repo at some point?  

Thanks!

-- 
 Bastien



[O] org-export-after-rendering-hook for the new exporter? (was: texinfo back-end won't export to INFO)

2012-12-18 Thread Bastien
Hi Thomas,

t...@tsdye.com (Thomas S. Dye) writes:

 IIUC, Jonathan Leeche-Pepin fixed this in org-e-texinfo.el a while back.

So let me open a new thread for this possible hook.

Nicolas, what do you think of having `org-export-after-rendering-hook' 
as a simple access for applying global changes on the export buffer?

Does the filter mechanism is simple enough to make this completely
useless?

Thanks!

-- 
 Bastien



Re: [O] texinfo back-end won't export to INFO

2012-12-18 Thread Bastien
Hi Nicolas,

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

 Note that complexity of filters is the same as hook: you add functions
 to a list. 

Okay... thanks for the explanations.

 A filter function requires three arguments.

... so that's where complexity comes from.  I'm afraid you'll just 
scare away many users with these three arguments.  

What do you think?

-- 
 Bastien



Re: [O] Bugs in org-cycle-internal-local?

2012-12-18 Thread Rémi Vanicat
Bastien b...@altern.org writes:

 Hi Rémi,

 Rémi Vanicat vani...@debian.org writes:

 I've tried to use visibility cycling in outline minor mode[1] with ruby,

 I tried your minor mode with the minimal snippet you gave and it works
 well here.  

did you let the two space before the both def? Without those space,
every thing work find:

the full snipet is like

class XmmsInteract
  def get(info, attr, default=nil)
info[attr].to_a[0][1]
  end

  def initialize
@looking_for_medialib_list = []
  end
end

and the hide fail on the   def get

I admit that the importance of the space could be not obvious in my
first email.



 Could it be the version of org-mode you're using?

It's stock org-mode from Emacs

-- 
Rémi Vanicat



Re: [O] Filling comments in Org code block vs in temporary buffer

2012-12-18 Thread Bastien


Hi Sébastien,

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

 When trying to refill the comment directly in the following code block
 (staying in the Org file), it has *no effect*.

Fixed, thanks.

-- 
 Bastien




Re: [O] texinfo back-end won't export to INFO

2012-12-18 Thread Nicolas Goaziou
Bastien b...@altern.org writes:

 A filter function requires three arguments.

 ... so that's where complexity comes from.  I'm afraid you'll just 
 scare away many users with these three arguments.  

 What do you think?

Using a hook or a filter requires to write a function in most cases.
I don't think that a person able to write such a function would cringe
in front of a function of three arguments (you don't even have to use
them all).

Filters are applied on something (often a string). That something is the
first argument. Also, filters are probably very dependant on the
back-end used. That is the second argument. Eventually, it may be useful
to know which options were active at the time of export. This is the
third argument.

I can remove the last argument, bringing down the sum of arguments to 2.
Should I?


Regards,

-- 
Nicolas Goaziou



Re: [O] Bibtex export

2012-12-18 Thread mohamed

Bastien bzg at altern.org writes:

 I'm not sure I understand.  In what condition does deleting 
 * Section a will delete * Bibliography ?
 



Hi Bastien,
Thank you for answering.

Usually I write
---
* Section a

 ...

\clearpage
\bibliographystyle{acm}
\bibliography{biblio.bib}

---
However, sometimes I decide to delete the section section a
and then the lines including the bibliography specifications are also lost
in the overview mode. 

Therefore, I need something to protect the bibliography lines and make them
accessible in a dedicated section.

Regards,
Mohamed





[O] Dramatic slowdown in org mode

2012-12-18 Thread Fraga, Eric
Hello,

sometime between last week and today, there has been a dramatic slowdown in the 
generation of an agenda view.  Using elp to instrument the org package and then 
asking for the default agenda view (C-c a a), I get the attached results.  The 
agenda view takes just under 2 seconds with org from commit 47ea1666 (12 
December) and over 30 seconds with org from commit 76cf2538 (today, up to 
date).  I have attached the two outputs from elp.

Unfortunately, I haven't had the chance to go through the changes over the past 
week to see if I could identify which one causes the dramatic change in 
performance.

Thanks,
eric
org-agenda1   
1.761614798   1.761614798
org-agenda-list   1   
1.578568495   1.578568495
org-agenda-get-day-entries14  
1.2357858689  0.0882704192
org-agenda-get-scheduled  14  
0.9519977079  0.0679998362
org-entry-get 589 
0.4575541829  0.0007768322
org-get-property-block589 
0.4306466940  0.0007311488
org-back-to-heading   1962
0.3531446199  0.0001799921
org-get-todo-state773 
0.239770826   0.0003101821
org-agenda-prepare1   
0.213085072   0.213085072
org-agenda-prepare-buffers1   
0.209823313   0.209823313
org-agenda-get-restriction-and-command1   
0.1829714909  0.1829714909
org-agenda-skip   813 
0.178216573   0.0002192085
org-agenda-get-deadlines  14  
0.1516758889  0.0108339920
org-before-first-heading-p589 
0.1033582670  0.0001754809
org-agenda-skip-eval  1624
0.0946857890  5.830...e-05
org-refresh-category-properties   14  
0.087657319   0.0062612370
org-get-tags-at   33  
0.0726190890  0.0022005784
org-up-heading-safe   124 
0.068383819   0.0005514824
org-end-of-subtree83  
0.0565531959  0.0006813638
org-agenda-get-sexps  14  
0.0541387670  0.0038670547
org-agenda-get-timestamps 14  
0.042689354   0.0030492395
org-time-string-to-absolute   758 
0.0353096979  4.658...e-05
org-agenda-get-blocks 14  
0.0323156729  0.0023082623
org-agenda-format-item45  
0.021494701   0.0004776600
org-get-effort34  
0.0134196910  0.0003946967
org-in-src-block-p813 
0.0134103450  1.649...e-05
org-outline-level 331 
0.011762491   3.553...e-05
org-parse-time-string 836 
0.0114203009  1.366...e-05
org-get-priority  31  
0.011103502   0.0003581774
org-agenda-finalize-entries   1   
0.007454607   0.007454607
org-agenda-finalize   1   
0.006165148   0.006165148
org-at-date-range-p   36  
0.005066060.0001407238
org-agenda-align-tags 1   
0.005057498   0.005057498
org-backward-heading-same-level   2   
0.003762298   0.001881149
org-agenda-highlight-todo 45  
0.0033643649  7.476...e-05
org-fit-window-to-buffer  1   
0.003328753   0.003328753
org-diary-sexp-entry  27  
0.002785114   0.0001031523
org-agenda-files  3   
0.002448539   0.0008161796
org-agenda-add-time-grid-maybe1   
0.002256168   0.002256168
org-closest-date  26  
0.002233855   8.591...e-05
org-check-agenda-file 28  
0.0020999359  7.499...e-05
org-get-agenda-file-buffer28  
0.001792991   6.403...e-05
org-entries-lessp 166 
0.0017702189  

Re: [O] new exporter: link abbrev

2012-12-18 Thread Nicolas Goaziou
Michael Brand michael.ch.br...@gmail.com writes:

 In the meantime I found out that I can simply add
 org-export-normalize-links to org-export-before-processing-hook and it
 seems to do what I expect. But this is probably not to be included in
 Org core because the (hopefully at least only basic) pre-parsing of
 org-export-normalize-links undermines the later parsing of
 org-elements. In case org-export-normalize-links would survive the old
 exporter (I fear it will not) the workaround of hooking would do it
 for me.

The problem should now be fixed without using any trick (and no,
`org-export-normalize-links' will not survive the old exporter).


Regards,

-- 
Nicolas Goaziou



Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Abdó Roig-Maranges


Hi

 sometime between last week and today, there has been a dramatic
 slowdown in the generation of an agenda view.

I tracked it back to commit a7afe7d, but haven't had the time to
investigate it further. On my case the slowdown is not as dramatic as
Eric's, though.

Abdo.



Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Bastien
Hi Eric,

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

 Unfortunately, I haven't had the chance to go through the changes over the
 past week to see if I could identify which one causes the dramatic change
 in performance.

My guess is commit 980e522 -- can you confirm this?

-- 
 Bastien



Re: [O] texinfo back-end won't export to INFO

2012-12-18 Thread Bastien
Hi Nicolas,

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

 I can remove the last argument, bringing down the sum of arguments to 2.
 Should I?

No, i think it's good to have such flexible filters.

Let's see if users request a simple generic after-export
(or before-saving-file) hook.

Thanks,

-- 
 Bastien



Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Abdó Roig-Maranges

Hi,

 My guess is commit 980e522 -- can you confirm this?

I don't think it is 980e522. Here are my timings

a7afe7d:10.6 s
c4bf1ee:3.86 s

980e522:3.8  s
08e4111:3.88 s

that point to a7afe7d. It reads the files all right in about 4s, and on
the extra 6 seconds it just keeps thinking hard, until it displays the agenda.

Abdo.



Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Nick Dokos
Bastien b...@altern.org wrote:

 Hi Eric,
 
 Fraga, Eric e.fr...@ucl.ac.uk writes:
 
  Unfortunately, I haven't had the chance to go through the changes over the
  past week to see if I could identify which one causes the dramatic change
  in performance.
 
 My guess is commit 980e522 -- can you confirm this?
 


I doubt it - this commit is not in the range that Eric identified (indirectly
in the filenames, so I'm guessing):

,
| $ git log --oneline 47ea1666..76cf2538 
| 76cf253 Merge branch 'maint'
| 7739e8b Small refactoring
| 0f3264f org-agenda.el: Use `org-todo-keyword-faces' to highlight selected 
TODO keywords.
| 0db5f28 org-html.el and org-e-html.el: Add CSS classes to list tags.
| bbb451a Merge branch 'maint'
| 374efdd org.el (org-in-fixed-width-region-p): Rewrite using org-element.el.
| 4996e5b Merge branch 'maint'
| 9d4dd69 org.el (org-fill-paragraph): Fill correctly in source code block.
| 1af0b39 Allow C-S-up/down to sync update clock timestamps by several units.
| 709bf92 Backwards compatibility for `user-error´
| 676180a org-e-texinfo.el: Fix link export to account for alternate TOC names
| 83b5679 org-export: Fix docstring
| 442b2ad Merge branch 'maint'
| 20839ce org-element: Fix parsing of a list in a block in a list
| 4588244 Revert tangled files should not be writable
| 457c27d org-e-confluence: Add asynchronous export support
| fa0e8fe org-test.el (org-test-with-temp-text-in-file): Wrap ,@body into 
(progn ...).
| c8452bf Merge branch 'maint'
| c0675b4 test-org-src.el: Fix a test.
| 8f3b8ee testing/org-test.el: Fix `org-test-with-temp-text'.
| e77f26e contrib/lisp/org-e-confluence.el: New file by Sébastien Delafond
| 20940bb contrib/lisp/org-bullets.el: New file by Evgeni Sabof
| db5881f Merge branch 'master' of orgmode.org:org-mode
| beea46f Merge branch 'maint'
| 0b44eb6 Add doclicense.texi to include the GNU FDL license and fix the 
copyright notice.
| e556812 org-export: Fix docstring
| 68d4de2 org-koma-letter: Add asynchronous export support
| a223d1a * contrib/lisp/org-e-texinfo.el: Remove messages used for debugging 
(org-e-texinfo--generate-menu-items): Remove messages used for debugging.
| 2dbd84e Merge branch 'maint'
| 6f5b4a8 orgguide.texi: Fix the copyright notice.
| 6af6e95 Merge branch 'maint'
| cd24962 org.texi: Update copyright notice.
| db51b80 Merge branch 'maint'
| df09917 org.el (org-edit-special): Fix bug about editing special environments.
| 81d5ebc org-src.el (org-edit-src-code): Check if we are in a source code 
block with `org-in-src-block-p'.
| a7afe7d org.el (org-in-src-block-p): Return t when on #+BEGIN|END_SRC lines.
| b866204 Merge branch 'maint'
| c4bf1ee Remove gplmanual.pl as we are not allowed to dual-license the Org 
manual.
| 6202df5 Merge branch 'master' of orgmode.org:org-mode
| 2c164be Merge branch 'maint'
| 4524a02 Edit source: fix 'end' initialisation
| 22e4a4e Revert org-src.el (org-edit-src-code): Fix bug on Emacs 24.1.
| 286fd7f org-e-beamer/html: Asynchronous export ignores 
`org-export-show-temporary-export-buffer'
| 26d2490 Merge branch 'maint'
| 0584dff ob-exp.el (obe-marker): Delete useless var.
| ac1b117 Merge branch 'maint'
| 70b0f42 Fix copyright notices for test files.
| a0cb4a3 add tests for org-src-edit
| f72bb57 Merge branch 'master' of orgmode.org:org-mode
| 22ee29b Merge branch 'maint'
| 7a770c1 org-src.el (org-edit-src-code): Fix bug on Emacs 24.1.
| 06872a4 export back-ends: Activate asynchronous export
| 5319cec org-e-publish: Activate asynchronous publishing
| ffb630b org-export: Add asynchronous process wrapper for export
| 5c1eab5 * contrib/lisp/org-e-texinfo.el: Provided export of info: links
| 31d24aa Merge branch 'maint'
| 82db0aa org.texi: Fix typos.
| 8c04fb7 org-exp.el (org-export-copy-to-kill-ring): Add a new choice 
'if-interactive and use it as the default.
| 627d573 org-e-html: Small refactoring
| 2c39a4a export back-ends: Apply line break changes
| 6e37a4d org-element: Fix line break parsing
| 8dd3fa3 Use the org-mime-default-header customized variable
| 2c34715 option to byte-compile elisp loaded from Org files
| 5e3b825 tangled files should not be writable
| ff00818 requiring ob now pulls in all of Babel
| 0694965 renaming lisp/ob.el to lisp/ob-core.el
| ba59eeb ob-python: specify defcustom parameters
| 01bf706 org-babel: fix bug introduced in commit 78cdf149
| cf9838f org.el: Display the blocking heading when a TODO state change is 
blocked.
| 1bfea39 Support `C-1' prefix for `org-agenda-capture' and `org-capture'.
| 275f07c Merge branch 'maint'
| 488eea6 org-latex.el: Escape raw path when exporting links to files.
`

a7afe7d was my initial guess because of the profiles:

org-in-src-block-p813 
0.0134103450  1.649...e-05

org-in-src-block-p813 
28.441751922  0.0349837047

That's a whopping difference for such a simple function.

Abdo Roig-Maranges apparently did a bisect and came to the same 

[O] Opening (for the first time) a 10-line Org doc takes 4 seconds

2012-12-18 Thread Sebastien Vauban
Hello,

Looking at how to improve my Org config, regarding speed, I notice that it
takes 4.22 s to open a simple 10-line Org file *for the first time* (when Org
wasn't loaded yet). The reason is that it requires a big amount of packages,
those requiring themselves many others, and so on.

Do you find such a time normal, or too much?

How to redo the test:

emacs -q -l .emacs-minimal.el

where `.emacs-minimal.el' is:

--8---cut here---start-8---
(message Loading Minimal Emacs...)

(defconst em/emacs-load-time-start (float-time))

;; change the pathnames appropriately!
(add-to-list 'load-path (expand-file-name ~/src/org-mode/lisp))
(add-to-list 'load-path (expand-file-name ~/src/org-mode/contrib/lisp))

(add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode))
(if (locate-library org-loaddefs)
(require 'org-loaddefs)
  (require 'org-install))

(defadvice require (around require-around)
  Leave a trace of packages being loaded.
  (let* ((feature (ad-get-arg 0))
 (require-depth (or (and (boundp 'require-depth) require-depth)
0))
 (prefix (concat (make-string (* 2 require-depth) ? ) )))
(cond ((featurep feature)
   (message %s%s - %s... Done ;; already loaded
prefix
(if load-file-name
(file-name-base load-file-name)
  nil?)
feature)
   (setq ad-return-value feature))
  (t
   (let ((lvn/time-start))
 (message %s%s - %s...
  prefix
  (if load-file-name
  (file-name-base load-file-name)
nil?)
  feature)
 (setq lvn/time-start (float-time))
 (let ((require-depth (1+ require-depth)))
   ad-do-it))

(ad-activate 'require)

(find-file TODO.org)

(message Loading Minimal Emacs... Done (in %.2f s)
 (- (float-time) em/emacs-load-time-start))
--8---cut here---end---8---

and `TODO.org' is some simple Org file such as:

--8---cut here---start-8---
#+TITLE: Simple Org file
#+LANGUAGE:  en-us

* Emacs

** TODO Improve performance

Check out how to improve overall perf by putting chunks of code inside
(eval-after-load) forms.
--8---cut here---end---8---

That results in all the following packages to be loaded:

--8---cut here---start-8---
Loading Minimal Emacs...
.emacs-minimal - help-fns... Done [2 times]
org - cl...
  cl - cl-lib... Done
  cl - macroexp... Done
org - gnus-sum...
  gnus-sum - gnus...
gnus - wid-edit...
gnus - mm-util...
  mm-util - mail-prsvr...
  mm-util - timer... Done
gnus - nnheader...
  nnheader - mail-utils...
  nnheader - mm-util... Done
  nnheader - gnus-util...
gnus-util - time-date... Done
gnus - gnus-util... Done
gnus - nnheader... Done
gnus - gnus-ems...
  gnus-sum - gnus-group...
gnus-group - gnus... Done
gnus-group - gnus-start...
  gnus-start - gnus... Done
  gnus-start - gnus-win...
gnus-win - gnus... Done
gnus-win - gnus-util... Done
  gnus-start - gnus-int...
gnus-int - gnus... Done
gnus-int - message...
  message - mailheader...
  message - gmm-utils...
  message - mail-utils... Done
  message - mailabbrev...
  message - mail-parse...
mail-parse - mail-prsvr... Done
mail-parse - ietf-drums...
  ietf-drums - mm-util... Done
mail-parse - rfc2231...
  rfc2231 - ietf-drums... Done
  rfc2231 - rfc2047...
rfc2047 - mm-util... Done
rfc2047 - ietf-drums... Done
rfc2047 - mail-prsvr... Done
rfc2047 - rfc2045...
  rfc2045 - ietf-drums... Done
mail-parse - rfc2047... Done
mail-parse - rfc2045... Done
  message - mml...
mml - mm-util... Done
mml - mm-bodies...
  mm-bodies - mm-util... Done
  mm-bodies - rfc2047... Done
  mm-bodies - mm-encode...
mm-encode - mail-parse... Done
mml - mm-encode... Done
mml - mm-decode...
  mm-decode - mail-parse... Done
  mm-decode - mm-bodies... Done
mml - mml-sec...
  message - rfc822...
  message - format-spec...
  cl-macs - cl-lib... Done
  cl-macs - macroexp... Done
  cl-macs - gv...
gv - macroexp... Done
  message - idna...
gnus-int - gnus-range...
  gnus-start - gnus-spec...
gnus-spec - gnus... Done
  gnus-start - gnus-range... Done
  gnus-start - gnus-util... Done

Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Bastien
Hi Abdó,

Abdó Roig-Maranges abdo.r...@gmail.com writes:

 I tracked it back to commit a7afe7d, but haven't had the time to
 investigate it further. On my case the slowdown is not as dramatic as
 Eric's, though.

Thanks for the investigation.

The problem was that org-agenda-skip, which is called many times 
during agenda generation, checks whether the point is in a code
source block.  The new org-in-src-block-p distinguish whether 
we are really within or at (which includes the #+begin_src
and #+end_src lines).  org-agenda-skip just needs to check
if we are _within_.  I fixed this.

-- 
 Bastien



Re: [O] Emacs 22 compatibility

2012-12-18 Thread Bastien
Hi Yagnesh,

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

 I just tried building. it was successful although there are lot of
 warnings.

Good to know it builds fine, even with all those warnings.

Are you using this version?  If so, would you be willing to
report compatibility problems that may happen?

Thanks!

-- 
 Bastien



Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Bastien
Hi Eric,

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

 sometime between last week and today, there has been a dramatic slowdown in
 the generation of an agenda view.  Using elp to instrument the org package
 and then asking for the default agenda view (C-c a a), I get the attached
 results.  The agenda view takes just under 2 seconds with org from commit
 47ea1666 (12 December) and over 30 seconds with org from commit 76cf2538
 (today, up to date).  I have attached the two outputs from elp.

This should be fixed -- let me know if the problem persists.

Thanks,

-- 
 Bastien



Re: [O] Anyone using or working on ob-scheme?

2012-12-18 Thread Jeff Mickey
On Mon, Nov 26, 2012 at 3:34 PM, Michael Gauland
mikely...@no8wireless.co.nz wrote:
 Wish me luck!

Indeed!

I'm running into these problems as well. I was curious if you've had
any time to work on this.

As a general question to the org list: What dynamic languages similar
to how scheme will interact with it's inferior process (python and
ruby?) have decently complete org babel implementations that I can
look at to fix parts of this? I'd like to get :session working.

  //  jeff



Re: [O] indentation across multiple source blocks

2012-12-18 Thread Tony Day
On 18 Dec 2012, at 22:55, Bastien b...@altern.org wrote:

 Hi Tony,
 

Hi Bastien,

Thanks for the flurry of activity :)

 Tony Day tonyday...@gmail.com writes:
 
 Is there an easy way to preserve indentation for a source block taking
 into account previous blocks?  
 
 No.  Besides, I don't really see a good case where it would make sense
 to split functions across code blocks... surely a lack of imagination :)

More like a terrible example.  Here's a more complicated one out in the wild 
(from https://github.com/renard/o-blog) - templating html creation.

https://gist.github.com/4333546

I imagine patches would be welcome :)





Re: [O] Anyone using or working on ob-scheme?

2012-12-18 Thread Thorsten Jolitz
Jeff Mickey j...@archlinux.org writes:

 As a general question to the org list: What dynamic languages similar
 to how scheme will interact with it's inferior process (python and
 ruby?) have decently complete org babel implementations that I can
 look at to fix parts of this? I'd like to get :session working.

Maybe have a look at ob-picolisp.el? Its not really tested out there in
the wild, but I had quite a lot of testcases that worked out fine.

Its included in Org-mode, but there is a github repo with two additional
test-files: 

,
| https://github.com/tj64/ob-picolisp
`

-- 
cheers,
Thorsten




Re: [O] Anyone using or working on ob-scheme?

2012-12-18 Thread Michael Gauland
On 19/12/12 13:48, Jeff Mickey wrote:
 I'm running into these problems as well. I was curious if you've had
 any time to work on this. As a general question to the org list: What
 dynamic languages similar to how scheme will interact with it's
 inferior process (python and ruby?) have decently complete org babel
 implementations that I can look at to fix parts of this? I'd like to
 get :session working. // jeff 
Thanks for asking, Jeff. I've had quite good success using geiser. I'm
still waiting to hear from the FSF about updating my assignment, but I'd
be happy to unofficially share my code with you in the meantime.

Kind Regards,
Mike Gauland




signature.asc
Description: OpenPGP digital signature


[O] Python code for producing Org tables

2012-12-18 Thread François Pinard
Hi, Org people.

I recently needed to produce Org tables from within Python, splitting
them as needed to fit within a preset width.  I append the code after my
signature, in case it would be useful to others (or even, if you have
ideas to improve it).

One thing I only realized after writing this, however, is that I wrongly
thought Org mode was aligning floating numbers on the decimal period,
while it merely right align floating numbers regardless of the position
of the period.  So, I turn my mistake into a suggestion, as I think it
would be more convenient if Org mode was aligning floating numbers more
appropriately.

I even thought trying to contribute some Emacs Lisp code to do so, but
seeing that I'm short on free time in these days (like too often), I now
find more fruitful to merely share the idea (and the Python code) now.

François



def to_org(titles, rows, write, hide_empty=False, margin=0, easy=4, span=1,
   fillto=None, limit=None):
\
Given a list of column TITLES, and a list of ROWS, each containing a list
of columns, use WRITE to produce a Org formatted table with the text of
columns. If HIDE_EMPTY is not False, then omit columns containing nothing but
empty strings.  The formatted table is shifted right by MARGIN columns.

To accomodate for titles, the width of a column will easily extend to EASY,
or to whatever is needed so the title is not split on more than SPAN lines.
FILLTO may be used to force last column to extend until that position.  LIMIT
may be used to impose a limit to the number of characters in produced lines.

If TITLES is None, the titles are not produced.

Columns containing only numbers (integer or floating) align them properly.


# Exit if nothing to display.
if not rows:
return

# Compute widths from data.
rows = [[safe_unicode(column, 30).replace('\\', '')
 .replace('|', '\\vert{}') for column in row]
 for row in rows]
# Each WIDTH is the column width as strings.  Each LEFT is either
# False when there is a no-number in the column or the maximum width
# of the integral part of all numbers.  When LEFT is not None, each
# RIGHT is either the maximum width of the fraction part including
# the decimal point of all numbers, or 0 if all pure integers.
widths = [0] * len(rows[0])
lefts = [0] * len(rows[0])
rights = [0] * len(rows[0])
for row in rows:
for counter, cell in enumerate(row):
widths[counter] = max(widths[counter], len(cell))
if lefts[counter] is not False:
match = re.match('([0-9]*)(\\.[0-9]*)$', cell)
if match is None:
lefts[counter] = False
else:
lefts[counter] = max(lefts[counter],
 len(match.group(1)))
if match.group(2):
rights[counter] = max(rights[counter],
  len(match.group(2)))
for counter, (left, right) in enumerate(zip(lefts, rights)):
if left == 0 and right == 0:
lefts[counter] = False
elif left is not False:
widths[counter] = left + right

# Extend widths as needed to make room for titles.
if titles is not None:
for counter, (width, title) in enumerate(zip(widths, titles)):
if (not hide_empty or width) and len(title)  width:
if len(title) = easy:
widths[counter] = len(title)
else:
for nlines in range(2, span):
if len(title) = easy * nlines:
widths[counter] = max(
width, (len(title) + nlines - 1) // nlines)
break
else:
widths[counter] = max(
width, (len(title) + span - 1) // span)
if fillto:
extend = fillto - margin - sum(widths) - 3 * len(widths) - 1
if extend  0:
widths[-1] += extend

# Horizontally split the display so each part fits within LIMIT columns.
end = 0
while end  len(widths):
start = end
if limit is None:
end = len(widths)
else:
remaining = limit - margin - widths[start] - 4
end = start + 1
while end  len(widths) and remaining = widths[end] + 3:
remaining -= widths[end] + 3
end += 1
# Now ready to output columns from START to END (excluded).

# Skip this part if nothing to display.
if hide_empty:
for width in widths[start:end]:
if width:
break
else:
continue
if start  0:
write('\n')

if titles is not None:
# Write title lines, splitting titles as needed.
pairs = 

Re: [O] Opening (for the first time) a 10-line Org doc takes 4 seconds

2012-12-18 Thread Bastien


Hi Sébastien,

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

 (if (locate-library org-loaddefs)
 (require 'org-loaddefs)
   ^

You don't need this, there is (load org-loaddefs.el t t) in org.el.

Are your org elisp files compiled?

What results do you have without the advice on `require'?

-- 
 Bastien




Re: [O] Dramatic slowdown in org mode

2012-12-18 Thread Fraga, Eric
 From: Bastien Guerry [bastiengue...@gmail.com] on behalf of Bastien 
 [b...@altern.org]
 Fraga, Eric e.fr...@ucl.ac.uk writes:
 
  sometime between last week and today, there has been a dramatic slowdown in
  the generation of an agenda view.  Using elp to instrument the org package
  and then asking for the default agenda view (C-c a a), I get the attached
  results.  The agenda view takes just under 2 seconds with org from commit
  47ea1666 (12 December) and over 30 seconds with org from commit 76cf2538
  (today, up to date).  I have attached the two outputs from elp.
 
 This should be fixed -- let me know if the problem persists.

Bastien,

this has definitely been fixed!  Thank you very much.

And thanks to everybody else that investigated while I slept ;-)  I am 
completely jet-lagged (after 30+ hour trip from Oz to UK)...

eric




Re: [O] Emacs 22 compatibility

2012-12-18 Thread Yagnesh Raghava Yakkala

Hello Bastien,

On 12月 19 2012, Bastien b...@altern.org wrote:

 Hi Yagnesh,

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

 I just tried building. it was successful although there are lot of
 warnings.

 Good to know it builds fine, even with all those warnings.

 Are you using this version?  

No, I don't use version. 

If so, would you be willing to
 report compatibility problems that may happen?

Since I don't use that version, I am afraid I can not assure.

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



[O] Emacs conference 30/3/2013 in London

2012-12-18 Thread Ivan Kanis
Hello,

I am forwarding Alex e-mail from the emacs conference mailing list.

I can confirm that the date for the conf is 30th March. It will be
held at Forward, here:
http://www.forward.co.uk/contact

The venue can hold 100 people and there are various breakout areas,
which I think will be ideal to hold sessions/tutorials/lightning
talks.

The venue can also stream video live, but details about that a bit later.

One of the things I'd like to encourage, all the speakers is that the
talks should not be a set format, just to fill a particular time slot.
It should be any length where you can convey your message across. If
you want to make it more interactive, be it audience participation,
IRC participation or something else, feel free to include that.

The point is to encourage knowledge sharing and better tooling with
Emacs.

I would like to add that we have the following resources to organize the
conference:

  - Web site:
http://emacsconf.org

  - Mailing list:
http://lists.hugadev.com/listinfo.cgi/emacs-conf-hugadev.com

  - Twitter account
@EmacsConf

  - Talks organization document:
https://github.com/dotemacs/emacsconf-organisation/blob/master/talks.org

Take care,

Ivan
-- 
It's not what we have in our life, but who we have in our life,
that counts.
-- J.M. Laurence