Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Christopher Schmidt
Bastien b...@altern.org writes:
 Can you give an indication on how it impacts the generation of agenda?
 This is a potential blocker.

It should not impact agenda generation at all - neither feature nor
performance-wise.  All non-trivial changes are in parts of the code that
directly relate to orgstruct-mode or
org-\(forward\|backward\)-heading-same-level.  These functions and their
internals are not used non-interactively.

 Also, we won't be able to apply such a change until you assign your
 copyright to the FSF.  I'm not asking you to go through this now
 because I'm not sure we should apply the patch, but just to let you
 know.

I am familiar with the procedure.  The copyright of this patch goes to
the FSF, of course, and I have FSF papers signed.

Christopher



Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Bastien
Hi Christopher,

Christopher Schmidt christop...@ch.ristopher.com writes:

 Bastien b...@altern.org writes:
 Can you give an indication on how it impacts the generation of agenda?
 This is a potential blocker.

 It should not impact agenda generation at all - neither feature nor
 performance-wise.  All non-trivial changes are in parts of the code that
 directly relate to orgstruct-mode or
 org-\(forward\|backward\)-heading-same-level.  These functions and their
 internals are not used non-interactively.

org-outline-regexp-bol, org-\(forward\|backward\)-heading-same-level
are fundamental vars/functions -- any change here is likely to impact
the agenda generation.  So while I hope you're right, I'd feel better
with figures and tests :)

 Also, we won't be able to apply such a change until you assign your
 copyright to the FSF.  I'm not asking you to go through this now
 because I'm not sure we should apply the patch, but just to let you
 know.

 I am familiar with the procedure.  The copyright of this patch goes to
 the FSF, of course, and I have FSF papers signed.

Great, I've updated worg/org-contribute.org accordingly.

Thanks!

-- 
 Bastien



Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Christopher Schmidt
Bastien b...@altern.org writes:

Hi Bastien,

 Bastien b...@altern.org writes:
 Can you give an indication on how it impacts the generation of
 agenda?  This is a potential blocker.

 It should not impact agenda generation at all - neither feature nor
 performance-wise.  All non-trivial changes are in parts of the code
 that directly relate to orgstruct-mode or
 org-\(forward\|backward\)-heading-same-level.  These functions and
 their internals are not used non-interactively.

 org-outline-regexp-bol, org-\(forward\|backward\)-heading-same-level
 are fundamental vars/functions -- any change here is likely to impact
 the agenda generation.  So while I hope you're right, I'd feel better
 with figures and tests :)

org-outline-regexp-bol value is ^org-outline-regexp.  There is one place
in org where org-outline-regexp-bol is actually set -
org-with-limited-levels.  It is let-bound to (concat ^
org-outline-regexp).

BTW what is the reason for having both org-outline-regexp and
org-outline-regexp-bol?  Matching the latter should be
faster than the former.

org-\(forward\|backward\)-heading-same-level are referenced
non-interactively in three functions - org-forward-element,
org-backward-element and org-copy-subtree.  I checked the implementation
of these functions and I did not see how the new behaviour should break
these functions.

After all, the functions now do what they are supposed to do.  Try this:

* Org
** Achim
** Bastien
** Carsten
* Diary

Place point on Achim and C-c C-b.  Place point on Casten and C-c C-f.

All my agendas generate just fine.  I am not exactly sure how I can
provide figures and tests.  We do not have any agenda test cases in the
first place.

Please take a look at the patch when you have time.  The diff is not
that scary.

Greetings,

Christopher



[O] [PATCH] Avoid modification hooks in org-clock-sum

2013-01-31 Thread Francesco Pizzolante
Hello,

This patch avoid modification hooks to be run in org-clock-sum by using
org-unmodified (instead of simply saving and restoring buffer-modified-p).

On my system, this speeds up the creation of clock reports.

I should have indented the code but I didn't in order to respect the
less-than-20-lines change (I have no copyright assignment to the FSF yet).

Regards,
 Francesco

From b328fadfbc76143ab86286f8a9939fa2c49ba186 Mon Sep 17 00:00:00 2001
From: Francesco Pizzolante f...@missioncriticalit.com
Date: Wed, 30 Jan 2013 17:21:42 +0100
Subject: [PATCH] Avoid Protect org-clock-sum using org-unmodified

* org-clock.el (org-clock-sum): Avoid modification hooks in org-clock-sum

TINYCHANGE
---
 lisp/org-clock.el |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 7bd5b5a..945fcd0 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1675,8 +1675,8 @@ each headline in the time range with point at the 
headline.  Headlines for
 which HEADLINE-FILTER returns nil are excluded from the clock summation.
 PROPNAME lets you set a custom text property instead of :org-clock-minutes.
   (interactive)
-  (let* ((bmp (buffer-modified-p))
-(re (concat ^\\(\\*+\\)[ \t]\\|^[ \t]*
+  (org-unmodified
+(let* ((re (concat ^\\(\\*+\\)[ \t]\\|^[ \t]*
 org-clock-string
 [ \t]*\\(?:\\(\\[.*?\\]\\)-+\\(\\[.*?\\]\\)\\|=[ 
\t]+\\([0-9]+\\):\\([0-9]+\\)\\)))
 (lmax 30)
@@ -1753,8 +1753,7 @@ PROPNAME lets you set a custom text property instead of 
:org-clock-minutes.
  (setq t1 0)
  (loop for l from level to (1- lmax) do
(aset ltimes l 0)))
-  (setq org-clock-file-total-minutes (aref ltimes 0)))
-(set-buffer-modified-p bmp)))
+   (setq org-clock-file-total-minutes (aref ltimes 0))
 
 (defun org-clock-sum-current-item (optional tstart)
   Return time, clocked on current item in total.
-- 
1.7.9



Re: [O] Some advice on how to use babel to generate cisco configs

2013-01-31 Thread Karl Voit
* Bart Bunting b...@bunting.net.au wrote:
 Good morning,

Hi!

 What I would like to achieve is to have a table containing a few values,
 e.g. ip address vlan number etc.

 Then have a cisco config in the org file with markers where the
 substitutions are to be inserted.
 Run through the table and create a node in the org file one for each row
 of the table.

Are you planning to use this as a one-time creation thing or do you
want to re-run (and re-generate) the configs from the same table
multiple times?

 The end result should be a set of cisco configs with the substitutions
 made.  I was hoping to also use shell to call pwgen to generate a
 random password to insert.

If it is one-time only, you might be happy using a yasnippet
template which generates your substitutions.

-- 
Karl Voit




Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-01-31 Thread Martin Beck
Bernt Hansen bernt at norang.ca writes:
 
  Ho could I insert this additional column in the agenda view?
 
 I can't make it work in the block agenda but as a standalone agenda does
 this help?
 
 --8---cut here---start-8---
 (x test tags-todo PRIORITY=\A\ 
  ((org-agenda-overriding-header Critical)
   (org-agenda-entry-types '(:deadline))
   (org-columns-default-format %10CATEGORY(Category) %60ITEM(Task)
%15DEADLINE(Deadline) %15SCHEDULED(Scheduled))
   (org-agenda-view-columns-initially t)
   (org-agenda-sorting-strategy (quote (time-up category-keep)))
   (org-agenda-todo-ignore-scheduled 'future)
   (org-agenda-todo-ignore-deadlines 'future)))
 --8---cut here---end---8---
 
 This starts the agenda in column mode and shows category, task,
 deadline, scheduled dates.
 
 'q' exits column mode.
 
 In the block agenda if you turn on column mode with C-c C-x C-c you get
 the same information for all tasks in the agenda
 
 It's probably not exactly what you were looking for...
 
 Regards,
 Bernt
 
 

Hi Bernt,
thanks for your help - so if you can not make it work, I assume that it's not
possible yet? 
I tried your code - it does what it promises.. however, you're right, it's not
yet what I need:
I'd need Priority A and B in one view (table),
then sorted
* Prio A first
* Prio B second
lines sorted by date descending (newest first) .. would that be possible?

If I understand the problem right, I can get the deadline/scheduled information
in the agenda only with the agenda commmand, not with tags-todo or anything
else? This is a pity.
So theoretically, I'd have to use this agenda command and then tweak the sorting
function to arrange items by Prio first and then by date?
(That's what I tried already, based on your setup, but I was not able to make it
work yet..)

Kind regards

Martin




Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-01-31 Thread Martin Beck
Bernt Hansen bernt at norang.ca writes:

  But unfortunately, it does only display category, TODO-keyword 
  and subject, but
  NO information about Deadline or Scheduled date.
 

I tried to create a block agenda with several blocks based 
on the (agenda )command, but then I also have the time grid several times..

Martin





Re: [O] ...

2013-01-31 Thread Carsten Dominik
Hi Christopher,

I mant to copy the list, I am doing this again now.

Wow, I was not aware that Emacs caches by content, this is an important piece 
of information.  I guess this removed the main concern I had.  Thanks for 
looking it up in the code and showing it to me.  I am not sure if I understand 
that code completely, but i trust your judgment.

-Carsten

On 31 jan. 2013, at 10:29, Christopher Schmidt christop...@ch.ristopher.com 
wrote:

 Christopher Schmidt christop...@ch.ristopher.com writes:
 I was not aware of Emacs caching the regexp on a per-object rather
 than per-content basis.  If that is true, the regexp should be made a
 buffer local variable, of course!
 
 I do not think that's true.
 
 In compile_pattern:
 
  for (cpp = searchbuf_head; ; cpp = cp-next)
{
  cp = *cpp;
  ...
  if (SCHARS (cp-regexp) == SCHARS (pattern)
   STRING_MULTIBYTE (cp-regexp) == STRING_MULTIBYTE (pattern)
   !NILP (Fstring_equal (cp-regexp, pattern))
^^^
   EQ (cp-buf.translate, (! NILP (translate) ? translate : 
 make_number (0)))
   cp-posix == posix
   (EQ (cp-syntax_table, Qt)
  || EQ (cp-syntax_table, BVAR (current_buffer, 
 syntax_table)))
   !NILP (Fequal (cp-whitespace_regexp, Vsearch_spaces_regexp))
   cp-buf.charset_unibyte == charset_unibyte)
break;
 
  /* If we're at the end of the cache, compile into the nil cell
 we found, or the last (least recently used) cell with a
 string value.  */
  if (cp-next == 0)
{
compile_it:
  compile_pattern_1 (cp, pattern, translate, posix);
  break;
}
}
  ...
 
Christopher


-- 
They can't eat you. -- Merlin Mann in his Scared Shitless talk




Re: [O] ...

2013-01-31 Thread Christopher Schmidt
Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Christopher,

 I mant to copy the list, I am doing this again now.

 Wow, I was not aware that Emacs caches by content, this is an important piece 
 of
 information.  I guess this removed the main concern I had.  Thanks for looking
 it up in the code and showing it to me.  I am not sure if I understand that 
 code
 completely, but i trust your judgment.

Please, do not trust me.  This should be brought up to emacs-devel and
the definite answer should be documented in (info (elisp)Regular
Expressions).

Thanks a lot for your input.  Greetings,

Christopher



Re: [O] Fixes for org-capture-templates-contexts

2013-01-31 Thread Bastien
Hi Paul,

Paul Sexton psexton...@gmail.com writes:

 Bastien bzg at altern.org writes:

 If you can send a patch against master for this, I'd be happy to apply
 it!  Thanks again for pointing to these problems,
 

 Below are patches against org.el and org-capture.el.

I implemented the ability to check contexts against buffer names.

Thanks for triggering this,

-- 
 Bastien



Re: [O] Confused about inline html images

2013-01-31 Thread Bastien
Hi John,

John Hendy jw.he...@gmail.com writes:

 Still one issue: it's applying the attr_html to the wrong bit. Here's
 the resultant export output:

 #+attr_html: width=400px
 [[http://path/to/file.jpg][http://path/to/file.jpg]]

 becomes:

 a href=http://path/to/file.jpg; width=400pximg
 src=http://path/to/file.jpg; alt=file.jpg//a

Yes, that's wrong.  I fixed this.  Thanks for reporting it!

-- 
 Bastien



Re: [O] can babel results show time of evaluation?

2013-01-31 Thread Bastien
Hi Eric,

Eric Schulte schulte.e...@gmail.com writes:

 As a temporary fix, I put the full defconst invocation into ob-core.el,
 but this can't be the best solution.

Yep, having the same defconst twice...

 What's the best practice for how to use a defconst defined in an
 external file (when you can't require that file because that file
 requires you)?

To circumvent the dependency problem by having defconst in a separate
file that any file can load safely -- since that file will not require
any other file.

I'm not ready yet to take that road for now, because it requires time
and attention.  I just hardcoded the regexp in ob-core.el and added 
a warning.

Thanks,

-- 
 Bastien



Re: [O] no pdf-output in lilypond code blocks

2013-01-31 Thread Bastien
Hi Achim,

Achim Gratz strom...@nexgo.de writes:

 (or (cdr (assoc (file-name-extension out-file)
 '((pdf . --pdf )
 (ps . --ps )
 (png . --png 
 --png )

 work just as well?

Yes, I've committed this change, thanks.

-- 
 Bastien



Re: [O] footnote placement

2013-01-31 Thread Bastien
Hi Henry,

henry atting s...@online.de writes:

 Thanks Bastien. Okay, it is not possible by default. As a workaround I 
 manually
 put the footnotes where I want them to be. So far so good, but when I
 export the file to html the footnotes are at the end of the html
 document anyway. 

Yes, that's the way Org export works for now.

 Hence my second question. It would not bother me to
 change the footnotes' postion in the org file by hand if the org to html
 exporter would respect my changes.

Feature request registered, thanks.

-- 
 Bastien



Re: [O] can babel results show time of evaluation?

2013-01-31 Thread Bastien
Hi Achim,

Achim Gratz strom...@nexgo.de writes:

 Putting all definitions into a separate leaf file that can then be
 required from everywhere with impunity.  Bastien doesn't like this
 idea,

Maybe you misunderstood me.

I am very much in love with the idea of putting defconst in a
separate file.

What I don't like *at all* is the idea you proposed to put every
variable (including user options) in a separate file.  The reason why
I don't like this is because it will force potential contributors to
modify this Yeah-I-contain-all-variables!-file.  This would be a
maintainance burden.

-- 
 Bastien



Re: [O] [Bug] test-org-export/before-parsing-hook

2013-01-31 Thread Bastien
Hi Nicolas,

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

 It is more that this function does too much things behind the scenes
 (like calling `org-agenda-prepare-buffers') to be reliable in a test
 environment.

Agreed.  We are better off testing the behavior of `org-map-entries'
than using it for tests.

-- 
 Bastien



Re: [O] ...

2013-01-31 Thread Bastien
Hi Carsten and Christopher,

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

 I mant to copy the list, I am doing this again now.

 Wow, I was not aware that Emacs caches by content, this is an important
 piece of information.  I guess this removed the main concern I had.  Thanks
 for looking it up in the code and showing it to me.  I am not sure if I
 understand that code completely, but i trust your judgment.

I'm not sure I have all the background to understand the issue at
stake... can anyone educate me?  Thanks!

-- 
 Bastien



Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Bastien
Hi Christopher,

Christopher Schmidt christop...@ch.ristopher.com writes:

 All my agendas generate just fine.  I am not exactly sure how I can
 provide figures and tests.

You can instrument org with M-x elp-instrument-package RET org RET
then check the results (after running an agenda command) with 
M-x elp-results RET

You can also check with M-x profiler-start RET then get the report
with M-x profiler-report RET.

Hope that helps,

PS: To make things clear: I'm confident the patch is good, but I will
put it higher on my patch review process if I know the agenda does not
slow down :)

-- 
 Bastien



Re: [O] ...

2013-01-31 Thread Carsten Dominik
Hi Bastien,

as you know, regular expressions are a language to do a programmed search for 
text.  The pattern string has to be compiled before it can be used.  That 
compilation is a costly process, so most languages that have pattern matching 
use some kind of cache to store compiled patterns, so that frequently used 
patterns can be reused without compilation.

I am aware of this very much from studying perl.  In perl, a compiled pattern 
is associated with a particular instance of a string.  Often you build the 
pattern by constructing it through concatenation of other parts etc.  In Perl 
this means that the pattern is recompiled each time a match.  You can work 
around this issue in Perl by telling it explicitly and on programmers authority 
that, yes, this pattern is dynamically constructed, but only once, I guarantee 
that it will not change, so compile it only once.  So in Perl the difference is

/pattern/  will match against pattern
/$pattern/ will match agains the pattern contained in the
   variable $pattern, and recompilation will occur
   each time
/$pattern/owill compile only once and trust the programmer.

So I am very aware of this speedup issue.  And I thought that in Emacs, the 
caching would work by associating a specific string object with the compiled 
pattern.  But the code Christopher pointed out seems to suggest that the 
pattern cache works also for strings that are `equal', not only for string that 
are `eq'.

If this is the case, this means that there is only a very small difference 
between

(defconst my-pattern (concat ^ xyz))
(re-search-forward my-pattern )  ; many times in different functions

and

(defconst my-partial-pattern xyz)
(re-search-forward (concat ^ my-partial-pattern) )  ; many times

The difference is only the repeated concatenation operation, and not the 
recompilation.  I always thought that this would work differently, and that is 
why a lot of regexps get constructed and then stored in variables or constants. 
 Of course this is also a good practice for readable and maintainable code, but 
the impact on efficiency is not as big as I used to think.  So when I saw 
Christoher's initial patch, I thought a function to create
org-ooutline-regexp-bol would be a large burden in speed - but it now seems 
that it would only be a minor impact.

Still, I think making a local variable in buffers with org-struct-mode is also 
a good way to get the functionality Christopher wants.

Clearer?

- Carsten


On 31 jan. 2013, at 12:22, Bastien b...@altern.org wrote:

 Hi Carsten and Christopher,
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 I mant to copy the list, I am doing this again now.
 
 Wow, I was not aware that Emacs caches by content, this is an important
 piece of information.  I guess this removed the main concern I had.  Thanks
 for looking it up in the code and showing it to me.  I am not sure if I
 understand that code completely, but i trust your judgment.
 
 I'm not sure I have all the background to understand the issue at
 stake... can anyone educate me?  Thanks!
 
 -- 
 Bastien


-- 
There is no unscripted life.  Only a badly scripted one. -- Brothers Bloom




Re: [O] html export list indentation wrong with comments

2013-01-31 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 Commenting out a list item works properly, but exporting does not.

 Export of subtree to HTML.

Is it only when exporting subtrees?  

Do you also have this problem with the new exporter?

Thanks,

-- 
 Bastien



[O] Converting csv (with new lines) to org-mode.

2013-01-31 Thread Nicolas Richard
Hello everyone,

A csv table can include newlines in its fields, which confuses the csv
parser contained in org-table-convert-region. Since I had no time to
patch the current implementation of org-table-convert-region, I decided
to use an already existing csv parser found in marmalade. You find below
the code I used (requires pcsv, a csv parser) if anyone is interested.
It's very simple : pcsv does the work of transforming the csv into a
list of list, then I mapconcat those using  |  as separator.

(defun yf/lisp-table-to-org-table (table optional function)
  Convert a lisp table to `org-mode' syntax, applying FUNCTION to each of its 
elements.
The elements should not have any more newlines in them after
applying FUNCTION ; the default converts them to spaces. Return
value is a string containg the unaligned `org-mode' table.
  (unless (functionp function)
(setq function (lambda (x) (replace-regexp-in-string \n   x
  (mapconcat (lambda (x); x is a line.
   (concat |  (mapconcat function x  | )  |))
 table \n))

(defun yf/csv-to-table (beg end)
Convert a csv file to an `org-mode' table.
  (interactive r)
  (require 'pcsv)
  (insert (yf/lisp-table-to-org-table (pcsv-parse-region beg end)))
  (delete-region beg end)
  (org-table-align))

-- 
N.




Re: [O] How to improve Org startup time?

2013-01-31 Thread Sebastien Vauban
Hi Eric,

Eric S Fraga wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 Please find here an enriched log of the packages which are loaded for Org, 
 and
 the time it takes.

 [2013-01-29 21:20:18] (info) +- Requiring `appt'...
 [2013-01-29 21:20:18] (info)   +- Requiring `diary-lib'...
 [2013-01-29 21:20:18] (info) +- Requiring `calendar'...

 how do you get this output?  It looks very useful!

The timestamp stuff comes from EmacsWiki:

#+begin_src emacs-lisp
  (defadvice message (before when-was-that activate)
Add timestamps to `message' output.
(ad-set-arg 0 (concat (format-time-string [%Y-%m-%d %T] )
  (ad-get-arg 0
#+end_src

The call tree between packages is originally written by me:

#+begin_src emacs-lisp
  (defadvice require (around require-around activate)
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 (info) %sRequiring `%s'... already loaded
  prefix feature)
 ;; in the case `ad-do-it' is not called, you have to set the
 ;; return value yourself!
 (setq ad-return-value feature))
(t
 (let ((lvn/time-start))
   (message (info) %sRequiring `%s'... prefix feature)
   (setq lvn/time-start (float-time))
   (let ((require-depth (1+ require-depth)))
 ad-do-it)
   (message (info) %sRequiring `%s'... %s (loaded in %.2f s)
prefix feature
(locate-library (symbol-name feature))
(- (float-time) lvn/time-start)))
#+end_src

You can further improve what you see in the echo area with:

#+begin_src emacs-lisp
  (defadvice load (before debug-log activate)
(message (info) Loading %s... (locate-library (ad-get-arg 0

  (defadvice load-library (before debug-log activate)
(message (info) Loading library `%s'... (locate-library (ad-get-arg 0

  (defadvice load-file (before debug-log activate)
(message (info) Loading file `%s'... (locate-library (ad-get-arg 0

  (defadvice find-file (around find-file-around activate)
Open FILENAME and report time spent.
(let ((filename (ad-get-arg 0))
  (find-file-time-start (float-time)))
  (message (info) Finding file %s... filename)
  ad-do-it
  (message (info) Found file %s in %.2f s. filename
   (- (float-time) find-file-time-start
#+end_src

Adapt it to your taste (and report it!)...

 In terms of the actual topic of this thread, I can say that the recent
 changes to org for startup have led to a significant decrease in my
 emacs startup time.  Thanks to all that have done this!

I hope to benefit from all that soon, as well...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: Author email not included in postamble when doing HTML export [7.9.3d (release_7.9.3d-898-g005917-git @ org-loaddefs.el can not be found!)]

2013-01-31 Thread Bastien
Hi Michael,

Michael Armbrecht michael.armbre...@gmail.com writes:

 Aaah. Apparently I didn't understand the doc correctly :/
 In fact, I like the #+OPTIONS way best.

Well, the docstring of org-export-html-post/preamble-format
forgot to mention that org-export-html-post/preamble needs
to be `t' so that these variables have any effect.

I just pushed this change, thanks!

-- 
 Bastien



Re: [O] How to improve Org startup time?

2013-01-31 Thread Sebastien Vauban
Hi Eric,

Eric S Fraga wrote:
 Some timings on a 3-4 (?) year old netbook with Intel N450 Atom @1.66GHz
 dual core powered:

 With old org, actually from October 2012 (!) as this system acts as a
 cloud server for me so I don't actually use it interactively much:

 | org-agenda-to-appt |   1 | 12.525722775  | 12.525722775  |
 | org-agenda-prepare-buffers |   2 | 10.719484861  |  5.3597424305 |
 | org-agenda-get-day-entries |  15 |  1.4113181819 |  0.0940878787 |
 | org-agenda-get-scheduled   |  15 |  1.032943071  |  0.0688628714 |
 | org-agenda-get-deadlines   |  14 |  0.2688785840 |  0.0192056131 |
 | org-agenda-skip| 797 |  0.1879489969 |  0.0002358205 |

 and with up to date org as of a few minutes ago:

 | org-agenda-to-appt |   1 | 9.168879079  | 9.168879079  |
 | org-agenda-prepare-buffers |   2 | 8.1717637810 | 4.0858818905 |
 | org-agenda-get-day-entries |  15 | 0.5261351449 | 0.0350756763 |
 | org-agenda-get-deadlines   |  14 | 0.253867925  | 0.0181334232 |
 | org-agenda-get-scheduled   |  15 | 0.1835072029 | 0.0122338135 |
 | org-agenda-skip| 797 | 0.0482942050 | 6.059...e-05 |

 I.e. an approximately 25% reduction in time overall so I think
 org-agenda is significantly faster (okay, not orders of magnitude) but
 the time taken is dominated by org-agenda-prepare-buffers on this
 system.

 However, more interestingly, on a 1 year old desktop computer Intel Core
 i5-2500 @ 3.30 GHz, I get very different behaviour:

 | org-agenda-to-appt |   1 | 0.182718048  | 0.182718048  |
 | org-agenda-get-day-entries |  14 | 0.095832824  | 0.0068452017 |
 | org-agenda-prepare-buffers |   1 | 0.086104933  | 0.086104933  |
 | org-agenda-get-scheduled   |  14 | 0.067475949  | 0.0048197106 |
 | org-agenda-skip| 794 | 0.0475198030 | 5.984...e-05 |
 | org-agenda-get-deadlines   |  14 | 0.014998552  | 0.0010713251 |

 Notice the big change in org-agenda-prepare-buffers relative to the
 other calls.  Disk performance is almost likely the key here and I think
 the recent improvements are quite dramatic but I haven't had a chance to
 time these yet.

Dividing the figures by 50, just for the disks, seems too big for me, nope?

Just to be sure: are you sure that, in this last test, `org-agenda-to-appt'
was called without having first opening the agenda files?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Bug: ODT export and environments

2013-01-31 Thread Cassio Koshikumo
Oh, that's great!  I was out of the loop for a while and didn't even know
there was a new exporter on the works.

Thanks and best regards,


On Wed, Jan 30, 2013 at 7:47 AM, Bastien b...@altern.org wrote:

 Hi Cassio,

 Cassio Koshikumo ckoshik...@gmail.com writes:

  I think there's a bug when exporting files to ODT using environments
  (center, quote etc.).  Sample file:
 
  * Testing
  #+BEGIN_CENTER
  First line.
 
  Second line.
  #+END_CENTER
 
  When exporting that, only First line will have the correct style
  OrgCenter.  Second line (and all subsequent ones) will have the
  default Text body style.

 Yes, there is a bug here.  The bug is not present in the new exporter,
 which will be merged very soon now.

 Thanks for reporting this,

 --
  Bastien




-- 
Cássio


Re: [O] Problems with TODO and agenda command

2013-01-31 Thread Bastien
Hi Aaron,

Siegel, Aaron J. aaron_sie...@fmi.com writes:

 This first task in this tutorial did not work for me. When I closed
 the task using C-c C-t I did not receive a time stamp. I have
 scheduled tasks and set deadlines for tasks but when I execute the
 command C-c a a I do not see any tasks in the agenda.

What do you get instead of the agenda?

Did you made any progress by checking other tutorials,
maybe some video screencast on the web?

Let us know,

-- 
 Bastien



[O] roundtrip integration with Asana?

2013-01-31 Thread Meng Weng Wong
I use org for personal task management, but I use asana.com with my workgroup.

I just learned that Asana offers an API that exposes all the usual interfaces.
http://developers.asana.com/documentation/

Roundtrip integration between org and Asana is therefore possible.

I'm sure I'm not the first person to have thought about this... which approach 
would be the preferred architecture for achieving such integration?

I can imagine writing, say, a bunch of Perl scripts using WWW::Asana, to act as 
a gateway between text file and web API. As far as org and emacs are concerned, 
the text files magically update themselves, and no additional elisp need be 
written.

I can also imagine native org-mode extensions that talk directly to asana, in 
the same way that org2blog/wp talks directly to Wordpress. Until emacs gets 
threading support, though, blocking HTTP IO operations might seriously 
inconvenience one's editing.

Which approach do you think is preferable?




Re: [O] Some advice on how to use babel to generate cisco configs

2013-01-31 Thread Thomas S. Dye
Aloha Bart,
Bart Bunting b...@bunting.net.au writes:

 Good morning,

 I have been trying to figure out without much luck how to use babel to
 generate some cisco configs.


 What I would like to achieve is to have a table containing a few values,
 e.g. ip address vlan number etc.

 Then have a cisco config in the org file with markers where the
 substitutions are to be inserted.
 Run through the table and create a node in the org file one for each row
 of the table.

 The end result should be a set of cisco configs with the substitutions
 made.  I was hoping to also use shell to call pwgen to generate a
 random password to insert.
   
 Hope that ramble made some sort of sence.

I don't know a Cisco config from a fig newton, but here is my sense of
what you wrote, in case it is helpful.

#+name: cisco-table
| 1 | one   | two  |
| 2 | three | four |
| 3 | five  | six  |

#+header: :results output raw
#+header: :var x=cisco-table
#+begin_src python
  for y in x:
  s = * Cisco %s \nTwiddle %s, poke %s \n\n % tuple(y)
  print s,
#+end_src

#+results:
* Cisco 1 
Twiddle one, poke two 

* Cisco 2 
Twiddle three, poke four 

* Cisco 3 
Twiddle five, poke six 

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



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-31 Thread Bastien
Hi Nick,

Nick Dokos nicholas.do...@hp.com writes:

 (defun org-force-lazy-text-properties ()
 (jit-lock-function 1))

 It seems to work at least for small files. There seem to be limits
 to how much fontification it does, so if the file is bigger, it might
 miss things. The more likely misfeature however is that it will slow
 down the agenda to a crawl. It's an existence proof, not a solution.

Still interesting to know... it leaves other experiments to do in hope
we can still optimize the agenda!  Thanks for sharing this,

-- 
 Bastien



Re: [O] Problems with TODO and agenda command

2013-01-31 Thread Siegel, Aaron J.
Bastien

It is working, I used the C-c [ command to add the file to the agenda list.  I 
do not know why the configuration in my .emacs did not work,  understanding the 
Agenda file list is on my TODO list.  The time stamp is a custom configuration 
that can be added to the header of a org file.  

Thank you
Aaron 

-Original Message-
From: Bastien Guerry [mailto:bastiengue...@gmail.com] On Behalf Of Bastien
Sent: Thursday, January 31, 2013 3:42 AM
To: Siegel, Aaron J.
Cc: emacs-orgmode@gnu.org
Subject: Re: Problems with TODO and agenda command

Hi Aaron,

Siegel, Aaron J. aaron_sie...@fmi.com writes:

 This first task in this tutorial did not work for me. When I closed 
 the task using C-c C-t I did not receive a time stamp. I have 
 scheduled tasks and set deadlines for tasks but when I execute the 
 command C-c a a I do not see any tasks in the agenda.

What do you get instead of the agenda?

Did you made any progress by checking other tutorials, maybe some video 
screencast on the web?

Let us know,

--
 Bastien





Re: [O] ...

2013-01-31 Thread Bastien
Hi Carsten,

thanks a lot for the very clear explanations.

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

 The difference is only the repeated concatenation operation, and not the
 recompilation.  I always thought that this would work differently, and that
 is why a lot of regexps get constructed and then stored in variables or
 constants.  Of course this is also a good practice for readable and
 maintainable code, but the impact on efficiency is not as big as I used to
 think.  So when I saw Christoher's initial patch, I thought a function to
 create
 org-ooutline-regexp-bol would be a large burden in speed - but it now seems 
 that it would only be a minor impact.

That was my assumption too... hence my reaction to Christopher's
patch.

It now makes sense -- I'll ask for confirmation on the emacs-devel as
suggested by Christopher.

 Still, I think making a local variable in buffers with
 org-struct-mode is also a good way to get the functionality
 Christopher wants.

Mh... here I'm not sure to understand what you suggest. 
Isn't the whole point of Christopher's patch to rely on
a buffer local value of org-outline-regexp?  I surely miss
something.

Thanks!

-- 
 Bastien



Re: [O] ...

2013-01-31 Thread Bastien
Christopher Schmidt christop...@ch.ristopher.com writes:

 Please, do not trust me.  This should be brought up to emacs-devel and
 the definite answer should be documented in (info (elisp)Regular
 Expressions).

I asked on emacs-devel.  Thanks,

-- 
 Bastien



Re: [O] Babel-generated files not part of published projects?

2013-01-31 Thread Bastien
Hi Gunnar,

Gunnar Wolf gw...@gwolf.org writes:

 When I export a single file (i.e. with C-c C-e p), the file gets
 generated with the specified filename and included in the resulting
 PDF. However, when I do it via org-publish-all (or
 org-publish-project), the code does not get executed, and the
 resulting files are missing the diagramas.

 What am I missing?

Most probably the ltxpng/ directory is not reachable/known or set
correctly the publishing project.

HTH,

-- 
 Bastien



Re: [O] roundtrip integration with Asana?

2013-01-31 Thread Bastien
Hi Meng Weng,

Meng Weng Wong mengw...@gmail.com writes:

 I use org for personal task management, but I use asana.com with my workgroup.

 I just learned that Asana offers an API that exposes all the usual interfaces.
 http://developers.asana.com/documentation/

 Roundtrip integration between org and Asana is therefore possible.

 I'm sure I'm not the first person to have thought about
 this... which approach would be the preferred architecture for
 achieving such integration?

I don't know Asana but I'd suggest to have a look at org-sync

  http://orgmode.org/cgit.cgi/org-sync.git/
  ~$ git clone git://orgmode.org/org-sync.git

It allows to connect a local .org file with various APIs.

-- 
 Bastien



Re: [O] Macro question with new texinfo exporter

2013-01-31 Thread Bastien
Hi Nicolas,

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

 OTOH, the change will happen during a major release. Moreover macros
 belong to an export framework which have been totally rewritten. Must we
 cope with backward compatibility in this case ?

I'd say as much as we can, yes.  But if an incompatible change must
appear, 8.0 is a good timing, I agree.

Now back to the issue at hand, what about simply allowing to escape
the , and  characters?  This was Thomas first try, and a natural one
I'd say.

What do you think?

-- 
 Bastien



Re: [O] Macro question with new texinfo exporter

2013-01-31 Thread Nicolas Goaziou
Bastien b...@altern.org writes:

 Now back to the issue at hand, what about simply allowing to escape
 the , and  characters?  This was Thomas first try, and a natural one
 I'd say.

 What do you think?

In this case, there's no point in allowing to escape quotation marks.
The current syntax handles them fine. However, it should be possible to
escape backslashes, as \\, is different from \,.

I'll have a look at it a bit later.


Regards,

-- 
Nicolas Goaziou



Re: [O] Babel-generated files not part of published projects?

2013-01-31 Thread Gunnar Wolf
Bastien dijo [Thu, Jan 31, 2013 at 02:42:27PM +0100]:
  When I export a single file (i.e. with C-c C-e p), the file gets
  generated with the specified filename and included in the resulting
  PDF. However, when I do it via org-publish-all (or
  org-publish-project), the code does not get executed, and the
  resulting files are missing the diagramas.
 
  What am I missing?
 
 Most probably the ltxpng/ directory is not reachable/known or set
 correctly the publishing project.

Hi,

No, I thought about it as well, but I now create the directory just
before calling org-publish-project — This snippet might sound silly,
but please bear in mind it's just a part of a bigger project :) I have
this in my project Makefile:

/
| html:
|   mkdir -p html/ltxpng
|   echo html | emacs --batch --load ~/.emacs --load publish.el --funcall 
org-publish-project
| 
| pdf:
|   mkdir -p pdf/ltxpng
|   echo pdf | emacs --batch --load ~/.emacs --load publish.el --funcall 
org-publish-project
| 
| publish:
|   emacs --batch --load ~/.emacs --load publish.el --funcall 
org-publish-all

My ~/.emacs file does include the needed declarations for Babel to
evaluate the blocks:

(org-babel-do-load-languages 'org-babel-load-languages  '((dot . t)) )
(defun my-org-confirm-babel-evaluate (lang body)
  (not (or (string= lang dot) (string= lang ditaa
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)

The only information I can get from the buid process is that LaTeX
does not find the needed files (and that can be reproduced just by
running latex on the generated .tex files):

LaTeX Warning: File `ltxpng/estados_proceso.png' not found on input line 94.
! Package pdftex.def Error: File `ltxpng/estados_proceso.png' not found.
(...)
LaTeX Warning: File `ltxpng/bloqueo_mutuo_simple.png' not found on input 
line 1300.
! Package pdftex.def Error: File `ltxpng/bloqueo_mutuo_simple.png' not 
found.

The only thing I see is that when Org-mode exports to LaTeX, it does
not run the Babel blocks.

Any ideas?



Re: [O] ...

2013-01-31 Thread Carsten Dominik

On 31 jan. 2013, at 14:32, Bastien b...@altern.org wrote:

 Hi Carsten,
 
 thanks a lot for the very clear explanations.
 
 Carsten Dominik carsten.domi...@gmail.com writes:
 
 The difference is only the repeated concatenation operation, and not the
 recompilation.  I always thought that this would work differently, and that
 is why a lot of regexps get constructed and then stored in variables or
 constants.  Of course this is also a good practice for readable and
 maintainable code, but the impact on efficiency is not as big as I used to
 think.  So when I saw Christoher's initial patch, I thought a function to
 create
 org-ooutline-regexp-bol would be a large burden in speed - but it now seems 
 that it would only be a minor impact.
 
 That was my assumption too... hence my reaction to Christopher's
 patch.
 
 It now makes sense -- I'll ask for confirmation on the emacs-devel as
 suggested by Christopher.
 
 Still, I think making a local variable in buffers with
 org-struct-mode is also a good way to get the functionality
 Christopher wants.
 
 Mh... here I'm not sure to understand what you suggest. 
 Isn't the whole point of Christopher's patch to rely on
 a buffer local value of org-outline-regexp?  I surely miss
 something.

Not really, I am not particulrly clear here.

Christopher proposes to do this:

   ;; Local Variables:
   ;; eval: (orgstruct-mode 1)
   ;; org-outline-regexp: ;;; \\*+
   ;; org-heading-regexp: ^;;; \\(\\*+\\)\\(.+\\)$
   ;; End:

I was just thinking, if you are setting up two local variables, you could set 
up three and include org-outline-regexp-bol as well.  Or, you could just set up 
`org-outline-regexp', and make the function org-struct-mode set up the other 
two as additional local variables.  This would simplify things.  In fact, I 
think this would make for a more compact and better patch, Christopher, what do 
you think?

- Carsten




Re: [O] How to improve Org startup time?

2013-01-31 Thread Sebastien Vauban
Bastien,

Sebastien Vauban wrote:
 Bastien wrote:
 put your .emacs on diet :) More seriously, I would start by checking
 org-agenda-to-appt documentation. It should be on your system. If it is not,
 check online.

 I tried to filter to only timestamp entries with the following:

 #+begin_src emacs-lisp
   (org-agenda-to-appt nil nil '(:timestamp))
 #+end_src

 But that does not work -- no error, but no event added to the appt list!

 I must not understand the rest parameter, I guess.

 That's what really slows down your config.

 Yes and no.

 Yes, because it's currently run at startup time, even if I put that command
 inside an eval-after-load org-agenda (as `org-agenda' is ultimately called
 when `org-clock-persist' is set).

 No, because no running that does not change the fact that, sooner or later,
 the Org agenda files will have to be loaded and scanned through.

 Not having that done at startup simply _add_ another 16 seconds delay to the
 computation of the first agenda view; not a gain IMO.

To be coherent with what I'm telling in this thread... that is:

- we can use Org just for note-taking, and exporting to HTML/LaTeX/etc.
- we can use it for agenda purpose only
- we can use if for clocking purpose only
- we can use it for any mix of these (at different moments in time)

... I've removed the explicit call of `(org-agenda-to-appt)' from my .emacs:
it makes no sense to search for event notifications at startup time if my
primary purpose, now, of firing up Emacs is to work on notes and documents.

However, I've left it in the `org-finalize-agenda-hook' hook, so that the
`appt-list' is fed up as soon as I begin using agenda functions.

That way, I have well removed 16 seconds from my Emacs startup time, but
they're moved for the creation of the _first_ agenda view.

IOW, the time is lost where it makes more sense, but I still have to search on
how to reduce that time.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] [PATCH] Protect org-agenda-prepare-buffers with org-unmodified

2013-01-31 Thread Francesco Pizzolante
Hello,

This patch protects changes done in org-agenda-prepare-buffers with
org-unmodified instead of saving/restoring buffer-modified-p. This avoids
modification hooks to run.

Regards,
 Francesco

From 6ce481a40a64510d67708ca63d27bdb434ee3e5a Mon Sep 17 00:00:00 2001
From: Francesco Pizzolante f...@missioncriticalit.com
Date: Thu, 31 Jan 2013 16:35:31 +0100
Subject: [PATCH] Protect org-agenda-prepare-buffers with org-unmodified

* org.el (org-agenda-prepare-buffers): stable 

TINYCHANGE
---
 lisp/org.el |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index ca751a7..a578371 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17008,7 +17008,7 @@ When a buffer is unmodified, it is just killed.  When 
modified, it is saved
(inhibit-read-only t)
(org-inhibit-startup org-agenda-inhibit-startup)
(rea (concat : org-archive-tag :))
-   bmp file re)
+   file re)
 (save-excursion
   (save-restriction
(while (setq file (pop files))
@@ -17018,7 +17018,7 @@ When a buffer is unmodified, it is just killed.  When 
modified, it is saved
  (org-check-agenda-file file)
  (set-buffer (org-get-agenda-file-buffer file)))
(widen)
-   (setq bmp (buffer-modified-p))
+   (org-unmodified
(org-refresh-category-properties)
(org-refresh-properties org-effort-property 'org-effort)
(org-refresh-properties APPT_WARNTIME 'org-appt-warntime)
@@ -17045,8 +17045,7 @@ When a buffer is unmodified, it is just killed.  When 
modified, it is saved
   org-comment-string))
  (while (re-search-forward re nil t)
(add-text-properties
-(match-beginning 0) (org-end-of-subtree t) pc)))
-   (set-buffer-modified-p bmp)
+(match-beginning 0) (org-end-of-subtree t) pc
 (setq org-todo-keywords-for-agenda
   (org-uniquify org-todo-keywords-for-agenda))
 (setq org-todo-keyword-alist-for-agenda
-- 
1.7.9



Re: [O] orgstruct-mode with custom headline prefix (was: ...)

2013-01-31 Thread Christopher Schmidt
Carsten Dominik carsten.domi...@gmail.com writes:
 I was just thinking, if you are setting up two local variables, you
 could set up three and include org-outline-regexp-bol as well.  Or,
 you could just set up org-outline-regexp', and make the function
 org-struct-mode set up the other two as additional local variables.
 This would simplify things.  In fact, I think this would make for a
 more compact and better patch, Christopher, what do you think?

I agree.  I am not sure how to deduce org-heading-regexp from
org-outline-regexp, though.  Maybe we can use a buffer-local
orgstruct-heading-prefix and setup
org-heading-regexp/org-outline-regexp(-bol) from this one?

Here is my patch with org-outline-regexp-bol being a variable and being
set up by the hijacker commands using org-outline-regexp.
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -92,6 +92,7 @@
 ;; job when `orgstruct-mode' is active.
 (defvar org-outline-regexp \\*+ 
   Regexp to match Org headlines.)
+;;;###autoload(put 'org-outline-regexp 'safe-local-variable 'stringp)
 
 (defvar org-outline-regexp-bol ^\\*+ 
   Regexp to match Org headlines.
@@ -101,6 +102,7 @@ sure that we are at the beginning of the line.)
 (defvar org-heading-regexp ^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$
   Matches an headline, putting stars and text into groups.
 Stars are put in group 1 and the trimmed body in group 2.)
+;;;###autoload(put 'org-heading-regexp 'safe-local-variable 'stringp)
 
 ;; Emacs 22 calendar compatibility:  Make sure the new variables are available
 (when (fboundp 'defvaralias)
@@ -6223,8 +6225,10 @@ and subscripts.
 
 (defvar org-cycle-global-status nil)
 (make-variable-buffer-local 'org-cycle-global-status)
+(put 'org-cycle-global-status 'org-state t)
 (defvar org-cycle-subtree-status nil)
 (make-variable-buffer-local 'org-cycle-subtree-status)
+(put 'org-cycle-subtree-status 'org-state t)
 
 (defvar org-inlinetask-min-level)
 
@@ -7403,13 +7407,24 @@ This is a list with the following elements:
 - the tags string, or nil.
   (save-excursion
 (org-back-to-heading t)
-(if (let (case-fold-search) (looking-at org-complex-heading-regexp))
-	(list (length (match-string 1))
-	  (org-reduced-level (length (match-string 1)))
-	  (org-match-string-no-properties 2)
-	  (and (match-end 3) (aref (match-string 3) 2))
-	  (org-match-string-no-properties 4)
-	  (org-match-string-no-properties 5)
+(if (let (case-fold-search)
+  (looking-at
+   (if orgstruct-mode
+   org-heading-regexp
+ org-complex-heading-regexp)))
+(if orgstruct-mode
+(list (length (match-string 1))
+  (org-reduced-level (length (match-string 1)))
+  nil
+  nil
+  (match-string 2)
+  nil)
+  (list (length (match-string 1))
+(org-reduced-level (length (match-string 1)))
+(org-match-string-no-properties 2)
+(and (match-end 3) (aref (match-string 3) 2))
+(org-match-string-no-properties 4)
+(org-match-string-no-properties 5))
 
 (defun org-get-entry ()
   Get the entry text, after heading, entire subtree.
@@ -8482,12 +8497,12 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive.
 ;; command.  There might be problems if any of the keys is otherwise
 ;; used as a prefix key.
 
-;; Another challenge is that the key binding for TAB can be tab or \C-i,
-;; likewise the binding for RET can be return or \C-m.  Orgtbl-mode
-;; addresses this by checking explicitly for both bindings.
+(defcustom orgstruct-setup-hook nil
+  Hook run after orgstruct-mode-map is filled.
+  :group 'org
+  :type 'hook)
 
-(defvar orgstruct-mode-map (make-sparse-keymap)
-  Keymap for the minor `orgstruct-mode'.)
+(defvar orgstruct-initialized nil)
 
 (defvar org-local-vars nil
   List of local variables, for use by `orgstruct-mode'.)
@@ -8498,26 +8513,13 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive.
 This mode is for using Org-mode structure commands in other
 modes.  The following keys behave as if Org-mode were active, if
 the cursor is on a headline, or on a plain list item (both as
-defined by Org-mode).
-
-M-upMove entry/item up
-M-down	Move entry/item down
-M-left	Promote
-M-right	Demote
-M-S-up	Move entry/item up
-M-S-downMove entry/item down
-M-S-leftPromote subtree
-M-S-right   Demote subtree
-M-q	Fill paragraph and items like in Org-mode
-C-c ^	Sort entries
-C-c -	Cycle list bullet
-TAB Cycle item visibility
-M-RET   Insert new heading/item
-S-M-RET Insert new TODO heading / Checkbox item
-C-c C-c Set tags / toggle checkbox
-  nil  OrgStruct nil
-  (org-load-modules-maybe)
-  (and (orgstruct-setup) (defun orgstruct-setup () nil)))
+defined by Org-mode).
+  nil  OrgStruct (make-sparse-keymap)
+  (when orgstruct-mode
+(org-load-modules-maybe)
+(unless 

Re: [O] html export list indentation wrong with comments

2013-01-31 Thread Samuel Wales
On 1/31/13, Bastien b...@altern.org wrote:
 Commenting out a list item works properly, but exporting does not.

 Export of subtree to HTML.

 Is it only when exporting subtrees?

 Do you also have this problem with the new exporter?

I don't know.  I get other bugs with both, and don't use them.  It
will take me a while before I can test.

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

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] [PATCH] Avoid all modification hooks in org-unmodified

2013-01-31 Thread Francesco Pizzolante


Hi Bastien,

 This is great.  It's not only more efficient but also more
 consistent.  Thanks a lot for joining the agenda optimization
 gang with such a contribution!  I applied your patch, with
 a tiny change in the ChangeLog.

Thanks for your message and for having applied the patch.
I'm happy that it effectively helps.

I've also noticed several other spots where org-unmodified should be used
instead of simply saving and restoring buffer-modified-p.

I will submit another tiny patch in order for you to see.

Regards,
 Francesco




Re: [O] How to improve Org startup time?

2013-01-31 Thread Bastien


Hi Sébastien,

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

 #+begin_src emacs-lisp
   (org-agenda-to-appt nil nil '(:timestamp))
 #+end_src

Try this:

#+begin_src emacs-lisp
  (org-agenda-to-appt nil nil :timestamp)
#+end_src

HTH,

-- 
 Bastien




Re: [O] How to improve Org startup time?

2013-01-31 Thread Bastien


Hi Sébastien,

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

 For example, why do all the Org agenda files have to be loaded when I'm simply
 opening a plain common (I mean: not part of the agenda) Org file?

They don't.  Can you reproduce the problem with a minimal config?

Thanks,

-- 
 Bastien




Re: [O] [PATCH] Avoid modification hooks in org-clock-sum

2013-01-31 Thread Bastien


Hi Francesco,

Francesco Pizzolante
fpz-djc/ipccudyqhejpep6iedvlejwur...@public.gmane.org writes:

 This patch avoid modification hooks to be run in org-clock-sum by using
 org-unmodified (instead of simply saving and restoring buffer-modified-p).

 On my system, this speeds up the creation of clock reports.

Applied, thanks.

 I should have indented the code but I didn't in order to respect the
 less-than-20-lines change (I have no copyright assignment to the FSF yet).

Please let me know if you want to assign your copyright for
further patches -- the limit is cumulative over patches.

Thanks!

-- 
 Bastien




Re: [O] [PATCH] Avoid modification hooks in org-clock-sum

2013-01-31 Thread Francesco Pizzolante


Hi Bastien,

 Applied, thanks.

Thanks to you.


 Please let me know if you want to assign your copyright for
 further patches -- the limit is cumulative over patches.

I just introduced a request to the FSF.

Regards,
 Francesco




Re: [O] How to improve Org startup time?

2013-01-31 Thread Achim Gratz
Sebastien Vauban writes:
 You may be right, but I guess that I'm not alone using Windows 8, so my
 performance observations must be shared by others as well. It may even be
 worse for some who have more Org files, and a less powerful computer.

Take Emacs and Org out of the picture and check how fast you can open
random files.  That will tell you if the performance degradation you see
is caused (at least in part) by those low-level operations.  I've had
two incidents the past year where some group policy changes done by IT
would result in a file-open time of close to two seconds (no joke).  Now
imagine what happens when you need to open some 10k files…

As to how Org implements its agenda operations: I don't know and I don't
have a comment.


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

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] Seeking advice for conditional code

2013-01-31 Thread François Pinard
Hi, Org friends.

Would someone be kind enough to point me in the right direction, if
there is one already?  My need is to have conditional code at
publication time, and being able to include or exclude regions of code
according to some symbol being active or defined, or not.

The use case is a piece of Python code implementing an API interface,
for which items are implemented through functions (methods).  These
functions each have a doc-string, using Org, documenting that item.
Now, there are API items which we publish for our users, and other API
items which are rather internal and which we would not document
externally.  I would much prefer keeping a single source, and generate
different documentation for the external site and the internal site.

Currently, I use poporg (https://github.com/pinard/poporg) to edit these
doc-strings, and a small program which reads and concatenate them all.
This program already recognizes #+FILE: (not Org standard) to drive the
splitting of the resulting Org document into many files, each of which
will end up being an HTML page.  The first idea which comes to my mind
is adding #+IF: #+ELIF: #+ELSE #+ENDIF directives for that program to
recognize as well.

But if possible, I would much prefer to stick to known and standard Org
paradigms than inventing my own, and this is why I'm asking here...

Keep happy, all!

François



Re: [O] no pdf-output in lilypond code blocks

2013-01-31 Thread Achim Gratz
Achim Gratz writes:
 Florian Beck writes:
 I don't think so. The string evaluates to itself or am I missing
 something?

 If it would fall under SELFQUOTING then yes (but I really don't
 understand what the doc string is trying to tell me there and what would
 be used for comparison).

I've looked at this again and I still don't understand the docstring.
I've confirmed that the bytecompiler produces not only a warning during
compilation, but the compiled code won't work, so despite indications to
the contrary the backquotes are indeed necessary.  This means that
either the docstring fails to clearly indicate the necessity of using
the backquotes on string constants or the bytecompiler fails to compile
legal code: I'd suggest you take this example to emacs-bugs and see what
the devs have to say.


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

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




Re: [O] no pdf-output in lilypond code blocks

2013-01-31 Thread Florian Beck
Achim Gratz strom...@nexgo.de writes:

 Achim Gratz writes:
 Florian Beck writes:
 I don't think so. The string evaluates to itself or am I missing
 something?

 If it would fall under SELFQUOTING then yes (but I really don't
 understand what the doc string is trying to tell me there and what would
 be used for comparison).

 I've looked at this again and I still don't understand the docstring.
 I've confirmed that the bytecompiler produces not only a warning during
 compilation, but the compiled code won't work, 

I cannot reproduce this. The code works for me and byte compiling
doesn't generate any warning.

GNU Emacs 24.3.50.7 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0) of 
2013-01-28 on flo-laptop

 so despite indications to
 the contrary the backquotes are indeed necessary.  This means that
 either the docstring fails to clearly indicate the necessity of using
 the backquotes on string constants or the bytecompiler fails to compile
 legal code: I'd suggest you take this example to emacs-bugs and see what
 the devs have to say.


 Regards,
 Achim.

-- 
Florian Beck



Re: [O] no pdf-output in lilypond code blocks

2013-01-31 Thread Achim Gratz
Florian Beck writes:
 I cannot reproduce this. The code works for me and byte compiling
 doesn't generate any warning.

 GNU Emacs 24.3.50.7 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0) of 
 2013-01-28 on flo-laptop

Fail: 24.2 (unknown upattern),
  23.[34] (malformed function),
  22.3 (malformed function)
Pass: 24.3.50, 24.2.9[012]

So it seems to have been fixed by the macro compilation changes that
Stefan Monnier did some months ago.


For grins the result with the backquotes:

Fail: 23.[34] (old-style backquote warning)
  22.3 (old-style backquote warning)
Pass: 24.3.50, 24.2.9[012], 24.2

Still not a good idea to use pcase in code that should be backwards
compatible…


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

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




Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Christopher Schmidt
Bastien b...@altern.org writes:
 PS: To make things clear: I'm confident the patch is good, but I will
 put it higher on my patch review process if I know the agenda does not
 slow down :)

Here is the patch.  Now one just needs

;; Local Variables:
;; eval: (orgstruct-mode 1)
;; orgstruct-heading-prefix-regexp: ;;; 
;; End:

It cannot get any easier than this.

2013-01-31  Christopher Schmidt  christop...@ch.ristopher.com

* org.el (org-cycle-global-status, org-cycle-subtree-status): Set
state property.
(org-heading-components): Use org-heading-regexp in
orgstruct-mode.
(orgstruct-heading-prefix-regexp, orgstruct-setup-hook): New
options.
(orgstruct-initialized): New variable.
(orgstruct-mode): Simplify implementation.
(orgstruct-setup): Simplify implementation.  Translate keys to
their most general equivalent.
(orgstruct-make-binding): Generate index on the fly.  Discard
alternative keys.  Bind variables according to
orgstruct-heading-prefix-regexp.
(org-get-local-variables): Honour state property.
(org-run-like-in-org-mode): Do not override variables with
non-default values.
(org-forward-heading-same-level): Do not skip to headlines on
another level.  Handle negative prefix argument correctly.
(org-backward-heading-same-level): Use
org-forward-heading-same-level.
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6223,8 +6223,10 @@ and subscripts.
 
 (defvar org-cycle-global-status nil)
 (make-variable-buffer-local 'org-cycle-global-status)
+(put 'org-cycle-global-status 'org-state t)
 (defvar org-cycle-subtree-status nil)
 (make-variable-buffer-local 'org-cycle-subtree-status)
+(put 'org-cycle-subtree-status 'org-state t)
 
 (defvar org-inlinetask-min-level)
 
@@ -7403,13 +7405,24 @@ This is a list with the following elements:
 - the tags string, or nil.
   (save-excursion
 (org-back-to-heading t)
-(if (let (case-fold-search) (looking-at org-complex-heading-regexp))
-	(list (length (match-string 1))
-	  (org-reduced-level (length (match-string 1)))
-	  (org-match-string-no-properties 2)
-	  (and (match-end 3) (aref (match-string 3) 2))
-	  (org-match-string-no-properties 4)
-	  (org-match-string-no-properties 5)
+(if (let (case-fold-search)
+  (looking-at
+   (if orgstruct-mode
+   org-heading-regexp
+ org-complex-heading-regexp)))
+(if orgstruct-mode
+(list (length (match-string 1))
+  (org-reduced-level (length (match-string 1)))
+  nil
+  nil
+  (match-string 2)
+  nil)
+  (list (length (match-string 1))
+(org-reduced-level (length (match-string 1)))
+(org-match-string-no-properties 2)
+(and (match-end 3) (aref (match-string 3) 2))
+(org-match-string-no-properties 4)
+(org-match-string-no-properties 5))
 
 (defun org-get-entry ()
   Get the entry text, after heading, entire subtree.
@@ -8482,12 +8495,19 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive.
 ;; command.  There might be problems if any of the keys is otherwise
 ;; used as a prefix key.
 
-;; Another challenge is that the key binding for TAB can be tab or \C-i,
-;; likewise the binding for RET can be return or \C-m.  Orgtbl-mode
-;; addresses this by checking explicitly for both bindings.
+(defcustom orgstruct-heading-prefix-regexp 
+  Regexp that matches the custom prefix of Org headlines in
+orgstruct(++)-mode.
+  :group 'org
+  :type 'string)
+;;;###autoload(put 'orgstruct-heading-prefix-regexp 'safe-local-variable 'stringp)
+
+(defcustom orgstruct-setup-hook nil
+  Hook run after orgstruct-mode-map is filled.
+  :group 'org
+  :type 'hook)
 
-(defvar orgstruct-mode-map (make-sparse-keymap)
-  Keymap for the minor `orgstruct-mode'.)
+(defvar orgstruct-initialized nil)
 
 (defvar org-local-vars nil
   List of local variables, for use by `orgstruct-mode'.)
@@ -8498,26 +8518,13 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive.
 This mode is for using Org-mode structure commands in other
 modes.  The following keys behave as if Org-mode were active, if
 the cursor is on a headline, or on a plain list item (both as
-defined by Org-mode).
-
-M-upMove entry/item up
-M-down	Move entry/item down
-M-left	Promote
-M-right	Demote
-M-S-up	Move entry/item up
-M-S-downMove entry/item down
-M-S-leftPromote subtree
-M-S-right   Demote subtree
-M-q	Fill paragraph and items like in Org-mode
-C-c ^	Sort entries
-C-c -	Cycle list bullet
-TAB Cycle item visibility
-M-RET   Insert new heading/item
-S-M-RET Insert new TODO heading / Checkbox item
-C-c C-c Set 

Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Christopher Schmidt
Christopher Schmidt christop...@ch.ristopher.com writes:

This is the memory profiler result.

 a2febd210182d9e1a37b0d7fd9ee007a10abc4bc refs/remotes/origin/HEAD
 Saved working directory and index state WIP on master: a2febd2 Merge 
 branch 'maint'
 HEAD is now at a2febd2 Merge branch 'maint'
 OVERVIEW
 Setting `org-agenda-files' temporarily since emacs -q would overwrite 
 customizations
 File added to front of agenda file list
 CPU and memory profiler started
 
 12.207549810409546


 + normal-top-level 46,533,611  74%
 + command-line-16,385,759  10%
 + command-line  5,800,077   9%
 + eval  2,639,778   4%
 + progn   690,611   1%
 + let  70,947   0%
 + apply20,536   0%
 + org-agenda-get-sexps 12,332   0%
 + load-with-code-conversion 8,188   0%
 + profiler-calltree-walk8,188   0%
 + org-agenda-prepare6,482   0%
 + byte-code 4,272   0%
 + diary-font-lock-keywords  4,144   0%
 + org-agenda-list   1,114   0%
 + file-truename 1,100   0%
 + load  1,040   0%
 # On branch master
 # Changes not staged for commit:
 #   (use git add file... to update what will be committed)
 #   (use git checkout -- file... to discard changes in working 
 directory)
 #
 #modified:   lisp/org.el
 #
 no changes added to commit (use git add and/or git commit -a)
 Dropped refs/stash@{0} (a8007c5e99e8481d82ec8303c75069e150a81874)
 OVERVIEW
 Setting `org-agenda-files' temporarily since emacs -q would overwrite 
 customizations
 File added to front of agenda file list
 CPU and memory profiler started
 
 12.091503858566284


 + normal-top-level 45,399,311  73%
 + command-line-16,522,990  10%
 + command-line  5,875,736   9%
 + eval  3,803,175   6%
 + progn   316,014   0%
 + let  84,388   0%
 + apply16,376   0%
 + org-agenda-get-sexps  8,188   0%
 + load-with-code-conversion 8,188   0%
 + profiler-calltree-walk8,188   0%
 + profiler-report-setup-buffer  8,188   0%
 + org-agenda-list   4,296   0%
 + diary-font-lock-keywords  4,144   0%
 + org-agenda-get-day-entries4,144   0%
 + require   3,120   0%
 + org-agenda-prepare2,338   0%
 + file-truename 2,156   0%
 + tramp-completion-file-name-handler1,040   0%
 + byte-code   104   0%

This is the equally uninteresting cpu result.

a2febd210182d9e1a37b0d7fd9ee007a10abc4bc refs/remotes/origin/HEAD
Saved working directory and index state WIP on master: a2febd2 Merge branch 
'maint'
HEAD is now at a2febd2 Merge branch 'maint'
OVERVIEW
Setting `org-agenda-files' temporarily since emacs -q would overwrite 
customizations
File added to front of agenda file list
CPU profiler started

12.362266302108765

+ normal-top-level   8765  78%
+ command-line   1769  15%
  Automatic GC377   3%
+ eval144   1%
+ command-line-1   68   0%
+ progn 8   0%
+ let   4   

Re: [O] orgstruct-mode with custom headline prefix

2013-01-31 Thread Thorsten Jolitz
Christopher Schmidt christop...@ch.ristopher.com writes:

 Here is the patch.  Now one just needs

 ;; Local Variables:
 ;; eval: (orgstruct-mode 1)
 ;; orgstruct-heading-prefix-regexp: ;;; 
 ;; End:

 It cannot get any easier than this.

Just a question - why ;;;  and not ;;  (i.e. ;; \*+ )? 

I (still) don't use orgstruct-mode instead of outline-minor-mode, but
can easily use full org-mode functionality in Emacs Lisp files by
marking  outcommenting/uncommenting regions that look like this

,---
| ;; * level1
| ;; ** level2
| ;; text text text text
| ;; ** level2
| ;; text text text text
| 
| (defun ...)
`---

,---
| * level1
| ** level2
| text text text text
| ** level2
| text text text text
| 
| (defun ...)
`---

and toggling major modes between Emacs Lisp and Org-mode. 

With prefixes like ';;; *' or ';;*' this becomes less convenient in my
eyes, since 'M-x comment-region' can't be applied anymore. 

-- 
cheers,
Thorsten




Re: [O] Seeking advice for conditional code

2013-01-31 Thread Sebastien Vauban
Hi François,

François Pinard wrote:
 Would someone be kind enough to point me in the right direction, if
 there is one already?  My need is to have conditional code at
 publication time, and being able to include or exclude regions of code
 according to some symbol being active or defined, or not.

I want to be sure to understand: do you need

- conditional tangled code, or

- conditional full document (containing conditional code and conditional
  doc)?

When you say conditional, do you mean to to be able to decide to include it
or not, or even more (such as including one version or the other)?

What's sure if that you can have conditions based on tags, and things in the
following spirit::

--8---cut here---start-8---
* Global constants

#+tblname: params
| Variable   | dev | stg | prd |
|+-+-+-|
| webServerName  | a   | g   | m   |
| loginWebServerName | b   | h   | n   |
| pwWebServerName| c   | i   | o   |
| appBaseDir | d   | j   | p   |
| dbName | e   | k   | q   |
| dbBackupFile   | f   | l   | r   |

* Show the params:dev:

Params are dynamically assigned. Here the results with the dev tag:

#+begin_src sh :rownames no :var data=(concat (car (org-get-tags-at (point))) 
-params) :exports both
echo $data
#+end_src
--8---cut here---end---8---

Please tell if that's more or less the direction you want to take...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Macro question with new texinfo exporter

2013-01-31 Thread Nicolas Goaziou
Bastien b...@altern.org writes:

 Now back to the issue at hand, what about simply allowing to escape
 the , and  characters?  This was Thomas first try, and a natural one
 I'd say.

I have pushed a fix in maint for that. It should now be possible to use
{{{kbd(C-\,)}}} to get C-, as argument.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Avoid modification hooks in org-clock-sum

2013-01-31 Thread Bastien


Hi Francesco,

Francesco Pizzolante f...@missioncriticalit.com writes:

 Please let me know if you want to assign your copyright for
 further patches -- the limit is cumulative over patches.

 I just introduced a request to the FSF.

I've updated the Worg page:
http://orgmode.org/worg/org-contribute.html#sec-6-2

Thanks!

-- 
 Bastien




Re: [O] Seeking advice for conditional code

2013-01-31 Thread John Kitchin
I think I have done something like this with tags and custom export
lisp code.

Something like:

(let ((org-export-exclude-tags '(supplementary noexport)))
 (org-export-as-latex 5))

That allows me to export all sections not tagged by those values. This
would require all your code blocks be in tagged sections, e.g. tagged by
internal, external, etc...

for a particular org file I make an init.el file with different export
functions in it. Alternatively, I have put emacs-lisp code blocks in the
org file so it is self contained.

I am curious what other people do. My typical uses for selective export
are to selectively export a manuscript from an org file, or to
separately export a homework and the solution from one file.
-- 
==
John Kitchin
Associate Professor
A207F Doherty Hall
Department of Chemical Engineering
Carnegie Mellon University
412-268-7803



Re: [O] Seeking advice for conditional code

2013-01-31 Thread François Pinard
Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 Hi François,

Hi, Sebastien! :-)

 Please tell if that's more or less the direction you want to take...

Direction already taken, and completed a few minutes ago! :-).  But I'll
happily revert to something else it if there is a better way to proceed.
The addition of pseudo-Org directives does not really please me, I would
prefer plain Org if possible.  If you are curious, see comments at start
of https://github.com/pinard/poporg/blob/master/extradoc.py.  In my
application, I even define context from the Makefile, which is an
unexpected advantage.

 I want to be sure to understand: do you need
 - conditional tangled code, or
 - conditional full document (containing conditional code and conditional
   doc)?
 When you say conditional, do you mean to to be able to decide to include it
 or not, or even more (such as including one version or the other)?

Exactly! :-) It's not tangling.  Rather, merely extract the
documentation out of comments found in (program) source code.  The
comments (once removed the hash marks) are in Org format.  I'm seeking
for conditional documentation.

 What's sure if that you can have conditions based on tags, and things in the
 following spirit::
 * Show the params:dev:
 Params are dynamically assigned. Here the results with the dev tag:
 #+begin_src sh :rownames no :var data=(concat (car (org-get-tags-at (point))) 
 -params) :exports both
 echo $data
 #+end_src

I should have thought at exploring the usage of Org tags.  :export: and
:noexport: are already very useful, but the idea did not come to me that I
could extend this to other tags.  I probably do not use tags enough!

In any case, the example above is quite interesting, and could be useful
to solve other problems.  I'll keep it around.

 #+tblname: params
 | Variable   | dev | stg | prd |
 |+-+-+-|
 | webServerName  | a   | g   | m   |
 | loginWebServerName | b   | h   | n   |
 | pwWebServerName| c   | i   | o   |
 | appBaseDir | d   | j   | p   |
 | dbName | e   | k   | q   |
 | dbBackupFile   | f   | l   | r   |

I missed the point of this table however, I presume the dev column is
to be linked in some way to the :dev: tag, but I do not see why/how.

 Best regards,

Thanks for caring, Sebastien!  I feel all warm inside :-).

François



[O] Dropbox integration suddenly stopped working with Mobile-Org

2013-01-31 Thread Benjamin Alexander
Hello all!

I've been a happy (!) user of Mobile-Org for some time now, on the iPhone, and a
few months ago I switched to Dropbox integration.  Things have gone fine until
today when I synced for the first time in a week or so.  The Dropbox password
that was saved, and had worked fine (and still works from the web interface)
simply gives an error message from within the Settings page of Mobile-Org. 

Dropbox Error
Bad username and password or network error.

The strange thing is, the Dropbox app works fine.  So it isn't a network problem
(at least, not a simple case of being offline). And I've tried retyping the
password, with and without a terminating return as the known issue from the
Mobile-Org web page suggests.  The files are still on Dropbox and I can still
push and pull (though there is nothing new to pull) from within emacs.

I'm really stumped.  I don't even know where to look on the iPhone for log
messages.  I've even tried using my old phone (which was configured to use my
now discontinued webdav server) using dropbox and I get the same error.

My current phone is running iOS 6.0.1 (10A523). I have not installed the new iOS
update yet.  I am considering doing that to see if it helps, but I know I can't
roll it back.

I've also considered deleting mobile-org and reinstalling, but I'm worried that
mobile-org isn't in the App store anymore so I may lose all functionality!

Does anyone have any suggestions?  I would really appreciate it.

Best Wishes,
Ben




Re: [O] About range references in the spreadsheet

2013-01-31 Thread Dieter Wilhelm
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Bastien b...@altern.org writes:

 Hi Xue, Eric and Dieter,

 die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

 (I would avoid the ambiguous expression column two since it is a
 relative specification) alternatively

   The TWO REFERENCES expand to a field range from the row above the
   current row, starting with two columns to the left up to the current
   column.

 Yes... but this is a bit long.

 I finally used this:

 @@-1$-2..@@-1   @r{in the first row up, 3 fields from 2 columns on the left}

 Concise and correct!  I'm happy with this.

Sorry but I don't understand in the first row up.  Maybe better: The
(or a) row up, 3...

Another grievance with such a terse description for me is although it
may describe the end result - the range - correctly but does not take
into account how the references at hand are working.

But maybe I'm just picking nits here :-)

What about such an approach:

@@-1$-2..@@-1 @r{a range of 3 fields: a row up, from 2 fields on the left .. a 
row up}


  Dieter

-- 
Best wishes

H. Dieter Wilhelm
Darmstadt
Germany



Re: [O] Seeking advice for conditional code

2013-01-31 Thread Sebastien Vauban
Hi François,

François Pinard wrote:
 Sebastien Vauban writes:
 Please tell if that's more or less the direction you want to take...

 Direction already taken, and completed a few minutes ago! :-).  But I'll
 happily revert to something else it if there is a better way to proceed.
 The addition of pseudo-Org directives does not really please me, I would
 prefer plain Org if possible.  If you are curious, see comments at start
 of https://github.com/pinard/poporg/blob/master/extradoc.py.  In my
 application, I even define context from the Makefile, which is an
 unexpected advantage.

I'll have a look, but not now... ;-(

 I want to be sure to understand: do you need
 - conditional tangled code, or
 - conditional full document (containing conditional code and conditional
   doc)?
 When you say conditional, do you mean to to be able to decide to include it
 or not, or even more (such as including one version or the other)?

 Exactly! :-) It's not tangling.  Rather, merely extract the
 documentation out of comments found in (program) source code.  The
 comments (once removed the hash marks) are in Org format.  I'm seeking
 for conditional documentation.

For curiosity, why aren't you considering tangling?

 What's sure if that you can have conditions based on tags, and things in the
 following spirit::
 * Show the params
 :dev:
 Params are dynamically assigned. Here the results with the dev tag:
 #+begin_src sh :rownames no :var data=(concat (car (org-get-tags-at
 (point))) -params) :exports both
 echo $data
 #+end_src

 I should have thought at exploring the usage of Org tags.  :export: and
 :noexport: are already very useful, but the idea did not come to me that I
 could extend this to other tags.  I probably do not use tags enough!

 In any case, the example above is quite interesting, and could be useful
 to solve other problems.  I'll keep it around.

 #+tblname: params
 | Variable   | dev | stg | prd |
 |+-+-+-|
 | webServerName  | a   | g   | m   |
 | loginWebServerName | b   | h   | n   |
 | pwWebServerName| c   | i   | o   |
 | appBaseDir | d   | j   | p   |
 | dbName | e   | k   | q   |
 | dbBackupFile   | f   | l   | r   |

 I missed the point of this table however, I presume the dev column is
 to be linked in some way to the :dev: tag, but I do not see why/how.

The above is almost working real sample -- not had time to really finish it.

The column is a list of parameters (for different environments, such as
development machine, staging and production): paths, user names,
passwords, database names, etc.

By using the tags, you can tangle or display inline code customized to the tag
of their subtree. Have 3 subtrees to list all 3 codes, or have just one, and
change the tag accordingly to what you need to do (generate).

Such a document can be used as a deployment guideline, for example.

 Thanks for caring, Sebastien!  I feel all warm inside :-).

Silly you ;-)

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] About range references in the spreadsheet

2013-01-31 Thread Nick Dokos
Dieter Wilhelm die...@duenenhof-wilhelm.de wrote:

 Eric S Fraga e.fr...@ucl.ac.uk writes:
 
  Bastien b...@altern.org writes:
 
  Hi Xue, Eric and Dieter,
 
  die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
 
  (I would avoid the ambiguous expression column two since it is a
  relative specification) alternatively
 
The TWO REFERENCES expand to a field range from the row above the
current row, starting with two columns to the left up to the current
column.
 
  Yes... but this is a bit long.
 
  I finally used this:
 
  @@-1$-2..@@-1   @r{in the first row up, 3 fields from 2 columns on the 
  left}
 
  Concise and correct!  I'm happy with this.
 
 Sorry but I don't understand in the first row up.  Maybe better: The
 (or a) row up, 3...
 
 Another grievance with such a terse description for me is although it
 may describe the end result - the range - correctly but does not take
 into account how the references at hand are working.
 
 But maybe I'm just picking nits here :-)
 

No, I think it's unclear as well (I hadn't paid attention to the thread 
previously.
Sorry for joining the party late).

 What about such an approach:
 
 @@-1$-2..@@-1 @r{a range of 3 fields: a row up, from 2 fields on the left .. 
 a row up}
 

Perhaps factoring out the row part makes it clearer? Also, presenting it as a 
movement from
the current cell might help - at least that's how I tend to read these specs:

a range of 3 fields: up one row, two columns over to the left .. the current 
column (implicitly specified)

Nick






[O] Bug: org-id-get-with-outline-path-completion docstring [7.9.3d (release_7.9.3d-929-ga2febd @ /home/flo/.emacs.d/org-mode/lisp/)]

2013-01-31 Thread Florian Beck

The docstring claims when the optional argument is omitted
all headlines in all agenda files are eligible.

In fact, only the headlines in the current file are used (which is reasonable).

Emacs  : GNU Emacs 24.3.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0)
 of 2013-01-31 on flo-laptop
Package: Org-mode version 7.9.3d (release_7.9.3d-929-ga2febd @ 
/home/flo/.emacs.d/org-mode/lisp/)
-- 
Florian Beck



Re: [O] How to improve Org startup time?

2013-01-31 Thread Bastien


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

 However, I've left it in the `org-finalize-agenda-hook' hook, so that the
 `appt-list' is fed up as soon as I begin using agenda functions.

But then org-agenda-to-appt will be called each time your generate
a new agenda... not sure you really want this right.

Why not simply calling it interactively when you need it?

-- 
 Bastien




Re: [O] How to improve Org startup time?

2013-01-31 Thread Sebastien Vauban
Bastien,

Bastien wrote:
 Sebastien Vauban writes:

 However, I've left it in the `org-finalize-agenda-hook' hook, so that the
 `appt-list' is fed up as soon as I begin using agenda functions.

 But then org-agenda-to-appt will be called each time your generate
 a new agenda... not sure you really want this right.

 Why not simply calling it interactively when you need it?

I can't count on myself to do it at a regular enough interval (at least
daily).

Then, this is the only (?) solution found so that the appt-list is still quite
up-to-date.

This is how Bernt does it as well in his tutorial:

  http://doc.norang.ca/org-mode.html#Reminders

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Off for the next four days

2013-01-31 Thread Bastien
Hi all,

I'm completely off with no internet access for the next four days,
I'm back on tuesday.

I've released Org 7.9.3e, a minor fixes release, which makes current
agenda optimizations available to The Rest of The World.

I must say I'm quite excited by the times to come: the new exporter
merged soon, the feature Christopher has been working on, and some
other cool stuff that will be part of 8.0.  We need patience for the
FSF-assignment process, but we will make it.  A big thanks to everyone
for your enduring patience and the constant collective brainstorming.

I will try to secure two weeks in february to work full time on Org.

Have a nice week-end!

-- 
 Bastien




Re: [O] How to improve Org startup time?

2013-01-31 Thread Eric S Fraga
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 The timestamp stuff comes from EmacsWiki:

 #+begin_src emacs-lisp
   (defadvice message (before when-was-that activate)
 Add timestamps to `message' output.
 (ad-set-arg 0 (concat (format-time-string [%Y-%m-%d %T] )
   (ad-get-arg 0
 #+end_src

 The call tree between packages is originally written by me:
 [...]

Thanks!  Very useful.
-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-917-gb9c506




Re: [O] About range references in the spreadsheet

2013-01-31 Thread Thomas S. Dye
Nick Dokos nicholas.do...@hp.com writes:

 Dieter Wilhelm die...@duenenhof-wilhelm.de wrote:

 Eric S Fraga e.fr...@ucl.ac.uk writes:
 
  Bastien b...@altern.org writes:
 
  Hi Xue, Eric and Dieter,
 
  die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
 
  (I would avoid the ambiguous expression column two since it is a
  relative specification) alternatively
 
The TWO REFERENCES expand to a field range from the row above the
current row, starting with two columns to the left up to the current
column.
 
  Yes... but this is a bit long.
 
  I finally used this:
 
  @@-1$-2..@@-1 @r{in the first row up, 3 fields from 2 columns on
  the left}
 
  Concise and correct!  I'm happy with this.
 
 Sorry but I don't understand in the first row up.  Maybe better: The
 (or a) row up, 3...
 
 Another grievance with such a terse description for me is although it
 may describe the end result - the range - correctly but does not take
 into account how the references at hand are working.
 
 But maybe I'm just picking nits here :-)
 

 No, I think it's unclear as well (I hadn't paid attention to the
 thread previously.
 Sorry for joining the party late).

 What about such an approach:
 
 @@-1$-2..@@-1 @r{a range of 3 fields: a row up, from 2 fields on the
 left .. a row up}
 

 Perhaps factoring out the row part makes it clearer? Also, presenting
 it as a movement from
 the current cell might help - at least that's how I tend to read these specs:

 a range of 3 fields: up one row, two columns over to the left .. the
 current column (implicitly specified)

a range of three fields in the row before the current row, starting two
columns before the current column and ending in the current
column.

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



Re: [O] How to improve Org startup time?

2013-01-31 Thread Eric S Fraga
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 Hi Eric,


[...]

 Dividing the figures by 50, just for the disks, seems too big for me, nope?

Hi Seb, yes, it does seem dramatic.

 Just to be sure: are you sure that, in this last test, `org-agenda-to-appt'
 was called without having first opening the agenda files?

Ummm, I thought I was sure but I have just done it again and get
different results so I must have done something wrong in the last
test.  Ooops...  Doing it again, using this procedure:

- start emacs
- M-x elp-instrument-package RET org-agenda RET
- M-x org-agenda-to-apt RET
- M-x elp-results
- quit emacs

now gives me

| org-agenda-to-appt |   1 |  1.602924479 |  1.602924479 |
| org-agenda-prepare-buffers |   1 |  1.510812568 |  1.510812568 |
| org-agenda-get-day-entries |  14 |  0.088741138 | 0.0063386527 |
| org-agenda-get-scheduled   |  14 |  0.027990309 | 0.0019993077 |
| org-agenda-get-deadlines   |  14 | 0.0154423710 | 0.0011030265 |
| org-agenda-skip| 797 |  0.008103603 | 1.016...e-05 |

so the reduction is not quite as dramatic (factor of 5, not 50).


-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-917-gb9c506




Re: [O] Seeking advice for conditional code

2013-01-31 Thread François Pinard
Sebastien Vauban

 For curiosity, why aren't you considering tangling?

Quick half of a reply, I'll revise the rest of your message later.

That would be far too much of a change for the habits of the team, or at
least, this is how I perceive the equilibrium between developers.
Moreover, some of us are not even Emacs users.

When writing a program, the feeling still has to be that we write a
program, rather than a document describing the program, and from which
the program could be extracted.  Python is rather descriptive as a
language, and while comments are useful, they might be less needed than
in other languages.  This is debatable, of course :-).

The documentation is meant for users, and it was strongly suggested that
we try to keep the documentation within the program as much as possible,
as a way to ease keeping the documentation and the program in good
sync.  Some of us really enjoy Org mode, and this is how came the idea
of this compromise of writing Python doc-strings using Org.

François



Re: [O] roundtrip integration with Asana?

2013-01-31 Thread Meng Weng Wong
On 31 Jan, 2013, at 9:49 PM, Bastien b...@altern.org wrote:
 
 Meng Weng Wong mengw...@gmail.com writes:
 http://developers.asana.com/documentation/
 Roundtrip integration between org and Asana is therefore possible.
 
 I don't know Asana but I'd suggest to have a look at org-sync
  http://orgmode.org/cgit.cgi/org-sync.git/ 

Thank you. I have also learned of
https://github.com/christopherjwhite/org-toodledo

I will review the sync architecture of both packages if I get the chance.

For now I am taking the Perl route as we have over 400 tasks across the 
enterprise, so it's probably better to sync them in a separate background 
process. When the code is done I will publish it to CPAN and drop an 
announcement here.

thanks all




Re: [O] About range references in the spreadsheet

2013-01-31 Thread Nick Dokos
Thomas S. Dye t...@tsdye.com wrote:


   @@-1$-2..@@-1 @r{in the first row up, 3 fields from 2 columns on
   the left}
  
 
 a range of three fields in the row before the current row, starting two
 columns before the current column and ending in the current
 column.
 

That's the best one so far imo, and I doubt it can get any better.

Nick




Re: [O] How to improve Org startup time?

2013-01-31 Thread Nick Dokos
Eric S Fraga e.fr...@ucl.ac.uk wrote:

 - start emacs
 - M-x elp-instrument-package RET org-agenda RET
 - M-x org-agenda-to-apt RET
 - M-x elp-results
 - quit emacs
 
 now gives me
 
 | org-agenda-to-appt |   1 |  1.602924479 |  1.602924479 |
 | org-agenda-prepare-buffers |   1 |  1.510812568 |  1.510812568 |
 | org-agenda-get-day-entries |  14 |  0.088741138 | 0.0063386527 |
 | org-agenda-get-scheduled   |  14 |  0.027990309 | 0.0019993077 |
 | org-agenda-get-deadlines   |  14 | 0.0154423710 | 0.0011030265 |
 | org-agenda-skip| 797 |  0.008103603 | 1.016...e-05 |
 
 so the reduction is not quite as dramatic (factor of 5, not 50).
 
 

That's roughly the kind of numbers I see as well.

Nick



[O] exporting org presentation to PowerPoint via OpenOffice/LibreOffice

2013-01-31 Thread Eric S Fraga
Hello,

In an email to this list a while back [1], it was suggested that one
could convert an org file to PowerPoint using the OpenOffice Writer
send to presentation menu option.  This option is meant to convert an
Writer outline to a set of Impress (i.e. OpenOffice's PowerPoint
equivalent) slides.  I have tried this, with the new exporter, but the
conversion from Writer to Impress only transfers the headings and not
the bullet lists in each slide.  The Writer file does have all the
content from the org file as headings and bullet points.

Has anybody tried this and managed to get it to work?  I know very
little about OpenOffice, and much less of Microsoft's tools...

Thanks,
eric


Footnotes: 
[1]  http://article.gmane.org/gmane.emacs.orgmode/41924

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org 7.9.3e-897-g787a07