Re: [O] Updated syntax for #+bind and no LaTeX \maketitle command?

2013-05-23 Thread Nick Dokos
Nick Dokos  writes:

>> #+bind: org-latex-title-command ""
>>
>> This is still generating a \maketitle line in my .tex file.
>>
>> What's the proper way to do this on Org 8.0?
>>
>>
>
> I suspect this is the same problem as the one discussed in the following:
>
>http://thread.gmane.org/gmane.emacs.orgmode/72085
>
> Nicolas suggested using a file local variable for that problem and I've
> verified that that solution also works for this one. Just add
>
> # Local Variables:
> # org-latex-title-command: ""
> # End:
>
> at the end of your file.

No, I'm wrong: it's not the same problem. And using BIND should
work in this case, assuming that it is allowed.

Check the value of org-export-allow-bind-keywords. If nil, then
BIND keywords seem to be ignored silently.

-- 
Nick




Re: [O] Updated syntax for #+bind and no LaTeX \maketitle command?

2013-05-23 Thread Nick Dokos
John Hendy  writes:

> I sometimes don't want a title in my LaTeX exported documents and used to use:
>
> #+bind: org-export-latex-title-command ""
>
> in my documents. I see that the new variable is simply
> =org-latex-title-command= and now have:
>
> #+bind: org-latex-title-command ""
>
> This is still generating a \maketitle line in my .tex file.
>
> What's the proper way to do this on Org 8.0?
>
>

I suspect this is the same problem as the one discussed in the following:

   http://thread.gmane.org/gmane.emacs.orgmode/72085

Nicolas suggested using a file local variable for that problem and I've
verified that that solution also works for this one. Just add

--8<---cut here---start->8---
# Local Variables:
# org-latex-title-command: ""
# End:
--8<---cut here---end--->8---

at the end of your file.
-- 
Nick




Re: [O] [NEW FEATURE] org-hlc.el - hidden-lines-cookies (hlc) for Org-mode

2013-05-23 Thread Nick Dokos
Thorsten Jolitz  writes:

>> , and it should be hooked somehow into the folding/unfolding routines
>> to auto-update.
>
> Thats what I thought too, but I ran into a problem I could not solve so
> far, so this user-command based implementation (show the cookies on
> demand) is kind of the second-best solution (better then nothing). 
>
> Here is a thread related to the problem mentioned, unfortunately with no
> posts except my own so far:
>
> ,---
> | http://lists.gnu.org/archive/html/help-gnu-emacs/2013-05/msg00511.html
> `---

You can try increasing max-specpdl-size: read the doc for it. If you are
asking for a bounded amount of resources but that amount is bigger than
what emacs is willing to give you, then increasing the size should work.
OTOH, if you are asking for unlimited resources (e.g. you have an
infinite recursion somewhere), then increasing the limit will only allow
you to go a little further before blowing up again.

So try making it 10 or even 100 times bigger and see what you get (and
try it on a throwaway emacs instance, not the working instance). If it
still blows up, you'll have to look at your code carefully: chances are
there is a programming error.
-- 
Nick




Re: [O] (Potential) new feature for Org-mode: "hidden-lines cookies"

2013-05-23 Thread Suvayu Ali
On Thu, May 23, 2013 at 10:39:03AM +0200, Sebastien Vauban wrote:
> Hi Suvayu, Thorsten,
> 
> Suvayu Ali wrote:
> >> Now I wonder if such a feature already exists in Org-mode (I would not
> >> be surprised, but I'm not aware of it) and if anybody would be
> >> interested in having such a feature?
> >
> > As per my understanding, there is no such feature; and as a user, I
> > would love it!
> 
> It does exist in the "Org-mode clone for Vim", but not yet in Org...

VimOrganizer although really cool, is not Emacs Org-mode ;).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Rasmus
Bastien  writes:

> Hi Suvayu,
>
> Suvayu Ali  writes:
>
>> I believe you can use git for this.  Try
>>
>>   $ git clean -n -x
>
> I didn't know this git command, neat!
>
> The problem we were discussing is different: it's about deleting
> HTML pages that have been published and that have no corresponding
> .org file anymore -- the way I do this for other projects of mine
> is to delete all HTML files and republish my project, but we don't
> want to take that route here...

Couldn't we just compare input and output?  Or is that not safe
enough?  E.g. in an over-simplistic form obtain dead pages via
something like this:

#+BEGIN_SRC emacs-lisp
(let* ((html '("dir1/my-page1.html" 
  "dir2/my-page2.html"
  "dir2/my-page3.html"
  "dir2/my-page4.html"
  "dir3/my-page4.html")) 
   (org '("dir1/my-page1.org" 
 "dir2/my-page2.org"
 "dir3/my-page4.org"))
   (html-sans-extensions (mapcar 'file-name-sans-extension html))
   (org-sans-extensions (mapcar 'file-name-sans-extension org)))
  (mapcar (lambda (x) (concat x ".html"))
  (dolist (x org-sans-extensions html-sans-extensions)
   (setq html-sans-extensions (remove x html-sans-extensions)
#+END_SRC


-- 
A clever person solves a problem. A wise person avoids it




Re: [O] [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x

2013-05-23 Thread Anupam Sengupta

Hi Bastien,


>> Loading tags from a #+SETUPFILE is causing inconsistent behavior
>> in the tag-selection for both in-buffer selection via C-c C-q
>> (`org-set-tags-command`) and in-agenda selection via :
>> (`org-agenda-set-tags`).

Bastien> Thanks a lot for reporting this and for the test case, it
Bastien> should be fixed now.

Bastien> All: the fix involves checking for a #+setupfile directive
Bastien> when processing Org buffers for building the agenda.  This
Bastien> may lead to some slow down when your agenda is built from
Bastien> many files.  Let me know if you notice some weirdness.

Thanks a lot for the fix.  The test files are now behaving properly
after the fix (I am on orgmode git development head at commit
36848fdec9eb8c9c17a2e98cd742af1f9f9b23db as on 23rd May).

*However*, while testing this fix, I think I have uncovered a few more bugs(?)
with the +SETUPFILE interaction with the in-buffer tag selection.

Specifically, if the +SETUPFILE contains /any/ of the following
directives (not exhaustive, just what my setup happened to have), then
the tag listing in the completion buffer is showing _duplicated lists_
of the tags read from the setup file:

+STARTUP
+OPTIONS
+TYP_TODO
+CHOOSE_TODO

I have expanded the test case to include this scenario:

The setup file
==
##+STARTUP: align

##+OPTIONS: timestamp:t
##+TYP_TODO: TODO(t) DELEGATED(l!) | DONE(d)
##+CHOOSE_TODO: NO(,-) YES(,0)

#+TAGS: { @work(w) @home(h) }

The test orgmode file
=
#+SETUPFILE: ~/setup.org
#+TAGS: call(l) email(e)

* The top entry 
   :@work:call:
  SCHEDULED: <2013-05-14 Tue>


Note that in the setup file, I have commented out every option other
than +STARTUP and +TAGS.  In this case, the in-buffer tag selection
results in a tag selection display of:


Inherited:
Current:@work call

  [l] call[e] email
{ [w] @work   [h] @home   }
{ [w] @work   [h] @home   }   <- Note the duplicated listing


If you comment the +STARTUP option in the setup.org file, then the tag
selection behaves as expected.  Alternatively, if you enable any of
the other options, then the issue reoccurs.

Thanks!
--
Anupam


Re: [O] #+ATTR_LaTeX no longer honoured

2013-05-23 Thread Rasmus
Paul Stansell  writes:

>> here's the line you're looking for:
>> 
>> #+ATTR_LaTeX: :width 5cm :options angle=90
>
> Thanks very much, that does what I want.
>
> Also, regarding the manual being up-to-date or not, I took my instructions
> from the page at http://orgmode.org/manual/Images-in-LaTeX-export.html which
> does seem out of date as it says one should use

I don't know what that page is and I can't find it in the manual.  It
seems like it somehow an outdated pages which is part of an older
version of the manual. 

Check out section 12.7 in the manual:

   http://orgmode.org/manual/index.html

–Rasmus

-- 
May contains speling mistake




Re: [O] Using org to create a TOC for a compilation of separate PDF documents

2013-05-23 Thread Rasmus
John Hendy  writes:

> I have a use case and am not sure if Org would help or not. I've
> downloaded a bunch of technical data sheets on various materials from
> a vendor. I'd like to create a "booklet" of them with a cover page
> table of contents.

You can use pdfpages for this.  There's a command for inserting page
links and everything.  There's also a booklet option for this which I
haven't used in a while.

Also, do try pdfjam.  It is the most amazing thing that has come out
of Warwick!  (And Warwick is good :)


> I can create the booklet very easily with Stapler (or similar), but am
> not sure on the best way to generate a clickable linked PDF of the
> individual materials contained in the compiled document.[1] What I'm
> not sure on is how to create a table of contents.

If you want a more hackish solution you can adapt the stuff I post in
the end for your needs.  What you'll need is just to incorporate
hyperref which I think you can do with pdfpages or perhaps even
vanilla hyperref.  Let me know if it's causing trouble 'cause I did it
some years back. . .


> Ideally, I could do something like generate a page count of each
> document and then use this to create the page numbers I'd use to
> create links to, which I thought I could do with Org. Even better
> would be to have [back to top] links as well, since this will end up
> being a multi-hundred page booklet (~100 documents of 2-4 pages each).

Go out should be easy.  Page count is easy. 

For a get home key you might overlay a button with tikz and
hyperref. . .  I show how to make an overlay on all sites.  You'd
somehow want to only do it on the first side perhaps.  You'd do this
by inducing to pdfpages commands and only have a pageCommand on the
first page (for instance).  

OR add hyperlinks and have a site bar/index  curtisy of hyperref.

> Is it easier to just generate a list of files and use Org to "include"
> them somehow via LaTeX instead of using Stapler to combine them?

I used to do stuff like this in LaTeX.  I'm quite happy to organize it
in Org via tables. 

I've included two examples in the following gist.  Note, I wrote them
quickly and I didn't know (and still don't) any Emacs Lisp.  The LaTeX
functions are super ugly as well, but they get stuff done.  Hopefully
you can find some inspiration.

https://gist.github.com/anonymous/5640444

–Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!



Re: [O] org-blog 0.9 release

2013-05-23 Thread Matt Price
On Wed, May 1, 2013 at 7:04 AM, Puneeth Chaganti  wrote:
> Mike,
>
> On Wed, May 1, 2013 at 4:18 PM, Michael Alan Dorman
>  wrote:
>> Puneeth Chaganti  writes:
>>> Or, if it seems reasonable, we could club the two projects into a
>>> single one to give the users something that's better than a sum of the
>>> parts!
> [..]
>> If you don't mind, I will start looking at the org2blog code and seeing
>> how cleanly I can implement these additional capabilities as handlers or
>> filters for the exporter---and then maybe we could look for that
>> back-end to live in contrib, and both our codebases could take advantage
>> of it?
>
> That seems like a good plan.  I've been meaning to get this going for
> some time, but have been quite busy off-late.  I'll try to make some
> time for it, soon.
>

Hi guys!

Was there ever any progress on this?  I code so slowly I'd not likely
be much help with the actual implementation but would be happy to pull
from git and do some testing if that's of any use.


Thanks!
Matt



> Thanks!
> Puneeth
>



[O] org-element

2013-05-23 Thread Daimrod
Hi,

I'm playing a bit with org-element for org-contacts and I wanted to know
what is the prefered way to change an element.

For example, ATM, when I want to change an element property to add a new
value, I do:

#+BEGIN_SRC emacs-lisp
  (org-entry-put nil property
 (concat (org-entry-get nil property)
 " " new-value))
#+END_SRC

Is it the correct way? IMHO it would be nicer if we could modify an
object created by the new parser and write it back but I don't think
it is possible (yet?).

Regards,

-- 
Daimrod/Greg


pgpZ70aTA0Nyn.pgp
Description: PGP signature


Re: [O] Updated syntax for #+bind and no LaTeX \maketitle command?

2013-05-23 Thread Rasmus
John Hendy  writes:

> I sometimes don't want a title in my LaTeX exported documents and used to use:
>
> #+bind: org-export-latex-title-command ""
>
> in my documents. I see that the new variable is simply
> =org-latex-title-command= and now have:
>
> #+bind: org-latex-title-command ""
>
> This is still generating a \maketitle line in my .tex file.

Does either of solutions work in your case?

#+BEGIN_SRC org
#+TITLE:
* My document without title
  . . . By setting TITLE to nil 
#+END_SRC 

#+BEGIN_SRC org
#+TITLE: my-title
#+BEGIN_SRC emacs-lisp :exports none
(set (make-local-variable 'org-latex-title-command) "")
#+END_SRC 
* My document without title
  . . . By changing the command with babel
#+END_SRC 

#+BEGIN_SRC org

#+TITLE: with title
#+BEGIN_SRC emacs-lisp :exports results
(set (make-local-variable 'org-export-allow-bind-keywords) t)
#+END_SRC
#+BIND: org-latex-title-command ""
* without title
  using and allowing bind. 
#+END_SRC

-- 
I almost cut my hair, it happened just the other day




Re: [O] Updated syntax for #+bind and no LaTeX \maketitle command?

2013-05-23 Thread Marcin Borkowski
Dnia 2013-05-23, o godz. 17:48:59
John Hendy  napisał(a):

> I sometimes don't want a title in my LaTeX exported documents and
> used to use:
> 
> #+bind: org-export-latex-title-command ""
> 
> in my documents. I see that the new variable is simply
> =org-latex-title-command= and now have:
> 
> #+bind: org-latex-title-command ""
> 
> This is still generating a \maketitle line in my .tex file.
> 
> What's the proper way to do this on Org 8.0?
> 
> 
> Thanks!
> John
> 

Hi John,

with the caveat that I don't use Org exporter, so I'm not sure whether
this will help: a (dirty) TeX trick would be to say
\let\maketitle=\relax somewhere in the preamble. (\relax is TeX's
no-op.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



[O] Updated syntax for #+bind and no LaTeX \maketitle command?

2013-05-23 Thread John Hendy
I sometimes don't want a title in my LaTeX exported documents and used to use:

#+bind: org-export-latex-title-command ""

in my documents. I see that the new variable is simply
=org-latex-title-command= and now have:

#+bind: org-latex-title-command ""

This is still generating a \maketitle line in my .tex file.

What's the proper way to do this on Org 8.0?


Thanks!
John



Re: [O] Using org to create a TOC for a compilation of separate PDF documents

2013-05-23 Thread John Hendy
On Thu, May 23, 2013 at 5:20 PM, Suvayu Ali  wrote:
> On Thu, May 23, 2013 at 03:21:56PM -0500, John Hendy wrote:
>>
>> Is it easier to just generate a list of files and use Org to "include"
>> them somehow via LaTeX instead of using Stapler to combine them?
>
> I would use a shell script to write an Org file with headlines derived
> from the filenames and include the PDFs with pdfpages.
>

Thanks to your and Martin. I've not used that package, so I'll check
it out and let you know if I have any issues (perhaps off-line to
Martin if I end up not actually using Org). But using babel to just
generate the LaTeX code would be great!


Thanks again,
John

> Hope this helps,
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>



Re: [O] Indentation of code blocks within lists

2013-05-23 Thread Sebastien Vauban
Hello Francesco,

That won't help you, but I've already sent questions on this problem, last
year (Org < 8). See my post on
http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00247.html.

Though, it's (for me) still unfixed as of today.

The good news is that Nicolas seemed OK to look at it, and find a solution for
it...

Best regards,
  Seb

"Francesco Pizzolante" wrote:
> I'd like to let you know about issues I'm having while trying to put source
> code blocks within lists.
>
> Here's my example and how I indent it:
>
> * First situation
>
> - My first bullet
>
>   We need to do this:
>
>   #+begin_src emacs-lisp
>   (message "this is a string")
>   (defun x()
> "Doc..."
> (interactive)
> (message "hello"))
>   #+end_src
>
> - My second bullet
>
>   #+begin_src emacs-lisp
>   "test"
>   #+end_src
>
>   #+results:
>   : test
>
>   - Sub-point of second bullet
>
> We need to do this as well:
>
> #+begin_src emacs-lisp
> (sort)
> #+end_src
>
> This way if indenting code blocks has the following advantages:
>
> - it looks nice;
>
> - thanks to the indentation, you directly know at which list level the code
>   block belongs to;
>
> - you can easily use Emacs commands (like `C-x TAB') on regions or Org
>   promote/demote commands on items or subtrees to edit and reorganize your
>   text: "relative" indentation is preserved in all cases.
>
> But, I have 2 issues with it:
>
> - when using `C-c '' (`org-edit-special'), I see spaces before my code, while
>   I would expect to see my code starting at column 0 in the edit buffer (the
>   "reference" column for the "margin" being, here, the column with the '#'
>   from '#+begin_src';
>
> - when exporting, the spaces from column 0 to the start of my code are also
>   exported, while I would again expect these spaces to be ignored for the
>   export.
>
> The only way I found to fix these issues is to edit my text like this (and
> make any code to start in column 0):
>
> - My first bullet
>
>   We need to do this:
>
>   #+begin_src emacs-lisp
> (message "this is a string")
> (defun x()
>   "Doc..."
>   (interactive)
>   (message "hello"))
>   #+end_src
>
> - My second bullet
>
>   #+begin_src emacs-lisp
> "test"
>   #+end_src
>
>   #+results:
>   : test
>
>   - Sub-point of second bullet
>
> We need to do this as well:
>
> #+begin_src emacs-lisp
> (sort)
> #+end_src
>
> But:
>
> - as you can see, the text does not look anymore as nice as in the previous
>   example;
>
> - I'm no longer able to edit and reorganize the text using Emacs `C-x TAB'
>   command. That command becomes "forbidden" as it can't correctly respect the
>   indentation requirements:
>
>   + starting at column 0 for code;
>
>   + relative for list items (depending on their depth);
>
> - even Org promote/demote commands are buggy in this case: as a simple
>   example, when I try to promote (with M-Shift-Left) the last point "Sub-point
>   of second bullet" I get an error ("indent-line-to: Wrong type argument:
>   wholenump, -2" ) and the following half-baked result:
>
>   - Sub-point of second bullet
>
> We need to do this:
>
> #+begin_src emacs-lisp
> (sort)
>   #+end_src
>
>   The "#+end_src" line got misaligned.
>
> So, my question is the following: is there a way to edit my text as shown in
> the first example and edit/export it ignoring the "margin" spaces?
>
> Any help is welcome.
>
> Thanks a lot,
>  Francesco

-- 
Sebastien Vauban




Re: [O] Using org to create a TOC for a compilation of separate PDF documents

2013-05-23 Thread Suvayu Ali
On Thu, May 23, 2013 at 03:21:56PM -0500, John Hendy wrote:
> 
> Is it easier to just generate a list of files and use Org to "include"
> them somehow via LaTeX instead of using Stapler to combine them?

I would use a shell script to write an Org file with headlines derived
from the filenames and include the PDFs with pdfpages.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Using org to create a TOC for a compilation of separate PDF documents

2013-05-23 Thread Marcin Borkowski
Dnia 2013-05-23, o godz. 15:21:56
John Hendy  napisał(a):

> I have a use case and am not sure if Org would help or not. I've
> downloaded a bunch of technical data sheets on various materials from
> a vendor. I'd like to create a "booklet" of them with a cover page
> table of contents.
> 
> I can create the booklet very easily with Stapler (or similar), but am
> not sure on the best way to generate a clickable linked PDF of the
> individual materials contained in the compiled document.[1] What I'm
> not sure on is how to create a table of contents.
> 
> Ideally, I could do something like generate a page count of each
> document and then use this to create the page numbers I'd use to
> create links to, which I thought I could do with Org. Even better
> would be to have [back to top] links as well, since this will end up
> being a multi-hundred page booklet (~100 documents of 2-4 pages each).
> 
> Any thoughts on this?
> 
> Is it easier to just generate a list of files and use Org to "include"
> them somehow via LaTeX instead of using Stapler to combine them?

I'd just use LaTeX's pdfpages package, possibly with hyperref.  (If you
encounter any problems, email me - I've done similar things before, so
I guess I could help you.)

> Thanks for any suggestions!
> John

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] MobileOrg for iOS approved and soon to be available in the app store

2013-05-23 Thread Greg Minshall
> For those interested in MobileOrg on iOS devices, it has been approved
> and will be back in the store soon, it can take up to 24 hours to
> become available.

awesome!!  thanks *very* much!!



Re: [O] Minor problems with dvipng latex image preview

2013-05-23 Thread Nick Dokos
Nicolas Goaziou  writes:

> Nick Dokos  writes:
>
>> I learnt quite a bit from this discussion (thank you!), but I'm still a
>> bit puzzled about your reluctance that custom options be added to the
>> latex call. Why is that? Too many customizations? dvipng should be
>> deprecated?  Too many twisty passages to explain?
>
> Huh? I'm not reluctant to anything with regards to this discussion. I'm
> just suggesting solutions to your problem.
>

Ah, OK - sorry I misunderstood.

> Anyway, in a nutshell, your proposal is to:
>
>   - add a custom variable, e.g., `org-latex-dvi-process-options' (which
> library should it belong to?)

Unless it would make sense to toss the whole dvipng thing overboard and
just keep imagemagick.

>   - modify `org-latex-listings' docstring (in particular, add third
> elements and new custom variable)

I'm not sure any more that it can all be explained clearly in the
docstring (at least I've been trying different mental gyrations and I
have not come up with anything satisfactory). So maybe the thing to do
is add a page to worg and a pointer to it in the docstring. If that's
acceptable, I volunteer to write the worg page (at least the initial
version).

As a separate issue, I proposed some debugging aids:

>   - add a custom variable, e.g., `org-latex-dvi-process-debug', which,
> when non-nil asks to leave produced "tex" file.
>

... and a call-process-log function that logs the command in *Messages*
before executing it with call-process (or something more or less
equivalent). It would be used wherever call-process is used now.

I would actually propose that the debug variable inhibit the deletion
of intermediate files everywhere, not just in latex preview.

-- 
Nick




Re: [O] #+ATTR_LaTeX no longer honoured

2013-05-23 Thread Paul Stansell
> here's the line you're looking for:
> 
> #+ATTR_LaTeX: :width 5cm :options angle=90

Thanks very much, that does what I want.

Also, regarding the manual being up-to-date or not, I took my instructions
from the page at http://orgmode.org/manual/Images-in-LaTeX-export.html which
does seem out of date as it says one should use

  #+ATTR_LaTeX: width=5cm,angle=90

Regards,

Paul







[O] Using org to create a TOC for a compilation of separate PDF documents

2013-05-23 Thread John Hendy
I have a use case and am not sure if Org would help or not. I've
downloaded a bunch of technical data sheets on various materials from
a vendor. I'd like to create a "booklet" of them with a cover page
table of contents.

I can create the booklet very easily with Stapler (or similar), but am
not sure on the best way to generate a clickable linked PDF of the
individual materials contained in the compiled document.[1] What I'm
not sure on is how to create a table of contents.

Ideally, I could do something like generate a page count of each
document and then use this to create the page numbers I'd use to
create links to, which I thought I could do with Org. Even better
would be to have [back to top] links as well, since this will end up
being a multi-hundred page booklet (~100 documents of 2-4 pages each).

Any thoughts on this?

Is it easier to just generate a list of files and use Org to "include"
them somehow via LaTeX instead of using Stapler to combine them?


Thanks for any suggestions!
John

[1] https://github.com/fwenzel/stapler



Re: [O] [PATCH] Export: Override headline numbering via properties

2013-05-23 Thread Nicolas Goaziou
Hello,

Thanks for your patch.

> An alternative would be to stick this into ox-latex.el, which then
> wouldn't interfere with other backends.
>
> I also think this functionality is good to have, since longer latex
> documents often have unnumbered sections (and there seem to be
> periodic questions on various boards on how to achieve this).  While
> one can mess around with the latex code, it's often a hassle when the
> "master" document is in org and you need to recompile often.
>
> For a recent project I needed a super-simple way to turn off numbering
> (for intro and references), so based on the above I made the following
> tiny modification to ox-latex.el, which looks up the "LATEX_NUMBERED"
> property to decide whether to insert a numbered or unnumbered heading.
> Since I didn't need it, inheritance isn't in here, but it should be
> simple enough to add.
>
> Since this wouldn't interfere with any other backends, perhaps there
> will be fewer reservations about merging something like this into the
> repo?

If it has to be implemented, I think that's the most reasonable solution
for now. For other back-ends, manual numbering specifications are just
too vague to lead to useful code.

> --
> diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
> index 41cf1d0..33a39c7 100644
> --- a/lisp/ox-latex.el
> +++ b/lisp/ox-latex.el
> @@ -1369,7 +1369,11 @@ holding contextual information."
>(unless (org-element-property :footnote-section-p headline)
>  (let* ((class (plist-get info :latex-class))
>(level (org-export-get-relative-level headline info))
> -  (numberedp (org-export-numbered-headline-p headline info))
> +  (latex-numbered (org-export-get-node-property :LATEX_NUMBERED 
> headline))
> +  (numberedp
> +   (cond ((equal latex-numbered "n") nil)
> + ((equal latex-numbered "y") t)
> + (t (org-export-numbered-headline-p headline info

I'd rather have "nil", anything but "nil" and property not set.

It also needs proper documentation in org.texi.


Regards,

-- 
Nicolas Goaziou



Re: [O] conflict load of epresent - org mode 8.0.3

2013-05-23 Thread d . tchin
Hi,


If the intention is to use epresent with org file, is it necessary to put
the following instructions in epresent.el and epresent-org.el?

(require 'ox)
(require 'ox-latex)

I suppose that when a org file is loaded, this library and corresponding are
already loaded, so these intructions may be not needed ?


Thanks

  writes:







Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Suvayu Ali
On Thu, May 23, 2013 at 07:54:12PM +0200, Bastien wrote:
> Hi Suvayu,
> 
> Suvayu Ali  writes:
> 
> > I believe you can use git for this.  Try
> >
> >   $ git clean -n -x
> 
> I didn't know this git command, neat!
> 
> The problem we were discussing is different: it's about deleting
> HTML pages that have been published and that have no corresponding
> .org file anymore -- the way I do this for other projects of mine
> is to delete all HTML files and republish my project, but we don't
> want to take that route here...

Ahh sorry, I realised the problem but overlooked that this removes all
html files!  It's end of the day after all :-p.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi Bastien,

Bastien wrote:

> Hi Viktor,
> 
> Viktor Rosenfeld  writes:
> 
> > The files are:
> > - http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> > - http://orgmode.org/worg/org-tutorials/koma-letter-example.html
> >
> > Sorry for the inconvenience.
> 
> Deleted, thanks.

Thanks!
 
> > Is there also a way not to publish Org files to HTML which are checked
> > into the Worg repository? 
> 
> We could use an :exclude directive in the publishing project, but
> I'd rather not go this way, too mush maintainance hassle for fixing
> ~zero inconvenience...
> 
> > I am asking because the file
> > http://orgmode.org/worg/exporters/koma-letter-example.html could also be
> > deleted. It is created from
> > http://orgmode.org/worg/sources/exporters/koma-letter-example.org which
> > is included as an example in
> > http://orgmode.org/worg/sources/exporters/koma-letter-export.org. But
> > the HTML file is not linked anywhere.
> 
> Well, it does not hurt that much to have this orphan HTML page.

I agree.

Cheers,
Viktor

> 
> HTH,
> 
> -- 
>  Bastien
> 



Re: [O] [bug] org-capture fails with undefined org-time-was-given variable

2013-05-23 Thread Bastien
Hi Eric,

Eric S Fraga  writes:

> I've had a look at the source (reasonably up to date) but this variable
> does not seem to be something I should be setting.  Is my capture rule
> somehow wrong?  Or is this a bug in org-capture?

I can't reproduce this... can you reproduce the problem with emacs -Q?

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Suvayu,

Suvayu Ali  writes:

> I believe you can use git for this.  Try
>
>   $ git clean -n -x

I didn't know this git command, neat!

The problem we were discussing is different: it's about deleting
HTML pages that have been published and that have no corresponding
.org file anymore -- the way I do this for other projects of mine
is to delete all HTML files and republish my project, but we don't
want to take that route here...

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Viktor,

Viktor Rosenfeld  writes:

> The files are:
> - http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> - http://orgmode.org/worg/org-tutorials/koma-letter-example.html
>
> Sorry for the inconvenience.

Deleted, thanks.

> Is there also a way not to publish Org files to HTML which are checked
> into the Worg repository? 

We could use an :exclude directive in the publishing project, but
I'd rather not go this way, too mush maintainance hassle for fixing
~zero inconvenience...

> I am asking because the file
> http://orgmode.org/worg/exporters/koma-letter-example.html could also be
> deleted. It is created from
> http://orgmode.org/worg/sources/exporters/koma-letter-example.org which
> is included as an example in
> http://orgmode.org/worg/sources/exporters/koma-letter-export.org. But
> the HTML file is not linked anywhere.

Well, it does not hurt that much to have this orphan HTML page.

HTH,

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi Bastien,

Bastien wrote:

> Hi Viktor,
> 
> Viktor Rosenfeld  writes:
> 
> > However, the old version of the tutorial still shows at the old address.
> > I moved the file in the worg git repository from org-tutorials/ to
> > exporters/ but now there are two separate HTML copies. Do I have to do
> > something else to explicitly delete the old version?
> 
> Er, this is a strong (and quite stupid) limitation of the publishing
> engine: it does not delete files that exist from a previous publication.
> 
> I have absolutely no idea for a clever mechanism that would find the
> files to delete.
> 
> We can delete them manually for now -- please send me the list of
> .html files I need to delete.

The files are:
- http://orgmode.org/worg/org-tutorials/koma-letter-export.html
- http://orgmode.org/worg/org-tutorials/koma-letter-example.html

Sorry for the inconvenience.

Is there also a way not to publish Org files to HTML which are checked
into the Worg repository? I am asking because the file
http://orgmode.org/worg/exporters/koma-letter-example.html could also be
deleted. It is created from
http://orgmode.org/worg/sources/exporters/koma-letter-example.org which
is included as an example in
http://orgmode.org/worg/sources/exporters/koma-letter-export.org. But
the HTML file is not linked anywhere.

Cheers,
Viktor
> 
> -- 
>  Bastien
> 



Re: [O] Minor problems with dvipng latex image preview

2013-05-23 Thread Nicolas Goaziou
Nick Dokos  writes:

> I learnt quite a bit from this discussion (thank you!), but I'm still a
> bit puzzled about your reluctance that custom options be added to the
> latex call. Why is that? Too many customizations? dvipng should be
> deprecated?  Too many twisty passages to explain?

Huh? I'm not reluctant to anything with regards to this discussion. I'm
just suggesting solutions to your problem.

Anyway, in a nutshell, your proposal is to:

  - add a custom variable, e.g., `org-latex-dvi-process-options' (which
library should it belong to?)
  - modify `org-latex-listings' docstring (in particular, add third
elements and new custom variable)
  - add a custom variable, e.g., `org-latex-dvi-process-debug', which,
when non-nil asks to leave produced "tex" file.

Is that right?


Regards,

-- 
Nicolas Goaziou



Re: [O] Minor problems with dvipng latex image preview

2013-05-23 Thread Nick Dokos
Nicolas Goaziou  writes:

>> OK, that works - I didn't know about the three-element list
>> form. Thanks!
>
> The surprising part of that third element is that it is assumed to be
> non-nil when missing (see `org-latex-packages-to-string').
>

Yes, presumably in the name of backward compatibility and "least
surprise": if one uses the two-element form, one gets the package
included in both export and previews, which is probably what is
wanted in general (although minted is something of an exception).


>> Perhaps the docstring for org-latex-listings should include
>> the three-element list form, with a pointer to the
>> org-latex-packages-alist doc for more details.
>
> The docstring already contains two references to
> `org-latex-packages-alist'.  Wouldn't suggesting to insert
>
>   (add-to-list 'org-latex-packages-alist '("" "minted" nil))
>
> be confusing, since we don't provide a third element for "listings" and
> "color" packages? Well, unless we provide the element for the three of
> them (t for the first two, and nil for the last).
>

Yes, it's not particularly easy to explain. But if one copies the code
from the docstring verbatim, one can slam into the problem and it is not
easy to debug.

>> There is also a (perhaps unlikely) scenario where this is not enough:
>> previewing typeset code where I *want* to use minted:
>>
>> * Code
>>
>> \begin{minted}{c} printf("Hello world\n"); \end{minted}
>
> In that case, I suggest to use `imagemagick' for the conversion, since
> it relies on `org-latex-pdf-process' value (and is therefore
> customizable).
>

I learnt quite a bit from this discussion (thank you!), but I'm still a
bit puzzled about your reluctance that custom options be added to the
latex call. Why is that? Too many customizations? dvipng should be
deprecated?  Too many twisty passages to explain? 

BTW, I found myself wishing for some debugging aid along the following
lines: an option to keep the .tex file produced (it *is* kept in case of
error, but sometimes it would be nice to look at it even if there is no
error), and a message in *Messages* with the complete command that
call-process is executing: that way, one can easily execute the command
by hand. One can always use the debugger for this, but that feels like
the proverbial elephant gun in search of a fly.

-- 
Nick




Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Suvayu Ali
Hi Bastien,

On Thu, May 23, 2013 at 10:21:23AM +0200, Bastien wrote:
> Viktor Rosenfeld  writes:
> 
> > However, the old version of the tutorial still shows at the old address.
> > I moved the file in the worg git repository from org-tutorials/ to
> > exporters/ but now there are two separate HTML copies. Do I have to do
> > something else to explicitly delete the old version?
> 
> Er, this is a strong (and quite stupid) limitation of the publishing
> engine: it does not delete files that exist from a previous publication.
> 
> I have absolutely no idea for a clever mechanism that would find the
> files to delete.

I believe you can use git for this.  Try

  $ git clean -n -x

to see the files that will be removed.  If you are happy with it, run

  $ git clean -f -x

Please note the subtle difference between -x and -X.  -x cleans *all*
untracked files, whereas -X cleans only files explicitly ignored by
.gitignore.  I would advise to put the published files as ignored:

*.html
*.html~

Then you can safely run

  $ git clean -f -X

and potentially keep untracked manually created files
(e.g. .gitattributes).  This could then be put in the post-commit hook
that publishes Worg.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] ox-beamer worg site: broken download

2013-05-23 Thread Bastien
Hi Michael,

Michael Bach  writes:

> I see from the browser's javascript tools console, that the 'Show Org source' 
> button's onclick function show_org_source() is not defined. Is this file 
> accessible otherwise?

I fixed the function.  Thanks for reporting this!

-- 
 Bastien



Re: [O] [bug] org-capture fails with undefined org-time-was-given variable

2013-05-23 Thread Nick Dokos
Eric S Fraga  writes:

> Hello,
>
> I have the following org capture template:
>
> #+begin_src emacs-lisp
> (setq org-capture-templates '(("j" "journal" entry (file+datetree+prompt 
> "~/s/notes/journal.org")
>"* %(format-time-string \"%H:%M\") %^{Entry} 
> %^G\n%i%?")))
> #+end_src
>
> (other rules elided for clarity).  Trying this today (after not using it
> for a long time), I get the following error:
>
> ,
> | Debugger entered--Lisp error: (void-variable org-time-was-given)
> |   org-capture-set-target-location()
> |   org-capture(nil)
> |   call-interactively(org-capture nil nil)
> |   command-execute(org-capture)
> `
>
> I don't actually use this rule any longer as I prefer to clock in and
> out but I was trying to show a friend how he could use org for
> journalling.
>
> I've had a look at the source (reasonably up to date) but this variable
> does not seem to be something I should be setting.  Is my capture rule
> somehow wrong?  Or is this a bug in org-capture?
>

FWIW, I tried the capture rule in a minimal emacs and it's working fine
for me:

Org-mode version 8.0.3 (release_8.0.3-144-gbd09fe @
/home/nick/elisp/org-mode/lisp/)

That includes a bunch of private commits, but when I look at git history
I don't find the commit you mention in your org version, f1b99a, so
maybe you have your own bunch of private commits and one or more of them
broke something? Maybe try a vanilla org?

The variable is indeed not to be set by you: it's a dynamically scoped
variable, so somebody binds it at some level and then every callee
(direct or indirect) can access it. Stepping through
org-capture-set-location shows that it is unbound up until the call to
org-read-date (line 907-909 in org-capture.el) and it is bound on return
from that function, at least in my case.

> Any suggestions or pointers welcome!
>
> Thanks,
> eric

-- 
Nick




Re: [O] date calculation in org table

2013-05-23 Thread Michael Brand
Hi Rafal

On Thu, May 23, 2013 at 4:47 PM, The Dude  wrote:
> BTW, what is the difference between `C-u C-c C-c' and `C-u C-*'?  I
> thought they're doing the same thing.

- `C-u C-c *' or `C-u C-c C-c': recalculate once
- `C-u C-u C-c *' or `C-u C-u C-c C-c' (`org-table-iterate'): repeat
  recalculation until no further changes occur
See http://orgmode.org/org.html#Updating-the-table

Michael



Re: [O] date calculation in org table

2013-05-23 Thread The Dude
-> Michael Brand writes:

[...]

> Let me suggest one more variant. No row numbers, uses the fact that
> the formula for $3 is not evaluated in the header and it circumvents
> the bug:

> |   | WP | Days | Arrival Date |
> |   ||  | <2013-06-05 Wed> |
> |---++--+--|
> |   |  1 |4 | <2013-06-09 Sun> |
> |   |  - |2 | <2013-06-11 Tue> |
> |   |  2 |4 | <2013-06-15 Sat> |
> |   |  - |2 | <2013-06-17 Mon> |
> |   |  3 |1 | <2013-06-18 Tue> |
> |   |  4 |2 | <2013-06-20 Thu> |
> |   |  5 |1 | <2013-06-21 Fri> |
> |   |  - |2 | <2013-06-23 Sun> |
> |   |  6 |1 | <2013-06-24 Mon> |
> |   |  7 |2 | <2013-06-26 Wed> |
> |   |  - |1 | <2013-06-27 Thu> |
> |   |  8 |1 | <2013-06-28 Fri> |
> |   |  9 |1 | <2013-06-29 Sat> |
> |   |  - |3 | <2013-07-02 Tue> |
> |   | 10 |3 | <2013-07-05 Fri> |
> |   |  - |1 | <2013-07-06 Sat> |
> |   | 11 |2 | <2013-07-08 Mon> |
> |---++--+--|
> |   ||   33 | <2013-07-08 Mon> |
> #+TBLFM: $4 = @-1 + $3 :: @>$3 = vsum(@I..@II) :: @>$4 = @-1

That's a very nice variant and works well.  Thanks.  

BTW, what is the difference between `C-u C-c C-c' and `C-u C-*'?  I
thought they're doing the same thing.

> Michael

cheers
-- 
-dude

Too brief? Here's why! http://emailcharter.org




Re: [O] orgstruct in emacs -nw

2013-05-23 Thread Memnon Anon
Christopher Schmidt  writes:

>> Wrong setup, a bug or intentional?
>
> This is a bug.  Can you please give this patch a try and see if it
> corrects the issue?  Apply it on master (06cdb2d).  Thanks!

Patch applied, Tab works. 
I will test it more thoroughly over the next days.

Thanks!
Memnon




Re: [O] Minor problems with dvipng latex image preview

2013-05-23 Thread Nicolas Goaziou
Nick Dokos  writes:

> Nicolas Goaziou  writes:
>
>>> ... I set:
>>>
>>> (setq org-export-latex-listings 'minted)
>>
>> You mean `org-latex-listings'.  `org-export-latex-listings' belongs to
>> the old export framework (like almost all variables with
>> "org-export-BACKEND-" prefix).
>>
>
> Yes, indeed.
>
>>> (add-to-list 'org-latex-packages-alist '("" "minted"))
>>
>>> in which case, I end up with a \usepackage{minted} in the preview
>>> latex file. 
>>
>> Use:
>>
>>   (add-to-list 'org-latex-packages-alist '("" "minted" nil))
>>
>> to tell Org not to include the package for previewing snippets.
>>
>
> OK, that works - I didn't know about the three-element list
> form. Thanks!

The surprising part of that third element is that it is assumed to be
non-nil when missing (see `org-latex-packages-to-string').

> Perhaps the docstring for org-latex-listings should include
> the three-element list form, with a pointer to the
> org-latex-packages-alist doc for more details.

The docstring already contains two references to
`org-latex-packages-alist'.  Wouldn't suggesting to insert

  (add-to-list 'org-latex-packages-alist '("" "minted" nil))

be confusing, since we don't provide a third element for "listings" and
"color" packages? Well, unless we provide the element for the three of
them (t for the first two, and nil for the last).

> There is also a (perhaps unlikely) scenario where this is not enough:
> previewing typeset code where I *want* to use minted:
>
> * Code
>
> \begin{minted}{c} printf("Hello world\n"); \end{minted}

In that case, I suggest to use `imagemagick' for the conversion, since
it relies on `org-latex-pdf-process' value (and is therefore
customizable).


Regards,

-- 
Nicolas Goaziou



Re: [O] Seeking advice on structuring my org-mode file

2013-05-23 Thread Julian M. Burgos
Matt, this is very useful!  I agree with you, I also tend to create
several org-mode files for a project that is becoming too large.  For
example, I keep a separate org-file for each paper or report, another
with notes, another with analysis (with R code blocks), etc.

One issue is that I use lots of TODO statemens in my files, and when
org-mode files multiply it starts to become difficult to keep the agenda
files list updated.  To do this I use this snippet that I found
somewhere (I do not remember exactly where).  This includes all
org-files in a specific directory (in my case my "Documents" directory)
in the agenda files list.

#+begin_src lisp
;;--
;; Load org agenda files
;;--
; Do not add agenda files "by hand"
(add-hook 'org-mode-hook
  (lambda ()
(org-defkey org-mode-map "\C-c["'undefined)
(org-defkey org-mode-map "\C-c]"'undefined))
  'append)

(load-library "find-lisp")

(add-hook 'org-agenda-mode-hook (lambda () 
(setq org-agenda-files 
  (find-lisp-find-files "/home/julian/Documents" "\.org$"))
))
#+end_src

With this I can create org-files to my heart's content and I know that
all TODOs statements will show up in the agenda.

All the best,

Julian

-- 
Julian Mariano Burgos, PhD
Hafrannsóknastofnunin/Marine Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: jul...@hafro.is

Matt Lundin writes:

> Marcin Borkowski  writes:
>
>> I have an Org-mode file with notes concerning a large project connected
>> with teaching at my university.  One of the headlines is dedicated to
>> one particular course, where I am part of a group developing a concept
>> of this course.  So, one subheadline is devoted to that.  Yet another
>> (subsub)headline is a list if my proposals of things that should be
>> covered during that course, and now it needs 3 more levels down.
>> Summing it up: I have 5 levels of headlines and now I need a sixth
>> one.  So, my question is: what are good practices of other Org-moders?
>> Do you push such a monster to an external file and just include a link
>> to it?  
>
> If a file grows to large, I simply create a new one. In this instance, I
> would recommend creating a separate file for each course.
>
> Below you'll find a very hackish helper function that I use to generate
> a new file from a headline. It leaves a link to the new file in the
> original location.
>
> Best,
> Matt
>
> --8<---cut here---start->8---
> (defun my-org-file-from-headline (file)
>   (interactive
>(list
> (completing-read "File: "
>  (mapcar 'file-name-nondirectory
>(file-expand-wildcards "~/org/*.org"))
>  nil nil)))
>   (unless (string-match "\\.org$" file)
> (error "Not an org file"))
>   (save-excursion
> (beginning-of-line)
> (unless (org-at-heading-p)
>   (error "Not on a headline")))
>   (let* ((exists (file-exists-p file))
>  (ftags (append
>  (list (file-name-sans-extension file))
>  (mapcar 'substring-no-properties org-file-tags)))
>  (headline (nth 4 (org-heading-components)))
>  (org-archive-reversed-order t)
>  (org-archive-location (concat file "::"))
>  (org-archive-save-context-info nil))
> (org-archive-subtree)
> (save-excursion (insert "* [[file:" file "][" file "]] - " headline "\n"))
> (find-file file)
> (goto-char (point-min))
> (save-excursion
>   (if (re-search-forward "#\\+FILETAGS:\\(.*\\)$" nil t)
>   (progn
> (save-match-data
>   (setq ftags
> (mapconcat 'identity
>(org-uniquify
> (append ftags
> (split-string
>  (substring-no-properties
>   (match-string 1) " ")))
> (replace-match (concat "#+FILETAGS: " ftags)))
> (insert "#+FILETAGS: " (mapconcat 'identity ftags " ") "\n"))
>   (goto-char (point-min))
>   (unless (re-search-forward "#\\+CATEGORY:\\(.*\\)$" nil t)
> (insert "#+CATEGORY: " (file-name-sans-extension file) "\n"))
>   (goto-char (point-min))
>   (when (re-search-forward "^Archived entries from file.+\n" nil t)
> (replace-match ""
>   (write-file file))
> --8<---cut here---end--->8---





Re: [O] orgstruct in emacs -nw

2013-05-23 Thread Thorsten Jolitz
Memnon Anon  writes:

> Footnotes: 
> [1]  https://www.youtube.com/watch?v=fnk0TJC7iJI
> Nice one ;)

Indeed, and it made me discover 'grep-find', thanks for the tip to
Bastien, thats definitely a useful function. 

-- 
cheers,
Thorsten




Re: [O] orgstruct in emacs -nw

2013-05-23 Thread Christopher Schmidt
> I tried to use the orgstruct minor mode, but it didn't seem to do
> anything, although I used exactly the same setup Bastien showed in his
> interview[1].
>
> After a while, I realized it was because I was using emacs in an
> xterm.  Steps to reproduce below.[2]

Some bindings, such as M-TAB, C-n or C-p, should work fine.

> Wrong setup, a bug or intentional?

This is a bug.  Can you please give this patch a try and see if it
corrects the issue?  Apply it on master (06cdb2d).  Thanks!
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8960,26 +8960,30 @@ buffer.  It will also recognize item context in multiline items."
 (let ((f (or (car-safe cell) cell))
 	  (disable-when-heading-prefix (cdr-safe cell)))
   (when (fboundp f)
-	(dolist (binding (nconc (where-is-internal f org-mode-map)
-(where-is-internal f outline-mode-map)))
-	  ;; TODO use local-function-key-map
-	  (dolist (rep '(("" . "TAB")
-			 ("" . "RET")
-			 ("" . "ESC")
-			 ("" . "DEL")))
-	(setq binding (read-kbd-macro
-			   (let ((case-fold-search))
-			 (replace-regexp-in-string
-			  (regexp-quote (cdr rep))
-			  (car rep)
-			  (key-description binding))
-	  (let ((key (lookup-key orgstruct-mode-map binding)))
-	(when (or (not key) (numberp key))
-	  (condition-case nil
-		  (org-defkey orgstruct-mode-map
-			  binding
-			  (orgstruct-make-binding f binding disable-when-heading-prefix))
-		(error nil
+	(let ((new-bindings))
+	  (dolist (binding (nconc (where-is-internal f org-mode-map)
+  (where-is-internal f outline-mode-map)))
+	(push binding new-bindings)
+	;; TODO use local-function-key-map
+	(dolist (rep '(("" . "TAB")
+			   ("" . "RET")
+			   ("" . "ESC")
+			   ("" . "DEL")))
+	  (setq binding (read-kbd-macro
+			 (let ((case-fold-search))
+			   (replace-regexp-in-string
+(regexp-quote (cdr rep))
+(car rep)
+(key-description binding)
+	  (cl-pushnew binding new-bindings :test 'equal)))
+	  (dolist (binding new-bindings)
+	(let ((key (lookup-key orgstruct-mode-map binding)))
+	  (when (or (not key) (numberp key))
+		(condition-case nil
+		(org-defkey orgstruct-mode-map
+binding
+(orgstruct-make-binding f binding disable-when-heading-prefix))
+		  (error nil)
   (run-hooks 'orgstruct-setup-hook))
 
 (defun orgstruct-make-binding (fun key disable-when-heading-prefix)

Christopher


[O] ox-beamer worg site: broken download

2013-05-23 Thread Michael Bach
Dear org-mode Users and Developers,

I just tried to get an example of the usage of the new ox-beamer module and 
thus tried to view the source of the org file referenced on the ox-beamer 
example page on worg[1].

I see from the browser's javascript tools console, that the 'Show Org source' 
button's onclick function show_org_source() is not defined. Is this file 
accessible otherwise?

Best Regards,
Michael Bach

[1] http://orgmode.org/worg/exporters/beamer/presentation.html




[O] orgstruct in emacs -nw

2013-05-23 Thread Memnon Anon
Hi,

I tried to use the orgstruct minor mode, but it didn't seem to do
anything, although I used exactly the same setup Bastien showed in his
interview[1].

After a while, I realized it was because I was using emacs in an xterm.
Steps to reproduce below.[2] 

Wrong setup, a bug or intentional?

If it is supposed to work that way, 
it should perhaps be mentioned in the manual.

I also saw that Bastien somehow got colortheme support for
orgstructlines in elisp files. My cyberpunk doesn't do that OOTB,
so I guess I need to have a look at outshine[3] for that?

TIA
Memnon

Footnotes: 
[1]  https://www.youtube.com/watch?v=fnk0TJC7iJI
Nice one ;)

[2]  
* 1) emacs -Q -nw
* 2) load version from git:
   (add-to-list 'load-path "path/to/org-mode/lisp")
   (add-to-list 'load-path "path/to/org-mode/contrib/lisp")
   (add-to-list 'load-path "path/to/org-mode/contrib/babel/lisp")
   (require 'org)
* 3) M-x find-file ~/orgstruct.test
,[ ~/orgstruct.test ]
* test
** test
** test 2
`
* 4) M-x orgstruct++-mode
* 5) Tab does not cycle while on `* test' headline
   But it does when emacs is started with "emacs -Q" in 1) 
   and same steps applied.

This is with:
ELISP> (org-version t t t)
"Org-mode version 8.0.3 (release_8.0.3-147-g06cdb2 
 @ /home/memnon/tmp/bin/org-mode/lisp/)"
ELISP> (emacs-version)
"GNU Emacs 24.3.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2)\n 
 of 2013-05-11 on gkar, modified by Debian"

[3]  
http://orgmode.org/worg/org-tutorials/org-outside-org.html#fontification-navigation-and-structure-editing




Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread John Hendy
On Thu, May 23, 2013 at 5:16 AM, Michael Brand
 wrote:
> Hi Bastien
>
> On Thu, May 23, 2013 at 12:07 PM, Bastien  wrote:
>> Does it make a difference whether the file has a #+setupfile
>> directive or not?
>
> The issue disappears when I remove #+setupfile as I "expected". Sorry,
> I forgot to mention that the
> (when (search-forward "#+setupfile" nil t)
> looked suspicious to me when I looked at the commit.

Confirmed: if I remove the setupfile line, everything seems alright.

John

>
> Michael
>



Re: [O] [NEW FEATURE] org-hlc.el - hidden-lines-cookies (hlc) for Org-mode

2013-05-23 Thread Thorsten Jolitz
Carsten Dominik  writes:

Hi Carsten,

> On 22 mei 2013, at 22:44, Thorsten Jolitz  wrote:

> What is it all about? With 'org-hlc' 
> 
> ,
> | Behind every folded headline, a little 'cookie' shows the number of
> | hidden lines till the next visible headline.
> `

> This is is definitely a nice feature. [...] However, I don't think the
> implementation is the right one.  Modifying the file to display this
> does not seem right. I would say it should use text properties or
> maybe overlays for display

I have not done anything with text properties or overlays before, so I
have to take it look at the docs, but I guess this would only affect
small parts of the implementation (do something with properties/overlays
instead of inserting/deleting text). 

> , and it should be hooked somehow into the folding/unfolding routines
> to auto-update.

Thats what I thought too, but I ran into a problem I could not solve so
far, so this user-command based implementation (show the cookies on
demand) is kind of the second-best solution (better then nothing). 

Here is a thread related to the problem mentioned, unfortunately with no
posts except my own so far:

,---
| http://lists.gnu.org/archive/html/help-gnu-emacs/2013-05/msg00511.html
`---

-- 
cheers,
Thorsten




Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread Michael Brand
Hi Bastien

On Thu, May 23, 2013 at 12:07 PM, Bastien  wrote:
> Does it make a difference whether the file has a #+setupfile
> directive or not?

The issue disappears when I remove #+setupfile as I "expected". Sorry,
I forgot to mention that the
(when (search-forward "#+setupfile" nil t)
looked suspicious to me when I looked at the commit.

Michael



Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread Bastien
Michael Brand  writes:

>> My bisect says:
>> b83c0309a7ecb86251451557a12e451fe9f93b11 is the first bad commit
>
> Same here.

Thanks for confirming.

Does it make a difference whether the file has a #+setupfile
directive or not?

-- 
 Bastien



Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread Michael Brand
Hi Bastien

Thanks for investigating.

On Thu, May 23, 2013 at 11:15 AM, Sebastien Vauban
 wrote:

> My bisect says:
> b83c0309a7ecb86251451557a12e451fe9f93b11 is the first bad commit

Same here.

>> I'll investigate -- in the meantime, could you just let me know what
>> version of Emacs do you use?

All that I tested show the issue:
GNU Emacs 23.3.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
GNU Emacs 24.1.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
GNU Emacs 24.2.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)
GNU Emacs 24.3.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9)

Michael



[O] [bug] org-capture fails with undefined org-time-was-given variable

2013-05-23 Thread Eric S Fraga
Hello,

I have the following org capture template:

#+begin_src emacs-lisp
(setq org-capture-templates '(("j" "journal" entry (file+datetree+prompt 
"~/s/notes/journal.org")
   "* %(format-time-string \"%H:%M\") %^{Entry} 
%^G\n%i%?")))
#+end_src

(other rules elided for clarity).  Trying this today (after not using it
for a long time), I get the following error:

,
| Debugger entered--Lisp error: (void-variable org-time-was-given)
|   org-capture-set-target-location()
|   org-capture(nil)
|   call-interactively(org-capture nil nil)
|   command-execute(org-capture)
`

I don't actually use this rule any longer as I prefer to clock in and
out but I was trying to show a friend how he could use org for
journalling.

I've had a look at the source (reasonably up to date) but this variable
does not seem to be something I should be setting.  Is my capture rule
somehow wrong?  Or is this a bug in org-capture?

Any suggestions or pointers welcome!

Thanks,
eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.3-144-gf1b99a




Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread Sebastien Vauban
Bastien,

My bisect says:

--8<---cut here---start->8---
b83c0309a7ecb86251451557a12e451fe9f93b11 is the first bad commit
commit b83c0309a7ecb86251451557a12e451fe9f93b11
Author: Bastien Guerry 
Date:   Thu May 16 10:33:32 2013 +0200

Fix handling of setup file wrt setting tags

* org.el (org-set-regexps-and-options-for-tags): Return a list
with tag-related variables.
(org-set-regexps-and-options): Append tags from a setup file
to the local tags of the file.
(org-agenda-prepare-buffers): Set tags from a setup file by
calling `org-set-regexps-and-options' when necessary.

Thanks to Anupam Sengupta for reporting this.
--8<---cut here---end--->8---

My recipe for testing good/bad is:

1. Start Emacs
2. `C-c a a'
3. Open my `work.org' file
4. Check whether it's colored or black&white only...

>> I switched to commit 838e421 and the colors are back again.

Same for me...

> I'll investigate -- in the meantime, could you just let me know what
> version of Emacs do you use?

GNU Emacs 24.3.1 (i386-mingw-nt6.2.9200) of 2013-04-08 on LEG570

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] (Potential) new feature for Org-mode: "hidden-lines cookies"

2013-05-23 Thread Sebastien Vauban
Hi Suvayu, Thorsten,

Suvayu Ali wrote:
>> Now I wonder if such a feature already exists in Org-mode (I would not
>> be surprised, but I'm not aware of it) and if anybody would be
>> interested in having such a feature?
>
> As per my understanding, there is no such feature; and as a user, I
> would love it!

It does exist in the "Org-mode clone for Vim", but not yet in Org...

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] date calculation in org table

2013-05-23 Thread Michael Brand
Hi Rafal

On Thu, May 23, 2013 at 8:43 AM, The Dude  wrote:

> The problem is that when I change the $sdate and recalculate the whole
> table with `C-u C-u C-c C-c' only the element @4$4 is set.  It seems
> like the column formula doesn't apply to the other fields.

This I consider a bug, minimal example:

| # | a | a |
|   | b |   |
#+TBLFM: $3 = $2

|   | a | a |
|   | b | b |
#+TBLFM: $3 = $2

> |   | WP | Days | Arrival Date |
> |---++--+--|
> | # ||  | <2013-06-05 Wed> |
> | ^ ||  | sdate|
> |---++--+--|
> |   |  1 |4 | <2013-06-09 Sun> |
> |   |  - |2 | <2013-06-11 Tue> |
> |   |  2 |4 | <2013-06-15 Sat> |
> |   |  - |2 | <2013-06-17 Mon> |
> |   |  3 |1 | <2013-06-18 Tue> |
> |   |  4 |2 | <2013-06-20 Thu> |
> |   |  5 |1 | <2013-06-21 Fri> |
> |   |  - |2 | <2013-06-23 Sun> |
> |   |  6 |1 | <2013-06-24 Mon> |
> |   |  7 |2 | <2013-06-26 Wed> |
> |   |  - |1 | <2013-06-27 Thu> |
> |   |  8 |1 | <2013-06-28 Fri> |
> |   |  9 |1 | <2013-06-29 Sat> |
> |   |  - |3 | <2013-07-02 Tue> |
> |   | 10 |3 | <2013-07-05 Fri> |
> |   |  - |1 | <2013-07-06 Sat> |
> |   | 11 |2 | <2013-07-08 Mon> |
> |---++--+--|
> |   ||   33 | <2013-07-08 Mon> |
> #+TBLFM: @4$4=$sdate + 
> $3::$4=@-1$4+$3::@21$3=vsum(@II..@III)::@21$4=@III-1::$sdate=<2013-06-05 Wed>

Let me suggest one more variant. No row numbers, uses the fact that
the formula for $3 is not evaluated in the header and it circumvents
the bug:

|   | WP | Days | Arrival Date |
|   ||  | <2013-06-05 Wed> |
|---++--+--|
|   |  1 |4 | <2013-06-09 Sun> |
|   |  - |2 | <2013-06-11 Tue> |
|   |  2 |4 | <2013-06-15 Sat> |
|   |  - |2 | <2013-06-17 Mon> |
|   |  3 |1 | <2013-06-18 Tue> |
|   |  4 |2 | <2013-06-20 Thu> |
|   |  5 |1 | <2013-06-21 Fri> |
|   |  - |2 | <2013-06-23 Sun> |
|   |  6 |1 | <2013-06-24 Mon> |
|   |  7 |2 | <2013-06-26 Wed> |
|   |  - |1 | <2013-06-27 Thu> |
|   |  8 |1 | <2013-06-28 Fri> |
|   |  9 |1 | <2013-06-29 Sat> |
|   |  - |3 | <2013-07-02 Tue> |
|   | 10 |3 | <2013-07-05 Fri> |
|   |  - |1 | <2013-07-06 Sat> |
|   | 11 |2 | <2013-07-08 Mon> |
|---++--+--|
|   ||   33 | <2013-07-08 Mon> |
#+TBLFM: $4 = @-1 + $3 :: @>$3 = vsum(@I..@II) :: @>$4 = @-1

Michael



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Viktor,

Viktor Rosenfeld  writes:

> However, the old version of the tutorial still shows at the old address.
> I moved the file in the worg git repository from org-tutorials/ to
> exporters/ but now there are two separate HTML copies. Do I have to do
> something else to explicitly delete the old version?

Er, this is a strong (and quite stupid) limitation of the publishing
engine: it does not delete files that exist from a previous publication.

I have absolutely no idea for a clever mechanism that would find the
files to delete.

We can delete them manually for now -- please send me the list of
.html files I need to delete.

-- 
 Bastien



Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread Rainer Stengele
Am 23.05.2013 09:55, schrieb Bastien:
> Rainer Stengele  writes:
> 
>> I switched to
>> commit 838e421bf53c2ae41e6321d363fd0e8b85eb3c32
>> and the colors are back again.
> 
> Thanks all for testing/bisecting this.
> 
> I'll investigate -- in the meantime, could you just let me know what
> version of Emacs do you use?
> 

GNU Emacs 24.3.50.1 (i386-mingw-nt6.1.7601) of 2013-03-14 on VBOX




Re: [O] [NEW FEATURE] org-hlc.el - hidden-lines-cookies (hlc) for Org-mode

2013-05-23 Thread Carsten Dominik
Hi Thorsten,

On 22 mei 2013, at 22:44, Thorsten Jolitz  wrote:

> 
> Hi List, 
> 
> I ported this from outshine.el (i.e. outline-minor-mode) to Org-mode,
> hope it is useful. 
> 
> What is it all about? With 'org-hlc' 
> 
> ,
> | Behind every folded headline, a little 'cookie' shows the number of
> | hidden lines till the next visible headline.
> `
> 
> e.g.
> 
> ,-
> | * my-file.org [#13]
> | ** Commentary [#1]
> | *** About my-file
> | 
> |  This file implements extensions for occur-mode. You can think of a
> |  navi-buffer as a kind of 'remote-control' for an (adecuately)
> |  outline-structured original-buffer.
> | 
> | *** Usage [#165]
> `-



This is is definitely a nice feature.  Herbert Sitz has
this in his vimorganizer implementation for vi,

http://vimeo.com/16543959

and we have been jealous of this feature ever since.


However, I don't think the implementation is the right
one.  Modifying the file to display this does not seem right.
I would say it should use text properties or maybe
overlays for display, and it should be hooked somehow into the
folding/unfolding routines to auto-update.

Cheers!

- Carsten

> 
> I attach the code to this message, you can find the git-repo here:
> 
> ,
> | https://github.com/tj64/org-hlc
> | git clone https://github.com/tj64/org-hlc
> `--
> 
> Please let me know if there is interest to include this in Org-mode. 
> 
> ---
> ORG-HLC.EL
> ---
> 
> ;;; org-hlc.el --- hidden-lines-cookies for folded Org-mode headlines
> 
> ;; Copyright (C) 2013 Thorsten Jolitz
> 
> ;; Author: Thorsten Jolitz 
> ;; Keywords: org-mode, outline, visibility, overlays
> 
> ;; This file is (NOT YET) part of GNU Emacs.
> 
> ;; GNU Emacs is free software: you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published by
> ;; the Free Software Foundation, either version 3 of the License, or
> ;; (at your option) any later version.
> 
> ;; GNU Emacs is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
> 
> ;; You should have received a copy of the GNU General Public License
> ;; along with GNU Emacs.  If not, see .
> 
> ;;; Commentary:
> 
> ;; 'hidden-lines-cookies' (hlc) are small cookies at the end of each folded
> ;; (and visible) headline in an Org-mode buffer that show the number of hidden
> ;; lines before the next visible headline.
> 
> ;; hidden-lines-cookies can be handled with three user commands:
> ;; `org-hlc-show-hidden-lines-cookies', `org-hlc-hide-hidden-lines-cookies',
> ;; and the convenience command `org-hlc-toggle-hidden-lines-cookies' that
> ;; toggles between the two other commands conditional on the last one
> ;; executed.
> 
> ;; The appearance of the cookies can be customized by changing the values of
> ;; four customizable variables: `org-hlc-hidden-lines-cookie-left-delimiter'
> ;; (with default value "["), `org-hlc-hidden-lines-cookie-right-delimiter'
> ;; (with default value ']), `org-hlc-hidden-lines-cookie-left-signal-char'
> ;; (with default value "#") and
> ;; `org-hlc-hidden-lines-cookie-right-signal-char' (with default value "").
> 
> ;; Thus an exemplary folded headline with 165 hidden lines before the next
> ;; visible headline might look like this when hidden-lines-cookies are shown:
> 
> ;; ,-
> ;; | *** Headline [#165]
> ;; `-
> 
> ;;; Code:
> 
>  Variables
> 
> (defvar org-hlc-hidden-lines-cookies-on-p nil
>  "If non-nil, hidden-lines cookies are shown, otherwise hidden.")
> 
> (defgroup org-hlc nil
>  "Enhanced library for outline navigation in source code buffers."
>  :prefix "org-hlc-"
>  :group 'org)
> 
> (defcustom org-hlc-hidden-lines-cookie-left-delimiter "["
>  "Left delimiter of cookie that shows number of hidden lines."
>  :group 'org-hlc
>  :type 'string)
> 
> (defcustom org-hlc-hidden-lines-cookie-right-delimiter "]"
>  "Left delimiter of cookie that shows number of hidden lines."
>  :group 'org-hlc
>  :type 'string)
> 
> (defcustom org-hlc-hidden-lines-cookie-left-signal-char "#"
>  "Left signal character of cookie that shows number of hidden lines."
>  :group 'org-hlc
>  :type 'string)
> 
> (defcustom org-hlc-hidden-lines-cookie-right-signal-char ""
>  "Right signal character of cookie that shows number of hidden lines."
>  :group 'org-hlc
>  :type 'string)
> 
> (defvar org-hlc-hidden-lines-cookie-format-regexp
>  (concat
>   "\\( "
>   (regexp-quote org-hlc-hidden-lines-cookie-left-delimiter)
>

Re: [O] date calculation in org table

2013-05-23 Thread The Dude
-> Christian Moe writes:

> Hi, Dude,

> Not quite sure why that doesn't work (nor gives an error message about
> trying to set the same cell). However, it will work if you specify the
> cell range:

>> @4$4=$sdate + $3::$4=@-1$4+$3
> ^^   
>   @4$4=$sdate + $3::@5$4..@20$4=@-1$4+$3
> ^^^

Yep, that works perfectly.  The only drawback is when I have to add a
new row etc. but I can live with that.  Thanks!

> BTW, it's OK to omit the reference to the same column, so you can save
> two characters:

>   @4$4=$sdate + $3::@5$4..@20$4=@-1$4+$3
>^^
>   @4$4=$sdate + $3::@5$4..@20$4=@-1+$3 

Got it.

> Yours,
> Christian

cheers
-- 
-dude

Too brief? Here's why! http://emailcharter.org




Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi Bastien,

Bastien wrote:

> Hi Viktor,
> 
> Viktor Rosenfeld  writes:
> 
> >> I believe I can give a partial answer: it looks like Worg isn't
> >> publishing right now, which suggests that there was a recent commit
> >> which broke things.  The search for the problem begins.  Once the
> >> error is identified and fixed, then things should get back to normal.
> >
> > That's not it. The publishing process was working when I last checked. I
> > just pushed a change and it's reflected in the published HTML file, i.e.
> > [1], but the links are still now working and the old file still
> > exists.
> 
> I forgot to add some publishing projects during the migration,
> namely worg-sources and worg-images.  This should be fixed now.

Thanks for the fix. I can confirm that the links work now. (Did just
send a mail to that effect to the mailing list and then your message
arrived.)

However, the old version of the tutorial still shows at the old address.
I moved the file in the worg git repository from org-tutorials/ to
exporters/ but now there are two separate HTML copies. Do I have to do
something else to explicitly delete the old version?

Thanks again,
Viktor

> 
> Thanks,
> 
> -- 
>  Bastien
> 



Re: [O] Let's discuss citation and Org syntax

2013-05-23 Thread Christian Moe

Matt Price writes:
> On Wed, May 22, 2013 at 5:02 AM, Christian Moe  wrote:
>>
>> I have a rough, working example of this enabling Zotero cites for ODT
>> export (attached).

> Hi Christian,
>
> I'm really interested in this, as I use Zotero not only for writing
> but for group bibliographies in my  courses.  The broader conversation
> about the appropriate syntax is a bit beyond me,

Hi, Matt,

As the org-zotero-export.el shows, getting Zotero references from Org
into ODT is pretty simple. That framework could be implemented whatever
syntax we end up with to take care of the details. I'm interested in
feedback on the syntax, though -- that is, on the way I'm using the
description part of the link to convey various bits of information to
Zotero. Is it worth pursuing, or would people prefer other ways of
doing it? If worth pursuing, could it be improved?

> (1) How do you get the Zotero cite keys right now, and what method do
> you think would ultimately be the best to try for?

The best to try for: Something with as brilliant an interface as RefTex...

Since this thread is on citation syntax, I think I'll gather my thoughts
about how to get there (zotero-plain? Zotero Server API? sqlite? word
processor plugin emulation?), and about your other questions, and start
another Zotero-related thread in a day or two.

Right now: I'm still depending on Quick Copy with a custom Zotero
translator. That is, I tab from Emacs to Firefox, look up a reference in
the Zotero pane, and Quick Copy (C-S-c) to a formatted link to the
clipboard. Tab back to Emacs, yank the link, manually tweak the
description as necessary. RefTex it ain't, and it's cumbersome for
multiple citations, but it works.


Yours,
Christian




Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Viktor Rosenfeld
Hi everybody,

Viktor Rosenfeld wrote:

> > > I recently wrote a tutorial for the ox-koma-letter exporter [1] which
> > > includes a link to an Org file [2] file and a PDF file [3] as examples.
> > > The files are checked into the Worg repository, but they are not
> > > available online. Is there something I have to do to enable this? At
> > > first I thought the problem was related to the switchover to the new
> > > exporter, but the issue persists.
> > >
> > > Also, an old version of the tutorial at an old address [4] is still
> > > online even though I've changed the location in the git repository. How
> > > can I delete this version?
> > >
> > > Cheers,
> > > Viktor
> > >
> > > [1] http://orgmode.org/worg/exporters/koma-letter-export.html
> > > [2] http://orgmode.org/worg/sources/exporters/koma-letter-example.org
> > > [3] http://orgmode.org/worg/images/ox-koma-letter/koma-letter-example.pdf
> > > [4] http://orgmode.org/worg/org-tutorials/koma-letter-export.html
> > >
> > 
> > I believe I can give a partial answer: it looks like Worg isn't
> > publishing right now, which suggests that there was a recent commit
> > which broke things.  The search for the problem begins.  Once the
> > error is identified and fixed, then things should get back to normal.
> 
> That's not it. The publishing process was working when I last checked. I
> just pushed a change and it's reflected in the published HTML file, i.e.
> [1], but the links are still now working and the old file still exists.

So I checked again this morning and now the links to the source file and
the PDF example both work. Not sure if it is because of a delay (the
commit is only now listed on the worg homepage) or if somebody did
actively fix something; in case of the latter, many thanks.

The old version of the tutorial is still available at the old address
which is a minor annoyance because it is quickly getting out of date.
But I'm glad that the links are working.

Cheers,
Viktor



Re: [O] Starting emacs followed directly by org-agenda search and visiting file removes color formatting

2013-05-23 Thread Bastien
Rainer Stengele  writes:

> I switched to
> commit 838e421bf53c2ae41e6321d363fd0e8b85eb3c32
> and the colors are back again.

Thanks all for testing/bisecting this.

I'll investigate -- in the meantime, could you just let me know what
version of Emacs do you use?

-- 
 Bastien



Re: [O] Org sources and PDF files on Worg

2013-05-23 Thread Bastien
Hi Viktor,

Viktor Rosenfeld  writes:

>> I believe I can give a partial answer: it looks like Worg isn't
>> publishing right now, which suggests that there was a recent commit
>> which broke things.  The search for the problem begins.  Once the
>> error is identified and fixed, then things should get back to normal.
>
> That's not it. The publishing process was working when I last checked. I
> just pushed a change and it's reflected in the published HTML file, i.e.
> [1], but the links are still now working and the old file still
> exists.

I forgot to add some publishing projects during the migration,
namely worg-sources and worg-images.  This should be fixed now.

Thanks,

-- 
 Bastien



Re: [O] [NEW FEATURE] org-hlc.el - hidden-lines-cookies (hlc) for Org-mode

2013-05-23 Thread Rainer M. Krug


Thorsten Jolitz  writes:

> Hi List, 
>
> I ported this from outshine.el (i.e. outline-minor-mode) to Org-mode,
> hope it is useful. 

That looks very nice indeed and a very nice addition to the ellipsis
shown - I would definitely support that it is included in org and I
would use it.

Cheers,

Rainer


>
> What is it all about? With 'org-hlc' 
>
> ,
> | Behind every folded headline, a little 'cookie' shows the number of
> | hidden lines till the next visible headline.
> `
>
> e.g.
>
> ,-
> | * my-file.org [#13]
> | ** Commentary [#1]
> | *** About my-file
> | 
> |  This file implements extensions for occur-mode. You can think of a
> |  navi-buffer as a kind of 'remote-control' for an (adecuately)
> |  outline-structured original-buffer.
> | 
> | *** Usage [#165]
> `-
>
> I attach the code to this message, you can find the git-repo here:
>
> ,
> | https://github.com/tj64/org-hlc
> | git clone https://github.com/tj64/org-hlc
> `--
>
> Please let me know if there is interest to include this in Org-mode. 
>
> ---
> ORG-HLC.EL
> ---
>
> ;;; org-hlc.el --- hidden-lines-cookies for folded Org-mode headlines
>
> ;; Copyright (C) 2013 Thorsten Jolitz
>
> ;; Author: Thorsten Jolitz 
> ;; Keywords: org-mode, outline, visibility, overlays
>
> ;; This file is (NOT YET) part of GNU Emacs.
>
> ;; GNU Emacs is free software: you can redistribute it and/or modify
> ;; it under the terms of the GNU General Public License as published by
> ;; the Free Software Foundation, either version 3 of the License, or
> ;; (at your option) any later version.
>
> ;; GNU Emacs is distributed in the hope that it will be useful,
> ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
> ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ;; GNU General Public License for more details.
>
> ;; You should have received a copy of the GNU General Public License
> ;; along with GNU Emacs.  If not, see .
>
> ;;; Commentary:
>
> ;; 'hidden-lines-cookies' (hlc) are small cookies at the end of each folded
> ;; (and visible) headline in an Org-mode buffer that show the number of hidden
> ;; lines before the next visible headline.
>
> ;; hidden-lines-cookies can be handled with three user commands:
> ;; `org-hlc-show-hidden-lines-cookies', `org-hlc-hide-hidden-lines-cookies',
> ;; and the convenience command `org-hlc-toggle-hidden-lines-cookies' that
> ;; toggles between the two other commands conditional on the last one
> ;; executed.
>
> ;; The appearance of the cookies can be customized by changing the values of
> ;; four customizable variables: `org-hlc-hidden-lines-cookie-left-delimiter'
> ;; (with default value "["), `org-hlc-hidden-lines-cookie-right-delimiter'
> ;; (with default value ']), `org-hlc-hidden-lines-cookie-left-signal-char'
> ;; (with default value "#") and
> ;; `org-hlc-hidden-lines-cookie-right-signal-char' (with default value "").
>
> ;; Thus an exemplary folded headline with 165 hidden lines before the next
> ;; visible headline might look like this when hidden-lines-cookies are shown:
>
> ;; ,-
> ;; | *** Headline [#165]
> ;; `-
>
> ;;; Code:
>
>  Variables
>
> (defvar org-hlc-hidden-lines-cookies-on-p nil
>   "If non-nil, hidden-lines cookies are shown, otherwise hidden.")
>
> (defgroup org-hlc nil
>   "Enhanced library for outline navigation in source code buffers."
>   :prefix "org-hlc-"
>   :group 'org)
>
> (defcustom org-hlc-hidden-lines-cookie-left-delimiter "["
>   "Left delimiter of cookie that shows number of hidden lines."
>   :group 'org-hlc
>   :type 'string)
>
> (defcustom org-hlc-hidden-lines-cookie-right-delimiter "]"
>   "Left delimiter of cookie that shows number of hidden lines."
>   :group 'org-hlc
>   :type 'string)
>
> (defcustom org-hlc-hidden-lines-cookie-left-signal-char "#"
>   "Left signal character of cookie that shows number of hidden lines."
>   :group 'org-hlc
>   :type 'string)
>
> (defcustom org-hlc-hidden-lines-cookie-right-signal-char ""
>   "Right signal character of cookie that shows number of hidden lines."
>   :group 'org-hlc
>   :type 'string)
>
> (defvar org-hlc-hidden-lines-cookie-format-regexp
>   (concat
>"\\( "
>(regexp-quote org-hlc-hidden-lines-cookie-left-delimiter)
>(regexp-quote org-hlc-hidden-lines-cookie-left-signal-char)
>"\\)"
>"\\([[:digit:]]+\\)"
>"\\("
>(regexp-quote org-hlc-hidden-lines-cookie-right-signal-char)
>;; FIXME robust enough?
>(format "\\%s" org-hlc-hidden-lines-cookie-right-delimiter)
>"\\)")
>   "Matches cookies that show number of hidden lines for folded subtrees.")
>
> ;

Re: [O] date calculation in org table

2013-05-23 Thread Christian Moe



Hi, Dude,

Not quite sure why that doesn't work (nor gives an error message about
trying to set the same cell). However, it will work if you specify the
cell range:

> @4$4=$sdate + $3::$4=@-1$4+$3
^^   
  @4$4=$sdate + $3::@5$4..@20$4=@-1$4+$3
^^^

BTW, it's OK to omit the reference to the same column, so you can save
two characters:

  @4$4=$sdate + $3::@5$4..@20$4=@-1$4+$3
   ^^
  @4$4=$sdate + $3::@5$4..@20$4=@-1+$3 

Yours,
Christian