Re: [O] Bug: Column view in the agenda does not clean up ITEM [7.7]

2011-08-08 Thread Sebastien Vauban
Hi Christian,

Christian Schmidt wrote:
  I have got an issue with the column view in the agenda. In version
 7.5 I could clean up the column ITEM by setting the variable
 org-agenda-columns-remove-prefix-from-item.

 As far as I understood, this variable is depricated since version 7.6
 and the functionality is somehow replaced by the function
 org-columns-cleanup-item in the file org-colview.el.

 Unfortunately this does not work in the agenda view.


 I would like to give a minimal example:

 * NEXTACTION [#B] Test  :Tag:
   SCHEDULED: 2011-08-07 So

 Directly using column view in this buffer via CTRL-c CTRL-x CTRL-c
 yields to:

 NEXTACTION | B | * Test :Tag: | :Tag: | | | 2011-08-07 So |


 Like expexted the word NEXTACTION and the priority B are cleaned
 up from the column ITEM. This is the desired behaviour.


 When using the agenda view with CTRL-c CTRL-a L on this buffer we
 get in a seperate buffer:

 Sunday  7 August 2011
   Scheduled:  NEXTACTION [#B] Test :Tag:


 Now I use column view on this agenda via CTRL-c CTRL-x CTRL-c and
 end up with in the seperate buffer:

 NEXTACTION | B | NEXTACTION [#B] Test :Tag: | :Tag: | | | 2011-08-07 So |

 Thus we still have the unwanted NEXTACTION [#B] in the ITEM-column.

I (would have) thought that, when having a column dedicated for tags, the tag
would as well be removed from the headline column (3^rd one, in your
example).

Is there a good reason it's not working like that for the tag as well?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Help confirming odt-doc bug (Was Re: [odt] User-visible improvements)

2011-08-08 Thread Jambunathan K
Achim Gratz strom...@nexgo.de writes:

 Jambunathan K kjambunat...@gmail.com writes:
 Does anyone else see the reported behaviour with recent LibreOffice
 builds?

 The behaviour seems to be the same in LibreOffice3.3.3.  

Thanks for confirming this.

 Regards,
 Achim.

-- 



Re: [O] Help confirming odt-doc bug (Was Re: [odt] User-visible improvements)

2011-08-08 Thread Jambunathan K
Jambunathan K kjambunat...@gmail.com writes:

 I pushed few user-visible improvements to org-lparse/org-odt a few
 minutes ago. With these changes an exported document could be
 post-processed to another format (using an external converter) with just
 a single command (i.e., you no longer have to launch OpenOffice and do
 Save As etc)

 This addition seems to be bearing fruit immediately. I just reported a
 problematic behaviour with org-odt-doc conversion in LibreOffice
 mailing list. See

 http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/14739

 I am using OpenOffice.org-3.2.1 (OOO20m18/Build:9502).

I have pushed an alternative implementation + workaround that doesn't
trigger this bug. Please update your local copies.

 Does anyone else see the reported behaviour with recent LibreOffice
 builds? I am surprised that no one has complained about this problematic
 behaviour yet. Is it that people in this list (and their friends) have
 actually shifted to OpenDocument formats and don't rely on Word
 anymore. Or Is it that users simply hand fix the generated document.

 Jambunathan K.



-- 



Re: [O] Unicode and Latex export

2011-08-08 Thread Sebastien Vauban
Hi Suvayu,

suvayu ali wrote:
 Since I am a science student, I end up using lots of unicode
 characters for Greek and mathematical symbols. I usually read my notes
 in Emacs itself, unicode makes this a much nicer experience. However
 sometimes there is a need to export to html or pdf. Exporting to html
 works great with this, but I run into problems with missing characters
 when I export to latex.

 So my question is, is there a convenient way to translate the unicode
 characters into their corresponding latex commands for latex export
 and keep the unicode characters as is in the org file or for html
 export?

For the sake of completeness, please know you can use PDFLaTeX and UTF-8 -- I
do it for all my documents -- by having \usepackage[utf8x]{inputenc}
inserted at the right place(TM).

Normally, if your Org files are UTF-8, this should even be automatic, thanks
to the line:

\\usepackage[AUTO]{inputenc}

in `org-export-latex-classes'.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Unicode and Latex export

2011-08-08 Thread suvayu ali
Hi Seb,

On Mon, Aug 8, 2011 at 8:13 AM, Sebastien Vauban
wxhgmqzgw...@spammotel.com wrote:
 For the sake of completeness, please know you can use PDFLaTeX and UTF-8 -- I
 do it for all my documents -- by having \usepackage[utf8x]{inputenc}
 inserted at the right place(TM).

 Normally, if your Org files are UTF-8, this should even be automatic, thanks
 to the line:

    \\usepackage[AUTO]{inputenc}

 in `org-export-latex-classes'.


I believe you mean `org-export-latex-default-packages-alist'?
Everything seems fine with my settings ((AUTO inputenc t)..),
but the exported latex code has this:

\usepackage[utf8]{inputenc}

I edited the tex file to utf8x and everything works wonderfully. Any
ideas how I could get this working?

 Best regards,
  Seb

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] problem with code blocks

2011-08-08 Thread LanX
Aloha Thomas,

Thanks for the suggestion, but the problem persists!

Only replacing the 0 with an a helps.



--
#+LaTeX_CLASS: beamer
#+startup: beamer

* Lanx
** title

#+BEGIN_Example perl
 grep { $_ -[a] }  # - 0 fails
 X{1,2,3} X{1,2,3} X{1,2,3};
#+END_Example

--

type C-c C-e d  (or C-c C-e L)


Re: [O] Unicode and Latex export

2011-08-08 Thread Nick Dokos
suvayu ali fatkasuvayu+li...@gmail.com wrote:

 Hi Seb,
 
 On Mon, Aug 8, 2011 at 8:13 AM, Sebastien Vauban
 wxhgmqzgw...@spammotel.com wrote:
  For the sake of completeness, please know you can use PDFLaTeX and UTF-8 -- 
  I
  do it for all my documents -- by having \usepackage[utf8x]{inputenc}
  inserted at the right place(TM).
 
  Normally, if your Org files are UTF-8, this should even be automatic, thanks
  to the line:
 
     \\usepackage[AUTO]{inputenc}
 
  in `org-export-latex-classes'.
 
 
 I believe you mean `org-export-latex-default-packages-alist'?
 Everything seems fine with my settings ((AUTO inputenc t)..),
 but the exported latex code has this:
 
 \usepackage[utf8]{inputenc}
 
 I edited the tex file to utf8x and everything works wonderfully. Any
 ideas how I could get this working?
 

C-h v org-export-latex-inputenc-alist RET says:

,
| org-export-latex-inputenc-alist is a variable defined in `org-latex.el'.
| Its value is nil
| 
| Documentation:
| Alist of inputenc coding system names, and what should really be used.
| For example, adding an entry
| 
|   (utf8 . utf8x)
| 
| will cause \usepackage[utf8x]{inputenc} to be used for buffers that
| are written as utf8 files.
| 
| You can customize this variable.
`

Nick



Re: [O] Unicode and Latex export

2011-08-08 Thread suvayu ali
On Mon, Aug 8, 2011 at 9:09 AM, Nick Dokos nicholas.do...@hp.com wrote:
 C-h v org-export-latex-inputenc-alist RET says:



Thank you Nick, works great now. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [babel] tangle from within codeblock?

2011-08-08 Thread Rainer M Krug
On Fri, Aug 5, 2011 at 7:13 PM, Eric Schulte schulte.e...@gmail.com wrote:

 Rainer M Krug r.m.k...@gmail.com writes:

  Hi
 
  I have an R package in org, and would like to tangle it before I submit
 to
  svn.
 
  I commit via a code block:
 
  #+begin_src sh :results output
  svn commit  -m edits
  #+end_src
 
  How can I tangle automatically before I commit? I could use batch
 execution
  as described in  http://orgmode.org/manual/Batch-execution.html but I
 think
  it would be useless to start another emacs instance? I thought that I
 could
  put it into a header variable to have it evaluated, but I seem to be
 missing
  something:
 
  * test
  #+begin_src sh :tangle test.sh :var TANGLED=(org-babel-tangle)
echo TEST''
  #+end_src
 
  But I get an error:
 
  Saving file /home/rkrug/tmp/test.org...
  Wrote /home/rkrug/tmp/test.org
  (No changes need to be saved) [56 times]
  cons: Lisp nesting exceeds `max-lisp-eval-depth'
 
  I have the feeling, I am missing something small.
 
  Is there a different way to achieve this?
 

 Hi Rainer,

 You are very close, the problem is that the code block whose header
 argument initiates the tangling should not itself be tangled, otherwise
 you will wind up with the infinite recursion error you've noticed.

 A setup like the following should work...


Works perfectly - I especially like the summary of the tangling via wc
$TANGLED - very nice side effect.

Thanks a lot,

Rainer





 Best -- Eric

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




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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


[O] inlinetask html export template

2011-08-08 Thread suvayu ali
Hi,

org exports inlinetasks to HTML as preformatted text, and uses the
style class inlinetask. I wanted to export inlinetasks as a section
(div ?) but with the same style.

I don't know any HTML, but with some guess work I customised the html
template like this:


(html div class=\inlinetask\b%s%s/bbr /%s/div
  '((unless (eq todo )
  (format span class=\%s %s\%s%s/span  class todo todo 
priority))
heading content))


This takes care of replacing the preformatted block with a section but
the style isn't applied any more. Any ideas how I can achieve that?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] problem with code blocks

2011-08-08 Thread Sebastien Vauban
Hi LanX,

LanX wrote:
 Thanks for the suggestion, but the problem persists!

You see it's easier with an ECM...

 Only replacing the 0 with an a helps.

I don't have that problem. I guess it must have been fixed recently. It
clearly is related to [0] being interpreted as a footnote reference... It
should not, when in code. Please update your Org-mode version.

 --
 #+LaTeX_CLASS: beamer
 #+startup: beamer

 * Lanx
 ** title

 #+BEGIN_Example perl
  grep { $_ -[a] }  # - 0 fails
  X{1,2,3} X{1,2,3} X{1,2,3};
 #+END_Example

 --

 type C-c C-e d  (or C-c C-e L)

BTW, putting the language name after `begin_example' is useless. There is no
such concept. You should use the `begin_src' environments, where the language
is accepted as parameter:

#+begin_src perl
 grep { $_ -[0] }  # - 0 does not fail
 X{1,2,3} X{1,2,3} X{1,2,3};
#+end_src

Doing so, instead of:

#+begin_src latex
\begin{verbatim}
 grep { $_ -[0] }  # - 0 does not fail
 X{1,2,3} X{1,2,3} X{1,2,3};
\end{verbatim}
#+end_src

you'll get:

#+begin_src latex
\lstset{language=Perl}
\begin{lstlisting}
 grep { $_ -[0] }  # - 0 does not fail
 X{1,2,3} X{1,2,3} X{1,2,3};
\end{lstlisting}
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Unicode and Latex export

2011-08-08 Thread Stefan Nobis
Sebastien Vauban wxhgmqzgw...@spammotel.com writes:

 having \usepackage[utf8x]{inputenc} inserted

Please beware that utf8x is part of the obsolete and unsupported ucs
package. As ucs deeply affects the LaTeX kernel, more and more modern
packages are incompatible with utf8x and ucs (csquotes,
hyperref,...). For proper Unicode support its preferable to use LuaTeX
or XeTeX rather than using ucs (which is one of the first attemtps at
better Unicode support for TeX).

-- 
Until the next mail...,
Stefan.


pgpFLgv2hD8Ll.pgp
Description: PGP signature


[O] [babel] set post tangle hook on per file basis - evalu

2011-08-08 Thread Rainer M Krug
Hi

for different files, I put different things in the post-tangle hook. At tha
moment, I have an emacs-lisp code block, which I evaluate before I tangle,
but I forget this sometimes - so y question: is it possible (and think to
remember that it is, but I can't find how) to evaluate a source code block
upon opening of the file, or set the org-babel-post-tangle-hook in a
different way upon opening of the org file?

The code block I am using at the moment is:

** Evaluate to run post tangle script
#+begin_src emacs-lisp :results silent :tangle no :exports none
  (add-hook 'org-babel-post-tangle-hook
(
 lambda ()
(call-process-shell-command ./postTangleScript.sh nil
0 nil)
)
)
#+end_src

Thanks,

Rainer

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax (F):   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug


[O] Windows XP: date and time-stamp for DONE items not showing-up

2011-08-08 Thread Chris Henderson
I'm new to orgmode and emacs.

I have downloaded emacs 23.3 for XP and trying to use orgmode that
comes bundled with this version of emacs.

I'm following this tutorial:
http://orgmode.org/worg/org-tutorials/orgtutorial_dto.html

When I mark a project as Done it doesn't show the CLOSED and date
and time-stamp as described in the tutorial. It just puts the DONE
in front of the task.

My _emacs file is under the C:\Documents and Settings\user_name
directory and it only has the following:

(require 'org-install)
(add-to-list 'auto-mode-alist '(\\.org$ . org-mode))
(define-key global-map \C-cl 'org-store-link)
(define-key global-map \C-ca 'org-agenda)
(setq org-log-done t)

I have put emacs under C:\ drive and all the org files are under the
C:\emacs-23.3-bin-i386\emacs-23.3\lisp\org directory.

Could someone please tell me how to get the CLOSED and time and date
stamp for items that are marked as done?

Thanks.



Re: [O] inlinetask html export template

2011-08-08 Thread Jambunathan K
suvayu ali fatkasuvayu+li...@gmail.com writes:

 Hi,

 org exports inlinetasks to HTML as preformatted text, and uses the
 style class inlinetask. I wanted to export inlinetasks as a section
 (div ?) but with the same style.

 I don't know any HTML, but with some guess work I customised the html
 template like this:


 (html div class=\inlinetask\b%s%s/bbr /%s/div
 '((unless (eq todo )
 (format span class=\%s %s\%s%s/span  class todo todo 
 priority))
   heading content))


Put your html file in nxml-mode and do a C-c C-n. You will know the
reason. Basically it produces an invalid xhtml.

--8---cut here---start-8---
p
span style=text-decoration:underline;Questions/span:
div class=inlinetaskbDetector effects/bbr /
/pol  ### PROBLEM HERE
liHow is the Gaussian used for smearing of proper time resolution
   derived? a href=http://www.google.com;Google/a this.
/li
liWhy is the proper time error PDF needed? Why is
   smearing of time resolution not enough?
/li
/ol
--8---cut here---end---8---


 This takes care of replacing the preformatted block with a section but
 the style isn't applied any more. Any ideas how I can achieve that?

-- 



Re: [O] Unicode and Latex export

2011-08-08 Thread suvayu ali
Hi Stefan,

On Mon, Aug 8, 2011 at 9:53 AM, Stefan Nobis stefan...@snobis.de wrote:
 For proper Unicode support its preferable to use LuaTeX
 or XeTeX rather than using ucs

Thanks for the warning. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] inlinetask html export template

2011-08-08 Thread suvayu ali
Hi Jambu,

On Mon, Aug 8, 2011 at 10:39 AM, Jambunathan K kjambunat...@gmail.com wrote:
 Put your html file in nxml-mode and do a C-c C-n. You will know the
 reason. Basically it produces an invalid xhtml.

 --8---cut here---start-8---
 p
 span style=text-decoration:underline;Questions/span:
 div class=inlinetaskbDetector effects/bbr /
 /pol  ### PROBLEM HERE
 liHow is the Gaussian used for smearing of proper time resolution
   derived? a href=http://www.google.com;Google/a this.
 /li
 liWhy is the proper time error PDF needed? Why is
   smearing of time resolution not enough?
 /li
 /ol
 --8---cut here---end---8---


But fixing that doesn't render the box either.


p
span style=text-decoration:underline;Questions/span:
/p

div class=inlinetaskbDetector effects/bbr /
ol
liHow is the Gaussian used for smearing of proper
   time resolution derived?
/li
liWhy is the proper time error PDF needed? Why is
   smearing of time resolution not enough?
/li
/ol
/div


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Refiling list items

2011-08-08 Thread Nicolas Goaziou
Hello,

Jeff Horn jrhorn...@gmail.com writes:

 Should org-refile be able to refile list items?

Extending `org-refile', or creating an equivalent function for list
items would be overkill, in my opinion.

Just kill the item, repair the list, move point to an appropriate place,
and paste the item there.

Regards,

-- 
Nicolas Goaziou



Re: [O] inlinetask html export template

2011-08-08 Thread Jambunathan K
suvayu ali fatkasuvayu+li...@gmail.com writes:

 Hi Jambu,

 On Mon, Aug 8, 2011 at 10:39 AM, Jambunathan K kjambunat...@gmail.com wrote:
 Put your html file in nxml-mode and do a C-c C-n. You will know the
 reason. Basically it produces an invalid xhtml.

 --8---cut here---start-8---
 p
 span style=text-decoration:underline;Questions/span:
 div class=inlinetaskbDetector effects/bbr /
 /pol  ### PROBLEM HERE
 liHow is the Gaussian used for smearing of proper time resolution
   derived? a href=http://www.google.com;Google/a this.
 /li
 liWhy is the proper time error PDF needed? Why is
   smearing of time resolution not enough?
 /li
 /ol
 --8---cut here---end---8---


 But fixing that doesn't render the box either.


 p
 span style=text-decoration:underline;Questions/span:
 /p

 div class=inlinetaskbDetector effects/bbr /
 ol
 liHow is the Gaussian used for smearing of proper
time resolution derived?
 /li
 liWhy is the proper time error PDF needed? Why is
smearing of time resolution not enough?
 /li
 /ol
 /div

May be there is no entry for inlinetask in the default css. For example,
if I add the following to css, I see the entry correctly formatted.

--8---cut here---start-8---
  div.inlinetask {
color: red;
  }
--8---cut here---end---8---


Btw, you can get the div without any of the xhtml syntactic mess with
the HTML_CONTAINER_CLASS property and a regular outline (instead of a
deeply indented outline)

--8---cut here---start-8---
** Detector effects  :Qn:
   :PROPERTIES:
   :HTML_CONTAINER_CLASS: inlinetask
   :END:
1. How is the Gaussian used for smearing of proper time resolution
   derived? [[http://www.google.com][Google]] this.
--8---cut here---end---8---

Also note that with org-inlinetask NOT loaded, the headline is formatted
as a list because it is very deep ( H:? entry in #+OPTIONS line)

Jambunathan K.



Re: [O] Windows XP: date and time-stamp for DONE items not showing-up

2011-08-08 Thread Jambunathan K
Chris Henderson henders...@gmail.com writes:

 I'm new to orgmode and emacs.

 I have downloaded emacs 23.3 for XP and trying to use orgmode that
 comes bundled with this version of emacs.

 I'm following this tutorial:
 http://orgmode.org/worg/org-tutorials/orgtutorial_dto.html

 When I mark a project as Done it doesn't show the CLOSED and date
 and time-stamp as described in the tutorial. It just puts the DONE
 in front of the task.

 My _emacs file is under the C:\Documents and Settings\user_name
 directory and it only has the following:

 (require 'org-install)
 (add-to-list 'auto-mode-alist '(\\.org$ . org-mode))
 (define-key global-map \C-cl 'org-store-link)
 (define-key global-map \C-ca 'org-agenda)
 (setq org-log-done t)


 I have put emacs under C:\ drive and all the org files are under the
 C:\emacs-23.3-bin-i386\emacs-23.3\lisp\org directory.

 Could someone please tell me how to get the CLOSED and time and date
 stamp for items that are marked as done?

I don't see t as a valid value for org-log-done in the customization
menu or docstring and I am not sure how it is interpreted.

Have you tried

M-x customize-variable RET org-log-done RET

and choose one of the values that is offered in the menu.

,[ C-h v org-log-done RET ]
| org-log-done is a variable defined in `org.el'.
| Its value is note
| Original value was nil
| 
| Documentation:
| Information to record when a task moves to the DONE state.
| 
| Possible values are:
| 
| nil Don't add anything, just change the keyword
| timeAdd a time stamp to the task
| notePrompt for a note and add it with template `org-log-note-headings'
| 
| This option can also be set with on a per-file-basis with
| 
|#+STARTUP: nologdone
|#+STARTUP: logdone
|#+STARTUP: lognotedone
| 
| You can have local logging settings for a subtree by setting the LOGGING
| property to one or more of these keywords.
| 
| You can customize this variable.
| 
| [back]
`


 Thanks.



-- 



Re: [O] inlinetask html export template

2011-08-08 Thread suvayu ali
Hi Jambunathan,

On Mon, Aug 8, 2011 at 12:35 PM, Jambunathan K kjambunat...@gmail.com wrote:

 May be there is no entry for inlinetask in the default css. For example,
 if I add the following to css, I see the entry correctly formatted.


[...]


 Btw, you can get the div without any of the xhtml syntactic mess with
 the HTML_CONTAINER_CLASS property and a regular outline (instead of a
 deeply indented outline)

 --8---cut here---start-8---
 ** Detector effects                                      :Qn:
   :PROPERTIES:
   :HTML_CONTAINER_CLASS: inlinetask
   :END:
 1. How is the Gaussian used for smearing of proper time resolution
   derived? [[http://www.google.com][Google]] this.
 --8---cut here---end---8---


I made a class like this in my custom.css:

div.inlinetask
{
padding:10px;
border:2px solid gray;
margin:10px;
background: WhiteSmoke;
}

Works well. Since I am also using the Worg css, the styling clashes a
little with everything else. Thanks to your pointers, I also found the
styling for pre there. I think I can work up a look I am happy with
based on this.

 Also note that with org-inlinetask NOT loaded, the headline is formatted
 as a list because it is very deep ( H:? entry in #+OPTIONS line)


Yes, I am aware of that. That is why I load org-inlinetask in my init
file. :) Having org export headlines as deep as an inlinetask (=15) can
produce really weird section headings. I think it starts becoming weird
at H:4 or 5.

 Jambunathan K.


Thank you soo much for the help. :)

-- 
Suvayu

Open source is the future. It sets us free.



[O] [PATCH] org.el: Inhibit insertion of superfluous space character in org-add-planning-info.

2011-08-08 Thread Valentin Wüstholz
Hi,

I've noticed that org-add-planning-info adds a superfluous space
character when a repeated task is marked as DONE and gets rescheduled.

Example:

* TODO foo
  SCHEDULED: 2011-08-08 Mon +1d

This becomes (after pressing Shift-Right a few times):

* TODO foo
   SCHEDULED: 2011-08-09 Tue +1d
  :LOGBOOK:
  - State DONE   from WAITING[2011-08-08 Mon 15:33]
  :END:
  :PROPERTIES:
  :LAST_REPEAT: [2011-08-08 Mon 15:33]
  :END:

Note the additional space character before SCHEDULED.

I've attached a patch that seems to fix this issue.

Best regards,

Valentin
diff --git a/lisp/org.el b/lisp/org.el
index 11eaf78..d2fb343 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11914,7 +11914,7 @@ be removed.
 (re-search-forward org-closed-time-regexp nil t)))
(replace-match )
(if (looking-at --+[^]+) (replace-match 
-   (and (looking-at ^[ \t]+) (replace-match ))
+   (and (looking-at [ \t]+) (replace-match ))
(and org-adapt-indentation (bolp) (org-indent-to-column col))
(when what
  (insert


[O] backend specific preprocess hook

2011-08-08 Thread suvayu ali
Hello Orgers,

I wanted to do some preprocessing based on headline tags (set some
properties), before export[1]. But I want to do this only for specific
backends (html/latex). How can I achieve this?

Footnotes:

[1] IIUC I have to customise the `org-export-preprocess-hook'?

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Refiling list items

2011-08-08 Thread Florian Beck
Jeff Horn jrhorn...@gmail.com writes:

 Would someone throw me a bone? I couldn't find anything on gmane, but
 I my gmane-fu isn't the strongest. :D

 On Sat, Aug 6, 2011 at 14:54, Jeff Horn jrhorn...@gmail.com wrote:
 Should org-refile be able to refile list items? I suspect it would be
 non-trivial to add this functionality if it isn't already there, but I
 feel a bit overwhelmed keeping notes as headlines, particularly
 because I like to leave soft wrapping off and have a hard wrap at 80
 columns.

Here is a hack I use. It doesn't do any bookkeeping, doesn't check for
errors, (temporarily) moves the point during refiling and you might want
to set `org-refile-targets' to your liking. On the other hand, it might
just do the trick:

(defun org-copy-item (optional kill)
  Copy item at point to another location.
With prefix argument, move the item.
  (interactive P)
  (org-get-item kill)
  (let ((org-refile-targets
 '((org-default-notes-file :maxlevel . 4
(save-window-excursion
  (org-refile t)
  (outline-next-visible-heading 1)
  (skip-chars-backward  \t\n)
  (insert \n)
  (yank

(defun org-get-item (optional kill)
  Copy the item at point to the kill ring.
Optionally, kill it.
  (save-excursion
(let ((beg (org-in-item-p)))
  (org-end-of-item)
  (funcall (if kill
   'kill-region
 'copy-region-as-kill)
   beg (point)


-- 
Florian Beck



[O] [bug] org-inlinetask produces invalid xhtml

2011-08-08 Thread Jambunathan K

Summary: org-inlinetask produces invalid xhtml

The org file and exported html files are included. Org file also
contains some annotation on the bug.

Food for thought: If inline task entry is seen as a regular body text
even though it is wrapped in to pre /pre element does that suggest
a possible way in which this bug could be fixed.

* B oscillations
This is Suvayu's example but simplified. Also see the annotation
within the inline task itself.

_Questions_:
*** Detector effects :Qn:

Suvayu's example uses lists within inline task. Can the html export
engine produce valid html when the inline task has lists. But honestly
why does a preformatted text looks like a well-formatted html
list. Isn't that strange. Just uncomment the below list and see for
yourself.

# 1. How is the Gaussian used for smearing of proper time resolution
#derived? [[http://www.google.com][Google]] this.
# 2. Why is the proper time error PDF needed? Why is
#smearing of time resolution not enough?
*** END

Title: odt-export-bug



  
  






  odt-export-bug


  
	Table of Contents
	
	  
	1 B oscillations 
	  
	
  

  
	1 B oscillations 
	

	  This is Suvayu's example but simplified. Also see the annotation
	  within the inline task itself.
	  
	  
	Questions:
	Detector effects

	Suvayu's example uses lists within inline task. Can the html export
	engine produce valid html when the inline task has lists. But honestly
	why does a preformatted text looks like a well-formatted html
	list. Isn't that strange. Just uncomment the below list and see for
	yourself.
	  


	

  

  

  
Date: 2011-08-08 21:57:59 
Author: Jambunathan K
kjambunat...@gmail.com
Org version 7.7 with Emacs version 24
Validate XHTML 1.0

  



-- 


Re: [O] [bug] org-inlinetask produces invalid xhtml

2011-08-08 Thread Jambunathan K

Nicolas,

 Summary: org-inlinetask produces invalid xhtml

 The org file and exported html files are included. Org file also
 contains some annotation on the bug.

 Food for thought: If inline task entry is seen as a regular body text
 even though it is wrapped in to pre /pre element does that suggest
 a possible way in which this bug could be fixed.

Do you want to take a stab at this bug?

Having a valid html is in some sense necessary for producing for valid
odt output ...

Additional Note: I think instead of having templates one could have
org-backend-format-inlinetask(heading task todo priority whatever)

Jambunathan K.
-- 



[O] [RFC] inline task formatting in odt/doc (was Re: Org-odt fails to export when inline tasks are present)

2011-08-08 Thread Jambunathan K

Suvayu / Others

 Looks like I need to create an entry in

 C-h v org-inlinetask-export-templates.

Are there any opinions/preferences on how inline tasks could be exported
in to odt format. I think having an ability to quickly navigate through
all the inline tasks in the exported document would be a
pre-requisite. 

I am thinking of exporting them as Insert-Comments and from
OpenOffice help it seems one can quickly visit such comments in order. 

I am unsure how big the inline tasks typically are. From the mailing
lists it seems that the (unarticulated) expectation is that they are
simple notes (with mostly no body text or very little text)

Jambunathan K.





Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread John Hendy
On Fri, Aug 5, 2011 at 6:34 PM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 Hi John,

 On Sat, Aug 6, 2011 at 12:15 AM, John Hendy jw.he...@gmail.com wrote:
 1) writing a script that could handle the failure and leave the
 current agenda exported text file if it happened


 Do you run into the same problem if you one the file before hand in
 read only mode? Something like this before the agenda command might
 work.

 (find-file-read-only FILENAME)

How would I do this via the command line? Also, it's pulling from
about 10 project files, so I'm not sure if I'd have to do this for
every file or how that works since the org-batch-agenda command seems
to be pulling from all of them. Perhaps there's some way to trigger
emacs to think, Everything is read-only from here out?


Thanks,
John


 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] [RFC] inline task formatting in odt/doc (was Re: Org-odt fails to export when inline tasks are present)

2011-08-08 Thread suvayu ali
Hi Jambu,

On Mon, Aug 8, 2011 at 7:00 PM, Jambunathan K kjambunat...@gmail.com wrote:

 Suvayu / Others

 Looks like I need to create an entry in

 C-h v org-inlinetask-export-templates.

 Are there any opinions/preferences on how inline tasks could be exported
 in to odt format. I think having an ability to quickly navigate through
 all the inline tasks in the exported document would be a
 pre-requisite.

 I am thinking of exporting them as Insert-Comments and from
 OpenOffice help it seems one can quickly visit such comments in order.

 I am unsure how big the inline tasks typically are. From the mailing
 lists it seems that the (unarticulated) expectation is that they are
 simple notes (with mostly no body text or very little text)


I tried out the comments feature in OOo. I think it serves the purpose
very well. However I have an observation.

For single heading inlinetasks, you correctly say there is little text
and the comment feature works wonderfully. But for inlinetasks with an
END heading, it is common to find an enclosed list or a longer note.
Something like below.

*** Some note
+ with a few pointers
+ like these
*** END

Since comments in OOo don't support things like lists, it might be a
good idea to translate the shorter inlinetasks into comments and the
longer ones into highlighted blocks (as in latex export).

Since the format for inlinetask export templates already provides
support to adapt the template based on the content[1], this might be a
feasible feature request. But then again, I am not doing the work. ;)

 Jambunathan K.


I hope this helps.

Footnotes:

[1] org-inlinetask-export-templates is a variable defined in
`org-inlinetask.el'.
...
Moreover, the following special keywords are provided: `todo',
`priority', `heading', `content', `tags'.  If some of them are not
defined in an inline task, their value is the empty string.


-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [bug] org-inlinetask produces invalid xhtml

2011-08-08 Thread Nicolas Goaziou
Hello,

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

 Summary: org-inlinetask produces invalid xhtml

I've pushed a fix. Is it correct now?

 Additional Note: I think instead of having templates one could have
 org-backend-format-inlinetask(heading task todo priority whatever)

Not as long as org-inlinetask isn't loaded by default: it should be as
little intrusive as possible. But once it happens, I agree it could be
the path to go.

Regards,

-- 
Nicolas Goaziou



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread suvayu ali
Hi John,

On Mon, Aug 8, 2011 at 8:12 PM, John Hendy jw.he...@gmail.com wrote:
 Do you run into the same problem if you one the file before hand in
 read only mode? Something like this before the agenda command might
 work.

 (find-file-read-only FILENAME)

 How would I do this via the command line? Also, it's pulling from
 about 10 project files, so I'm not sure if I'd have to do this for
 every file or how that works since the org-batch-agenda command seems
 to be pulling from all of them. Perhaps there's some way to trigger
 emacs to think, Everything is read-only from here out?

If you can use wildcards to specify your files, it might be possible by
just one extra call to --eval. Something like this might work:

emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard t)' \
  --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt



 find-file-read-only is an interactive compiled Lisp function in
 `files.el'.

 It is bound to C-x C-r.

 (find-file-read-only FILENAME optional WILDCARDS)

 Edit file FILENAME but don't allow changes.
 Like C-x C-f, but marks buffer as read-only.
 Use C-x C-q to permit editing.

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Refiling list items

2011-08-08 Thread Nicolas Goaziou
Hello,

Florian Beck abstrakt...@t-online.de writes:

 (defun org-get-item (optional kill)
   Copy the item at point to the kill ring.
 Optionally, kill it.
   (save-excursion
 (let ((beg (org-in-item-p)))
   (org-end-of-item)
   (funcall (if kill
  'kill-region
'copy-region-as-kill)
  beg (point)

The latest Org introduced the function `org-list-send-item', which may
be useful here. I'd also suggest to repair list and, eventually, update
check-boxes when killing it.

Regards,

-- 
Nicolas Goaziou



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread John Hendy
On Mon, Aug 8, 2011 at 1:28 PM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 Hi John,

 On Mon, Aug 8, 2011 at 8:12 PM, John Hendy jw.he...@gmail.com wrote:
 Do you run into the same problem if you one the file before hand in
 read only mode? Something like this before the agenda command might
 work.

 (find-file-read-only FILENAME)

 How would I do this via the command line? Also, it's pulling from
 about 10 project files, so I'm not sure if I'd have to do this for
 every file or how that works since the org-batch-agenda command seems
 to be pulling from all of them. Perhaps there's some way to trigger
 emacs to think, Everything is read-only from here out?

 If you can use wildcards to specify your files, it might be possible by
 just one extra call to --eval. Something like this might work:

 emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard t)' \
      --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt


Hmm. That might work. Everything I pull from is in ~/org... could the
wildcard simply be ~/*.org? Forgive my emacs wildcard ignorance. I
did some filename regexp magic *once* and it took me like two hours to
learn the syntax just to turn camera directory names from 10#_MMDD to
-MM-DD...

Thanks again,
John



 find-file-read-only is an interactive compiled Lisp function in
 `files.el'.

 It is bound to C-x C-r.

 (find-file-read-only FILENAME optional WILDCARDS)

 Edit file FILENAME but don't allow changes.
 Like C-x C-f, but marks buffer as read-only.
 Use C-x C-q to permit editing.

 Hope this helps.

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread suvayu ali
Hi John,

On Mon, Aug 8, 2011 at 8:53 PM, John Hendy jw.he...@gmail.com wrote:
 If you can use wildcards to specify your files, it might be possible by
 just one extra call to --eval. Something like this might work:

 emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard t)' \
      --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt


 Hmm. That might work. Everything I pull from is in ~/org... could the
 wildcard simply be ~/*.org? Forgive my emacs wildcard ignorance.

As far as I know, emacs accepts any wildcard that is valid in the shell.
Since all your files are in ~/org, I would say try ~/org/*.org. The
'~/org/' limits it to files within your org directory and the '*.org'[1]
limits it to all files with a .org extension.

I hope this helps. :)

Footnotes:

[1] The asterisk (*) stands for zero or more characters. You can find
more details in `man bash` under the heading Pattern Matching.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread John Hendy
On Mon, Aug 8, 2011 at 1:59 PM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 Hi John,

 On Mon, Aug 8, 2011 at 8:53 PM, John Hendy jw.he...@gmail.com wrote:
 If you can use wildcards to specify your files, it might be possible by
 just one extra call to --eval. Something like this might work:

 emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard t)' \
      --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt


 Hmm. That might work. Everything I pull from is in ~/org... could the
 wildcard simply be ~/*.org? Forgive my emacs wildcard ignorance.

 As far as I know, emacs accepts any wildcard that is valid in the shell.
 Since all your files are in ~/org, I would say try ~/org/*.org. The
 '~/org/' limits it to files within your org directory and the '*.org'[1]
 limits it to all files with a .org extension.


Bummer, this is not working:

,---
| emacs -batch -l ~/.emacs -eval '(find-file-read-only ~/org/*.org t)' \
| -eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
`---

Do you see anything wrong with that? I guess I wonder what that first
part will do as perhaps the org-batch-agenda command is not
necessarily going to follow suit with the read-only command. As in,
does the first eval command affect anything that the org-batch-agenda
command is going to do? Is it trying to do the equivalent of opening
up all *.org files in read-only buffers and then run the agenda
export?


Thanks,
John
 I hope this helps. :)

 Footnotes:

 [1] The asterisk (*) stands for zero or more characters. You can find
    more details in `man bash` under the heading Pattern Matching.

 --
 Suvayu

 Open source is the future. It sets us free.




[O] [PATCH] org.el: Preserve indentation of manually indented lines in example blocks.

2011-08-08 Thread Valentin Wüstholz
Hi,

lines in example blocks are currently indented like the surrounding
begin and end delimiters. ¨This works fine unless, you want to indent
some lines manually; in this case, auto-indenting the buffer reverts
the manual indentation. This patch should prevent this from happening.

Best regards,

Valentin
diff --git a/lisp/org.el b/lisp/org.el
index 11eaf78..428804d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19460,10 +19460,14 @@ If point is in an inline task, mark that task 
instead.
   (save-excursion
(re-search-backward ^[ \t]*#\\+begin_\\([a-z]+\\) nil t))
   (setq column
-   (if (equal (downcase (match-string 1)) src)
-   ;; src blocks: let `org-edit-src-exit' handle them
-   (org-get-indentation)
- (org-get-indentation (match-string 0)
+(cond ((equal (downcase (match-string 1)) src)
+   ;; src blocks: let `org-edit-src-exit' handle them
+   (org-get-indentation))
+  ((equal (downcase (match-string 1)) example)
+   (max (org-get-indentation) (org-get-indentation 
(match-string 0
+  (t
+   (org-get-indentation (match-string 0)))
+  )))
  ;; This line has nothing special, look at the previous relevant
  ;; line to compute indentation
  (t


Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread suvayu ali
Hi John,

On Mon, Aug 8, 2011 at 9:48 PM, John Hendy jw.he...@gmail.com wrote:
 -batch -l ~/.emacs -eval

Your problem is the long options are wrong. According to the manpages,
there should be 2 hyphens.

--eval and --batch.

GL

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread John Hendy
On Mon, Aug 8, 2011 at 3:22 PM, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 Hi John,

 On Mon, Aug 8, 2011 at 9:48 PM, John Hendy jw.he...@gmail.com wrote:
 -batch -l ~/.emacs -eval

 Your problem is the long options are wrong. According to the manpages,
 there should be 2 hyphens.

 --eval and --batch.

Well, that might be *a* problem, but it's not *the* problem.

This produces the same results:
,---
| emacs --batch -l ~/.emacs --eval '(find-file-read-only ~/org/*.org t)' \
| --eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
`---

I get this from the command line:
,---
| ...~/org/rigor.org locked by jwhendy... (pid 10935): (s, q, p, ?)?
`---

Which means that when executed from cron, it won't proceed.

Also, good to know re. the man pages... however Worg is wrong, then.
Directly from Worg [1]:

,--
| Let's say you generate an export from the command line, such as the following:
| ,---
| | emacs -batch -l ~/.emacs -eval '(org-batch-agenda e)'
| `---
|
| or
|
| ,---
| |emacs -batch -l ~/.emacs -eval '(org-publish-all)'
| `---
`--

The manual contains the same syntax. [2]

[1] http://orgmode.org/worg/org-faq.html (see How can I preserve faces
when I export an agenda from the command line?).
[2] 
http://orgmode.org/manual/Extracting-agenda-information.html#Extracting-agenda-information


Best regards,
John



 GL

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread Nick Dokos
suvayu ali fatkasuvayu+li...@gmail.com wrote:

 Hi John,
 
 On Mon, Aug 8, 2011 at 9:48 PM, John Hendy jw.he...@gmail.com wrote:
  -batch -l ~/.emacs -eval
 
 Your problem is the long options are wrong. According to the manpages,
 there should be 2 hyphens.
 
 --eval and --batch.
 

Nope - emacs recognizes both (presumably the single hyphen ones are deprecated
but they still work:

emacs -batch -eval '(message foo)'

works fine.

Nick



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread Nick Dokos
John Hendy jw.he...@gmail.com wrote:

 On Mon, Aug 8, 2011 at 1:59 PM, suvayu ali fatkasuvayu+li...@gmail.com 
 wrote:
  Hi John,
 
  On Mon, Aug 8, 2011 at 8:53 PM, John Hendy jw.he...@gmail.com wrote:
  If you can use wildcards to specify your files, it might be possible by
  just one extra call to --eval. Something like this might work:
 
  emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard t)' \
       --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt
 
 
  Hmm. That might work. Everything I pull from is in ~/org... could the
  wildcard simply be ~/*.org? Forgive my emacs wildcard ignorance.
 
  As far as I know, emacs accepts any wildcard that is valid in the shell.
  Since all your files are in ~/org, I would say try ~/org/*.org. The
  '~/org/' limits it to files within your org directory and the '*.org'[1]
  limits it to all files with a .org extension.

Not true - if you want wildcards expanded, you have to do it yourself.
E.g. C-h f file-expand-wildcards

,
| file-expand-wildcards is a compiled Lisp function in `files.el'.
| 
| (file-expand-wildcards PATTERN optional FULL)
| 
| Expand wildcard pattern PATTERN.
| This returns a list of file names which match the pattern.
| 
| If PATTERN is written as an absolute file name,
| the values are absolute also.
| 
| If PATTERN is written as a relative file name, it is interpreted
| relative to the current default directory, `default-directory'.
| The file names returned are normally also relative to the current
| default directory.  However, if FULL is non-nil, they are absolute.
`

Nick

 
 
 Bummer, this is not working:
 
 ,---
 | emacs -batch -l ~/.emacs -eval '(find-file-read-only ~/org/*.org t)' \
 | -eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
 `---
 
 Do you see anything wrong with that? I guess I wonder what that first
 part will do as perhaps the org-batch-agenda command is not
 necessarily going to follow suit with the read-only command. As in,
 does the first eval command affect anything that the org-batch-agenda
 command is going to do? Is it trying to do the equivalent of opening
 up all *.org files in read-only buffers and then run the agenda
 export?
 
 
 Thanks,
 John
  I hope this helps. :)
 
  Footnotes:
 
  [1] The asterisk (*) stands for zero or more characters. You can find
     more details in `man bash` under the heading Pattern Matching.
 
  --
  Suvayu
 
  Open source is the future. It sets us free.
 
 



Re: [O] [PATCH] org.el: Preserve indentation of manually indented lines in example blocks.

2011-08-08 Thread Nicolas Goaziou
Hello,

Valentin Wüstholz wuesth...@gmail.com writes:

 lines in example blocks are currently indented like the surrounding
 begin and end delimiters. ¨This works fine unless, you want to indent
 some lines manually;

You may use colons instead. They are meant for this task. I.e.:

: some text
: ^

 in this case, auto-indenting the buffer reverts the manual
 indentation. This patch should prevent this from happening.

I don't think we should prevent that as it would be more hassle to cope
with the new behaviour than doing it with colons.

Regards,

-- 
Nicolas Goaziou



[O] [yasnippet] can not creating links with description

2011-08-08 Thread Karl Voit
Hi!

I'd like to create a link like

  [[file:~/share/all/org-mode/contacts.org::*foo][company:foo]]

... and therefore I created:

,[ ~/snippets/org-mode/vkcomp ]
| # name : expand link to company
| # --
| [[file:~/share/all/org-mode/contacts.org::*$1][company:$1]] $0
`

But: unfortunately my Org-mode behaves strangely when applying the
snippet: company: with blinking cursor in the «c» which does not
let me enter the string which replaces «$1».

I guess this is related to «hiding the actual link when a
description is set».

Can I define a snippet which behaves like following? After entering
the snippet command and pressing TAB, I get the chance to type «foo»
part and after another TAB, the link as stated above is finished and
the cursor is at the end.

Thanks!

-- 
Karl Voit




Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread John Hendy
On Mon, Aug 8, 2011 at 3:37 PM, Nick Dokos nicholas.do...@hp.com wrote:
 John Hendy jw.he...@gmail.com wrote:

 On Mon, Aug 8, 2011 at 1:59 PM, suvayu ali fatkasuvayu+li...@gmail.com 
 wrote:
  Hi John,
 
  On Mon, Aug 8, 2011 at 8:53 PM, John Hendy jw.he...@gmail.com wrote:
  If you can use wildcards to specify your files, it might be possible by
  just one extra call to --eval. Something like this might work:
 
  emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard t)' \
       --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt
 
 
  Hmm. That might work. Everything I pull from is in ~/org... could the
  wildcard simply be ~/*.org? Forgive my emacs wildcard ignorance.
 
  As far as I know, emacs accepts any wildcard that is valid in the shell.
  Since all your files are in ~/org, I would say try ~/org/*.org. The
  '~/org/' limits it to files within your org directory and the '*.org'[1]
  limits it to all files with a .org extension.

 Not true - if you want wildcards expanded, you have to do it yourself.
 E.g. C-h f file-expand-wildcards

 ,
 | file-expand-wildcards is a compiled Lisp function in `files.el'.
 |
 | (file-expand-wildcards PATTERN optional FULL)
 |
 | Expand wildcard pattern PATTERN.
 | This returns a list of file names which match the pattern.
 |
 | If PATTERN is written as an absolute file name,
 | the values are absolute also.
 |
 | If PATTERN is written as a relative file name, it is interpreted
 | relative to the current default directory, `default-directory'.
 | The file names returned are normally also relative to the current
 | default directory.  However, if FULL is non-nil, they are absolute.
 `


Thanks. I tried with this based on this new information:

,---
|  emacs --batch -l ~/.emacs --eval '(find-file-read-only \
| (file-expand-wildcards ~/org/*.org) t)' \
| --eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
`---

But I get this error:
,---
| Wrong type argument: stringp, (~/org/file1.org ~/org/file2.org... etc.)
`---

I'm assuming something about how I used this is returning the wrong data type?

As another option, if I run this and just respond with p when I'm
asked about the lock (proceed), it works. I'm assuming that running
agenda won't mess up an unsaved file, but that it just accesses it for
todos and other information. If this is the case and an automatic
proceed is safe... is there a way to pass some sort of --force
option to emacs from the command line to override the lock when it's
encountered?

I'm running through cron and thus am not able to manually respond to the prompt.


Thanks,
John

 Nick

 

 Bummer, this is not working:

 ,---
 | emacs -batch -l ~/.emacs -eval '(find-file-read-only ~/org/*.org t)' \
 | -eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
 `---

 Do you see anything wrong with that? I guess I wonder what that first
 part will do as perhaps the org-batch-agenda command is not
 necessarily going to follow suit with the read-only command. As in,
 does the first eval command affect anything that the org-batch-agenda
 command is going to do? Is it trying to do the equivalent of opening
 up all *.org files in read-only buffers and then run the agenda
 export?


 Thanks,
 John
  I hope this helps. :)
 
  Footnotes:
 
  [1] The asterisk (*) stands for zero or more characters. You can find
     more details in `man bash` under the heading Pattern Matching.
 
  --
  Suvayu
 
  Open source is the future. It sets us free.
 





Re: [O] [PATCH] org.el: Preserve indentation of manually indented lines in example blocks.

2011-08-08 Thread Valentin Wüstholz
Hi Nicolas.


 On Mon, Aug 8, 2011 at 10:40 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:
  Hello,
 
  Valentin Wüstholz wuesth...@gmail.com writes:
 
  lines in example blocks are currently indented like the surrounding
  begin and end delimiters. ¨This works fine unless, you want to indent
  some lines manually;
 
  You may use colons instead. They are meant for this task. I.e.:
 
  : some text
  : ^


Colons are great for short snippets. However, blocks are far more
convenient for longer passages.


  in this case, auto-indenting the buffer reverts the manual
  indentation. This patch should prevent this from happening.
 
  I don't think we should prevent that as it would be more hassle to cope
  with the new behaviour than doing it with colons.


I don't think that the behaviour is fundamentally different. Blocks
that were indented using the old behaviour will still be indented in
the same way. The new behaviour is mainly more flexible. What
potential hassle were you thinking of?

Best regards,

Valentin



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread Nick Dokos
John Hendy jw.he...@gmail.com wrote:

 On Mon, Aug 8, 2011 at 3:37 PM, Nick Dokos nicholas.do...@hp.com wrote:
  John Hendy jw.he...@gmail.com wrote:
 
  On Mon, Aug 8, 2011 at 1:59 PM, suvayu ali fatkasuvayu+li...@gmail.com 
  wrote:
   Hi John,
  
   On Mon, Aug 8, 2011 at 8:53 PM, John Hendy jw.he...@gmail.com wrote:
   If you can use wildcards to specify your files, it might be possible by
   just one extra call to --eval. Something like this might work:
  
   emacs --batch -l ~/.emacs --eval '(find-file-read-only wildcard 
   t)' \
        --eval '(org-batch-agenda w)'  ~/org/aux/agenda-export.txt
  
  
   Hmm. That might work. Everything I pull from is in ~/org... could the
   wildcard simply be ~/*.org? Forgive my emacs wildcard ignorance.
  
   As far as I know, emacs accepts any wildcard that is valid in the shell.
   Since all your files are in ~/org, I would say try ~/org/*.org. The
   '~/org/' limits it to files within your org directory and the '*.org'[1]
   limits it to all files with a .org extension.
 
  Not true - if you want wildcards expanded, you have to do it yourself.
  E.g. C-h f file-expand-wildcards
 
  ,
  | file-expand-wildcards is a compiled Lisp function in `files.el'.
  |
  | (file-expand-wildcards PATTERN optional FULL)
  |
  | Expand wildcard pattern PATTERN.
  | This returns a list of file names which match the pattern.
  |
  | If PATTERN is written as an absolute file name,
  | the values are absolute also.
  |
  | If PATTERN is written as a relative file name, it is interpreted
  | relative to the current default directory, `default-directory'.
  | The file names returned are normally also relative to the current
  | default directory.  However, if FULL is non-nil, they are absolute.
  `
 
 
 Thanks. I tried with this based on this new information:
 
 ,---
 |  emacs --batch -l ~/.emacs --eval '(find-file-read-only \
 | (file-expand-wildcards ~/org/*.org) t)' \
 | --eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
 `---
 
 But I get this error:
 ,---
 | Wrong type argument: stringp, (~/org/file1.org ~/org/file2.org... etc.)
 `---
 
 I'm assuming something about how I used this is returning the wrong data type?

Yes:

| This returns a list of file names which match the pattern.

so you have to loop over the list.

Nick

PS. BTW, don't take this as an endorsement of the course you are
following.  I don't have the time to think much about it, and I don't
have a better solution, but personally, I would try to find another
method: my knee-jerk reaction was to use emacsclient if emacs is running
(if not, fall back to emacs --batch: since no other instance is running,
you wouldn't have to deal with locking in that case).  But that may or
may not work - I just don't know.

 
 As another option, if I run this and just respond with p when I'm
 asked about the lock (proceed), it works. I'm assuming that running
 agenda won't mess up an unsaved file, but that it just accesses it for
 todos and other information. If this is the case and an automatic
 proceed is safe... is there a way to pass some sort of --force
 option to emacs from the command line to override the lock when it's
 encountered?
 
 I'm running through cron and thus am not able to manually respond to the 
 prompt.
 
 
 Thanks,
 John
 
  Nick
 
  
 
  Bummer, this is not working:
 
  ,---
  | emacs -batch -l ~/.emacs -eval '(find-file-read-only ~/org/*.org t)' \
  | -eval '(org-batch-agenda e)'  ~/org/aux/agenda-export.txt
  `---
 
  Do you see anything wrong with that? I guess I wonder what that first
  part will do as perhaps the org-batch-agenda command is not
  necessarily going to follow suit with the read-only command. As in,
  does the first eval command affect anything that the org-batch-agenda
  command is going to do? Is it trying to do the equivalent of opening
  up all *.org files in read-only buffers and then run the agenda
  export?
 
 
  Thanks,
  John
   I hope this helps. :)
  
   Footnotes:
  
   [1] The asterisk (*) stands for zero or more characters. You can find
      more details in `man bash` under the heading Pattern Matching.
  
   --
   Suvayu
  
   Open source is the future. It sets us free.
  
 
 
 



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread suvayu ali
Hi Nick,

On Mon, Aug 8, 2011 at 10:37 PM, Nick Dokos nicholas.do...@hp.com wrote:
  As far as I know, emacs accepts any wildcard that is valid in the shell.
  Since all your files are in ~/org, I would say try ~/org/*.org. The
  '~/org/' limits it to files within your org directory and the '*.org'[1]
  limits it to all files with a .org extension.

 Not true - if you want wildcards expanded, you have to do it yourself.
 E.g. C-h f file-expand-wildcards

I should have been more precise. I meant to say in the context of the
current function or other functions which _accept_ wildcards as valid
arguments. Of course internally they use file-expand-wildcards, easily
verified by looking at the source of find-file. :)

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Handling errors in command line exporting of agenda?

2011-08-08 Thread Nick Dokos
suvayu ali fatkasuvayu+li...@gmail.com wrote:

 Hi Nick,
 
 On Mon, Aug 8, 2011 at 10:37 PM, Nick Dokos nicholas.do...@hp.com wrote:
   As far as I know, emacs accepts any wildcard that is valid in the shell.
   Since all your files are in ~/org, I would say try ~/org/*.org. The
   '~/org/' limits it to files within your org directory and the '*.org'[1]
   limits it to all files with a .org extension.
 
  Not true - if you want wildcards expanded, you have to do it yourself.
  E.g. C-h f file-expand-wildcards
 
 I should have been more precise. I meant to say in the context of the
 current function or other functions which _accept_ wildcards as valid
 arguments. Of course internally they use file-expand-wildcards, easily
 verified by looking at the source of find-file. :)
 

No, you were precise enough, but I was too careless to see it (and of
course *knew* that find-file does not expand wildcards, even though the
last time I looked at the code or its doc was probably 20 years ago: I
have an inherent bias to assume that things don't change after I learn
about them :-) ).

You are right about find-file and friends re wildcards. I don't know why
this does not work:

$ emacs --batch --eval '(progn (find-file-read-only ~/lib/org/*.org t) 
(org-batch-agenda t))' 2/dev/null
Global list of TODO items of type: ALL
Available with `N r': (0)ALL

and nothing after it, but when I evaluate (org-batch-agenda t) in
the running emacs, I get everything.

Nick








Re: [O] [PATCH] org.el: Preserve indentation of manually indented lines in example blocks.

2011-08-08 Thread Nicolas Goaziou
Valentin Wüstholz wuesth...@gmail.com writes:

 Colons are great for short snippets. However, blocks are far more
 convenient for longer passages.

That's certainly true, but I fail to see an use case for such long
passages. May I know what you do have in mind?

 What potential hassle were you thinking of?

Being left with no more literal markup automatically indented. It's not
that your idea is bad, but there could be users appreciating the current
feature.

Perhaps this could be applied to verse blocks instead.

Regards,

-- 
Nicolas Goaziou



Re: [O] Refiling list items

2011-08-08 Thread Nicolas Goaziou
Jeff Horn jrhorn...@gmail.com writes:

 Thanks to Florian for sharing code. Nicolas, I still think this is a
 bug. I don't doubt extending org-refile would be messy. It's above my
 head, and I realize I'm asking a lot from anyone that would tackle
 this for me, but I still think its a bug.

Where is the bug? As far as I can see, you're expecting a function
designed for headlines only to operate on list items. Am I missing the
point?

 Your workaround sounds exactly like what org-refile is designed to
 avoid. Quoting the manual:

Except that I was suggesting to turn these instructions into a function,
not doing them manually.

 Of course, I can keep working for now, and I'll try Florian's code.
 Maybe it might be adaptable to a robust function called
 'org-refile-list-item'? Thanks for listening!

What would be the specifications of that function? Would it only send
the item at point to the end of the headline specified through the
refile interface?

Regards,

-- 
Nicolas Goaziou



Re: [O] Refiling list items

2011-08-08 Thread Nick Dokos
Jeff Horn jrhorn...@gmail.com wrote:

 So, as a user, I was expecting something to happen that didn't. That's
 a bug. That may be a misuse of the term, and I apologize for using it
 loosely.
 

It's a bug all right: the question is whether the bug is in the code,
in the docs or in the user's head ;-) 99.9% of the bugs I find are
in my head (most recently the find-file wildcard thing...)

Nick



Re: [O] Refiling list items

2011-08-08 Thread Nick Dokos
Jeff Horn jrhorn...@gmail.com wrote:

  What would be the specifications of that function? Would it only send
  the item at point to the end of the headline specified through the
  refile interface?
 
 I hope its clear that this is all above my head. I know enough to make
 suggestions, but not contribute to implementing them. That makes me a
 free-rider, but a free-rider that recognizes he's at the mercy of
 others' talents.
 

Ah, no - you don't get off that easily! This is not implementing
anything.  He is asking about your expectations:

If I have a list item here and I do an org-refile with such and such
arguments in a file that looks like so and so, I expect it to do such
and such. Instead it did this and that, which was rather surprising.
OTOH, if the list item is *there*... etc. etc.

I haven't read the thread (apologies) but ISTR you provided such a
description to begin with. What Nicolas is asking is: what should happen
in other cases of interest? You may want to cover just that one special
case, but an implementation has to worry about *all* cases[fn:1]:
otherwise, there *will* be bug reports in the very near future and guess
who their target will be (hint: it won't be you :-) )

Hope-your-sense-of-humor-is-working-today-ly yours,
Nick

Footnotes:

[fn:1] It might punt of course: cover the special case only and raise an
error in all other cases e.g., but that's not particularly appealing.



Re: [O] Refiling list items

2011-08-08 Thread Jeff Horn
On Mon, Aug 8, 2011 at 20:20, Nick Dokos nicholas.do...@hp.com wrote:
 Jeff Horn jrhorn...@gmail.com wrote:

  What would be the specifications of that function? Would it only send
  the item at point to the end of the headline specified through the
  refile interface?

 I hope its clear that this is all above my head. I know enough to make
 suggestions, but not contribute to implementing them. That makes me a
 free-rider, but a free-rider that recognizes he's at the mercy of
 others' talents.


 Ah, no - you don't get off that easily! This is not implementing
 anything.  He is asking about your expectations:

 I haven't read the thread (apologies) but ISTR you provided such a
 description to begin with. What Nicolas is asking is: what should happen
 in other cases of interest? You may want to cover just that one special
 case, but an implementation has to worry about *all* cases[fn:1]:
 otherwise, there *will* be bug reports in the very near future and guess
 who their target will be (hint: it won't be you :-) )

I see, thanks Nicholas. As a start, in a subjectively ideal world,
org-refile-list-item would work on list items:

1) and their children to arbitrary depth
2) in the current buffer, or any agenda file
3) using either path-like headline specification or IDO completion

But I'd settle for an in-buffer restriction like Florian used. I just
noticed org-goto makes the manual workaround a bit easier.

I guess this really amounts to the first time I've ever been convinced
that treating list items like headlines would be useful to me. At
least, it feels like list items might benefit from being a proper
subset of headlines. I don't remember what the disadvantages of such a
move would be, but I suspect there's a lot of tacit knowledge in the
codebase already.

 Hope-your-sense-of-humor-is-working-today-ly yours,

It is. :)

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/



Re: [O] Refiling list items

2011-08-08 Thread Jeff Horn
On Mon, Aug 8, 2011 at 20:40, Jeff Horn jrhorn...@gmail.com wrote:
 I see, thanks Nicholas. As a start, in a subjectively ideal world,
 org-refile-list-item would work on list items:

 1) and their children to arbitrary depth
 2) in the current buffer, or any agenda file
 3) using either path-like headline specification or IDO completion

 But I'd settle for an in-buffer restriction like Florian used. I just
 noticed org-goto makes the manual workaround a bit easier.

I should also note that having the only valid refile *target* as a
headline would be OK. More specifically, a list item refiled to a
target headline should be placed at the highest (list) level possible
within the headline, as my OP might have suggested. It would be nice
to have child hierarchy maintained in the move, however.

I don't expect a list item to be refiled to another arbitrary list
item. As a user, I wouldn't want to navigate that completion list.

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/



Re: [O] Refiling list items

2011-08-08 Thread Florian Beck
Jeff Horn jrhorn...@gmail.com writes:


 What would be the specifications of that function? Would it only send
 the item at point to the end of the headline specified through the
 refile interface?

 I hope its clear that this is all above my head. I know enough to make
 suggestions, but not contribute to implementing them. That makes me a
 free-rider, but a free-rider that recognizes he's at the mercy of
 others' talents.

The thing is, the code I sent you is just that: a shortcut for killing
an item and pasting it at a refile location. Orgs refiling interface
goes to a lot of trouble to do the right thing. Nicolas already
mentioned reparing the list and updating checkboxes, both of which never
was an issue for me.

FWIW, refiling items seems like a natural extension to me. In any case,
it is not about you being able to specify or implement a function. But I
found it very helpful to pick up just enough elisp to automate tasks.

-- 
Florian Beck



Re: [O] Refiling list items

2011-08-08 Thread suvayu ali
On Tue, Aug 9, 2011 at 2:02 AM, Nick Dokos nicholas.do...@hp.com wrote:
 99.9% of the bugs I find are
 in my head (most recently the find-file wildcard thing...)


I think you can let that go now :D

 Nick



-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] [PATCH] org.el: Preserve indentation of manually indented lines in example blocks.

2011-08-08 Thread Valentin Wüstholz
Hi Nicolas,

thanks for the quick response.


On Tue, Aug 9, 2011 at 12:33 AM, Nicolas Goaziou n.goaz...@gmail.com wrote:
 Valentin Wüstholz wuesth...@gmail.com writes:

 Colons are great for short snippets. However, blocks are far more
 convenient for longer passages.

 That's certainly true, but I fail to see an use case for such long
 passages. May I know what you do have in mind?


Sure. At least four use cases come to my mind for this: (a) literal
console output, (b) blocks of pseudo code (can't really use SRC blocks
since there is no actual language for this), (c) blocks of source code
in experimental or little known programming languages (ditto), and (d)
sketches of mathematical proofs or computations where you don't want
to mess with LaTeX typesetting (yet). More generally, every long
passage where you would like indentation to be treated literally (not
only by an exporter, but also by the automatic indenter).


 What potential hassle were you thinking of?

 Being left with no more literal markup automatically indented. It's not
 that your idea is bad, but there could be users appreciating the current
 feature.


I certainly thought about existing users, which is why by default
lines are is still indented like before. If you care about automatic
indentation, your example blocks are already indented like the
delimiters and the new behaviour keeps it just like that. If you
previously chose to indent you blocks differently, the new behaviour
will respect that decision by not messing with your indentation.


 Perhaps this could be applied to verse blocks instead.


As far as I recall verse blocks are treated somewhat differently from
example blocks by the exporter (e.g. verse vs verbatim in LaTeX).
Initially, I thought about allowing no specific language in SRC
blocks. However, this seems somewhat counterintuitive to me.

Best regards,

Valentin



Re: [O] [bug] org-inlinetask produces invalid xhtml

2011-08-08 Thread Jambunathan K
Nicolas Goaziou n.goaz...@gmail.com writes:

 Hello,

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

 Summary: org-inlinetask produces invalid xhtml

 I've pushed a fix. Is it correct now?

The problem persists. You can put the exported html file in nxml-mode
and do a C-c C-n to find the validation errors.

I am attaching the two examples and the problematic html segment (marked
with VALIDATION ERROR) here. Note that one of the examples has a list in
the inline task.


* B oscillations
This is Suvayu's example but simplified. Also see the annotation
within the inline task itself.

_Questions_:
*** Detector effects :Qn:
1. How is the Gaussian used for smearing of proper time resolution
   derived? [[http://www.google.com][Google]] this.
2. Why is the proper time error PDF needed? Why is
   smearing of time resolution not enough?
*** END



#+begin_src nxml
pre class=inlinetaskbDetector effects/bbr /
ol !-- VALIDATION ERROR HERE: Element not allowed in this context --
  liHow is the Gaussian used for smearing of proper time resolution
  derived? a href=http://www.google.com;Google/a this.
  /li
  liWhy is the proper time error PDF needed? Why is
  smearing of time resolution not enough?
  /li
/ol
#+end_src

* B oscillations
This is Suvayu's example but simplified. Also see the annotation
within the inline task itself.

_Questions_:
*** Detector effects :Qn:
Suvayu's example uses lists within inline task. Can the html export
engine produce valid html when the inline task has lists. But honestly
why does a preformatted text looks like a well-formatted html
list. Isn't that strange. Just uncomment the below list and see for
yourself.
*** END


#+begin_src nxml
div id=outline-container-1 class=outline-2
  h2 id=sec-1span class=section-number-21/span B oscillations /h2
  div class=outline-text-2 id=text-1

pThis is Suvayu's example but simplified. Also see the annotation
within the inline task itself.
/p
p
  span style=text-decoration:underline;Questions/span:
/p


pre class=inlinetaskbDetector effects/bbr /
p !-- VALIDATION ERROR: Element not allowed in this context --
  Suvayu's example uses lists within inline task. Can the html export
  engine produce valid html when the inline task has lists. But honestly
  why does a preformatted text looks like a well-formatted html
  list. Isn't that strange. Just uncomment the below list and see for
  yourself.
/pre !-- VALIDATION ERROR: Missing end-tag p --

  /p/div !-- VALIDATION ERROR: Mismatched end-tag --
/div
#+end_src


--