Re: [O] Bug when publishing images

2011-03-21 Thread Francesco Pizzolante
Hi David,

  There's still a little problem though when adding a caption:
 
  --8---cut here---start-8---
  #+CAPTION: toto
  [[file:toto.png]]
  --8---cut here---end---8---
 
  Indeed.  I overlooked a stray p tag.  This one is fixed by now.

 Again, thanks a lot for the fix: it's perfect at the level of the image now.

 There's still a small problem with the caption being escaped (I thought it
 would disappear with your previous fix, that's why I didn't add it to my
 example, so here it is now).

 This should be fix now.

Indeed, it is.

Thanks a lot.

Francesco



[O] Re: Org expert mode?

2011-03-21 Thread Rainer M Krug
On Sun, Mar 20, 2011 at 3:08 AM, Matt Lundin m...@imapmail.org wrote:
 Rainer M Krug r.m.k...@gmail.com writes:

 But following on your statement that the features will still be there,
 I would actually suggest to introduce an Org Babel Mode which would
 *disable* features like archiving - the archiving feature (very useful
 for time management et al) is quite useless in the use of babel for
 literate programming. This Org Babel mode should not be a mode for
 the whole of org, but rather on a per file basis.

 I would suggest that archiving can fit very well into a literate
 programming and/or writing workflow. One can use org-archive-subtree,
 for instance, to remove unneeded sections of code/prose without deleting
 them altogether. I do this all the time when drafting a new bit of code
 or an essay.

Right - never thought about that.

I always delete functions which I do not need any more and feel bad
(What if I need them again???) - with archiving I would be able to
retrieve them again.

OK - I use svn as well, but...

I should probobly read the org manual again and look at each section
from the viewpoint of literate programming.

Cheers and thanks for the tip,

Rainer



 Best,
 Matt




-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          rai...@krugs.de

Skype:          RMkrug
Google:         r.m.k...@gmail.com



[O] Re: regexp link on windows problem

2011-03-21 Thread Rafal
David Maus dmaus at ictsoc.de writes:

 
 
 I suppose more a glitch.  AFAIK there is currently no distinction
 between real link target paths (files, directories etc.) and
 expressions that would qualify as a query part of a link (e.g. like
 the regexp).
 
 Maybe fiddling with percent escaping (Cf. org-link-escape and
 org-link-unescape) might provide a way to protect the slashes from
 conversion.
 

I tested it but unfortunately it didn't help. 
What's worse I noticed that my regexp is broken on linux too - all double
slashes '//' (c++ single one line comment) become one slash '/'.


regards,
Rafal





[O] HTML export Bold and italic links

2011-03-21 Thread Francesco Pizzolante
Hi,

Exporting the following links:

--8---cut here---start-8---
Exporting a [[http://www.google.com][*bold link*]].
Exporting a *[[http://www.google.com][bold link]]*.

Exporting an [[http://www.google.com][/italic link/]].
Exporting an /[[http://www.google.com][italic link]]/.
--8---cut here---end---8---

Gives the following HTML code:

--8---cut here---start-8---
p
Exporting a a href=http://www.google.com;bbold link/b/a.
Exporting a *a href=http://www.google.com;bold link/a*.
/p
p
Exporting a a href=http://www.google.com;ibold link/i/a.
Exporting a /a href=http://www.google.com;bold link/a/.
/p
--8---cut here---end---8---

I Would expect the following code:

--8---cut here---start-8---
p
Exporting a a href=http://www.google.com;bbold link/b/a.
Exporting a ba href=http://www.google.com;bold link/a/b.
/p
p
Exporting a a href=http://www.google.com;ibold link/i/a.
Exporting a ia href=http://www.google.com;bold link/a/i.
/p
--8---cut here---end---8---

As you can see, the first option (setting the bold and italic symbols *into*
the link) works, while the second one (setting the bold and italic symbols
*outside* the links) does not work.

I think both options should work. At least the second one was working last
week.

Thanks.

Francesco



[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Bastien
Hi Jambunathan,

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

 This is a formal request to integrate my org-html.el  org-odt.el
 changes in to the master branch. 

Thanks a *LOT* for this work!  I'm willing to help as much as possible
to get this integrated.

 This patch introduces 3 major features:
 1. A generic exporter

Let me understand: this is more a generalization of the HTML export than
a true generic exporter, right?  The docstring of org-do-export suggests
so.  Rewriting org-html.el so that the HTML export is done in a more
generic way is a *good* thing, but we should be careful with the naming
of the functions here.

 2. All new html backend re-implemented as a plugin to (1).
 3. A odt backend as a plugin to (1).

This makes sense.

 The patch is based on git commit 3d802.

Please everyone test it and report any problem.  I was kept away from
Org due to personal issues the last week, but I'm available again.

All best,

-- 
 Bastien



Re: [O] OT: Another great application for Org

2011-03-21 Thread Bastien
Carsten Dominik carsten.domi...@gmail.com writes:

 Another great way to use Org-mode..

 http://xkcd.com/874/

:)

I won't stop hacking Org till it is explicitely quoted in xkcd.
That's the only true test for success!

-- 
 Bastien



Re: [O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi,

I'd love to try it out, but I'm not good at git. Would someone be kind 
enough to post directions?


I thought this would do it:

git checkout 3d802
git checkout -b ooo
git apply 
../0001-Re-implement-org-export-as-html-and-add-support-for-.patch


But I got:

error: patch failed: lisp/org.el:8711
error: lisp/org.el: patch does not apply

Yours,
Christian


On 3/21/11 9:21 AM, Bastien wrote:

Hi Jambunathan,

Jambunathan Kkjambunat...@gmail.com  writes:


This is a formal request to integrate my org-html.el  org-odt.el
changes in to the master branch.


Thanks a *LOT* for this work!  I'm willing to help as much as possible
to get this integrated.


This patch introduces 3 major features:
1. A generic exporter


Let me understand: this is more a generalization of the HTML export than
a true generic exporter, right?  The docstring of org-do-export suggests
so.  Rewriting org-html.el so that the HTML export is done in a more
generic way is a *good* thing, but we should be careful with the naming
of the functions here.


2. All new html backend re-implemented as a plugin to (1).
3. A odt backend as a plugin to (1).


This makes sense.


The patch is based on git commit 3d802.


Please everyone test it and report any problem.  I was kept away from
Org due to personal issues the last week, but I'm available again.

All best,






[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

Christian

Thanks being the first one here (again). 

I have tried incorporating some subset (and not all) of your feedback on
the new odt exporter. My priority was to get the html exporter and the
generic interface right.

 Hi,

 I'd love to try it out, but I'm not good at git. Would someone be kind
 enough to post directions?

(1) You can checkout via git: 

#+begin_src sh
  git remote add org-odt http://repo.or.cz/r/org-mode/org-jambu.git
  git fetch org-odt
  git checkout -b org-odt org-odt/staging [Note the word `staging']
#+end_src

(2) You can download a snapshot. (Search for .tar.gz and .zip)
http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging

The above instructions are the same as one that I shared with
Release-0.6 [1] with one important change - instead of `master' the
changes are in `staging' branch.

Footnotes:
[1] http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01210.html

Jambunathan K.




[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Rustom Mody
How does this relate to the docbook exporter?
I ask because I needed a generic exporter (this was more than a year ago)
and I made do with the docbook exporter for that purpose


[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K
Christian Moe m...@christianmoe.com writes:

 Hi,

 I'd love to try it out, but I'm not good at git. Would someone be kind
 enough to post directions?

 I thought this would do it:

 git checkout 3d802
 git checkout -b ooo
 git apply
 ../0001-Re-implement-org-export-as-html-and-add-support-for-.patch

 But I got:

 error: patch failed: lisp/org.el:8711
 error: lisp/org.el: patch does not apply

One of the reasons the patch fails to apply is because I have hand
edited it and removed the hunks that correspond to new files (all
org-odt related). 

In my experience, `git apply' is quite intelligent in figuring out that
the patch has been tampered with. May be you should try plain old patch
utility.

#+begin_src sh
  patch  my.patch
#+end_src

should provide a good starting point. It is likely to ask some questions
just answer them.

As noted previously, I have stripped off all the odt related changes
from the patch I circulated. The patching route is recommended for
existing html users. The checkout route is recommended for html + odt
users.

Jambunathan K.






[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

 How does this relate to the docbook exporter?

(In principle), Docbook exporter can move to the new core. This would
considerably reduce the size of the org-docbook.el.

 I ask because I needed a generic exporter (this was more than a year
 ago) and I made do with the docbook exporter for that purpose

There are lots of generic exporters for Org. There is a Wes's generic
exporter C-c C-e g and Bastien's very own org-export.el. There is this
new one. 

With my new patches, org-html.el and org-odt.el share a common core to
 which they plug in using callbacks. This common core is right now part
 of my new org-html.el.

If you are a developer and have some use-cases in mind may be you could
help with refining the new core. The exporter is line-oriented (unlike
the LaTeX exporter) - whatever that means :-).

Jambunathan K.

--



[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

 1. A generic exporter

There is lots of generic exporter floating around and I don't want to
add to confusion. Let's call the new patch `newhtml' with the
understanding that the patch does much more than offer a new html and
odt backends.

For the developers among us, refer to the following post for a quick
overview.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg00839.html

For those of you, who have used org-special-blocks a near equivalent
entity is ENVIRONMENT.

Jambunathan K.





Re: [O] java snippet code not exported

2011-03-21 Thread Eric S Fraga
Andrea Crotti andrea.crott...@gmail.com writes:

 I was carrying around this issue since long time, but today I finally
 understood what exactly the source is.

 Suppose I have this very simple orgfile, if I try to export it to html I
 get the error as below.  Can anyone else reproduce it?  I guess is
 font-locking problem but that should be a perfectly valid (even if
 perfectly useless java snippet).


 title

 #+begin_src java
   import static org.junit.Assert.*;

 #+end_src

[...]

 Thanks,
 Andrea

 --
 Org-mode version 7.5 (release_7.5.60.g706a)

Andrea,

This works just fine for me.  No errors at all and the code (html)
generated seems fine.  Try latest git version maybe in case the problem
has somehow been fixed in the 30+ commits made 2since the version you
used?

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.91.g38c6b)



[O] advice: how to export a list without exporting all entries

2011-03-21 Thread Eric S Fraga
Hi,

I chair a particular committee at work and am responsible for keeping
track of any actions that arise from our meetings.  I use org for this
(obviously ;-).  So far, so good.

I would like to move to a system in which all the actions are numbered
sequentially.  At present, they are numbered sequentially within a list
for each meeting.  I would like to have a single list which grows over
time. However, when I distribute the minutes of the latest meeting, I
would like to only have those actions which are not yet complete listed
in the document I circulate.  The complication is that I want those
actions that have actually been done still in the list but not exported.

Is there any way to /comment/ out individual list items (whether bullet
or enumerated) on export?  I export typically to latex but this need not
be a constraint.  Simply putting [ ] versus [X] boxes on the items is not
satisfactory as the list would be very long if all items were included in
the export.

Is there some hook that I can intercept that would enable this?  Can I
encapsulate individual list items into latex macros with the status of
the [ ] or [X] boxes?  I am more than happy to write latex code as
required!  Or even, at a push, elisp code...

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.91.g38c6b)



Re: [O] java snippet code not exported

2011-03-21 Thread andrea crotti
2011/3/21 Eric S Fraga e.fr...@ucl.ac.uk:
 Andrea Crotti andrea.crott...@gmail.com writes:

 This works just fine for me.  No errors at all and the code (html)
 generated seems fine.  Try latest git version maybe in case the problem
 has somehow been fixed in the 30+ commits made 2since the version you
 used?


Right it works also for me now on linux with a bit younger version of org.
I should try on OSX again and see if it's maybe it's something else...

Anyway another issue which is still related to exporting.
The other day it took me a long time to understand why
#+begin_src c
#+end_src

was not working, and in the end the solution was simply to use

#+begin_src C
#+end_src

the problem is that with the capital C emacs doesn't find a C-mode and thus
I don't get the right mode to write code with.

But the main question is, does it make sense to make that particular
string case sensitive?

How could
#+begin_src Language and #+begin_src lanGuage do different things?

Thanks a lot,
Andrea



[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi, Jambunathan,

Thanks, I should have tested first if the previous instructions 
worked. I think I have it set up now.


With a minimal Emacs as per the old instructions, and with one minor 
change to your test file (`LaTeX:verbatim' -- I don't have dvipng 
installed), I get this:



Debugger entered--Lisp error: (invalid-function 
with-org-html-preserve-paragraph-state)

  with-org-html-preserve-paragraph-state(nil)
  byte-code([...THIS LINE DIDN'T COPY-PASTE WELL... CHRISTIAN]
  org-do-export(nil nil nil nil nil nil)
  (let* ((org-parse-get-callback ...) 
(org-export-html-special-string-regexps 
org-export-odt-special-string-regexps)) (org-do-export arg hidden 
ext-plist to-buffer body-only pub-dir))

  org-export-as-odt(nil)
  call-interactively(org-export-as-odt)
  org-export(nil)
  call-interactively(org-export nil nil)


Yours,
Christian

On 3/21/11 10:31 AM, Jambunathan K wrote:


Christian

Thanks being the first one here (again).

I have tried incorporating some subset (and not all) of your feedback on
the new odt exporter. My priority was to get the html exporter and the
generic interface right.


Hi,

I'd love to try it out, but I'm not good at git. Would someone be kind
enough to post directions?


(1) You can checkout via git:

#+begin_src sh
   git remote add org-odt http://repo.or.cz/r/org-mode/org-jambu.git
   git fetch org-odt
   git checkout -b org-odt org-odt/staging [Note the word `staging']
#+end_src

(2) You can download a snapshot. (Search for .tar.gz and .zip)
http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging

The above instructions are the same as one that I shared with
Release-0.6 [1] with one important change - instead of `master' the
changes are in `staging' branch.

Footnotes:
[1] http://lists.gnu.org/archive/html/emacs-orgmode/2011-01/msg01210.html

Jambunathan K.







Re: [O] OT: Another great application for Org

2011-03-21 Thread Carsten Dominik

On 21.3.2011, at 09:25, Bastien wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 
 Another great way to use Org-mode..
 
 http://xkcd.com/874/
 
 :)
 
 I won't stop hacking Org till it is explicitely quoted in xkcd.
 That's the only true test for success!


Yess!

 :D

- Carsten



[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Fri, Mar 18 2011, Stefan Monnier wrote:

 There's a misunderstanding: AFAIK the patch sent by Tassilo does not
 make the completion-at-point-function return a function that performs
 completion but does properly return completion data (i.e. region start,
 region end, and completion table), part of which happens to be
 represented by a function.
 I.e. this is not one of the discouraged cases.

You're right, indeed!

But I do not see anywhere the fact that the completion collection can be
a function.

I only found the sentence:

It would be consistent and clean for completion functions to allow
lambda expressions (lists that are functions) as well as function
symbols as COLLECTION, but this is impossible.

in (elisp) Programmed Completion.

Not sure it's really related to completion-at-point-functions, but well,
it's not making things clearer for me anyhow.

 - Make completing code allows to replace the region being completed with
   somethig that does not match at all.

 AFAIK that's already the case, tho it depends on lots of factors, such
 as what you mean by completing code.

I meant the code in minibuffer.el

To be clear, the things that disturbs me is that this simple test case
does not work as I would like it to:

#+begin_src emacs-lisp
(defun jd:completion-at-point-test ()
(list (point-at-bol) (point) '(Steve John)))
(add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
#+end_src

If you run that code into a buffer, and then type in this same buffer:

L

And try to complete that L with M-x completion-at-point, it will say
No match.

But if you do:
#+begin_src emacs-lisp
(defun jd:completion-at-point-test ()
(list (point-at-bol) (point) '(Lionel Steve John)))
(add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
#+end_src

And try to complete a L, it will complete to Lionel. Just because
completion-at-point is trying to be smarter than my function,
re-guessing which items from the collection are good candidates.
Something my function already does (well, not in this example, but in
real life).

This is why I'm (kindly) finger pointing the completing code in
minibuffer.el, but I might be wrong (and hope to be! :-)).

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpWdiximC2g7.pgp
Description: PGP signature


[O] Re: Another HTML Export Problem

2011-03-21 Thread Bernt Hansen
David Maus maus.da...@gmail.com writes:

 At Sun, 20 Mar 2011 21:46:19 -0400,
 Bernt Hansen wrote:

 I think there is yet another HTML export issue with the current
 development code.

 Indeed. This should be fixed now as well.

Hi David,

Thanks for the quick fix!

Regards,
-- 
Bernt



[O] Re: Completing with anything

2011-03-21 Thread Tassilo Horn
Julien Danjou jul...@danjou.info writes:

Hi Julien,

 To be clear, the things that disturbs me is that this simple test case
 does not work as I would like it to:

 #+begin_src emacs-lisp
 (defun jd:completion-at-point-test ()
 (list (point-at-bol) (point) '(Steve John)))
 (add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
 #+end_src

 If you run that code into a buffer, and then type in this same buffer:

 L

 And try to complete that L with M-x completion-at-point, it will say
 No match.

 But if you do:
 #+begin_src emacs-lisp
 (defun jd:completion-at-point-test ()
 (list (point-at-bol) (point) '(Lionel Steve John)))
 (add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
 #+end_src

 And try to complete a L, it will complete to Lionel.  Just because
 completion-at-point is trying to be smarter than my function,
 re-guessing which items from the collection are good candidates.
 Something my function already does (well, not in this example, but in
 real life).

Sorry, but I totally missed the point of the example. :-)

Isn't completion of L to Lionel at the beginning of a line exactly
what your completion function should enable?  With the bzr version of
yesterday, I get these results:

--8---cut here---start-8---
LTAB
Lionel

 LTAB
 ;; message: no match

LionelTAB
;; message: sole completion
--8---cut here---end---8---

Bye,
Tassilo



[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

Hello Christian

Thanks for your first bug report. I have the habit of not using
byte-compilation. 

The reason for the crash you have reported is that
`with-org-html-preserve-paragraph-state' is a macro and some of the
references to it preceded the definition. As a result the byte compiler
was mistaken in to thinking that this was a function.

Jambnathan K.

 With a minimal Emacs as per the old instructions, and with one minor
 change to your test file (`LaTeX:verbatim' -- I don't have dvipng
 installed), I get this:


 Debugger entered--Lisp error: (invalid-function
 with-org-html-preserve-paragraph-state)
   with-org-html-preserve-paragraph-state(nil)
   byte-code([...THIS LINE DIDN'T COPY-PASTE WELL... CHRISTIAN]
   org-do-export(nil nil nil nil nil nil)
   (let* ((org-parse-get-callback ...)
 (org-export-html-special-string-regexps
 org-export-odt-special-string-regexps)) (org-do-export arg hidden
 ext-plist to-buffer body-only pub-dir))
   org-export-as-odt(nil)
   call-interactively(org-export-as-odt)
   org-export(nil)
   call-interactively(org-export nil nil)



[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Mon, Mar 21 2011, Tassilo Horn wrote:

 Sorry, but I totally missed the point of the example. :-)

Damn it! I tried hard. :-)

 Isn't completion of L to Lionel at the beginning of a line exactly
 what your completion function should enable?

No. To give a even more concrete application of my example: I'd like
org-contacts to give completion for email addresses or nicknames. If you
have a contact entry like:
- Name: Emmett Brown
- Nickname: doc
- Email address: gigaw...@delorean.com

What I'd like to do is that if the user enters:

 docTAB

is that it can be completed to
   Emmett Brown gigaw...@delorean.com

But if I return such an item in COLLECTION, it just gets ignored because
Emmett Brown gigaw...@delorean.com does not match doc.

This was the point of my example in the my previous email. To just prove
that completion-at-point is being too much picky about which collection
item are valid candidate for completion. I'd like it to just trust what
my function returns. :-)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpoBHZzqTxXG.pgp
Description: PGP signature


Re: [O] [PATCH] Wash output of org-encrypt-entry, take 3

2011-03-21 Thread Julien Danjou
On Fri, Mar 18 2011, Óscar Fuentes wrote:

 The first line (Version:...) can change from machine to machine and over
 time (as gpg is updated with a new version.) This is problematic when
 the file is stored under version control, because as you decrypt and
 encrypt an entry that line will change and create differences among the
 file on the workspace and the file stored on VC.

This is true only if you modify the content of the entry, so I'm not
sure there's a real harm done here.

 Second, the empty line just wastes space and it is plain ugly once we
 remove the first one with the Version text.

This line is required by the protocol.

 Finally, on some systems (mostly Windows) depending on how your Emacs
 and gpg are configured, ^M characters may appear at the end of every
 line of gpg output once it is inserted on the Emacs buffer. This happens
 when the buffer uses Unix line-endings but gpg uses DOS line-endings.

I do not feel the right place and/or way to fix and encoding bug.

 +(defun org-crypt-wash-encrypted-string (str)
 +  Remove superfluos and annoying text from the encrypted string.
 +  (with-temp-buffer
 +(insert str)
 +(goto-char (point-min))
 +(while (re-search-forward ^Version:.*$\\|\^M\\|^\n nil t)
 +  (replace-match ))
 +(buffer-string)))
 +

Ultimately, maybe simpler with `string-match'.

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpN9ZtwttqKb.pgp
Description: PGP signature


Re: [O] Re: org-src-fontify-natively makes things very, very slow

2011-03-21 Thread Eric Schulte
Le Wang l26w...@gmail.com writes:

 On Mon, Mar 21, 2011 at 3:41 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 Le Wang l26w...@gmail.com writes:

 Why did you give up on yasnippet?

 Confusion amongst the key bindings, between org, yasnippet and the
 autocompletion tools I have been trying.  I want to be able to use TAB
 for completion.

 I may come back to yasnippet in due course so it's nothing to do with
 yasnippet per se.


I've been using the following yasnippet/org configuration for a long
while now binding yas/expand to TAB.

#+begin_src emacs-lisp
  (defun yas/org-very-safe-expand ()
(let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

  (add-hook 'org-mode-hook
(lambda ()
  ;...
  ;; yasnippet (using the new org-cycle hooks)
  (make-variable-buffer-local 'yas/trigger-key)
  (setq yas/trigger-key [tab])
  (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
  (define-key yas/keymap [tab] 'yas/next-field)
  ))
#+end_src

Best -- Eric


 I too had this issue of expansion confusion, especially when I
 installed the premade yasnippet packs.

 I solved it by adding moving yasnippet off the [tab] key, and adding
 it to hippie-expand, which I map to (M-/):

 (setq yas/trigger-key nil)
 (add-to-list 'hippie-expand-try-functions-list 'yas/hippie-try-expand)


 --
 : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
 : using Org-mode version 7.5 (release_7.5.90.g1fb3.dirty)




[O] Re: Completing with anything

2011-03-21 Thread Tassilo Horn
Julien Danjou jul...@danjou.info writes:

Hi Julien,

 Isn't completion of L to Lionel at the beginning of a line
 exactly what your completion function should enable?

 No. To give a even more concrete application of my example: I'd like
 org-contacts to give completion for email addresses or nicknames. If
 you have a contact entry like:

 - Name: Emmett Brown
 - Nickname: doc
 - Email address: gigaw...@delorean.com

 What I'd like to do is that if the user enters:

  docTAB

 is that it can be completed to
Emmett Brown gigaw...@delorean.com

 But if I return such an item in COLLECTION, it just gets ignored
 because Emmett Brown gigaw...@delorean.com does not match doc.

Now that is a completely understandable example! :-)

On the one hand, I'm a bit tempted to say that this is no COMPLETION,
but a kind of ABBREV EXPANSION (just like abbrev.el, skeleton.el,
temo.el, yasnippet.el, ...).  On the other hand, I clearly see the
usefulness of such a dynamic expansion-at-point.

What might be a solution is to allow COLLECTION to contain not only
strings, but also pairs (MATCH . EXPANSION), like (doc . Emmett Brown
gigaw...@delorean.com).

But I'm really no expert with the completion code, so I cannot speak on
how much effort that is, and if it would break things.  For example,
with normal completions you can usually cycle thru all completion
possibilities.  Not sure if that would work after an expansion has taken
place.

Bye,
Tassilo



Re: [O] OT: Another great application for Org

2011-03-21 Thread Manish
On Mon, Mar 21, 2011 at 1:55 PM, Bastien wrote:
 Carsten Dominik writes:

 Another great way to use Org-mode..

 http://xkcd.com/874/

 :)

 I won't stop hacking Org till it is explicitely quoted in xkcd.
 That's the only true test for success!

Amen!

-- 
Manish



[O] [PATCH 3/3] Fix a typo in the commentary.

2011-03-21 Thread Christian Egli
From: Christian Egli christian.e...@sbszh.ch

* org-taskjuggler.el: Fix a typo in the commentary.
---
 lisp/org-taskjuggler.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index bcf2c45..f891634 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -144,7 +144,7 @@
 ;;   - Look at org-file-properties, org-global-properties and
 ;; org-global-properties-fixed
 ;;   - What about property inheritance and org-property-inherit-p?
-;;   - Use TYP_TODO as an way to assign resources
+;;   - Use TYPE_TODO as an way to assign resources
 ;;   - Make sure multiple dependency definitions (i.e. BLOCKER on
 ;; previous-sibling and on a specific task_id) in multiple
 ;; attributes are properly exported.
-- 
1.7.1




[O] [PATCH 1/3] Replace recursive implementation with an iterative one

2011-03-21 Thread Christian Egli
From: Christian Egli christian.e...@sbszh.ch

* org-taskjuggler.el (org-taskjuggler-assign-resource-ids): Replace
recursive implementation with an iterative one.

That way we can avoid to have ask users to increase
`max-lisp-eval-depth'.
---
 lisp/org-taskjuggler.el |   16 +++-
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 9c88f5d..279f46d 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -418,15 +418,13 @@ deeper), then it's not a leaf.
 (defun org-taskjuggler-assign-resource-ids (resources)
   Given a list of resources return the same list, assigning a
 unique id to each resource.
-  (cond
-   ((null resources) nil)
-   (t
-(let* ((resource (car resources))
-  (unique-id (org-taskjuggler-get-unique-id resource unique-ids)))
-  (push (cons unique-id unique-id) resource)
-  (cons resource
-   (org-taskjuggler-assign-resource-ids (cdr resources)
-(cons unique-id 
unique-ids)))
+  (let (unique-ids new-list)
+(dolist (resource resources new-list)
+  (let ((unique-id (org-taskjuggler-get-unique-id resource unique-ids)))
+   (push (cons unique-id unique-id) resource)
+   (push unique-id unique-ids)
+   (push resource new-list)))
+(nreverse new-list)))
 
 (defun org-taskjuggler-resolve-dependencies (tasks)
   (let ((previous-level 0)
-- 
1.7.1




[O] [PATCH 2/3] Fix allocations handling for tj3

2011-03-21 Thread Christian Egli
From: Christian Egli christian.e...@sbszh.ch

* org-taskjuggler.el (org-taskjuggler-open-task): Only emit a purge
allocations statement if we are not targeting tj3.
---
 lisp/org-taskjuggler.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-taskjuggler.el b/lisp/org-taskjuggler.el
index 279f46d..bcf2c45 100644
--- a/lisp/org-taskjuggler.el
+++ b/lisp/org-taskjuggler.el
@@ -660,8 +660,8 @@ org-mode priority string.
  (format  depends %s\n previous-sibling)
(and depends (format  depends %s\n depends)))
   (and allocate (format  purge %s\n allocate %s\n
-   (or (and (org-taskjuggler-targeting-tj3-p) 
allocations)
-   allocate)
+   (or (and (org-taskjuggler-targeting-tj3-p) 
allocate)
+   allocations)
allocate))
   (and complete (format  complete %s\n complete))
   (and effort (format  effort %s\n effort))
-- 
1.7.1




[O] [PATCH 0/3] Small fixes to taskjuggler export

2011-03-21 Thread Christian Egli
Hi all

Here are some more small fixes to taskjuggler export

Thanks

Christian Egli (3):
  Replace recursive implementation with an iterative one
  Fix allocations handling for tj3
  Fix a typo in the commentary.

 lisp/org-taskjuggler.el |   22 ++
 1 files changed, 10 insertions(+), 12 deletions(-)




Re: [O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi,

I see. Would you like to continue to receive bug reports based on 
byte-compilation, or should I just load the sources for now?


Yours,
Christian

On 3/21/11 2:31 PM, Jambunathan K wrote:


Hello Christian

Thanks for your first bug report. I have the habit of not using
byte-compilation.

The reason for the crash you have reported is that
`with-org-html-preserve-paragraph-state' is a macro and some of the
references to it preceded the definition. As a result the byte compiler
was mistaken in to thinking that this was a function.

Jambnathan K.


With a minimal Emacs as per the old instructions, and with one minor
change to your test file (`LaTeX:verbatim' -- I don't have dvipng
installed), I get this:


Debugger entered--Lisp error: (invalid-function
with-org-html-preserve-paragraph-state)
   with-org-html-preserve-paragraph-state(nil)
   byte-code([...THIS LINE DIDN'T COPY-PASTE WELL... CHRISTIAN]
   org-do-export(nil nil nil nil nil nil)
   (let* ((org-parse-get-callback ...)
(org-export-html-special-string-regexps
org-export-odt-special-string-regexps)) (org-do-export arg hidden
ext-plist to-buffer body-only pub-dir))
   org-export-as-odt(nil)
   call-interactively(org-export-as-odt)
   org-export(nil)
   call-interactively(org-export nil nil)








[O] Publishing - how to disable backup file generation?

2011-03-21 Thread Marco Alberti

Hi all,
since I installed Org 7.5, I noticed that when I publish an html  
project to a local directory, backup copies of the existing html files  
are kept, with a tilde attached to their name. As far as I remember,  
this wasn't happening before. Is there a way to disable it? I couldn't  
find a relevant variable.

Thanks,
Marco








[O] Re: Completing with anything

2011-03-21 Thread Stefan Monnier
 There's a misunderstanding: AFAIK the patch sent by Tassilo does not
 make the completion-at-point-function return a function that performs
 completion but does properly return completion data (i.e. region start,
 region end, and completion table), part of which happens to be
 represented by a function.
 I.e. this is not one of the discouraged cases.

 You're right, indeed!

 But I do not see anywhere the fact that the completion collection can be
 a function.

 I only found the sentence:

 It would be consistent and clean for completion functions to allow
 lambda expressions (lists that are functions) as well as function
 symbols as COLLECTION, but this is impossible.

 in (elisp) Programmed Completion.

That sentence is obsolete.  Sorry 'bout that.  A collection can be
any function, including a lambda expression.

 And try to complete that L with M-x completion-at-point, it will say
 No match.

 But if you do:
 #+begin_src emacs-lisp
 (defun jd:completion-at-point-test ()
 (list (point-at-bol) (point) '(Lionel Steve John)))
 (add-to-list 'completion-at-point-functions 'jd:completion-at-point-test)
 #+end_src

completion-at-point-function is meant to provide just the possible
completion candidates for the kind of object being completed.
Which ones of these will be actually considered will then depend on the
actual text in the buffer and the completion-styles in use.

A missing feature in minibuffer.el is the ability to specify different
completion styles for different circumstances.

 And try to complete a L, it will complete to Lionel.

That depends on completion-styles.  Tho I must admit that I can't think
of any completion-style where it would make sense to complete L to
Steve when Lionel is a valid candidate (I have an experimental
forgiving completion-style which could be convinced to treat the L
as a typo and complete to Steve or John, but in the presence of
Lionel it would prefer not to).

 Just because completion-at-point is trying to be smarter than my
 function, re-guessing which items from the collection are
 good candidates.

Your function's job is not to guess which items are good candidates, but
rather to return all the candidates in the category being completed.

 Something my function already does (well, not in this example, but in
 real life).

A completion-at-point-function is allowed to look at the buffer text and
weed out elements that don't match, but it does not have to (and I'd
recommend that it does not except when there's a significant performance
benefit, since it may weed out elements that the completion-style in use
may actually consider as valid candidates).  It is the job of
completion-in-region-functions.


Stefan



[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Mon, Mar 21 2011, Stefan Monnier wrote:

 That sentence is obsolete.  Sorry 'bout that.  A collection can be
 any function, including a lambda expression.

Should I open a bug about that to keep track of it?
(asking in case you're already working on a fix or not)

 completion-at-point-function is meant to provide just the possible
 completion candidates for the kind of object being completed.
 Which ones of these will be actually considered will then depend on the
 actual text in the buffer and the completion-styles in use.

I see, that makes sense. I think that completion is not what I want to
use as Tassilo suggested. I've been that way just because this is what
is used in `message.el'. Maybe it requires a change too to turn towards
an `abbrev' use. :)

-- 
Julien Danjou
❱ http://julien.danjou.info


pgpsOwDbOtuVG.pgp
Description: PGP signature


[O] Re: Completing with anything

2011-03-21 Thread Stefan Monnier
 What I'd like to do is that if the user enters:

  docTAB

 is that it can be completed to
Emmett Brown gigaw...@delorean.com

In a BBDB discussion, I suggested to complete the above to Emmett Brown
\doc\ gigaw...@delorean.com, but it's true that you may prefer to
keep the nickname private.

In that case it's really not a completion (tho the completion code may
help you complete do to doc as a first step).

As Tassilo mentions, maybe we could have a post-completion step that can
perform some kind of expansion/replacement/cleanup once a valid
completion is selected.  I'm not sure what that would look like in terms
of code and API, but if someone wants to try it out a propose a patch to
start a discussion, maybe we could add such a thing.


Stefan



[O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

 Hi,

 I see. Would you like to continue to receive bug reports based on
 byte-compilation, or should I just load the sources for now?

The one you reported is a serious error and I have fixed it. 

Anything amounting to a crash or a crash in waiting has to be
immeditately addressed. As for warnings, they are better taken up just
before the actualy merge with the reposiory.

That said I welcome all bug reports and I will address all of them.

Jambunathan K.




Re: [O] Re: org-src-fontify-natively makes things very, very slow

2011-03-21 Thread Eric S Fraga
Hello again,

going back to the original subject of this thread (although thanks all
for your inputs on yasnippet ;-), I have started working on a new
document and am finding the slowdown of navigation (next-line) very
annoying.  In this document, I have two gnuplot source blocks.
Navigating through them, I get the following results from elp:

--8---cut here---start-8---
next-line 54  
5.946677  0.1101236481
previous-line 44  
0.435003  0.0098864318
org-encrypt-entries   1   
0.000424  0.000424
org-scan-tags 1   
0.000368  0.000368
org-make-tags-matcher 1   
5.1e-05   5.1e-05
org-activate-plain-links  1   
2.4e-05   2.4e-05
org-raise-scripts 1   
2.1e-05   2.1e-05
org-fontify-meta-lines-and-blocks 1   
1.9e-05   1.9e-05
org-font-lock-hook1   
1.9e-05   1.9e-05
org-outline-level 5   
1.9e-05   3.8e-06
org-mode-flyspell-verify  14  
1.8e-05   1.285...e-06
org-inlinetask-fontify1   
1.5e-05   1.5e-05
org-activate-footnote-links   1   
1.5e-05   1.5e-05
org-unfontify-region  1   
1.2e-05   1.2e-05
org-do-emphasis-faces 1   
1.2e-05   1.2e-05
org-activate-angle-links  1   
1.2e-05   1.2e-05
org-activate-dates1   
1.1e-05   1.1e-05
org-fontify-entities  1   
1.1e-05   1.1e-05
--8---cut here---end---8---

From these timings, the font locking doesn't seem to be the issue but
maybe the overlays are.  However, commenting out the code that Sébastien
Vauban indicated:

 Maybe this is (partly?) due to the overlay I added:
 
 #+begin_src emacs-lisp
 (overlay-put (make-overlay beg1 block-end)
  'face 'org-block-background))
 #+end_src

(well, commenting out the whole condition that includes this code) makes
no difference at all.

So, I turned off =org-src-fontify-natively= and things are back to
normal: next-line is as fast as previous-line.  I can put up without the
fontification so this is what I am doing now.  

However, as it's a pity to lose the native fontification, it would be
nice to solve this problem in another way.  Can anybody suggest any
other thing to try?

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.91.g38c6b)



Re: [O] Re: [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Jambunathan K

Hi,

 I see. Would you like to continue to receive bug reports based on
 byte-compilation, or should I just load the sources for now?


Just pushed a fix that nukes all the warnings that the byte-compiler was
generating.

Jambunathan K.



[O] Re: Accessing CATEGORY for custom agenda command

2011-03-21 Thread Markus Heller
Matt Lundin m...@imapmail.org writes:

 Markus Heller helle...@gmail.com writes:

 I'm trying to get the following to work:

 (org-add-agenda-custom-command
  '(X tags Task
((org-agenda-skip-function '(org-agenda-skip-entry-if 
  'notregexp Admin))
 (org-agenda-overriding-header   Test


 I want all entries that have the tag TASK and that have the category
 Admin shown in the agenda.

 Sorry for the late reply, but a simple way to do this is to change the
 query. This will pick up categories regardless of whether they are
 defined in the subtree or at the top of the file:

 (org-add-agenda-custom-command
  '(X tags TASK+CATEGORY=\Admin\
((org-agenda-overriding-header   Test

Hi Matt,

thanks for the reply.  Looks good to me, will play around with it.  Now
if I could only figure out how to use CATEGORY in my clock report ...

Cheers
Markus




[O] publishing org-mode to google docs

2011-03-21 Thread Daniel Mahler
What is the best way to publishh org-mode outlines to google docs.
I can upload the PDF, but I need the resulting google docs to be editable.

thanks
Daniel



Re: [O] [PATCH][ANN] org-html/org-odt

2011-03-21 Thread Christian Moe

Hi,

Very, very nice!

Tested with a minimal emacs, using Org-mode version 7.5 
(baseline.6.g533ba.dirty), GNU Emacs 23.2.1 
(powerpc-apple-darwin9.8.0, NS apple-appkit-949.54) on a Mac.


Notes on the resulting test.odt document (I've had only a quick look 
at the html, so what follows refers only to ODT unless HTML is 
specifically mentioned):


* Blocks

There's no syntax highlighting in exported src blocks (ODT and HTML 
both). Not a priority?


The OrgVerse style can, luckily, be changed to something more poetic...

* Verbatim LaTeX

I can't report on the LaTeX math display (never got dvipng to install 
on my system).


What I /can/ report is that with the =LaTeX:verbatim option=, which 
you probably haven't tested, LaTeX equation environments are not 
exported (everything after the =\begin{equation}= line is missing or 
not visible). This is copy-pasted from test.odt:


#+begin_example
  6.5.1 LaTeX Fragment1

  There is a equation down below.
  \begin{equation}

  6.5.2 LaTeX Fragment2

  \begin{equation}
  If $a^2=b$ and \( b=2 \), then the solution must be either $$ 
a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].

#+end_example

Everything shows up in HTML, but linebreaks before the 
=\end{equation}= line are lost.


* Links

The link to =Dedicated Target1= under 8.2.3 does not work when clicked 
(in odt -- it works in html). Hovering does show a popup, 
=.OrgXref.Dedicated-Target1=. All other links work as expected.


* Captions, labels, references

On opening, caption and reference labels include verbatim the 
reference key used in the Org source, which was my main concern last time.


But now I realize that this is not an issue after all! =Tools  Update 
 Update all= takes care of automatic renumbering of all 
labels/references. This should probably be mentioned in the documentation.


Tomorrow, I'll throw a 40-page report at it and see what happens.
:)

Yours,
Christian




On 3/20/11 7:32 PM, Jambunathan K wrote:


This is a formal request to integrate my org-html.el  org-odt.el
changes in to the master branch.

This patch introduces 3 major features:
1. A generic exporter
2. All new html backend re-implemented as a plugin to (1).
3. A odt backend as a plugin to (1).

The patch is based on git commit 3d802.

I am attaching a sample test.org and test.html file generated by the
above set of changes.

Http URL for the repo is:
- http://repo.or.cz/w/org-mode/org-jambu.git/shortlog/refs/heads/staging
(`staging' branch of `org-jambu.git')

Let me know if you have any questions.

ps: Considering the amount of effort I have already invested in these
patches it is almost impossible for me to break down this monolithic
patch in to series of smaller patches. I would be willing to accommodate
all other requests.






Jambunathan K.






[O] Tag hierarchy idea

2011-03-21 Thread John Tait
Hi all

This is my first post. First, I'd like to thank all the org-mode developers
for a great tool.

I'm a technical editor. I am facinated by the pros and cons of structured
documents with regard to their ease of use and power. I think that they are
probably far too restrictive and cumbersome (looking at you, DITA) for the
average technical document. Nevertheless, the idea of modular documents is
an appealing one to me. I like conditional text features (e.g. in LyX).

In org-mode, I really really love selective export (include/exclude tags)
and using #+INCLUDE: for including other files. This gives me enormous
flexibility, with zero DITA pain.

May I propose an additional feature? I haven't seen anything like it
published anywhere, though maybe I am using the incorrect search terms. (I
am getting enormous vertigo and time-travel sickness reading up on Lisp,
XML, DITA, etc.)

It's a pretty basic idea, but I hope you can take a moment to weigh up its
potential.

We could assign tags to hierarchies of other tags.


#+TAG-NEST: (colour(red green blue))
#+TAG-NEST: (type(colour size))
#+TAG-NEST: (car(type price))

or maybe like this. I'd leave it up to someone with actual programming
experience and a logical mind (my productive programming was PASCAL in 1991)
to suggest a rigorous system that makes sense.

#+TAG-NEST: colour  red:green:blue
#+TAG-NEST: type  colour:size
#+TAG-NEST: car  type:price

The point of this would be that selecting, say, colour as a tag would
bring along red, green, and blue along with it. The tag type would
bring colour, red, green, blue and size with it.

The power of this would be that hierarchies could be adjusted and
manipulated as necessary.

Since there is no one definitive way to tag real world objects and ideas
into nice nested boxes (thanks, AI research), we could adjust any tag
hierarchies to suit experience and changing priorities. Even hierarchies
could just be thrown away without affecting existing tags too much, since
tagged headings could just be selected/excluded as usual.

This way, we can use concept hierarchies as the disposable conveniences that
they are, without getting locked into them. Looking at stuff like XSLT
transformation for XML, that'd be worth avoiding.

Maybe there is some logical lispy reason why this couldn't work, but I hope
this is worthy of your consideration.

John

--

While I am here (sorry), I couldn't get #+FILETAGS: to work in org-version
7.4.

For example, if I export a file (to html) File1.org  with
#+EXPORT_EXCLUDE_TAGS: john, and then I include File2.org, I can see
File2.org included as part the export of File1 as expected. If I then set
#+FILETAGS: :john: in File2, I'd expect File2 to now be excluded, but it
still appears. If I then tag a File2 heading as say * Heading :john:, then
it won't appear in the File1 export, as expected. Am I missing something?


Re: [O] publishing org-mode to google docs

2011-03-21 Thread suvayu ali
On Mon, Mar 21, 2011 at 2:22 PM, Daniel Mahler dmah...@gmail.com wrote:
 What is the best way to publishh org-mode outlines to google docs.
 I can upload the PDF, but I need the resulting google docs to be editable.


How about usign the experimental odt exporter?

 thanks
 Daniel





-- 
Suvayu

Open source is the future. It sets us free.



[O] Re: org-src-fontify-natively makes things very, very slow

2011-03-21 Thread Sébastien Vauban
Hi Eric,

Eric S Fraga wrote:
 going back to the original subject of this thread (although thanks all for
 your inputs on yasnippet ;-), I have started working on a new document and
 am finding the slowdown of navigation (next-line) very annoying. In this
 document, I have two gnuplot source blocks. Navigating through them, I get
 the following results from elp:

 next-line 54  
 5.946677  0.1101236481
 previous-line 44  
 0.435003  0.0098864318
 org-encrypt-entries   1   
 0.000424  0.000424
 org-scan-tags 1   
 0.000368  0.000368
 org-make-tags-matcher 1   
 5.1e-05   5.1e-05
 org-activate-plain-links  1   
 2.4e-05   2.4e-05
 org-raise-scripts 1   
 2.1e-05   2.1e-05
 org-fontify-meta-lines-and-blocks 1   
 1.9e-05   1.9e-05
 org-font-lock-hook1   
 1.9e-05   1.9e-05
 org-outline-level 5   
 1.9e-05   3.8e-06
 org-mode-flyspell-verify  14  
 1.8e-05   1.285...e-06
 org-inlinetask-fontify1   
 1.5e-05   1.5e-05
 org-activate-footnote-links   1   
 1.5e-05   1.5e-05
 org-unfontify-region  1   
 1.2e-05   1.2e-05
 org-do-emphasis-faces 1   
 1.2e-05   1.2e-05
 org-activate-angle-links  1   
 1.2e-05   1.2e-05
 org-activate-dates1   
 1.1e-05   1.1e-05
 org-fontify-entities  1   
 1.1e-05   1.1e-05

 From these timings, the font locking doesn't seem to be the issue but maybe
 the overlays are. However, commenting out the code that Sébastien Vauban
 indicated:

 Maybe this is (partly?) due to the overlay I added:

 #+begin_src emacs-lisp
 (overlay-put (make-overlay beg1 block-end)
  'face 'org-block-background))
 #+end_src

See http://patchwork.newartisans.com/patch/581/ for a full diff. You can see I
only add *one* overlay: for the background face.

 (well, commenting out the whole condition that includes this code) makes no
 difference at all.

I'm surprised. Good to hear, but as some were finger pointing the overlays,
and as I added one for every block... But, OK, better like that!

For the sake of completeness, know that I first tried to add the background
fontification as a text property, but that made the other properties disappear
(annihilating the native fontification in fact). No a solution, or I did not
try the right way -- which is entirely possible, seen my poor knowledge on
this subject (I have to admit I succeeded by trials and errors).

 So, I turned off =org-src-fontify-natively= and things are back to
 normal: next-line is as fast as previous-line.  I can put up without the
 fontification so this is what I am doing now.

 However, as it's a pity to lose the native fontification, it would be
 nice to solve this problem in another way.  Can anybody suggest any
 other thing to try?

Not that I can think of now. Sorry for not being of any help here.

Best regards,
  Seb

-- 
Sébastien Vauban




[O] How to reuse page keywords for LaTeX with pdfkeywords and hyperref package?

2011-03-21 Thread Mikhail Titov
Hello all!

I would like to be able to have same keywords for both HTML and PDF output. I 
was a bit surprised that it is not there yet. I’m not a lisp user:( Could 
someone suggest what needs to be done to use org-export-page-keywords to set 
the value of pdfkeywords option of hyperref LaTeX package?

Mikhail






[O] Re: Completing with anything

2011-03-21 Thread Stefan Monnier
 As Tassilo mentions, maybe we could have a post-completion step that can
 perform some kind of expansion/replacement/cleanup once a valid
 completion is selected.  I'm not sure what that would look like in terms
 of code and API, but if someone wants to try it out a propose a patch to
 start a discussion, maybe we could add such a thing.

 Or maybe an upper layer mixing abbrev and completion? Trying one at
 first, the other one after. This could be useful for message-mode for
 example, since you probably wants to use both.

That might work even better, yes.


Stefan



[O] Re: publishing org-mode to google docs

2011-03-21 Thread Matt Lundin
Daniel Mahler dmah...@gmail.com writes:

 What is the best way to publishh org-mode outlines to google docs.
 I can upload the PDF, but I need the resulting google docs to be editable.

http://docs.google.com/support/bin/answer.py?hl=enanswer=186466topic=1153381

Best,
Matt




[O] Re: org-publish not publishing changed files

2011-03-21 Thread Aidan Gauland
Nick Dokos nicholas.dokos at hp.com writes:
 org uses timestamps to figure out which files need publishing
 (see section 13.4 of the Org manual) and they may have gotten
 curdled somehow. You can force publication by giving a second
 argument to org-publish (if you called it interactively, you
 could do that by giving it a prefix arg):
 
 (org-publish aidalgolland t)
 
 Or you can try getting rid of the timestamps (they are stored
 in the directory named in the variable org-publish-timestamp-directory
 (by default ~/.org-timestamps/) and publish again.
 
 If you can figure out *why* they got out of sync, that would be
 a bonus and worth a post here, particularly if you can identify
 a bug in the code.

How can I get the timestamps in a more human-readable format?  I keep
having this problem (and no symlinks involved) and keep having to wipe
the timestamps directory (a royal nuisance).

--Aidan





[O] Re: Completing with anything

2011-03-21 Thread Eric Abrahamsen
Stefan Monnier monn...@iro.umontreal.ca writes:

 As Tassilo mentions, maybe we could have a post-completion step that can
 perform some kind of expansion/replacement/cleanup once a valid
 completion is selected.  I'm not sure what that would look like in terms
 of code and API, but if someone wants to try it out a propose a patch to
 start a discussion, maybe we could add such a thing.

 Or maybe an upper layer mixing abbrev and completion? Trying one at
 first, the other one after. This could be useful for message-mode for
 example, since you probably wants to use both.

 That might work even better, yes.


 Stefan

This is what I've been using to insert other people's contact
information into emails. Probably no good for general use, but maybe
will provide food for thought.

#+BEGIN_SRC emacs-lisp
(defun my-cite-contact (name)
  (interactive sName (regexp): )
  (let ((rec)
(records (bbdb-search (bbdb-records) name name name nil nil)))
(if (= (length records) 1)
(setq rec (car records))
  (if (zerop (length records))
  (error No matching records)
(setq rec
  (let ((int-name (ido-completing-read Pick one: 
   (mapcar 'bbdb-record-name 
records
(car (bbdb-search (bbdb-records) int-name))
(insert (bbdb-dwim-net-address rec
#+END_SRC




[O] Re: Tag hierarchy idea

2011-03-21 Thread Jambunathan K

 May I propose an additional feature? 
 We could assign tags to hierarchies of other tags.

As a technical editor how do you think you would make use of
hierarchical tags. Without getting in to how this feature might be
implemented, if you can articulate your particular requirements and your
particular workflow there is a likelihood that someone picks the ball
and runs from there on.

My comments are not meant as a criticism but just a thought.

Jambunathan K.
-- 



Re: [O] org table calc and lisp for hh:mm timetable

2011-03-21 Thread Eric Schulte

 While this topic is raised, would it make sense for Org-mode table
 formula to automatically parse any time-like string into time units
 (i.e., base sixty).  That would be the easiest for most users, and (I
 imagine) would rarely result in surprising and unexpected behavior.


So, I took a shot at folding this into org-table.el, the resulting patch
is attached.  I'm not sure if this sort of automatic interpretation of
time-like strings into integers is a good idea, or if this is the best
implementation (I'm not incredibly familiar with Org's table handling)
but after a couple of simple tests the patch does seem to work.  For
example the following...

| 2:30 | 2 | 75 |
#+TBLFM: $3=$1/$2

It may make sense to also include functionality for converting the
result back into a time string, e.g.

#+begin_src emacs-lisp
  (defun org-time-seconds-to-string (secs)
Convert a number of seconds to a time string.
(cond ((= secs 3600) (format-seconds %h:%.2m:%.2s secs))
  ((= secs 60) (format-seconds %m:%.2s secs))
  (t (format-seconds %s secs
#+end_src

| 2:30 | 2 | 1:15 |
#+TBLFM: $3='(org-time-seconds-to-string (/ (string-to-number $1) 
(string-to-number $2)))

While the above is cumbersome, there may be a simpler syntax or
convention -- e.g., whenever one of the inputs is a time string then the
results are displayed as a time string.  Not sure what the best option
is here, but thought this patch may spur some good suggestions.

Best -- Eric

From 76b416013ee4c9a492c8ddced57727215165c298 Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Mon, 21 Mar 2011 19:43:19 -0600
Subject: [PATCH] org-table: convert times to integers on table formula evaluation

* lisp/org-table.el (org-table-to-time): If cell contents look like a
  time string, then converts to an integer.
  (org-table-eval-formula): Convert times to integers on table formula
  evaluation.
---
 lisp/org-table.el |   26 ++
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 3573032..3674b53 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2273,6 +2273,21 @@ of the new mark.
 (cons var (cons value modes)))
   modes)
 
+(defun org-table-to-time (s)
+  Convert cell to numerical time if contents look like a time string.
+  (cond
+   ((and (stringp s)
+	 (string-match \\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\) s))
+(let ((hour (string-to-number (match-string 1 s)))
+	  (min (string-to-number (match-string 2 s)))
+	  (sec (string-to-number (match-string 3 s
+  (+ (* hour 3600) (* min 60) sec)))
+   ((and (stringp s)
+	 (string-match \\([0-9]+\\):\\([0-9]+\\) s))
+(let ((min (string-to-number (match-string 1 s)))
+	  (sec (string-to-number (match-string 2 s
+  (+ (* min 60) sec)
+
 (defun org-table-eval-formula (optional arg equation
 	 suppress-align suppress-const
 	 suppress-store suppress-analysis)
@@ -2369,10 +2384,13 @@ not overwrite the stored one.
 	  (setq formula (org-table-formula-substitute-names formula)))
   (setq orig (or (get-text-property 1 :orig-formula formula) ?))
   (while ( ndown 0)
-	(setq fields (org-split-string
-		  (org-no-properties
-		   (buffer-substring (point-at-bol) (point-at-eol)))
-		   *| *))
+	(setq fields (mapcar (lambda (cell)
+			   (let ((time (org-table-to-time cell)))
+ (if time (number-to-string time) cell)))
+			 (org-split-string
+			  (org-no-properties
+			   (buffer-substring (point-at-bol) (point-at-eol)))
+			   *| *)))
 	(if (eq numbers t)
 	(setq fields (mapcar
 			  (lambda (x) (number-to-string (string-to-number x)))
-- 
1.7.1