[O] Out on the week-end

2011-03-13 Thread Bastien
Dear all,

I'm out on the week-end, will be back on tuesday.

  http://www.youtube.com/watch?v=UCElUItrLZc

Best,

-- 
 Bastien



[O] [PATCH] Goto correct footnote insertion point in org-mode buffers

2011-03-13 Thread Matt Lundin
* lisp/org-footnote.el: (org-footnote-create-definition): Don't search
  for last footnote when in org-mode file.

The recent changes to accommodate signatures in message-mode instruct
org-mode to search for the last footnote in the entire buffer when
inserting a new footnote definition. This causes problems in org
buffers, since org-footnote-goto-local-insertion-point already finds
the correct insertion point. (I.e., the insertion point is always
placed in beneath the last footnote in the buffer, even if
org-footnote-section is nil.) This patch invokes the search only if in
non org-mode buffers.
---
 lisp/org-footnote.el |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index f2b3489..0524b41 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -310,10 +310,10 @@ or new, let the user edit the definition of the footnote.
  (skip-chars-backward  \t\r\n)
  (delete-region (point) max)
  (insert \n\n)
- (insert org-footnote-tag-for-non-org-mode-files \n)
-;; Skip existing footnotes
-(while (re-search-forward ^[[:space:]]*\\[[^]]+\\]  nil t)
-  (forward-line))
+ (insert org-footnote-tag-for-non-org-mode-files \n)))
+   ;; Skip existing footnotes
+  (while (re-search-forward ^[[:space:]]*\\[[^]]+\\]  nil t)
+   (forward-line
 (insert \n[ label ] \n)
 (goto-char (1- (point)))
 (message Edit definition and go back with `C-c ' or, if unique, with 
`C-c C-c'.)))
-- 
1.7.4.1




[O] [PATCH] Prevent creation of duplicate footnote sections.

2011-03-13 Thread Matt Lundin
* lisp/org-footnote.el: (org-footnote-create-definition): Allow for
  footnote sections above the current footnote insertion point.

Fixes bug in which org-mode will create a new footnote section if the
current footnote section is not beneath the current insertion point.
---
 lisp/org-footnote.el |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 0524b41..2ce6668 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -291,6 +291,7 @@ or new, let the user edit the definition of the footnote.
  ;; No section, put footnote into the current outline node
  nil
;; Try to find or make the special node
+   (goto-char (point-min))
(setq re (concat ^\\*+[ \t]+ org-footnote-section [ \t]*$))
(unless (or (re-search-forward re nil t)
(and (progn (widen) t)
-- 
1.7.4.1




[O] [PATCH] New option to create unique, random labels for footnotes.

2011-03-13 Thread Matt Lundin
* lisp/org-footnote.el: (org-footnote-auto-label): New random option
* lisp/org-footnote.el: (org-footnote-new): Create random footnote
  labels with unique ids
---
 lisp/org-footnote.el |   16 
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 2ce6668..9dbd6be 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -113,12 +113,14 @@ t  create unique labels of the form [fn:1], 
[fn:2], ...
 confirmlike t, but let the user edit the created value.  In particular,
the label can be removed from the minibuffer, to create
an anonymous footnote.
+randomAutomatically generate a unique, random label.
 plain  Automatically create plain number labels like [1]
   :group 'org-footnote
   :type '(choice
  (const :tag Prompt for label nil)
  (const :tag Create automatic [fn:N] t)
  (const :tag Offer automatic [fn:N] for editing confirm)
+ (const :tag Create a random label random)
  (const :tag Create automatic [N] plain)))
 
 (defcustom org-footnote-auto-adjust nil
@@ -253,16 +255,22 @@ This command prompts for a label.  If this is a label 
referencing an
 existing label, only insert the label.  If the footnote label is empty
 or new, let the user edit the definition of the footnote.
   (interactive)
-  (let* ((labels (org-footnote-all-labels))
+  (let* ((labels (and (not (equal org-footnote-auto-label 'random))
+ (org-footnote-all-labels)))
 (propose (org-footnote-unique-label labels))
 (label
- (if (member org-footnote-auto-label '(t plain))
- propose
+ (cond 
+  ((member org-footnote-auto-label '(t plain))
+   propose)
+  ((equal org-footnote-auto-label 'random)
+   (require 'org-id)
+   (substring (org-id-uuid) 0 8))
+  (t
(completing-read
 Label (leave empty for anonymous): 
 (mapcar 'list labels) nil nil
 (if (eq org-footnote-auto-label 'confirm) propose nil)
-'org-footnote-label-history
+'org-footnote-label-history)
 (setq label (org-footnote-normalize-label label))
 (cond
  ((equal label )
-- 
1.7.4.1




[O] Section between #+latex: declarations not converted during export

2011-03-13 Thread Matt Lundin
In the following example...

--8---cut here---start-8---
* Testing
#+latex: \custommacro{%
[[http:www.google.com][Google]]
/The quick brown fox./
#+latex: }
--8---cut here---end---8---

...the lines between the latex declarations are not exported:

--8---cut here---start-8---
\section{Testing}
\label{sec-1}

\custommacro{%
[[http:www.google.com][Google]]
/The quick brown fox./
}
--8---cut here---end---8---

I would expect this behavior with #+begin_latex:...#+end_latex, but
not with #+latex.

Best,
Matt



[O] Re: [Orgmode] IMPORTANT Modified link escaping in Org mode

2011-03-13 Thread Michael Brand
Hi David

The current version of dmaus/org-check-percent-escapes from Worg
http://orgmode.org/worg/org-hacks.html#check-old-link-escapes
loops forever in the outer while when used on a one line Org buffer
containing just [[http://www.orgmode.org]] except I hack something
like (goto-char end) behind the inner while. What am I doing wrong?
Did anybody else have this issue?

Michael


On Thu, Feb 17, 2011 at 20:57, David Maus dm...@ictsoc.de wrote:
 Hello everybody,

 I've just pushed a series of commits to current master that modifies
 Org modes link escaping functions.

 Percent escaping is used in Org mode to escape certain characters in
 links that would either break the parser (e.g. square brackets in link
 target oder description) or are not allowed to appear in a particular
 link type (e.g. non-ascii characters in a http: link).

 With this change in place Org will apply percent escaping and
 unescaping more consistently especially for non-ascii characters.
 Additionally some of the outstanding bugs or glitches concerning
 percent escaped links are solved.

 However, this change has the potential to break existing links in your
 documents in at least one case: Links that contain a literal percent
 sign followed by two characters in [0-9a-fA-f] might break if this
 sequence of characters is /not/ a percent escape.

 E.g. a link to a directory literally called foo%45bar will break
 because the new unescaping function will happily interpret the %45
 as a percent encoded letter E.

 To detect at least some of such problematic links you can run the
 attached command `dmaus/org-check-percent-escapes' in a Org mode
 buffer.  It will scan all links in the buffer and issue a warning for
 each link that contains a sequence that matches aformentioned pattern
 and is not one of the escape sequences used by Org up to know.

 If you experience any problems with this change please don't forget to
 Cc: me so the complaints will end up in my main mailbox.

 Best,
  -- David



[O] RE: Alinea filling (hanlding of explicit line-breaks)

2011-03-13 Thread Vincent Belaïche


 Date: Sat, 12 Mar 2011 22:41:02 +
 From: k...@freefriends.org
 To: vincent@hotmail.fr
 CC: monn...@iro.umontreal.ca; emacs-de...@gnu.org
 Subject: RE: Alinea filling (hanlding of explicit line-breaks)

[...]
 1. Sure, @* forces a line break in Texinfo. How that technically
 compares to \\ in org mode, I don't know.

[...]

FYI, the only --- but significative --- difference is that in Org \\
needs to be placed at end of line to be active. This is the reason why
it is quite disturbing in Org if the paragraph filling moves \\ from the
end of of line. 

In Texinfo it is rather a matter of taste whether you like it or not
that in the source code @* are also at end of line to look like the
output --- I personally like it this way.

VBR,
   Vincent.



Re: [O] Re: [BUG] Unmatched #+end-src

2011-03-13 Thread Eric Schulte

 The real problem is: how should Org react when parsing syntactically
 erroneous buffers? I concede that freezing Emacs isn't nice, but otoh,
 code can't deal with every possible user error.

 So, what is the expected behavior here? Consider orphan #+end_ as
 normal text, throw an error, or both? An answer to this question would
 be more useful than code, honestly.


This is just opinion and gut reaction, but my first instinct is to say
that Org just treat an orphan #+end_ as normal text (or technically as
an Org-mode comment).

The same is true for a floating #+begin_src.  Until the block is closed,
it is just a comment.

Just opinions, Best -- Eric



Re: [O] org-sparse-tree on region or subtree?

2011-03-13 Thread Lee Hinman
Bernt  Suvayu,

Thanks.  Narrowing to subtree and then running org-sparse-tree worked great.

--
Lee

On Fri, Mar 11, 2011 at 7:18 PM, Bernt Hansen be...@norang.ca wrote:
 Lee Hinman hin...@gmail.com writes:

 Is it possible to run org-sparse-tree on a specific region or subtree of
 an org file?

 I have an Org file with the following structure

 * 2010...
 * 2011
 ** 2011-01 January...
 ** 2011-02 February
 *** 2011-02-01 Tuesday
  Alice
 - Plain list item 1
 - Plain list item 2
  Bob
 - Plain list item a
 - Plain list item b
 *** 2011-02-08 Tuesday
  Alice
 - Plain list item 3
 - Plain list item 4
  Bob
 - Plain list item c
 - Plain list item d


 I'd like to be able to be able to run a command and see all the Alice
 entries for 2011-02 February.  It seems like a sparse tree (with a regex
 for Alice) on the 2011-02 February subtree would give me that.  But I
 *think* org-sparse-tree uses org-occur which always starts at
 point-min, but I could easily be mis-reading the code.

 Does anyone have any ideas?

 Narrow to subtree, then run org-sparse-tree normally, then widen maybe?
 --
 Bernt




[O] [PATCH] Bugfix: org-agenda-open-link

2011-03-13 Thread Bert Burgemeister

* Org-agenda.el (org-agenda-open-link): C-c C-o didn't open links
inserted via the `%%( )' mechanism, affecting usability of
`%%(org-bbdb-anniversaries).

TINYCHANGE
---


The bug was apparently introduced in commit
ba1e90893d128d8004e4cb6763af692c5a6cd677.

-- 
Bert 



 lisp/org-agenda.el |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4b4dd68..123668c 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6742,13 +6742,13 @@ at the text of the entry itself.
  (+ (point-at-bol)
 (or (org-get-at-bol 'prefix-length) 0)
 (cond
- (buffer
-  (with-current-buffer buffer
-   (save-excursion
- (save-restriction
-   (widen)
-   (goto-char marker)
-   (org-offer-links-in-entry arg prefix)
+ ((and buffer
+  (with-current-buffer buffer
+(save-excursion
+  (save-restriction
+(widen)
+(goto-char marker)
+(org-offer-links-in-entry arg prefix))
  ((or (org-in-regexp (concat \\( org-bracket-link-regexp \\)))
  (save-excursion
(beginning-of-line 1)
-- 
1.7.2.3





[O] RE: Alinea filling (hanlding of explicit line-breaks)‏

2011-03-13 Thread Vincent Belaïche
Salut Stéfan,

 Actually, no, because paragraph-separate would cause the whole line
 that ends with \\ to be treated as not being part of a paragraph, and
 paragraph-start wouldn't be appropriate either.  Hence the good
 above :-(
[...]
 I have implemented the thing locally on my machine.  It works well but
 there is still something missing: the line containing the `\\' alinea
 separtor is not filled.
 
As you can see above, I'm not surprised.
Just don't use paragraph-separate.  What I'd do is to use
a fill-forward-paragraph-function which calls forward-paragraph, then
searches for a $ between the start and end point, and if found
adjust the end result accordingly.
 
If/when you come up with this function, please submit for inclusion in
tex-mode.el where it will come in handy as well.
 
 So, after more thinking about it the problem is the following: the
 fill-forward-paragraph has only one parameter which is the paragraph
 number --- with n = 0 = current --- but for finding the paragraph
 boundary we need *two* parameter
 
 = 1st argument: paragraph number
 = 2nd argument: whether we want to point at the beginning the
 paragraph or to the end of the paragraph. 
 
AFAIK the sign of the argument gives you this information.

Oh, I had missed that. The docstring of forward-paragraph is not very
clear about that.

So, I understand you as follows: basically when you are in the middle of
a paragraph, then -1 and +1 both mean current paragraph, with -1 meaning
beginning of paragraph and and +1 meaning end of paragraph.

But it seems that it does not exactly does the job this way: if the
argument sign is 0 and you are in the middle of a paragraph, then,
unless the paragraph is at beginning of buffer you are going to the
character before the 1st one, rather than to the 1st character of
paragraph.

So, it seems that you are indeed going to and end of paragraph with
arg  0, but that with arg  0, the what happens is more fuzzy.

 
 = maybe paragraph-separate could be a list of 3 items (REGEXP BEG END)
where REGEXP is the usual regexp matching the separator, and BEG and
END when non nil are function to go the the beginning of next or to
the end of previous assuming that the match data corresponds to a
match of REGEXP. This way would be really the most flexible.
 
Could be, but once you're in fill-forward-paragraph-function, you can do
it by hand with Elisp code, so it's not that important.  If/when we have
enough fill-forward-paragraph-functions we may revisit this opinion, but
I don't think we have enough experience yet to make a good design.
 

You are right, this can be done by implementing
fill-forward-paragraph-function accordingly. My idea was just to use the
same forward-paragraph engine for paragraph motion and for paragraph
filling, so the fill-forward-paragraph-function would just have been
some wrapper to call forward-paragraph with the correct parameters for
filling. 

Now, I am a bit confused about what should be the correct behaviour of
the fill-forward-paragraph-function: is that the following:

- arg  0: goto beginning of paragraph arg+1, with paragraph 0 = current

- arg  0 : goto beginning of paragraph arg-1, with paragraph 0 =
current

Where:

- beginning = point to 1st character of paragraph,
- end = point to next character to last character of paragraph
  (typically the `\n' at the end of paragraph is part of this
  paragraph).

 
Stefan

  Vincent.



[O] [dev] org-indent-mode patch

2011-03-13 Thread Nicolas
Hello,

I'd like to submit the following org-indent-mode patch for testing.

 git://github.com/ngz/org-mode-lists.git indent-patch-no-timer

It implements two things:

1. It indents correctly text when using visual-line-mode;
2. It removes the idle timer previous implementation was using, which
   means it won't refresh indentation more often than necessary.

Unfortunately, there is a price to pay:

1. Initialization will be much longer for large Org files, but I've
   added a message to the user saying so.
2. It is a bit slower, as the algorithm has more things to check.


Last point is obviously my main concern. Although not noticeable on my
not-so-recent laptop, I don't know how it behaves on old machines.

That's why a testing is necessary to determine (bugs and) if it is
usable. Any help welcome.

Regards,


-- 
Nicolas



[O] org-mac-protocol usage under Snow Leopard ?

2011-03-13 Thread Urs Rau (UK)
Gents,

Sorry to come back on this topic for the third time. But I have kept bashing at 
it and even gone to IRC on freenode to try to get help, but I think I need to 
re-state where I get stuck and then I will likely get hundreds of answers form 
the people that are used to applescript or services usage under Snow Leopard?

I am setting up org-mac-protocol as per instructions from 
https://github.com/claviclaws/org-mac-protocol/blob/master/org-mac-protocol.org

I get stuck trying to use it. Under Usage it says:

Usage

There are four scripts that can be invoked; org-link, org-link-tabs, org-note, 
and org-remember. These scripts can be called by various methods, for example, 
the Script menuhttps://Applications/AppleScript/AppleScript%20Utility.app/ in 
the menu bar, Quicksilverhttp://code.google.com/p/blacktree-alchemy/, 
FastScriptshttp://www.red-sweater.com/fastscripts/ etc.

Well, I don't have a Script menu, or am looking in the wrong place, and I also 
don't have Quicksilver (extinct?) or Fastscripts installed. The one odd bit 
following the instructions was that there was no Scripts dir under my 
~/Library dir, but I thought this might be because this is the first time I am 
trying to setup and use a applescript under my Snow Leopard.

How do I tell the Snow Leopard OS that it needs to trigger the scripts I copied 
into the correct (?) places under:

~/Library/Scripts/org-link.scpt
  org-link-tabs.scpt
  org-remember.scpt
  org-note.scpt
  orgQSLib/escape.rb
   getEmacsClient.scpt
   getItemMetadata.scpt



What are the keypresses or triggers to activate the scripts when I am in Safari 
or another supported App? I feel like I have done all the work and all should 
be setup, but I don't know how to trigger it or switch it on?

Thanks.


--
Urs Rau


[O] Re: [Orgmode] org export not working

2011-03-13 Thread David Maus
Hi John,

At Sun, 27 Feb 2011 22:48:03 -0500,
John Rakestraw wrote:
 --8---cut here---end---8---

 So far as I know, I've changed nothing in my set-up since last week, when
 I successfully exported the exam that I just finished grading. I have,
 however, upgraded org in the meantime.

 I realize that this could well be user error, but I can't find what it is.
 And my students are going to be pretty unhappy if I don't return these
 exams tomorrow. Can someone suggest what I might check?

Too late for your student but does this problem still persists?

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpfsKSbCjDXQ.pgp
Description: PGP signature


Re: [O] Re: can't export custom time stamps

2011-03-13 Thread David Maus
At Fri, 11 Mar 2011 10:10:08 +0100,
Daniel Clemente wrote:


 I tracked down this problem to this commit:


  163cd58ffd6461c98a96b1b63a3cf082b2825a52 is the first bad commit
  commit 163cd58ffd6461c98a96b1b63a3cf082b2825a52
  Author: David Maus dm...@ictsoc.de
  Date:   Fri Jan 14 06:37:52 2011 +0100

  Handle timestamps after handling links

Thanks for tracking this down.  I just pushed two commits that should
fix the problem.

The first reverts

commit ca69b556241ae904c5f291c98a6453f4ce830557
Author: Jason Dunsmore emacs-orgm...@dunsmor.com
Date:   Tue Feb 1 17:46:57 2011 +0100

Fix bug when exporing inactive timestamps.

* org-html.el (org-html-handle-time-stamps): fix bug when
exporing inactive timestamps.

This commit addressed the problem introduced by
163cd58ffd6461c98a96b1b63a3cf082b2825a52 but in a way that is
incompatible with the right fix.

My faulty commit not just changed the order of handling links and
handling timestamps but also prevented the left angle bracket of an
active timestamp from beeing protected from conversion to a HTML
character entity (i.e. lt;).

The (hopefully) final fix moves expanding character entities after
handling links and timestamps.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber dmj...@jabber.org
Email. dm...@ictsoc.de


pgpW8pzTUle4k.pgp
Description: PGP signature


Re: [O] Section between #+latex: declarations not converted during export

2011-03-13 Thread Nick Dokos
Matt Lundin m...@imapmail.org wrote:

 In the following example...
 
 * Testing
 #+latex: \custommacro{%
 [[http:www.google.com][Google]]
 /The quick brown fox./
 #+latex: }
 
 ...the lines between the latex declarations are not exported:
 
 \section{Testing}
 \label{sec-1}
 
 \custommacro{%
 [[http:www.google.com][Google]]
 /The quick brown fox./
 }
 
 I would expect this behavior with #+begin_latex:...#+end_latex, but
 not with #+latex.
 

The opening brace in the `#+ latex:' line confuses something.
My usual workaround is to fake a closing brace in the comment:

--8---cut here---start-8---
* Testing
#+latex: \custommacro{% fake it out }
[[http:www.google.com][Google]]
/The quick brown fox./
#+latex: }
--8---cut here---end---8---


which produces

--8---cut here---start-8---
\section{Testing}
\label{sec-1}

\custommacro{% fake it out }
\href{http:www.google.com}{Google}
\emph{The quick brown fox.}
}
--8---cut here---end---8---

Nick




[O] Re: Question about org-beamer overlays

2011-03-13 Thread Eric S Fraga
Matt Lundin m...@imapmail.org writes:

[...]

 I discovered one org-mode solution here. I can use
 org-beamer-environments-extra to wrap an only macro around an image
 link.

 (add-to-list 'org-beamer-environments-extra 
   '(only o \\only%a{%h%x }))

 A sequence of images in the same column can thus be accomplished with
 the following:

 *** right column  :BMCOL:B_ignoreheading:
 :PROPERTIES:
 :BEAMER_col: 0.6
 :BEAMER_env: ignoreheading
 :END:
  [[file:image1.png]]   :B_only:
  :PROPERTIES:
  :BEAMER_envargs: 1
  :BEAMER_env: only
  :END:
  [[file:image2.jpg]]:B_only:
  :PROPERTIES:
  :BEAMER_envargs: 2
  :BEAMER_env: only
  :END:
  [[file:image3.png]]  :B_only:
  :PROPERTIES:
  :BEAMER_envargs: 3
  :BEAMER_env: only
  :END: 

 Thanks again!
 Matt

This is really nice.  I hadn't thought of extending the beamer
environments list; obvious in hindsight!

Thanks,
eric

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



Re: [O] dates before 1970

2011-03-13 Thread Eric S Fraga
Carsten Dominik carsten.domi...@gmail.com writes:

[...]

 I am attaching a patch which tries to implement some kind of a
 solution for this problem.  The patch introduces a new variable
 which will allow you to use dates outside the safe range 1970-2037

Thanks Carsten.

[...]

 The patch also introduces a warning with a beep when Org has forced the year,
 which, I think, was really the main concern in this thread.

Yes, at least for me this is key.  I can use diary sexps, as you say,
for those dates that lie outside the range supported by emacs directly
but I need to know when something strange happens!

Thanks again,
eric

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



[O] Re: Alinea filling (hanlding of explicit line-breaks)‏

2011-03-13 Thread Stefan Monnier
 But it seems that it does not exactly does the job this way: if the
 argument sign is 0 and you are in the middle of a paragraph, then,
 unless the paragraph is at beginning of buffer you are going to the
 character before the 1st one, rather than to the 1st character of
 paragraph.

Actually, IIRC, it only goes to the previous line if that line is empty.

 So, it seems that you are indeed going to and end of paragraph with
 arg  0, but that with arg  0, the what happens is more fuzzy.

Yes, indeed.  But I don't think fill.el depends on this detail of
forward-paragraph's behavior.

 Now, I am a bit confused about what should be the correct behaviour of
 the fill-forward-paragraph-function: is that the following:

 - arg  0: goto beginning of paragraph arg+1, with paragraph 0 = current

 - arg  0 : goto beginning of paragraph arg-1, with paragraph 0 =
 current

I can't remember what forward-paragraph does for a 0 argument, but for
positive arguments it goes to the next Nth paragraph end and for
negative argument it goes to the next Nth paragraph start.
And fill.el only calls that function with values +1 and -1.

More specifically, fill.el mostly does something like:

  (fill-region-as-paragraph (progn (forward-paragraph -1) (point))
(progn (forward-paragraph 1) (point)))


-- Stefan



[O] [BUG] Did COMMENT break?

2011-03-13 Thread Rasmus
Hi,
It seems that 

,
| #+BEGIN_COMMENT 
|  ...
| #+END_COMMENT
`

Might be broken in Org-mode 7.5. According to the manual, 

,
| Finally, regions surrounded by
| ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.
`

Consider the following example generated with Org-mode 7.5 in Emacs 24.0.50
(started without config files).

,
| #+TITLE: this is a test
| 
| #+BEGIN_COMMENT
| Don't export me
| #+END_COMMENT
| 
| I'd like to be exposed
`

The HTML export is:

,
| snip
| h1 class=titlethis is a test/h1
| 
| div class=org-comment
| /br
| p
| p
| Don't export me
| /p
| /div
| 
| I'd like to be exposed
| snip
`

The LaTeX export is:

,
| \begin{verbatim}
| Don't export me
| \end{verbatim}
| I'd like to be exposed
`

On another note, on the official Org-site, the link to the pdf-manual is
wrong. It links to 

http://orgmode.org/manual/release_7.5/ 

which doesn't exists. I guess it should be linking to 

http://orgmode.org/org.pdf

-- 
Thanks,
Rasmus




[O] Re: [Orgmode] org export not working

2011-03-13 Thread John Rakestraw
Hi, David --

On Sun, 13 Mar 2011, David Maus wrote:
 Too late for your student but does this problem still persists?

It was user error. I found an old copy of org-export.el lurking in my load
path.

-- 
John Rakestraw



Re: [O] [BUG] Did COMMENT break?

2011-03-13 Thread Nick Dokos
Rasmus rasmus.p...@gmail.com wrote:

 Hi,
 It seems that 
 
 ,
 | #+BEGIN_COMMENT 
 |  ...
 | #+END_COMMENT
 `
 
 Might be broken in Org-mode 7.5. According to the manual, 
 
 ,
 | Finally, regions surrounded by
 | ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.
 `
 
 Consider the following example generated with Org-mode 7.5 in Emacs 24.0.50
 (started without config files).
 
 ,
 | #+TITLE: this is a test
 | 
 | #+BEGIN_COMMENT
 | Don't export me
 | #+END_COMMENT
 | 
 | I'd like to be exposed
 `
 
 The HTML export is:
 
 ,
 | snip
 | h1 class=titlethis is a test/h1
 | 
 | div class=org-comment
 | /br
 | p
 | p
 | Don't export me
 | /p
 | /div
 | 
 | I'd like to be exposed
 | snip
 `
 
 The LaTeX export is:
 
 ,
 | \begin{verbatim}
 | Don't export me
 | \end{verbatim}
 | I'd like to be exposed
 `
 

Indeed.

It seems that one of the hair-raising regexps that Carsten manages
to come up with is not quite right. Try this patch for now:

--8---cut here---start-8---
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 34f101d..e1dcea0 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1834,7 +1834,7 @@ table line.  If it is a link, add it to the line 
containing the link.
 (goto-char (point-min))
 (setq case-fold-search t)
 (while (re-search-forward
-   ^#\\+begin_comment[ \t]*\n[^\000]*?^#\\+end_comment\\.* nil t)
+   ^#\\+begin_comment[ \t]*\n[^\000]*?\n#\\+end_comment\\.* nil t)
   (replace-match  t t))
 ;; Remove subtrees that are commented
 (goto-char (point-min))
--8---cut here---end---8---

Nick




Re: [O] Something like 'org-clock-in-at-time'?

2011-03-13 Thread Richard Lawrence

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

 Could someone fill me in on your process for clocking in things after
 the fact? I've been trying to get into to clocking, but, especially at
 home, I don't return to my computer in between every different thing.
 Instead, I stop at it when I get a pause and try to fill in what I've
 been doing. So far, this has been something akin to:

 - create a new sub-headline and call it what I was doing
 - C-c C-c to tag it
 - C-c C-x C-i followed by C-c C-x C-o to create a clocked time stamps
 - Manually edit the times
 - C-c C-c to update the count

Not sure if this is entirely relevant here, but I have a similar
problem.  I often find I need to mark recurring tasks as done that I
completed on the previous day or even earlier.  For most tasks, it
doesn't matter when I mark them as done; but if the task uses org-habits, it
means I have to manually edit the timestamp so that it doesn't mess up
the habit log going forward.

If there's a better way to deal with situations like this, I'd love to
hear about it.  If not, I just wanted to point out another use case for
anyone thinking about implementing retroactive timestamp editing
functions.

Thanks!

Richard




[O] Set the beginning section number

2011-03-13 Thread lbmlist


Greetings,

I may have not read sufficiently, but I have not yet found how to set the 
beginning number when exporting to HTML and I'm desiring to start with a 
number other than 1.


* This
** is the example
*** that I play
*** with

Exports to:

1 This
1.1 is the example
1.1.1 that I play
1.1.2 with

What I would like to do is set the initial number so that the exported
reads as:

33 This
33.1 is the example
33.1.1 that I play
33.1.2 with


Can someone point me in the right direction?


Thanks in advance,

Louis



[O] Re: FR: broken links and footnote references

2011-03-13 Thread Samuel Wales
Example of what I think would work:

  * top
* first document -- this is exported and we get the URL when we post
  * anchor in first document
go to [[anchor in second document]]
* second document -- this is exported and we get the URL when we post
#+URL-FOR-EXTERNAL-ANCHORS http://example.org/first-document.html
  * anchor in second document
go to [[anchor%20in%20first%20document][anchor in first document]]

Comments are very welcome.  Is the problem clearly explained here?



Re: [O] Re: [Orgmode] bug: invalid export key in export visible region

2011-03-13 Thread Samuel Wales
On 2011-03-06, Bastien b...@altern.org wrote:
 David Maus dm...@ictsoc.de writes:
 Samuel Wales wrote:
   c-c c-e v H
   c-c c-e v R

 Emacs 22, latest org git master.

 Thanks for the report, should be fixed by now.

Thanks, David.  Doesn't work for me.

Also, the region gets set to only one visible line for some reason.

Error is long:

funcall: Wrong number of arguments: (lambda (beg end
optional body-only buffer) Convert region from BEG to END
in org-mode buffer to HTML.  If prefix arg BODY-ONLY is set,
omit file header, footer, and table of contents, and only
produce the region of converted text, useful for
cut-and-paste operations.  If BUFFER is a buffer or a
string, use/create that buffer as a target of the converted
HTML.  If BUFFER is the symbol `string', return the produced
HTML as a string and leave not buffer behind.  For example,
a Lisp program could call this function in the following
way:

  (setq html (org-export-region-as-html beg end t 'string))

When called interactively, the output buffer is selected,
and shown in a window.  A non-interactive call will only
return the buffer. (interactive r P) (when
(interactive-p) (setq buffer *Org HTML Export*)) (let
((transient-mark-mode t) (zmacs-regions t) ext-plist rtn)
(setq ext-plist (plist-put ext-plist :ignore-subtree-p t))
(goto-char end) (set-mark (point)) (goto-char beg) (setq rtn
(org-export-as-html nil nil ext-plist buffer body-only)) (if
(fboundp (quote deactivate-mark)) (deactivate-mark)) (if
(and (interactive-p) (bufferp rtn))
(switch-to-buffer-other-window rtn) rtn))), 1

Backtrace (how come Emacs doesn't include the error in the backtrace?):

  org-export-region-as-html(nil)
  funcall(org-export-region-as-html nil)
  (if keepp nil (funcall binding arg))
  (unless keepp (funcall binding arg))
  (let ((buffer-file-name file) (org-inhibit-startup t)) (org-mode)
(show-all) (unless keepp (funcall binding arg)))
  (save-excursion (setq s (goto-char ...)) (while (not ...) (goto-char
...) (append-to-buffer buffer s ...) (setq s ...))
(org-cycle-hide-drawers (quote all)) (goto-char (point-min)) (unless
keepp (if ... ...) (when ... ...)) (set-buffer buffer) (let (... ...)
(org-mode) (show-all) (unless keepp ...)))
  (let* ((binding ...) (keepp ...) (file buffer-file-name) (buffer
...) s e) (save-excursion (goto-char ...) (while ... ... ...))
(with-current-buffer buffer (erase-buffer)) (save-excursion (setq s
...) (while ... ... ... ...) (org-cycle-hide-drawers ...) (goto-char
...) (unless keepp ... ...) (set-buffer buffer) (let ... ... ... ...))
(if (not keepp) (kill-buffer buffer) (switch-to-buffer-other-window
buffer) (goto-char ...)))
  org-export-visible(82 nil)
  call-interactively(org-export-visible)
  (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...)
(set-process-sentinel p ...) (message Background process \%s\:
started p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1
ass)) (when (and bpos ...) (let ... ... ... ... ...)))
  (let* ((bg ...) (subtree-p ...) (help [t]   insert the export option template
[v]   limit export to visible part of outline tree
[1]   switch buffer/subtree export
[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)

[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer

[h] export as HTML  [H] to temporary buffer   [R] export region
[b] export as HTML and open in browser

[l] export as LaTeX [L] to temporary buffer
[p] export as LaTeX and process to PDF[d] ... and open PDF file

[D] export as DocBook   [V] export as DocBook, process to PDF, and open

[j] export as TaskJuggler [J] ... and open

[m] export as Freemind mind map
[x] export as XOXO
[g] export using Wes Hardaker's generic exporter

[i] export current file as iCalendar file
[I] export all agenda files as iCalendar files   [c] ...as one combined file

[F] publish current file  [P] publish current project
[X] publish a project...  [E] publish every projects) (cmds
...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion
(save-window-excursion ... ... ... ... ... ...)) (redisplay) (and bpos
(goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...)
(error No command associated with key %c r1)) (if (and bg ... ...
...) (let ... ... ...) (if subtree-p ...) (call-interactively ...)
(when ... ...)))
  ad-Orig-org-export(nil)
  org-export(nil)
  call-interactively(org-export)