[O] Re: unnumbered subsections in latex export

2011-04-01 Thread Nick Dokos
Jambunathan K kjambunat...@gmail.com wrote:

 Do look at my new html exporter. I have been very conservative in making
 the changes.
 
Well, Nicolas's proposal is more radical, but there is no inherent
backward compatibility disadvantage to it that I can see.

 Some observations from my side ...
 
   It isn't documented enough because some of those properties are not
  exactly defined, and their meaning, or their differences, aren't
  always explicit (org-protected, org-example, org-verbatim-emph are
  coming to my mind).
 
 I agree that text properties are problematic. I see that they are also
 used inconsistently.
 
 When I see backend specific code in org-exp.el something in my gut says
 that it is not OK.
 

Absolutely. It is the price that one has to pay when trying to add new
features to a system that has become successful and you don't dare break
backward compatibility: sometimes you have to resort to ugly hacks.
Think Windows e.g. which by now is riddled with ugly hacks, partly
because they don't want to give up backward compatibility.

Lest I give the wrong impression, let me say that even though org has
dark and ugly corners here and there, overall it is a thing of
beauty. Windows, not so much :-)

 For example, source blocks are transformed in org-exp.el to
 html-specific markup and get inserted between #+begin_html and
 #+end_html with org-indentation, org-protected properties. org-html.el
 just inserts it.
 
 I believe, it would be all the more better if the above transform 
 propertize in org-exp.el and just insert in org-html.el is done as
 propertize in org-exp.el and transform  insert in org-html.el.
 

IIUC, Nicolas proposes to make the exporters behave more like a modern
compiler: there is an intermediate representation (an attributed tree)
that the org document is transformed to. Then there is a standard tree
walker that walks the tree and does callbacks to backend-specific
functions. Each backend is responsible for providing this well-defined
set of functions. If a new syntactic or semantic element is introduced
that necessitates a new type of node in the tree, then the
walker would call a new function to handle the new node type: each
backend would have to implement this new function. As compiler writers
have found out, this makes it much easier to support a new backend.

 [Context Switch]
 Html exporter is not only line-oriented it is also a transformation
 pipeline. The latter part means that if lines are slightly arranged
 (that is the order of the transformation is changed) then things will
 break in unexpected ways.
 
 This is the root cause of all the recent regressions concerning images
 and timestamps in the HTML exporter.
 
 [Context Switch] 
 org-html.el opens paragraph in anticipation rather than when it is
 actually needed. As a result previous context just diffuses in to a
 latter context. If this were not so deleting of empty paragraphs
 wouldn't be necessary. 
 
 [Context Switch]
 HTML exporter occasionally emit things temporarily and goes back and
 fixes it. Table's colalign and colgroup markers come to mind here. In
 some sense convenience features like right align if a column is
 predominantly numeric also complicated things.
 
 I think one of the reasons Org is so popular it is that it is a
 common-man's swiss army knife and not a elitist samurai sword.
 

To continue your analogy: sometimes the cut is a bit rough. It might
be a good idea to use some of that elitist samurai sword metallurgy
know-how in order to provide better blades for the swiss army knife.

 Jambunathan K.
 

Nick



[O] Re: Timer mode doesn't hyphenate correctly

2011-04-01 Thread Nicolas
Hello,

Mark S throa...@yahoo.com writes:

I cannot reproduce what you are describing. I may be
 misunderstanding you. Could you please post an ECM
 for that?


 What's an ECM?

A minimal Org buffer with a recipe to reproduce the bug.

 Another thing I've noticed is that sometimes the list items are
 created in chronological order, and other times in
 reverse-chronological order. In fact, most of the time it wants to go
 in reverse-chronological order. Since there's no example in the
 manual, I'm not sure which one is normal. I would prefer
 chronological order, but I can see why some might prefer
 reverse-chronological.

It doesn't want anything. If you hit M-RET between left margin and
beginning of item's body, the new item will be inserted before the
current one. Otherwise, it will be inserted after it, as in any other
type of list.

Anyway, you can always sort your timer list with C-c ^.

Regards,

-- 
Nicolas



[O] Re: unnumbered subsections in latex export

2011-04-01 Thread Jambunathan K

 I'll show two examples to illustrate my point: lists and tables. Taken
 from a docstring, 

 1. first item
+ sub-item one
+ [X] sub-item two
more text in first item
 2. [@3] last item

 will be parsed as:

 (ordered (nil \first item\
   (unordered (nil sub-item one)
  (nil [CBON] sub-item two))
   more text in first item)
  (3 last item))

 This allows to easily (see org-list-to-latex, org-list-to-html,
 org-list-to-texinfo, and so on) transform an Org list in many different
 formats. Alas, it cannot be used in org-html.el and org-docbook.el, as
 those, again, parse buffer line-wise.

 The same could be said about tables:

 | Row 1 | 1 | 2 |
 |---+---+---|
 | Row 2 | 3 | 4 |

 can be parsed as:

 ((Row 1 1 2)
  'hline
  (Row 2 3 4))

 and from that, such functions as orgtbl-to-html, or orgtbl-to-latex were
 easy to create.

 So, basically, what I suggest here is:

 1. list all possible environments and objects offered by the Org format
(table, lists, inlinetasks, center, verbatim, paragraph, headlines,
time-stamps, LaTeX snippets, footnotes, links, source);
 2. define an explicit export format for each of them;
 3. determine options that should be know by org-exp, by the backend;
 4. create a parser, in org-exp, that will output Org buffer in the
chosen format;
 5. create (many are readily available) functions for each backend to
interpret them.


 Now about that explicit format. Taking this buffer,

 #+title: Example buffer

 Some text before first headline.

 * First section

   First paragraph $\alpha = 1$.

   Second paragraph.

   - item 1
   - item 2
 #+begin_center
 Text
 #+end_center

   | Row 1 | 1 | 2 |
   | Row 2 | 3 | 4 |

 * Second section

   Text with footnote[fn:1].
 *** Inline task
 Some text and
 a [[http://www.gnu.org/software/emacs/][link]]
 :DRAWER:
 - I like
 - lists.
 :END:
 *** END

 * Footnotes
 [fn:1] Footnote definition.

 It could be parsed as the following:

 '((:title Example buffer)
   (paragraph Some text before first headline.)
   (headline First section 
 (paragraph First paragraph  
(latex $\alpha = 1) 
.)
 (paragraph Second paragraph)
 (list unordered (nil item 1) 
 (nil item 2)
 (center (paragraph Text)))
 (table (Row 1 1 2)
hline
(Row 2 3 4)))
   (headline Second section
 (paragraph Text with footnote
(footnote Footnote definition)
.)
 (inlinetask Inline task
 (paragraph Some text and\na 
(link link http://www.gnu.org/;))
 (drawer (list unordered (nil I like)
 (nil lists.))

 Note that such a parsing will need a decent forward-paragraph function.
 It's also a very simplified example: headlines would need more than the
 title string (todo keyword, priority, tags) before starting the body.

 I have no code to offer at the moment, and, as we all know, Devil is in
 the details. But if the output from org-exp.el is clear, exporters will
 be more coherent. It is even provide tools to help exporters doing their
 task (a function to extract footnotes from the output, for example).

 Again, it may be a big task to undertake, but I think it will be
 necessary at some point.

Such an exporter (or similar in spirit to what you say) exists already.

For the sake of record, I am copying Bastien's notes on his
./EXPERIMENTAL/org-export.el (with some non-relevant content stripped)

Jambunathan K.


Attachment:

From: Bastien bastien.gue...@wikimedia.fr
Subject: Re: OpenDocumentText/OpenOffice exporter
To: Lennart Borgman lennart.borg...@gmail.com
Cc: Jambunathan K kjambunat...@gmail.com,  Carsten Dominik 
carsten.domi...@gmail.com
Date: Sun, 13 Feb 2011 11:00:34 +0100 (6 weeks, 4 days, 21 hours ago)
Message-ID: 87tyg8ntj1@gnu.org

Hi Lennart,

Lennart Borgman lennart.borg...@gmail.com writes:

 Perhaps we have done something very similar then, I do not know.

My bad.  I should have advertize EXPERIMENTAL/org-export.el sooner.

 So maybe your approach of parsing the org buffer to a list makes
 things more easy to handle. On what level is the list? (From your
 description I guess it is a parse tree or whatever it is called. Not
 a list of tokens.)

It's a parse tree.  

See attached example of a test.org file and the result of the function
(org-export-parse) : this list will go through the exporter, which takes
care of every subtree recursively.

Of course, having such a parse tree does not solve everything, and the
content of :content remains to be handled...  but at 

[O] document structure question

2011-04-01 Thread Colin Fraizer
If I have an org document like the one below, is there a way to tell org
that a subtree has ended such that the text that starts Finally is part of
the logical unit that starts with Headline 1, but *not* part of the subunit
Subheadline 1.2?

With lists I can use two blank lines to end the list item. Is there a
similar mechanism for subtrees?

--BEGIN--
* Headline 1
I have some text.

And more text.

** Subheadline 1.1
Some subtext.

** Subheadline 1.2
Additional subtext.

Finally, I'd like more text that is considered part of the logical Headline
1, but not part of Subheadline 1.2.

* Headline 2
Additional text.
--END--

Thanks,
--Colin Fraizer




Re: [O] document structure question

2011-04-01 Thread Marcel van der Boom

On vr 01-apr-2011 05:10
Colin Fraizer orgm...@cfraizer.com wrote:

 With lists I can use two blank lines to end the list item. Is there a
 similar mechanism for subtrees?

This is the exact same question as in a recent thread: Continuation of
main section text after subsections - [1] Perhaps read that thread
first?

marcel

[1] http://thread.gmane.org/gmane.emacs.orgmode/40182

-- 
Marcel van der Boom  -- http://hsdev.com/mvdb.vcf
HS-Development BV-- http://www.hsdev.com
So! web applications -- http://make-it-so.info
Cobra build  -- http://cobra.mrblog.nl



[O] org-attach link proposal

2011-04-01 Thread Juraj Kubelka
Hi,

I played a bit with org-attach. It is great package! Thanks for it! :)

I have one proposal. So at first why:

I would like to do something like this:

* Project documents
  :PROPERTIES:
  :Attachments: first.doc second.doc third.doc
  :ID:   37773ace-b471-4003-a8d1-448e7c48f77b
  :END:

  + the first document about something1 [[att:first.doc]]
  + the second document  [[att:second.doc]]
  + the third document [[att:third.doc]]

in order to easily access it just by click on related link.

So I defined method:

(defun org-attach-open-link (file optional in-emacs)
  (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))

and link:

#+LINK: att elisp:(org-attach-open-link %s)

and it works. but always asks if I want to execute elisp code.

Would it be possible to integrate it directly to org-mode like http: and
others? I am not sure how to do it.

Thank you!
Juraj


Re: [O] Re: Timer mode doesn't hyphenate correctly

2011-04-01 Thread Mark S

Hello Nicolas,

--- On Thu, 3/31/11, Nicolas n.goaz...@gmail.com wrote:


It doesn't want anything. If you hit M-RET between left
margin and
beginning of item's body, the new item will be inserted
before the
current one. Otherwise, it will be inserted after it, as in
any other
type of list.
Anyway, you can always sort your timer list with C-c ^.



Actually, its a little different. If you hit alt-enter at the end of a  
line, without typing other text first, like


   - 0:00:02 :: altenter

It thinks that you're at the beginning of a line and places the date-stamp  
*above* :


   - 0:03:43 ::
   - 0:00:02 ::

Mark





Re: [O] org-attach link proposal

2011-04-01 Thread Aankhen
Hi Juraj,

On Fri, Apr 1, 2011 at 16:32, Juraj Kubelka juraj.kube...@gmail.com wrote:
 I played a bit with org-attach. It is great package! Thanks for it! :)
 I have one proposal. So at first why:
 I would like to do something like this:
 * Project documents
   :PROPERTIES:
   :Attachments: first.doc second.doc third.doc
   :ID:       37773ace-b471-4003-a8d1-448e7c48f77b
   :END:
   + the first document about something1 [[att:first.doc]]
   + the second document  [[att:second.doc]]
   + the third document [[att:third.doc]]
 in order to easily access it just by click on related link.
 So I defined method:
 (defun org-attach-open-link (file optional in-emacs)
   (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))
 and link:
 #+LINK: att elisp:(org-attach-open-link %s)
 and it works. but always asks if I want to execute elisp code.
 Would it be possible to integrate it directly to org-mode like http: and
 others? I am not sure how to do it.

I believe this should be possible using a bit of Elisp:

,
| (org-add-link-type att 'org-attach-open-link)
|
| (defun org-attach-open-link (file optional in-emacs)
|   (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))
`

Put that in your init file, or wherever you place your customizations.
 You can read more about adding new hyperlink types in the manual.[1]
By the way, the function is only passed a single argument (the text of
the link); ‘in-emacs’ will always be ‘nil’, unless you’re also calling
it programmatically elsewhere.

Aankhen

[1]: http://orgmode.org/org.html#Adding-hyperlink-types



[O] Enforcing drawer setup

2011-04-01 Thread Aankhen
Hi,

Is there any command I can run to put into effect my
‘org-log-into-drawer’ setting?  I recently changed it to ‘t’, but I
have a fair number of existing entries where it was ‘nil’, meaning
that the files as a whole look rather haphazardly organized.

Thanks,
Aankhen



Re: [O] HTML export Bold and italic links

2011-04-01 Thread Michael Brand
Hi Francesco, hi all

Almost a year ago I started a discussion about export of emphasized
link and tried out a solution for HTML and DocBook. My question about
if and why in my opinion my solution collides with a code comment is
still open, just like the corresponding item `INCONSISTENCY export of
emphasized link' on the issue tracker
http://orgmode.org/worg/org-issues.html

The discussion started here
http://thread.gmane.org/gmane.emacs.orgmode/25811

Michael


On Mon, Mar 21, 2011 at 08:31, Francesco Pizzolante
f...@missioncriticalit.com wrote:
 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: Timer mode doesn't hyphenate correctly

2011-04-01 Thread Nicolas
Mark S throa...@yahoo.com writes:

 --- On Thu, 3/31/11, Nicolas n.goaz...@gmail.com wrote:

 It doesn't want anything. If you hit M-RET between left
 margin and
 beginning of item's body, the new item will be inserted
 before the
 current one. Otherwise, it will be inserted after it, as in
 any other
 type of list.
Anyway, you can always sort your timer list with C-c ^.


 Actually, its a little different. If you hit alt-enter at the end of
 a line, without typing other text first, like

- 0:00:02 :: altenter

 It thinks that you're at the beginning of a line and places the
 date-stamp *above* :

- 0:03:43 ::
- 0:00:02 ::

I didn't say at the beginning of line but before _item's body_. The tag
in a description list (or a timer list) isn't considered as the body of
the item, so my point is still valid. It would be the same with
a checkbox.

The advantage of this behavior is that M-RET will (or should) never
break list structure. Imagine M-RET in the middle of a checkbox or an
item tag.

Regards,

-- 
Nicolas



[O] Update org-mode

2011-04-01 Thread Dror Atariah
I tried to follow the update process described here:
http://orgmode.org/worg/org-faq.html under:
How do I keep current with bleeding edge development?

The only change I made was the place where I checked out the new version. 
Instead of ~/elisp I have ~/Library/elisp.

Everything went smooth, except that I had to add sudo before the make 
install. Without the sudo, I got an access denied error. Anyway, at the end, 
I got no warnings and it seems like the process was smooth. But when I checked 
the version of org-mode in aquamacs it was still 6.33x

I am using Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2011-03-19 on braeburn.aquamacs.org - Aquamacs Distribution 2.2 on a mac OS 
10.6.7.

What should I do in order to fix it?

Thanks in advance,
Dror






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

2011-04-01 Thread Nicolas
Hello,

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

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

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

 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...

 I'm not sure to fully understand what you want, but couldn't you
 delete-matching-lines toggled check-boxes in a copy of the original
 buffer, and export that?

 Regards,

 Thanks for the suggestion.  I think you did understand me and, yes, that
 would work, but only *if* each list entry were a single line.
 Unfortunately, I tend to fill my list paragraphs so that each item in
 the list is often several lines and, in fact, often several paragraphs
 (especially when it concerns minutes of a meeting and resulting
 actions).  delete-matching-lines would delete the first line of a list
 entry only.

 I need to be able to delete whole list entries automatically based on
 their status, whether in a copy or during export.

Maybe the following functions might help you. Their docstring is explicit.

#+begin_src emacs-lisp
(defun esf-list-remove-if (predicate struct)
  Remove all items satisfying PREDICATE in STRUCT and in buffer.
PREDICATE is a function called with item position as argument.
The modified STRUCT is returned.
  (let ((rev-struct (reverse struct))
res e)
(while rev-struct
  (setq e (pop rev-struct))
  (let ((item (car e)))
(if (funcall predicate item)
(delete-region item (nth 6 e))
  (push e res
res))

(defun esf-clear-toggled-checkboxes ()
  Remove toggled check-boxes from list at point.
Move point at the end of the list.
  (interactive)
  (if (not (org-at-item-p))
  (error Not at a list item)
(let* ((struct (org-list-struct))
   (end (copy-marker (org-list-get-bottom-point struct
  (esf-list-remove-if (lambda (e)
(equal [X] (org-list-get-checkbox e struct)))
  struct)
  (goto-char end
#+end_src

Then, remove toggled checkboxes in an hook called just before list processing:

#+begin_src emacs-lisp
(add-hook 'org-export-preprocess-after-tree-selection-hook
  (lambda ()
(goto-char (point-min))
(while (org-list-search-forward (org-item-beginning-re) nil t)
  (esf-clear-toggled-checkboxes
#+end_src

Note that this solution doesn't handle nested lists (i.e. checkboxes in
lists inside a drawer itself in a list).

HTH,

Regards,

-- 
Nicolas



Re: [O] org-attach link proposal

2011-04-01 Thread Darlan Cavalcante Moreira

I have the same use-case scenario as you and I asked the same question a
while ago [1]. As you, I define a link type for attached files with

#+LINK: attach elisp:(org-open-file (org-attach-expand %s))


To avoid the confirmation to execute elisp code you can use the
org-confirm-elisp-link-not-regexp variable that Bastien introduced after
[1]. In my case it is

(setq org-confirm-elisp-link-not-regexp org-open-file)

Off-course you can also disable confirmation to execute any elisp code, but
I think it is more reasonable to disable only the one you need.


Bastien also introduced the org-attach-store-link-p variable. Set it to
'attached and org will store a link to the attached file that you can
easily insert with C-c C-l.

--
Darlan

[1]: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37613.html

At Fri, 1 Apr 2011 13:02:50 +0200,
Juraj Kubelka juraj.kube...@gmail.com wrote:
 
 [1  text/plain; UTF-8 (7bit)]
 Hi,
 
 I played a bit with org-attach. It is great package! Thanks for it! :)
 
 I have one proposal. So at first why:
 
 I would like to do something like this:
 
 * Project documents
   :PROPERTIES:
   :Attachments: first.doc second.doc third.doc
   :ID:   37773ace-b471-4003-a8d1-448e7c48f77b
   :END:
 
   + the first document about something1 [[att:first.doc]]
   + the second document  [[att:second.doc]]
   + the third document [[att:third.doc]]
 
 in order to easily access it just by click on related link.
 
 So I defined method:
 
 (defun org-attach-open-link (file optional in-emacs)
   (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))
 
 and link:
 
 #+LINK: att elisp:(org-attach-open-link %s)
 
 and it works. but always asks if I want to execute elisp code.
 
 Would it be possible to integrate it directly to org-mode like http: and
 others? I am not sure how to do it.
 
 Thank you!
 Juraj
 [2  text/html; UTF-8 (quoted-printable)]
 



Re: [O] Illiterate programming question

2011-04-01 Thread Eric Schulte
Nick Dokos nicholas.do...@hp.com writes:

 Sean O'Halpin sean.ohal...@gmail.com wrote:

 On Thu, Mar 31, 2011 at 9:13 PM, Nick Dokos nicholas.do...@hp.com wrote:
  Sean O'Halpin sean.ohal...@gmail.com wrote:
 
  On Wed, Mar 30, 2011 at 11:52 PM, Eric Schulte schulte.e...@gmail.com 
  wrote:
   Babel does have a way to bring changes back from pure source code into
   code blocks in an Org-mode document.  While it isn't perfect (especially
   if you make extensive use of noweb references or variables) there are
   mechanisms to maintain such a /sync/.  To try this out, tangle out code
   with the :comments yes header argument, then change an element of the
   tangled source code, and use the `org-babel-detangle' function to bring
   the changes back into the Org-mode document.
  
   Improving the detangling (or illiterate) features is an area ripe for
   future Babel development.
  

 ...example elided...

  
  which doesn't look right to me.
 
 
  What should it look like?
 
  Nick
 
 To be honest, I don't know what it /should/ look like but I have
 ':comments yes' on three sections and get only one link on output, so
 I can't see how this would detangle properly.
 
 Also,
 
 # [[][main]]
 
 is missing the file reference (in the first set of brackets), so it
 won't work as a link.
 

 Yes, it does look unlikely. I don't know about the other comments (line
 numbers, etc.) but at least the link calculation in
 org-babel-tangle-collect-blocks is wrong I believe: it uses
 org-store-link to supposedly store a link to the current location on the
 global org-stored-links stack and then pops it, takes the car of it and
 sanitizes text properties of the result: that then becomes the link that
 should be stored in the tangled file.

 But it seems that org-store-link does not behave this way when called
 non-interactively: I get nothing on the global stack. Instead it seems
 to *return* the link as a string, which is then just thrown away.


This all looks to be correct, thanks for debugging this one.  I've just
pushed up a fix which brings the tangling link-extraction code up to
date with the current version of org-store-link.

The tangled comments should now appear as fully formed links.

However, in testing this I noticed that the code for following these
links form a source code file back into the original org-mode file
(namely `org-babel-tangle-jump-to-org') is not currently working for
some link types (e.g. id: links).

The problem here is that there is no org function for parsing/following
a link which can be called non-interactively.  I'd like to either

1. change org-open-at-point (the function which currently holds all of
   the org-link following logic) so that it returns an object (probably
   the buffer, maybe the buffer and point) holding the information on
   the link target, so that other elisp code can follow org-mode links
   with something like.

   #+begin_src emacs-lisp
 (pop-to-buffer (org-open-link-at-point))
   #+end_src
   
2. or, another option would be to pull the link-parsing logic out of
   org-open-link-at-point into a separate function which could then be
   called by org-open-link-at-point, and by other elisp functions
   wishing to use org-mode links.

I'm not comfortable making either of these changes myself without
Carsten or Bastien giving their OK.

Best -- Eric



[O] Re: Update org-mode

2011-04-01 Thread Jambunathan K
Dror Atariah dror...@gmail.com writes:

 I tried to follow the update process described here:
 http://orgmode.org/worg/org-faq.html under:
 How do I keep current with bleeding edge development?

Search for ELPA in FAQ. Maybe that will work well for you ...

Jambunathan K.



[O] Re: Enforcing drawer setup

2011-04-01 Thread Bernt Hansen
Aankhen aank...@gmail.com writes:

 Hi,

 Is there any command I can run to put into effect my
 ‘org-log-into-drawer’ setting?  I recently changed it to ‘t’, but I
 have a fair number of existing entries where it was ‘nil’, meaning
 that the files as a whole look rather haphazardly organized.

 Thanks,
 Aankhen

Hi Aankhen,

There's not built-in function to accomplish this that I am aware of.

This is a bit of a hack but it will probably get you the result you
want.  If you set org-clock-into-drawer to the drawer than you want and
set org-clock-out-remove-zero-time-clocks then you can visit each
heading using some elisp code, clock in and immediately clock out the
headline and it should create a drawer and wrap your existing data.

I haven't actually done this... so YMMV.

HTH,
Bernt



[O] Re: Update org-mode

2011-04-01 Thread Bernt Hansen
Dror Atariah dror...@gmail.com writes:

 I tried to follow the update process described here:
 http://orgmode.org/worg/org-faq.html under:
 How do I keep current with bleeding edge development?

 The only change I made was the place where I checked out the new version. 
 Instead of ~/elisp I have ~/Library/elisp.

 Everything went smooth, except that I had to add sudo before the
 make install. Without the sudo, I got an access denied
 error. Anyway, at the end, I got no warnings and it seems like the
 process was smooth. But when I checked the version of org-mode in
 aquamacs it was still 6.33x

 I am using Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
  of 2011-03-19 on braeburn.aquamacs.org - Aquamacs Distribution 2.2 on a mac 
 OS 10.6.7.

 What should I do in order to fix it?

Hi Dror,

I track the latest git code at least weekly.  I skip the compile and
make install steps completely and run the code uncompiled from the git
repository directly.

I just update the code and M-x org-reload (or restart Emacs) and I'm
done.

I put the directory that org-mode is loaded from early in my load path
so that the git version is loaded instead of whatever out-of-date
version the system has.

Unless you need to provide the updated org-mode to other users there's
no need to install it system wide - it's just another step that can trip
you up.

Regards,
Bernt



Re: [O] Re: unnumbered subsections in latex export

2011-04-01 Thread Eric S Fraga
Jambunathan K kjambunat...@gmail.com writes:

[...]

 I think one of the reasons Org is so popular it is that it is a
 common-man's swiss army knife and not a elitist samurai sword.

And I think this is a very important analogy.  Org does a good job for
many (very different) tasks.  The price is that it does not necessarily
do some of those tasks as well as could be.

I am happy to put with the rough edges exposed by the exporters because
of what the whole package provides.  Case in point: I submitted a paper
yesterday which I wrote in org.  However, for the submission, once I was
happy with all the content, I had to tweak the latex to meet the
journal's format because they provide a style file which requires title,
author, etc. to come *after* the \begin{document}.  

I could have fooled org into doing the right thing but it was simply
easier to worry about this at the end and not get hung up with the minor
exporting issues involved.  By using org for writing (days, weeks) and
latex (5-10 minutes) for the final tweaking, my productivity was
probably as high as it will ever get for this type of task.

This is *not* an argument against an improved export engine in org,
simply a comment on perspective and relative importance!

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



Re: [O] Update org-mode

2011-04-01 Thread Ian Barton

On 01/04/11 16:20, Dror Atariah wrote:

I tried to follow the update process described here:
http://orgmode.org/worg/org-faq.html under:
How do I keep current with bleeding edge development?

The only change I made was the place where I checked out the new version. 
Instead of ~/elisp I have ~/Library/elisp.

Everything went smooth, except that I had to add sudo before the make install. 
Without the sudo, I got an access denied error. Anyway, at the end, I got no warnings and it 
seems like the process was smooth. But when I checked the version of org-mode in aquamacs it was still 6.33x

I am using Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
  of 2011-03-19 on braeburn.aquamacs.org - Aquamacs Distribution 2.2 on a mac 
OS 10.6.7.

What should I do in order to fix it?



If you had to use sudo it sounds as though your Makefile might be wrong. 
You should have something like:


# Where local software is found
prefix=~/Library/elisp

Ian.



Re: [O] Re: [BABEL][BUG] Tangle incorrect with variables

2011-04-01 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03/31/2011 06:00 PM, Sébastien Vauban wrote:
 Hi Rainer,
 
 Rainer M Krug wrote:
 I get the following tangled output

 --8---cut here---start-8---

 REV=$(cat 'BABEL_TABLE'
 master
 BABEL_TABLE
 )
 STATE=$(cat 'BABEL_TABLE'
 edited
 BABEL_TABLE
 )
   rm -rf ./R
   rm -f ./spreadSim.sub
   REVISION=$REV.$STATE
   tar -xf nsa.$REVISION.tar.gz
   $HOME/R/R/R-2.12.0/bin/Rscript --vanilla -e
 source('./R/generateLatinHypercubeScenarios.R'); doIt()
   for SCENARIO in ./R/scenarios/*.R; do
 export SCENARIO=${SCENARIO#./R/scenarios/}
 qsub nsa.sub
   done
 --8---cut here---end---8---

 Which looks right to me.  Could it be something specific about your
 setup which is causing this issue?

 Sorry - I did not relize that the way the variables are inserted has
 changed - I should have tried the script before asking. It works fine.
 
 For my own understanding, could you explicit what you consider as changed in
 the way the variables are inserted?

It simply read:

REV=69
STATE=edited

Rainer

 
 Best regards,
   Seb
 


- -- 
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

Tel:+33 - (0)9 53 10 27 44
Cell:   +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2V+FEACgkQoYgNqgF2egrIygCggNLBvonVw8sHs4tSuJIVMrLT
fwUAn2fgINZLJsNFMMWa/2M6m0bLL4RS
=NzRp
-END PGP SIGNATURE-



Re: [O] [PATCH] Bury calendar buffer after C-c .?

2011-04-01 Thread Anthony Lander


On 11-Mar-29, at 7:12 PM, Ben North wrote:


Hi,

I've been using org-mode for a little while now, and finding it very
useful --- thanks!

Would you consider a patch along the lines of the attached, to bury  
the
calendar buffer once you've chosen a date via C-c .?  I often want  
to

do switch-to-other-buffer to check something in the most recently used
buffer, and find myself looking at the calendar instead.



Personally, I think this is a great idea as well.

 -Anthony




Re: [O] Re: Update org-mode

2011-04-01 Thread Nick Dokos
Bernt Hansen be...@norang.ca wrote:

 Dror Atariah dror...@gmail.com writes:
 
  I tried to follow the update process described here:
  http://orgmode.org/worg/org-faq.html under:
  How do I keep current with bleeding edge development?
 
  The only change I made was the place where I checked out the new version. 
  Instead of ~/elisp I have ~/Library/elisp.
 
  Everything went smooth, except that I had to add sudo before the
  make install. Without the sudo, I got an access denied
  error. Anyway, at the end, I got no warnings and it seems like the
  process was smooth. But when I checked the version of org-mode in
  aquamacs it was still 6.33x
 
  I am using Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
   of 2011-03-19 on braeburn.aquamacs.org - Aquamacs Distribution 2.2 on a 
  mac OS 10.6.7.
 
  What should I do in order to fix it?
 
 Hi Dror,
 
 I track the latest git code at least weekly.  I skip the compile and
 make install steps completely and run the code uncompiled from the git
 repository directly.
 
 I just update the code and M-x org-reload (or restart Emacs) and I'm
 done.
 

... and do ``make info'' to get the doc changes, right?

Nick



[O] create new files from capture

2011-04-01 Thread Buck Brody
Is there a way to use capture to create new files? Can I fill out the name of 
the file, and add a date stamp, from within the capture template? 

I also considered creating a new headline and then exporting the subtree. The 
problem is that I need to have the title of the new file automatically created 
based upon the headline, and I can't figure out how to do this.

Thanks 

Re: [O] org-attach link proposal

2011-04-01 Thread Juraj Kubelka
Hi Darlan and Aankhen,

thank you for your help! In the end a use this setup:

  (org-add-link-type att 'org-attach-open-link)
  (defun org-attach-open-link (file)
(org-open-file (org-attach-expand file)))
  (set-variable 'org-attach-store-link-p t)

I have learned a lot. This is a great project!
Best regards,
Juraj

On Fri, Apr 1, 2011 at 6:25 PM, Darlan Cavalcante Moreira darc...@gmail.com
 wrote:


 I have the same use-case scenario as you and I asked the same question a
 while ago [1]. As you, I define a link type for attached files with

 #+LINK: attach elisp:(org-open-file (org-attach-expand %s))


 To avoid the confirmation to execute elisp code you can use the
 org-confirm-elisp-link-not-regexp variable that Bastien introduced after
 [1]. In my case it is

 (setq org-confirm-elisp-link-not-regexp org-open-file)

 Off-course you can also disable confirmation to execute any elisp code, but
 I think it is more reasonable to disable only the one you need.


 Bastien also introduced the org-attach-store-link-p variable. Set it to
 'attached and org will store a link to the attached file that you can
 easily insert with C-c C-l.

 --
 Darlan

 [1]: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37613.html

 At Fri, 1 Apr 2011 13:02:50 +0200,
 Juraj Kubelka juraj.kube...@gmail.com wrote:
 
  [1  text/plain; UTF-8 (7bit)]
  Hi,
 
  I played a bit with org-attach. It is great package! Thanks for it! :)
 
  I have one proposal. So at first why:
 
  I would like to do something like this:
 
  * Project documents
:PROPERTIES:
:Attachments: first.doc second.doc third.doc
:ID:   37773ace-b471-4003-a8d1-448e7c48f77b
:END:
 
+ the first document about something1 [[att:first.doc]]
+ the second document  [[att:second.doc]]
+ the third document [[att:third.doc]]
 
  in order to easily access it just by click on related link.
 
  So I defined method:
 
  (defun org-attach-open-link (file optional in-emacs)
(org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))
 
  and link:
 
  #+LINK: att elisp:(org-attach-open-link %s)
 
  and it works. but always asks if I want to execute elisp code.
 
  Would it be possible to integrate it directly to org-mode like http: and
  others? I am not sure how to do it.
 
  Thank you!
  Juraj
  [2  text/html; UTF-8 (quoted-printable)]
 



Re: [O] Re: Update org-mode

2011-04-01 Thread Bernt Hansen
Nick Dokos nicholas.do...@hp.com writes:

 Bernt Hansen be...@norang.ca wrote:

 Dror Atariah dror...@gmail.com writes:
 
  I tried to follow the update process described here:
  http://orgmode.org/worg/org-faq.html under:
  How do I keep current with bleeding edge development?
 
  The only change I made was the place where I checked out the new version. 
  Instead of ~/elisp I have ~/Library/elisp.
 
  Everything went smooth, except that I had to add sudo before the
  make install. Without the sudo, I got an access denied
  error. Anyway, at the end, I got no warnings and it seems like the
  process was smooth. But when I checked the version of org-mode in
  aquamacs it was still 6.33x
 
  I am using Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
   of 2011-03-19 on braeburn.aquamacs.org - Aquamacs Distribution 2.2 on a 
  mac OS 10.6.7.
 
  What should I do in order to fix it?
 
 Hi Dror,
 
 I track the latest git code at least weekly.  I skip the compile and
 make install steps completely and run the code uncompiled from the git
 repository directly.
 
 I just update the code and M-x org-reload (or restart Emacs) and I'm
 done.
 

 ... and do ``make info'' to get the doc changes, right?

Yes - I do that but not for every update - normally just when new
releases come out.

Thanks for catching this.

Regards,
Bernt



[O] subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Yagnesh Raghava Yakkala

Dear list,

I read orgmode list from gmane news group and I want to subscribe the
list to be able to post, but dont want to recieve any mails unless they
directs to my mail ID. is it possible??

Thanks,
Yagnesh
-- 
Chicken Little was right.



[O] Re: unnumbered subsections in latex export

2011-04-01 Thread Achim Gratz
Nicolas n.goaz...@gmail.com writes:
 I have been thinking about exporters for a while now, and I'd like to
 share my point of view. Be warned, I will be a bit verbose.
[...]

+1

A remark about backwards compatibility:

I personally don't have a huge investment in documents that I export,
but I guess that backwards compatibility and/or a converter that points
out and possibly fixes any incompatibility between old and new exporters
would be required to make the transition smoothly.  Again, the changes
envisioned by Nicholas would require that the orgg documents in question
are well-formed (or at least fixable for the purposes of the export with
trivial and stable changes).  The situation today is that some export
backends require different levels of conformance while this new solution
would require the same quality for all of them.


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

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




[O] Re: subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Robert Pluim
Yagnesh Raghava Yakkala yagn...@live.com writes:

 Dear list,

 I read orgmode list from gmane news group and I want to subscribe the
 list to be able to post, but dont want to recieve any mails unless they
 directs to my mail ID. is it possible??

I believe you can post via gmane without being subscribed to the list
(this post being an example :) )

Robert




[O] Re: Update org-mode

2011-04-01 Thread Yagnesh Raghava Yakkala

hi Dror,


Dror Atariah dror...@gmail.com writes:

 I tried to follow the update process described here:
 http://orgmode.org/worg/org-faq.html under:
 How do I keep current with bleeding edge development?

 The only change I made was the place where I checked out the new version. 
 Instead of ~/elisp I have ~/Library/elisp.

may be problem with the path setting, 

#+begin_src elisp
(setq load-path (cons
 (expand-file-name ~/Library/elisp)
 load-path))
(require 'org-install)
#+end_src

may solve the problem.


 Everything went smooth, except that I had to add sudo before the
 make install. Without the sudo, I got an access denied
 error. Anyway, at the end, I got no warnings and it seems like the
 process was smooth. But when I checked the version of org-mode in
 aquamacs it was still 6.33x

 I am using Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
  of 2011-03-19 on braeburn.aquamacs.org - Aquamacs Distribution 2.2 on a mac 
 OS 10.6.7.

 What should I do in order to fix it?

 Thanks in advance,
 Dror






Yagnesh
--
You may be infinitely smaller than some things, but you're infinitely
larger than others.



[O] Re: Enforcing drawer setup

2011-04-01 Thread Aankhen
Hi Bernt,

On Fri, Apr 1, 2011 at 22:31, Bernt Hansen be...@norang.ca wrote:
 Aankhen aank...@gmail.com writes:
 Is there any command I can run to put into effect my
 ‘org-log-into-drawer’ setting?  I recently changed it to ‘t’, but I
 have a fair number of existing entries where it was ‘nil’, meaning
 that the files as a whole look rather haphazardly organized.

 Thanks,
 Aankhen

 Hi Aankhen,

 There's not built-in function to accomplish this that I am aware of.

 This is a bit of a hack but it will probably get you the result you
 want.  If you set org-clock-into-drawer to the drawer than you want and
 set org-clock-out-remove-zero-time-clocks then you can visit each
 heading using some elisp code, clock in and immediately clock out the
 headline and it should create a drawer and wrap your existing data.

 I haven't actually done this... so YMMV.

Yes, that was my first thought when I enabled logging into a drawer,
as I thought I’d read about it working that way, but unfortunately it
doesn’t seem to. :-( I appreciate the suggestion though.

Aankhen



[O] Re: subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Jambunathan K
Yagnesh Raghava Yakkala yagn...@live.com writes:

 Dear list,

 I read orgmode list from gmane news group and I want to subscribe the
 list to be able to post, but dont want to recieve any mails unless they
 directs to my mail ID. is it possible??

Try subscribing from. There is an option to achieve what you want.

http://lists.gnu.org/mailman/listinfo/emacs-orgmode


 Thanks,
 Yagnesh

-- 



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

2011-04-01 Thread Eric S Fraga
Nicolas n.goaz...@gmail.com writes:

 Hello,

Hi!

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

[...]

 I need to be able to delete whole list entries automatically based on
 their status, whether in a copy or during export.

 Maybe the following functions might help you. Their docstring is
 explicit.

Thanks for the code.  This looks like it would do what I originally
thought I wanted but Carsten, as always, has come to the rescue and
provided exactly what I needed (as opposed to what I asked for ;-).  See
his recent email on the list about =org-new-numbered-action=!

Thanks again,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.122.g2f72.dirty)



[O] Re: subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Yagnesh Raghava Yakkala

Hi Robert,

Robert Pluim rpl...@gmail.com writes:

 Yagnesh Raghava Yakkala yagn...@live.com writes:

 Dear list,

 I read orgmode list from gmane news group and I want to subscribe the
 list to be able to post, but dont want to recieve any mails unless they
 directs to my mail ID. is it possible??

 I believe you can post via gmane without being subscribed to the list
 (this post being an example :) )

Thanks, Fist I thought so, then I was afraid of giving manual work to the
moderators for spam verification. Thanks for the confirmation.

Yagnesh

-- 
Your supervisor is thinking about you.



[O] Re: Update org-mode

2011-04-01 Thread Dror Atariah
 #+begin_src elisp
 (setq load-path (cons
 (expand-file-name ~/Library/elisp)
 load-path))
 (require 'org-install)
 #+end_src
 
@Yagnesh: where should I plug this code into?





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

2011-04-01 Thread Aidan Gauland
Nick Dokos nicholas.dokos at hp.com writes:
 Aidan Gauland aidalgol at no8wireless.co.nz wrote:
  Yes it does.  Sorry, I should have worded that differently.  I meant
  that I have been repeatedly wiping ~/.org-timestamps/ in hopes that it
  will not get screwed up again and think none of my files have changed,
  and never re-publishes changed files (after an initial org-publish
  operation).  I think I have run into a bug in org-mode and I really
  want to track it down, so I thought the best place to start would be
  to look at what the timestamps are (in a human-readable format).
  
 
 OK - thanks. I started taking a look at the code, but I'm not getting
 anywhere fast, so the more eyes we can have on it the better.

Actually, we can forget about the timestamps.  I finally figured out
what circumstances under which this bug happens: I am trying to export
from a system where some of the symlinks in the project are broken.

Here's my setup: I sync my home directory on my laptop and desktop
computers using Unison.  In my project, I have symlinks to files in
~/images/, but since my laptop hard drive has less capacity than the
one in my desktop, I only keep ~/images/ on my desktop.  As a result
of this setup, some symlinks in my org-mode project are broken on my
laptop.  When I publish my project on my desktop, where no symlinks
are broken, org-publish behaves as expected; when I publish the same
project on my laptop, where some symlinks are broken, org-publish
appears to succeed, but publishes no changes.

I am really sorry for such a delayed response, but my university
semester started up again, which has been really hectic because of the
Feburary Christchurch earthquake.

Kind regards,
Aidan Gauland





[O] Re: subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Bernt Hansen
Yagnesh Raghava Yakkala yagn...@live.com writes:

 Hi Robert,

 Robert Pluim rpl...@gmail.com writes:

 Yagnesh Raghava Yakkala yagn...@live.com writes:

 Dear list,

 I read orgmode list from gmane news group and I want to subscribe the
 list to be able to post, but dont want to recieve any mails unless they
 directs to my mail ID. is it possible??

 I believe you can post via gmane without being subscribed to the list
 (this post being an example :) )

 Thanks, Fist I thought so, then I was afraid of giving manual work to the
 moderators for spam verification. Thanks for the confirmation.

 Yagnesh

Hi Yagnesh,

Yes you can do this.  That is how I am set up.  I read the list through
gmane (and Gnus) and am subscribed and set up to not receive email from
the list.  This allows posts by me to get to the list without requiring
moderation and I get to read the list the way that is most convenient
for me.

When someone does reply-all which includes my email address I get a copy
of that mail in my inbox and I'll definitely notice it and respond.
Posts intended for me but just sent only to the list may not be read for
long periods of time (read: days) so the author may not get a timely
response.

HTH,
Bernt



Re: [O] Re: Update org-mode

2011-04-01 Thread Nick Dokos
Dror Atariah dror...@gmail.com wrote:

  #+begin_src elisp
  (setq load-path (cons
  (expand-file-name ~/Library/elisp)
  load-path))
  (require 'org-install)
  #+end_src
  
 @Yagnesh: where should I plug this code into?
 

In your .emacs (or equivalent emacs initialization file.)

If your emacs is set up correctly, you should be able to visit the
relevant section in the Emacs manual by evaluating the following form:

   (info (emacs)Init file)

Put the cursor after the closing parenthesis and type C-x C-e

Nick



[O] Bug: EOL needs to be converted to Unix for MobileOrg files [7.5 (release_7.5.125.g70fe)]

2011-04-01 Thread Charles Sebold
Sorry, I first sent this from an account that isn't subscribed to the list.

This has been a problem for me for some time, but I only just now had
the chance to find the problem.

I primarily use Org-mode on Windows, and my org files mostly have DOS
line endings.  A while back a patch from me was accepted to convert the
checksum file to Unix EOLs (and Richard updated the iOS app to be
agnostic about it, I think, at the same time), which saved a lot of
syncing because the checksum file never looked right to MobileOrg.

However, the files themselves are irritating because they appear to have
double line feeds when they are viewed on the iOS device, and edits from
MobileOrg never sync because stray ^Ms creep in.

This patch makes all files pushed to MobileOrg into Unix files as far as
line endings go.

It's not a very elegant solution and my feelings won't be hurt if a
better way is proposed.

Diff is here, followed by the bug report data dump (edited to remove
things that don't need to be public, and I wonder if it would be a good
idea to modify the bug report to automatically leave out encryption
passwords and the like?).


diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 83462f0..fa1d4f4 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -472,6 +472,12 @@ agenda view showing the flagged items.
   target-file)
   (org-mobile-cleanup-encryption-tempfile

+(defun org-mobile-copy-file (file newname)
+  Copy file, converting to Unix line endings.
+  (with-temp-file newname
+(set-buffer-file-coding-system 'undecided-unix nil)
+(insert-file-contents file)))
+
 (defun org-mobile-copy-agenda-files ()
   Copy all agenda files to the stage or WebDAV directory.
   (let ((files-alist org-mobile-files-alist)
@@ -485,7 +491,7 @@ agenda view showing the flagged items.
  (make-directory target-dir 'parents))
(if org-mobile-use-encryption
(org-mobile-encrypt-and-move file target-path)
- (copy-file file target-path 'ok-if-exists))
+ (org-mobile-copy-file file target-path))
(setq check (shell-command-to-string
 (concat org-mobile-checksum-binary  
 (shell-quote-argument (expand-file-name file)
@@ -710,12 +716,15 @@ encryption program does not understand them.

 (defun org-mobile-encrypt-file (infile outfile)
   Encrypt INFILE to OUTFILE, using `org-mobile-encryption-password'.
-  (shell-command
-   (format openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s
-  (shell-quote-argument (concat pass:
-(org-mobile-encryption-password)))
-  (shell-quote-argument (expand-file-name infile))
-  (shell-quote-argument (expand-file-name outfile)
+  (let ((tempfile (make-temp-file orgmobile)))
+(org-mobile-copy-file infile tempfile)
+(shell-command
+ (format openssl enc -aes-256-cbc -salt -pass %s -in %s -out %s
+(shell-quote-argument (concat pass:
+  (org-mobile-encryption-password)))
+(shell-quote-argument (expand-file-name tempfile))
+(shell-quote-argument (expand-file-name outfile
+(delete-file tempfile)))

 (defun org-mobile-decrypt-file (infile outfile)
   Decrypt INFILE to OUTFILE, using `org-mobile-encryption-password'.


Emacs  : GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-03-29 on CT-SEBOLDCR-T4C
Package: Org-mode version 7.5 (release_7.5.125.g70fe)

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-agenda-custom-commands '((z tags memorizedaily|odd|thursday|memday31)
  (A Full Agenda ((agenda )))
  (7 Full Weekly Agenda
   ((agenda  ((org-agenda-span (quote week))
  (h . HOME + tag/TODO searches)
  (ha Full Agenda + Next Actions
   ((agenda) (todo INBOX) (todo
NEXTACTION) (todo TODO)))
  (hn Next Actions
   ((todo INBOX) (todo NEXTACTION)
(todo TODO)))
  (ht Non-LCMS Tasks ((tags-todo -lcms)))
  (hp All Projects
   ((todo PROJECT) (todo PROJWAITING)
(todo PROJVERIFY)))
  (R TeamMania tasks ((tags-todo
+work+teammania)))
  (w . LCMS + tag/TODO searches)
  (wo LCMS Servicewise Open Tickets
   ((tags +servicewise+ticket-status=\Closed\)))
  (wt LCMS tasks 

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

2011-04-01 Thread Nicolas
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Thanks for the code.  This looks like it would do what I originally
 thought I wanted but Carsten, as always, has come to the rescue and
 provided exactly what I needed (as opposed to what I asked for ;-).  See
 his recent email on the list about =org-new-numbered-action=!

Ah, I didn't follow closely this thread. I wish I could read minds like
Carsten!

Regards,

-- 
Nicolas



[O] Re: subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Yagnesh Raghava Yakkala

Hi Bernt,
Thanks for the response.,

Bernt Hansen be...@norang.ca writes:

 Yagnesh Raghava Yakkala yagn...@live.com writes:

 Hi Robert,

 Robert Pluim rpl...@gmail.com writes:

 Yagnesh Raghava Yakkala yagn...@live.com writes:

 Dear list,

 I read orgmode list from gmane news group and I want to subscribe the
 list to be able to post, but dont want to recieve any mails unless they
 directs to my mail ID. is it possible??

 I believe you can post via gmane without being subscribed to the list
 (this post being an example :) )

 Thanks, Fist I thought so, then I was afraid of giving manual work to the
 moderators for spam verification. Thanks for the confirmation.

 Yagnesh

 Hi Yagnesh,

 Yes you can do this.  That is how I am set up.  I read the list through
 gmane (and Gnus) and am subscribed and set up to not receive email from
 the list.  This allows posts by me to get to the list without requiring
 moderation and I get to read the list the way that is most convenient
 for me.

 When someone does reply-all which includes my email address I get a copy
 of that mail in my inbox and I'll definitely notice it and respond.
 Posts intended for me but just sent only to the list may not be read for
 long periods of time (read: days) so the author may not get a timely
 response.

Thanks I could do that. I didn't notice that there is an option to
login into the Mailman and change the subscription option.

BTW your org page is great. I feel sometimes it may take years for me to
reach the end of your document ;)

Thanks,
Yangesh.

-- 
You display the wonderful traits of charm and courtesy.



[O] Re: Illiterate programming question

2011-04-01 Thread Sébastien Vauban
Hi Eric,

Eric Schulte wrote:
 Nick Dokos nicholas.do...@hp.com writes:
 Sean O'Halpin sean.ohal...@gmail.com wrote:
 On Thu, Mar 31, 2011 at 9:13 PM, Nick Dokos nicholas.do...@hp.com wrote:
  Sean O'Halpin sean.ohal...@gmail.com wrote:
  which doesn't look right to me.

 To be honest, I don't know what it /should/ look like but I have
 ':comments yes' on three sections and get only one link on output, so
 I can't see how this would detangle properly.
 
 Also,
 
 # [[][main]]
 
 is missing the file reference (in the first set of brackets), so it
 won't work as a link.

 Yes, it does look unlikely. I don't know about the other comments (line
 numbers, etc.) but at least the link calculation in
 org-babel-tangle-collect-blocks is wrong I believe: it uses
 org-store-link to supposedly store a link to the current location on the
 global org-stored-links stack and then pops it, takes the car of it and
 sanitizes text properties of the result: that then becomes the link that
 should be stored in the tangled file.

 But it seems that org-store-link does not behave this way when called
 non-interactively: I get nothing on the global stack. Instead it seems
 to *return* the link as a string, which is then just thrown away.

 This all looks to be correct, thanks for debugging this one.  I've just
 pushed up a fix which brings the tangling link-extraction code up to
 date with the current version of org-store-link.

 The tangled comments should now appear as fully formed links.

 However, in testing this I noticed that the code for following these
 links form a source code file back into the original org-mode file
 (namely `org-babel-tangle-jump-to-org') is not currently working for
 some link types (e.g. id: links).

 The problem here is that there is no org function for parsing/following
 a link which can be called non-interactively.  I'd like to either

 1. change org-open-at-point (the function which currently holds all of
the org-link following logic) so that it returns an object (probably
the buffer, maybe the buffer and point) holding the information on
the link target, so that other elisp code can follow org-mode links
with something like.

#+begin_src emacs-lisp
  (pop-to-buffer (org-open-link-at-point))
#+end_src

 2. or, another option would be to pull the link-parsing logic out of
org-open-link-at-point into a separate function which could then be
called by org-open-link-at-point, and by other elisp functions
wishing to use org-mode links.

 I'm not comfortable making either of these changes myself without
 Carsten or Bastien giving their OK.

For sure, this is a regression between somewhere around Wed Mar 23 2011 (can
be a couple of days before, would I have passed days without updating Org --
that can't be true?) and now...

--8---cut here---start-8---
diff --git a/org/css/worg-leuven.css b/org/css/worg-leuven.css
index 0706bc2..970aa78 100755
--- a/org/css/worg-leuven.css
+++ b/org/css/worg-leuven.css
@@ -1,11 +1,11 @@
 
-/* [[id:a69e0323-2643-418b-bf1a-75c7dc53cf74][External-CSS:1]] */
+/* [[][External-CSS:1]] */
--8---cut here---end---8---

As you can see, I *had* correct ID comments the last time I tangled the CSS
file. Now, not anymore, with user changes (AFAICT).

Best regards,
  Seb

-- 
Sébastien Vauban




[O] Re: subscribe org list, but opt out from recieving mails.

2011-04-01 Thread Matt Lundin
Yagnesh Raghava Yakkala yagn...@live.com writes:

 Dear list,

 I read orgmode list from gmane news group and I want to subscribe the
 list to be able to post, but dont want to recieve any mails unless they
 directs to my mail ID. is it possible??


Please read the following FAQ:

http://orgmode.org/worg/org-faq.html#ml-subscription-and-gmane

Best,
Matt



[O] ToC in org-faq

2011-04-01 Thread Nick Dokos

The table of contents in the org-faq page on Worg,

http://orgmode.org/worg/org-faq.html

is always expanded, afaict: it's not a button that expands when you
mouse over it, as is the case in most (all?) Worg pages. Is that by
design or did something break?

Thanks,
Nick






Re: [O] ToC in org-faq

2011-04-01 Thread Jason Dunsmore
Nick Dokos nicholas.do...@hp.com writes:

 The table of contents in the org-faq page on Worg,

 http://orgmode.org/worg/org-faq.html

 is always expanded, afaict: it's not a button that expands when you
 mouse over it, as is the case in most (all?) Worg pages. Is that by
 design or did something break?

I think it's by design:
http://repo.or.cz/w/Worg.git/blobdiff/509e39e..9b4399:/org-faq.org



[O] No property change from ‘org-clock-sum’

2011-04-01 Thread Ben Finney
Howdy all,

When I use ‘org-clock-sum’ in Org-mode version 7.4, nothing appears to
happen: the items in the subtree are not updated and no ‘CLOCKSUM’
property appears.


I'm trying to generate an invoice report using ‘org-invoice.el’.

The items on which I want to report have clock entries, generated
correctly with ‘org-clock-in’ and ‘org-clock-out’. An example:

=
* foo
** bar
*** [2011-03-24 Thu]
CLOCK: [2011-03-24 Thu 14:15]--[2011-03-24 Thu 18:03] =  3:48
CLOCK: [2011-03-24 Thu 09:10]--[2011-03-24 Thu 12:27] =  3:17
*** [2011-03-23 Wed]
CLOCK: [2011-03-23 Wed 14:10]--[2011-03-23 Wed 18:16] =  4:06
CLOCK: [2011-03-23 Wed 09:30]--[2011-03-23 Wed 13:10] =  3:40
*** [2011-03-22 Tue]
CLOCK: [2011-03-22 Tue 14:00]--[2011-03-22 Tue 17:30] =  3:30
CLOCK: [2011-03-22 Tue 08:58]--[2011-03-22 Tue 13:31] =  4:33
=

According to the doc string for ‘org-invoice-report’, the ‘CLOCKSUM’
property on each item in the subtree will be used for the report.

So apparently I need to ‘org-clock-sum’ on the tree before updating the
report, in order to automatically generate the ‘CLOCKSUM’ property. But
that function doesn't change anything.

Why wouldn't the ‘org-clock-sum’ function do what its doc string says?
How should I be updating the ‘CLOCKSUM’ property?

-- 
 \ “Pinky, are you pondering what I'm pondering?” “I think so, |
  `\   Brain, but why does a forklift have to be so big if all it does |
_o__)   is lift forks?” —_Pinky and The Brain_ |
Ben Finney




Re: [O] Re: zotero (or mendeley) integration with org

2011-04-01 Thread Alan E. Davis
Is it possible to use org babel to extract bibtex entries from file of notes
to a *.bib file?

The stumbling point for me in saving bibtex sources is I don't see a way to
use the file as a bibtex *.bib file so as to use that as the direct source
for the publication.  Perhaps this could be automated with babel?

Alan

On Fri, Apr 1, 2011 at 6:13 AM, Matt Lundin m...@imapmail.org wrote:

 Stephen Eglen s.j.eg...@damtp.cam.ac.uk writes:

  Agreed. Google Scholar citations need very close proofreading, as they
  can be erroneous or poorly formatted.
 
  Thanks Matt - I'd agree with this, having seen oddities from google
  scholar.  I emailed them ages ago about one problem (formatting of
  initials in author names), but never heard back... it is a pity that
  there is no mechanism for tidying up their references, as it seems to be
  the best thing out there that covers all the fields.
 
  Having said that, if google scholar can save me some typing, I'll
  happilyuse it as a starting point for a bibtex entry.  I've just started
  using pdfmeat -- this is nice, as given a pdf, it outputs the
  corresponding bibtex entry from google scholar.  Probably works similar
  to the way zotero does it, but can be used straight from the command
  line:
 
http://code.google.com/p/pdfmeat/
 

 Thanks for the link! That looks like a useful tool.

  accessed by bibsnarf are limited to math and sciences. Since I use
  biblatex together with the Chicago Manual of Style, any bibtex entry I
  clip has to be edited and tweaked substantially. (Indeed, manual editing
  is unavoidable when using biblatex.)
 
  If its not too tangential, why do you use biblatex -- is it the future
  for bibtex?

 I use biblatex because I use citation styles in the humanities
 (especially the Chicago Manual of Style). Biblatex and the chicago-notes
 package (both now part of TeXLive) handle Chicago Style footnotes and
 bibliographies beautifully, with an astounding number of options and
 flawless formatting -- but the bibtex entries are a bit fussier than
 standard bibtex.

 Best,
 Matt