Re: [O] Using Org/babel for Emacs config files

2013-01-24 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

 I've been working with Nicolas Goaziou's new LaTeX exporter recently and
 the gap between Org mode and AucTeX has narrowed considerably.

Thats of course always true for Org-mode, and often the problem isn't
really in the software, but sits in front of the computer and is not
up-to-date or forgot how to do it. 

 The new exporter is *really* nice. 

Agreed ... 

-- 
cheers,
Thorsten




Re: [O] BUG: coderef labels not stripped when tangling

2013-01-24 Thread Sebastien Vauban
Hello Michael,

Michael Alan Dorman wrote:
 Using Org-mode to write in a literate style is a lot of fun.  When I
 read about coderef labels, they seemed likely to make it even better.

 The only problem is that they aren't stripped during tangling. If you
 tangle this:

 #+BEGIN_SRC sh -n -r :noweb tangle :shebang #!/bin/sh :tangle tangle-test.sh
 echo Working (ref:working) 
 #+END_SRC

 You end up with:

 #!/bin/sh

 echo Working (ref:working)

 That seems like a bug.

Or a feature, with the consequence that you should put those refs as comments
(with the appropriate syntax in your language).

But, yes, those comments stay as well in your tangled code, which you may not
like.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Passing variables between code blocks

2013-01-24 Thread Yotam Avital
I want to use org-mode for data analysis for my results. I also want to do
this using small chunks of code blocks for various task. To achieve that. I
need to pass dictionaries (20 entries of lists, each of several hundreds
variables, each is a list by itself). I wanted to do so by the #+CALL
option for example:


* test
  #+NAME:test
  #+BEGIN_SRC python
vars = dict()
vars[1] = 1
vars[2] = 2
return vars

  #+END_SRC

* caller
  #+NAME: caller
  #+HEADER: :var ins=#+CALL: test()
  #+BEGIN_SRC python :results output
print files

  #+END_SRC

But I get an error:

  File stdin, line 1
files=[1:, 1, 2:, 2]
^
SyntaxError: invalid syntax

Is there a way to pass a dictionary as a variables between blocks then?



-- 
My other email account has a professional signature.


[O] Integration notmuch org-mode - can't find ay info?

2013-01-24 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I konw ther is org-notmuch - but is there a howto around? I remember seeing 
something, but I can't
find it.

How can I load it? How can I create it? I looked at org-notmuch.el, but I seem 
to have one of my
frequent blonde moments in regards to elisp.

Cheers,

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 :   +33 - (0)9 58 10 27 44

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

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRAQe+AAoJENvXNx4PUvmCeooH/AjkdmO4OcRCxVSez4vxWgdz
8IvXAJJurB6OcPflOf4hFJs5SrevYMynnEdU+wYE+PMU6/GC3mppRLsOYbNLurBI
//DrTL0DVKpB5iu3/6JoeGeJlLOy58/Luk3CdFDgmA8449zywi3DC9Rmu0JejkpL
BYtz91VSffglG+2OhfSkyNoIRAR4YoNO28lKJPplPXfb2Um9rnVCyMlzYcJcsJgT
xMrVtkLAIDouozEyGyZ4j5LbmcRQxP6y9L3/jil7kN4/GeBFO9Wrh59Oj11Qsls7
xQipCveYTrJaPHQcfycUa2tOIPWdh1G9ZzxkufJeQtXBBt6z6Ky518jt7hY2wIE=
=mdGV
-END PGP SIGNATURE-



[O] full outline functionality in .el files: how? (was: Re: Using Org/babel for Emacs config files)

2013-01-24 Thread Gregor Zattler
Hi Thorsten,
* Thorsten Jolitz tjol...@googlemail.com [24. Jan. 2013]:
 - after figuring out that I can have full outline functionality in .el
   files too, the (in my eyes) main advantage of an org-based config was
   gone. 

could you please elaborate how to achieve this?

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



Re: [O] Editing comments or strings in Org mode

2013-01-24 Thread Bastien
Hi François,

François Pinard pin...@iro.umontreal.ca writes:

https://github.com/pinard/PopOrg

I added a link to 
https://github.com/pinard/PopOrg/blob/master/poporg.el

In worg/org-hacks.org:
http://orgmode.org/cgit.cgi/worg.git/commit/?id=c0a908

Please edit this further to refine it!

Thanks,

-- 
 Bastien



Re: [O] More decoration for babel output

2013-01-24 Thread Bastien
Hi Ken,

Ken Williams ken.willi...@windlogics.com writes:

 Hi all,

 When exporting to HTML I always add some extra CSS to my org-mode config,
 for the purpose of identifying which chunks are input vs. output, and for
 identifying the language of the code in code chunks.  Language is
 identified by a little label on the box, and input/output is identified by
 green/red.

 Would this be helpful to include by default?  Patch attached.

This look fine -- can you send a screenshot?

I cannot apply the patch until you assign your copyright to the FSF.
Would be nice if you can do it!  Here is the form:

http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt

Thanks,

-- 
 Bastien



Re: [O] [PATCH] Re: #+PROPERTY documentation

2013-01-24 Thread Daimrod
Bastien b...@altern.org writes:

 Yes, close to perfect.  As noted in the link I gave, you need to use
 `C-x 4 a' in the section of the manual you changed in order to create
 a proper ChangeLog.

It's weird, `C-x 4 a' wasn't able to determine correctly the sections
changed. :/

 In your case, the ChangeLog should start like this:

   * org.texi (Property syntax, Buffer-wide header arguments):

 Also, please add only one such footnote.  Having twice the same
 footnote is confusing for the readers -- if they remember there
 is a footnote for this... they will not be able to remember if 
 it was the first or the second one.  Choose the one that is the
 most important -- given that the information is already available 
 in another section.

You're right. I've replaced the footnote by a paragraph in (info (org)
Property syntax) because this footnote was already present elsewhere,
and removed the footnote in (info (org) Buffer-wide header arguments)
because there is a link to (info (org) Property syntax).

Here is (I hope) the final patch :)

From be60dcba66d24d84986ea2650c2ef6ad96d29c8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= gregoire.j...@gmail.com
Date: Thu, 24 Jan 2013 13:04:11 +0100
Subject: [PATCH] Update documentation of buffer-wide properties

* doc/org.texi (Property syntax): Recall the user to refresh the org
  buffer when properties are set on a per-file basis.

TINYCHANGE
---
 doc/org.texi |3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/org.texi b/doc/org.texi
index 61f1ee5..6447f9c 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -4961,6 +4961,9 @@ file, use a line like
 #+PROPERTY: NDisks_ALL 1 2 3 4
 @end example
 
+Contrary to properties set from a special drawer, you have to refresh the
+buffer with @kbd{C-c C-c} to activate this changes.
+
 If you want to add to the value of an existing property, append a @code{+} to
 the property name.  The following results in the property @code{var} having
 the value ``foo=1 bar=2''.
-- 
1.7.10.4


-- 
Daimrod/Greg


pgp__Xs3Q56S5.pgp
Description: PGP signature


[O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Gregor Zattler
Hi, 

my agenda shows a line:

No heading for this item in buffer or region.

how should I track down the problematic part of my org files? 


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Bastien
Hi Gregor,

Gregor Zattler telegr...@gmx.net writes:

 my agenda shows a line:

 No heading for this item in buffer or region.

It means the agenda contains tasks like

* TODO

with no heading.

 how should I track down the problematic part of my org files? 

You can run this in your Org buffer:

M-: (while (and (re-search-forward org-complex-heading-regexp nil t) 
(match-string 4))) RET

It will stop at the problematic headlines.

HTH,

-- 
 Bastien



Re: [O] [org2blog] How to add section numbers?

2013-01-24 Thread Bastien
Hi,

Ren Wen shan renws1...@gmail.com writes:

 I started to use org2blog for blogging recently and it works great.
 Just
 wondering if it is possible to add section numbers like
 org-export-as-html does.

 For example, a org file like this:

 * Generally Not Used
 ** Except
 *** By Middle Aged

 * Computer
 ** Scientist

 will becomes:

 1. Generally Not Used
    1.2 Except
        1.2.1 By Middle Aged

 2. Computer
    2.1 Scientist

 Thanks,

See this:
http://stackoverflow.com/questions/10340276/how-to-add-section-numbers-1-2-3-4-1-automatically-using-css

With an example here:
http://jsfiddle.net/PfcX2/1/

HTH,

-- 
 Bastien



Re: [O] full outline functionality in .el files: how?

2013-01-24 Thread Bastien
Hi Gregor,

Gregor Zattler telegr...@gmx.net writes:

 Hi Thorsten,
 * Thorsten Jolitz tjol...@googlemail.com [24. Jan. 2013]:
 - after figuring out that I can have full outline functionality in .el
   files too, the (in my eyes) main advantage of an org-based config was
   gone. 

 could you please elaborate how to achieve this?

See here: http://orgmode.org/worg/org-faq.html#sec-5-4

-- 
 Bastien



Re: [O] LaTeX preview

2013-01-24 Thread Daimrod
Daimrod daim...@gmail.com writes:

 Bastien b...@altern.org writes:

 Hi Daimrod,

 Daimrod daim...@gmail.com writes:

 Is there an #+STARTUP parameter to automatically display LaTeX
 fragments?

 Nope, sorry.

 Here is a patch to add `org-startup-with-latex-preview'. It should work
 like `org-startup-with-inline-images'.

Here is a better formatted patch:

From 63cd29b1d5b0c5758870a14ac3257e69d4560925 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= gregoire.j...@gmail.com
Date: Thu, 24 Jan 2013 14:02:00 +0100
Subject: [PATCH] Add a new startup keyword to preview LaTeX fragments

* doc/org.texi (Previewing @LaTeX{} fragments): Document the startup
  keywords which can be used to preview or not LaTeX fragments.
(Summary of in-buffer settings): Improve formatting and add an entry
for the variable `org-startup-with-latex-preview'.

* org.el (org-mode, org-startup-options,
  org-startup-with-inline-images): Add the variable
  `org-startup-with-latex-preview' which can be used to preview LaTeX
  fragments on startup. This variable is set to `nil' by default.
---
 doc/org.texi |   32 
 lisp/org.el  |   14 ++
 2 files changed, 46 insertions(+)

diff --git a/doc/org.texi b/doc/org.texi
index 37c7ac5..43a89ca 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -9758,6 +9758,19 @@ some aspects of the preview.  In particular, the @code{:scale} (and for HTML
 export, @code{:html-scale}) property can be used to adjust the size of the
 preview images.
 
+@vindex org-startup-with-latex-preview
+You can turn on the previewing of all @LaTeX{} fragments in a file with
+
+@example
+#+STARTUP: latexpreview
+@end example
+
+To disable it, simply use
+
+@example
+#+STARTUP: nolatexpreview
+@end example
+
 @node CDLaTeX mode,  , Previewing @LaTeX{} fragments, Embedded @LaTeX{}
 @subsection Using CD@LaTeX{} to enter math
 @cindex CD@LaTeX{}
@@ -14955,6 +14968,18 @@ inlineimages   @r{show inline images}
 noinlineimages @r{don't show inline images on startup}
 @end example
 
+@vindex org-startup-with-latex-preview
+When visiting a file, @LaTeX{} fragments can be converted to images
+automatically.  The variable @code{org-startup-with-latex-preview} which
+controls this behavior, is set to @code{nil} by default to avoid delays on
+startup.
+@cindex @code{latexpreview}, STARTUP keyword
+@cindex @code{nolatexpreview}, STARTUP keyword
+@example
+latexpreview   @r{preview @LaTeX{} fragments}
+nolatexpreview @r{don't preview @LaTeX{} fragments}
+@end example
+
 @vindex org-log-done
 @vindex org-log-note-clock-out
 @vindex org-log-repeat
@@ -15005,6 +15030,7 @@ nologdrawer @r{store log outside of drawer}
 logstatesreversed   @r{reverse the order of states notes}
 nologstatesreversed @r{do not reverse the order of states notes}
 @end example
+
 @vindex org-hide-leading-stars
 @vindex org-odd-levels-only
 Here are the options for hiding leading stars in outline headings, and for
@@ -15023,6 +15049,7 @@ noindent   @r{no virtual indentation according to outline level}
 odd@r{allow only odd outline levels (1,3,...)}
 oddeven@r{allow all outline levels}
 @end example
+
 @vindex org-put-time-stamp-overlays
 @vindex org-time-stamp-overlay-formats
 To turn on custom format overlays over timestamps (variables
@@ -15032,6 +15059,7 @@ To turn on custom format overlays over timestamps (variables
 @example
 customtime @r{overlay custom time format}
 @end example
+
 @vindex constants-unit-system
 The following options influence the table spreadsheet (variable
 @code{constants-unit-system}).
@@ -15041,6 +15069,7 @@ The following options influence the table spreadsheet (variable
 constcgs   @r{@file{constants.el} should use the c-g-s unit system}
 constSI@r{@file{constants.el} should use the SI unit system}
 @end example
+
 @vindex org-footnote-define-inline
 @vindex org-footnote-auto-label
 @vindex org-footnote-auto-adjust
@@ -15067,6 +15096,7 @@ fnplain @r{create @code{[1]}-like labels automatically}
 fnadjust@r{automatically renumber and sort footnotes}
 nofnadjust  @r{do not renumber and sort automatically}
 @end example
+
 @cindex org-hide-block-startup
 To hide blocks on startup, use these keywords.  The corresponding variable is
 @code{org-hide-block-startup}.
@@ -15076,6 +15106,7 @@ To hide blocks on startup, use these keywords.  The corresponding variable is
 hideblocks   @r{Hide all begin/end blocks on startup}
 nohideblocks @r{Do not hide blocks on startup}
 @end example
+
 @cindex org-pretty-entities
 The display of entities as UTF-8 characters is governed by the variable
 @code{org-pretty-entities} and the keywords
@@ -15085,6 +15116,7 @@ The display of entities as UTF-8 characters is governed by the variable
 entitiespretty  @r{Show entities as UTF-8 characters where possible}
 entitiesplain   @r{Leave entities plain}
 @end example
+
 @item #+TAGS:  TAG1(c1) TAG2(c2)
 @vindex org-tag-alist
 These lines (several such lines are allowed) specify the valid 

[O] footnote placement

2013-01-24 Thread henry atting
Hi,

how can I achieve that footnotes are inserted at the end of the top
level headline? By default they are inserted at the end after a new
headline ``footnotes''. 
Secondly how to prevent html export from altering the given position?

henry 




Re: [O] Bug: [PATCH] Org-babel: separate #+attr_... for code block and for results block [7.9.3d (release_7.9.3d-834-g60083a.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)]

2013-01-24 Thread Nicolas Goaziou
Hello,

vdya...@elvees.com (Дядов Васил Стоянов) writes:

 With my patch to ob-core.el org-babel works fine with your suggestion. It
 just skips #+attr_...: lines as blank lines (original behaviour of
 org-babel is to skip blank lines between #+end_src and #+results, when
 it searches results block for updating).

My remark about syntax was orthogonal to your patch. I was just pointing
out you used a wrong example. Eric Schulte will know better than me
about your patch.

 Of course, org-babel behavior may be easily changed to dissallow empty
 lines between #+attr_...: and #+results:.

It would be better, indeed.

 But currently org-elements allows next construction:

 ,
 | #+attr_html: alt=big image width=100%
 |  ^ 
 |  |
 |  +- several empty lines between attr and file
 |  |
 |  v
 | file:123.png
 `

Of course not. With:

  #+attr_html: alt=big image width=100%
  file:123.png

(org-element-property :attr_html (org-element-at-point)) with point at
file:... will return (alt=\big image\ width=\100%\) while on the
following example:

  #+attr_html: alt=big image width=100%

  file:123.png

it will return nil.
  
 That is why I think that it is not necessary to make org-babel behavior
 different from org-elements (to dissalow empty lines between #+attr and
 #+results when it searches results block), at least for now.

Babel behaviour is already slightly different from Elements's. In the
long run it will be necessary to correct this.

 PS: Is there any good documentation and explanation of org-mode
 internals? I could help a little with rewritting org-babel to use
 org-elements.

You may have a look at the comments at the start of org-elements.el. At
some point, I will have to write an Info doc about this library, unless
I postpone it until the end of time.


Regards,

-- 
Nicolas Goaziou



[O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Andreas Leha
Kyle Machulis k...@nonpolynomial.com writes:

 Building on these idea, eric schulte's emacs 24 starter kit actually
 uses tags to configure what should and shouldn't be tangled, to make
 things easily configurable by others (not really a feature most of us
 are looking for in configs, but interesting nonetheless). Check out
 the starter-kit-load function in
 https://raw.github.com/eschulte/emacs24-starter-kit/master/starter-kit.org


Apologies for hijacking this thread.  But could someone tell me how to
open that link directly in emacs?  My try with 'browse-url-emacs'
failed.

Thanks in advance,
Andreas




Re: [O] footnote placement

2013-01-24 Thread Bastien
Hi Henry,

henry atting s...@online.de writes:

 how can I achieve that footnotes are inserted at the end of the top
 level headline? By default they are inserted at the end after a new
 headline ``footnotes''. 

I remember seeing a hack for this, but maybe my memory is wrong.
With Org's default features, you cannot.
 
 Secondly how to prevent html export from altering the given
 position?

I don't understand... what do you mean?

Best,

-- 
 Bastien



Re: [O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Bastien
Hi Andreas,

Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Apologies for hijacking this thread.  But could someone tell me how to
 open that link directly in emacs?  My try with 'browse-url-emacs'
 failed.

You cannot.  Get the file and open it.

Best,

-- 
 Bastien



Re: [O] full outline functionality in .el files: how?

2013-01-24 Thread Thorsten Jolitz
Gregor Zattler telegr...@gmx.net writes:

Hi Gregor,

 * Thorsten Jolitz tjol...@googlemail.com [24. Jan. 2013]:
 - after figuring out that I can have full outline functionality in .el
   files too, the (in my eyes) main advantage of an org-based config was
   gone. 

 could you please elaborate how to achieve this?

I already shared my new trick (which might not be that new for many
others) on the PicoLisp mailing list:

,---
| http://www.mail-archive.com/picolisp@software-lab.de/msg03764.html
`---

When you replace # with ; as comment char, there is no difference
between a PicoLisp source file (.l) or an Emacs Lisp source file (.el)
with regards to this trick. 

Actually, the Org-mode visibility commands mostly work out of the box
too, without the .l or .el source buffer being in org (minor) mode,
since outline-minor-mode is active and these Org commands often simply
act on the (buffer local) 'outline-regexp', which might be '^;; \*+ ' or
'^## \*+ ' or something similar too.

-- 
cheers,
Thorsten




Re: [O] Passing variables between code blocks

2013-01-24 Thread Thomas S. Dye
Hi Yatam Avital,

Yotam Avital yota...@gmail.com writes:

 I want to use org-mode for data analysis for my results. I also want to do
 this using small chunks of code blocks for various task. To achieve that. I
 need to pass dictionaries (20 entries of lists, each of several hundreds
 variables, each is a list by itself). I wanted to do so by the #+CALL
 option for example:


 * test
   #+NAME:test
   #+BEGIN_SRC python
 vars = dict()
 vars[1] = 1
 vars[2] = 2
 return vars

   #+END_SRC

 * caller
   #+NAME: caller
   #+HEADER: :var ins=#+CALL: test()
   #+BEGIN_SRC python :results output
 print files

   #+END_SRC

You have the wrong syntax.  There is no need for #+CALL: in this
situation.

See section 14.8.2.1 of the manual:

code block without arguments
a code block name (from the example above), as assigned by #+NAME:, optionally 
followed by parentheses
  #+BEGIN_SRC emacs-lisp :var length=table-length()
  (* 2 length)
  #+END_SRC

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] full outline functionality in .el files: how?

2013-01-24 Thread Thorsten Jolitz
Bastien b...@altern.org writes:

Hi Bastien,

 Gregor Zattler telegr...@gmx.net writes:

 Hi Thorsten,
 * Thorsten Jolitz tjol...@googlemail.com [24. Jan. 2013]:
 - after figuring out that I can have full outline functionality in .el
   files too, the (in my eyes) main advantage of an org-based config was
   gone. 

 could you please elaborate how to achieve this?

 See here: http://orgmode.org/worg/org-faq.html#sec-5-4

I just tried it, the org-cyle commands do work in my init.el (in
outline-minor-mode), except the global cycling (with one C-u), that
one does nothing. But the others (zero Args, or with C-u C-u or C-u C-u
C-u) seem to work as expected. 

-- 
cheers,
Thorsten




Re: [O] full outline functionality in .el files: how?

2013-01-24 Thread Bastien
Hi Thorsten,

Thorsten Jolitz tjol...@googlemail.com writes:

 I just tried it, the org-cyle commands do work in my init.el (in
 outline-minor-mode), except the global cycling (with one C-u), that
 one does nothing. But the others (zero Args, or with C-u C-u or C-u C-u
 C-u) seem to work as expected. 

I don't understand what does not work exactly -- can you tell me?

-- 
 Bastien



Re: [O] Export of subtree does not include header

2013-01-24 Thread Søren Mikkelsen
John Hendy jw.he...@gmail.com writes:

 On Fri, Jan 18, 2013 at 4:35 AM, Søren Aagaard Mikkelsen
 so...@aamikkelsen.dk wrote:
 I have used orgmode for a while, but hasn't used any of its advanced
 features that much. I'm currently writing a minutes report and what to
 export a specific subtree, e.g.

 * Minutes from 2013-01-11

 * Minutes from 2013-01-18--- Want to export this only

 Then I press C-c @, which marks the subtree, and then I press C-c C-e
 and export it as a pdf-document.

 The problem is that I want the top section to remain the same, i.e. Minutes 
 from
 2013-01-18 is the top section and the others to be subsection of
 that.

 Currently, it surely exports the right subtree but the top-section is
 not Minutes from 2013-01-18, but the bullet after that.

 I get the same behavior. Does it need to export it in a tree like
 format, or would you be okay with your top level headline (the one you
 want exported, but which is currently not) being the actual title of
 the document? Or is that what you're currently getting.


This is what I'm currently getting. I want to have a document with all my
minutes and my idea is, that I should be able to export one heading for
each meeting, so I can prepare an agenda and afterwards fill in the
outcome of the discussions.

 With default settings (org-export-latex-title-command \\maketitle),
 I get the top-most headline of the marked subtree as my document title
 and the next level headline as the first section. Is this what you're
 getting, or the top headline text isn't showing up in the document at
 all?

Yes, I get the same result. I don't want subsections to be promoted to
sections when I export the org-markup. Is that possible?


 If having it as the title would work, you would get:
 --
 [centered]Minutes from 2013-01-18[centered]

 A bit of white space

 Any text directly under Minutes from 2013-01-18...

 [section] The first headline under Minutes from 2013-01-18 [section]
 text under that headline

 [section 2] The second headline under Minutes from 2013-01-18 [section]
 text under that headline
 --

 If it's just the centered text/bit white space gap you don't like, I'm
 sure there's LaTeX header arguments you could put in your Org document
 or setupfile to left-align the title and remove the space. What do you
 think of that option?

 Also... just to save you *one* keystroke,  you can put your cursor on
 the headline of interest and do =C-e 1 p=, which I think does the same
 as marking the whole subtree with =C-c @ C-e p=.


 John


Thanks for the keystroke advice. Love a bit of emacs-hints :)




Re: [O] BUG: coderef labels not stripped when tangling

2013-01-24 Thread Michael Alan Dorman
Hi, Sebastien,

Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 Or a feature, with the consequence that you should put those refs as comments
 (with the appropriate syntax in your language).

That is an excellent suggestion for resolving my immediate issue that
had not occured to me at all.  It believe it does mean that the
presentation of the code ends up with seemingly empty comments where the
coderefs were, but that's a relatively minor thing.

 But, yes, those comments stay as well in your tangled code, which you may not
 like.

It seems counter-intuitive to me that text that is regarded as
meta-information when rendering for presentation is not treated
similarly when tangling---a needless mismatch between the two processes.

But thanks for your workaround suggestion, I will definitely take
advantage of it.

Mike.



Re: [O] org-plus-contrib: Invalid function: org-no-popups

2013-01-24 Thread Bastien
Hi Moritz,

Moritz Ulrich mor...@tarn-vedra.de writes:

 Any hints? Googling just pointed me to a mail thread where removing,
 restarting Emacs and re-installing the package fixed everything - that
 doesn't work for me.

It's safer not to use GNU ELPA or Org ELPA for installing Org 
for now.  Yes, that's a bit an awkward statement to make, but
still -- if you can, install from Git or the .tar/zip archive.

All best,

-- 
 Bastien



Re: [O] Bug: [PATCH] Org-babel: separate #+attr_... for code block and for results block [7.9.3d (release_7.9.3d-834-g60083a.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)]

2013-01-24 Thread Дядов Васил Стоянов
Hi,

I looked into generated html, not result of org-element-property.

But you're right: org-element-property works exactly as you say.

I'll change the patch to ob-core.el to reflect behavior of
org-element-property.

With best regards,
Vasil

 Of course not. With:

   #+attr_html: alt=big image width=100%
   file:123.png

 (org-element-property :attr_html (org-element-at-point)) with point at
 file:... will return (alt=\big image\ width=\100%\) while on the
 following example:

   #+attr_html: alt=big image width=100%

   file:123.png

 it will return nil.
   
 That is why I think that it is not necessary to make org-babel behavior
 different from org-elements (to dissalow empty lines between #+attr and
 #+results when it searches results block), at least for now.

 Babel behaviour is already slightly different from Elements's. In the
 long run it will be necessary to correct this.

 PS: Is there any good documentation and explanation of org-mode
 internals? I could help a little with rewritting org-babel to use
 org-elements.

 You may have a look at the comments at the start of org-elements.el. At
 some point, I will have to write an Info doc about this library, unless
 I postpone it until the end of time.


 Regards,



Re: [O] [PATCH] session with python-mode.el complains of void py-toggle-shells

2013-01-24 Thread Bastien
Hi Andreas,

Andreas Röhler andreas.roeh...@online.de writes:

 Okay, I'll dig into.

 For the moment: assume this code should not be needed,
 python-mode.el should act that all.  But let me have a closer look,

Great, thanks a lot!

-- 
 Bastien



Re: [O] Wish: switch active time-stamps to inactive when CANCELED

2013-01-24 Thread Bastien
Hi Viktor,

Viktor Rosenfeld listuse...@gmail.com writes:

 The credit should go to Bernt Hansen. I found it in his org-mode
 setup.

Fixed, thanks!

-- 
 Bastien



Re: [O] Bug: [PATCH] Org-babel: separate #+attr_... for code block and for results block [7.9.3d (release_7.9.3d-834-g60083a.dirty @ /home/vdyadov/Work/Tools/emacs/org-mode/lisp/)]

2013-01-24 Thread Bastien
Hi Vasil,

vdya...@elvees.com (Дядов Васил Стоянов) writes:

 I'll change the patch to ob-core.el to reflect behavior of
 org-element-property.

Please fill in the form to assign your copyright to the FSF,
otherwise we will not be able to take any patch for Org's core.

http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt

Be patient, the process can take up to 3-4 weeks...  :/

Thanks!

-- 
 Bastien



Re: [O] escape square brackets to express literal [[]] without link magic?

2013-01-24 Thread Bastien
Hi David,

Loyall, David david.loy...@nebraska.gov writes:

 Does org-mode have an escape mechanism?

The new exporter handles links like =[[!img]]= correctly.

Download Org: orgmode.org/org-7.9.3d.tar.gz

Add the contrib lisp directory:

(add-to-list 'load-path ~/org-7.9.3d/lisp/)
(add-to-list 'load-path ~/org-7.9.3d/contrib/lisp/ t)

(require 'org-export)
(require 'org-e-html)

M-x org-export-dispatch RET h H 

and you will have a buffer with the correct HTML output.

HTH,

-- 
 Bastien



Re: [O] Compare a timestamp with existing agenda entries.

2013-01-24 Thread Bastien
Hi Nicolas,

Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 My use case is to ease the process of filling in a doodle. I already
 wrote a few lines to import the proposed dates of a given doodle into
 org-mode timestamps (see here: https://gist.github.com/4529894). Atm I
 have to open (C-c C-o) each time stamp to see if there's a clash.

 Any comment are welcome ! Thanks for your attention,

Here is what I do.

I have this in my Emacs config:

(setq calendar-mark-diary-entries-flag t)

And I use a simple ~/.diary file containing this:

%%(org-diary :scheduled :deadline :sexp :timestamp) ~/org/rdv.org

That way, each time I open the calendar, days with
scheduled/deadlined/timestamped entries in rdv.org
are highlighted.

This is not perfect because it does not tell the time
of these appointments -- so I just added a new binding 
in the Org read date prompt: you can now use `?' to view
the diary entries on the  date the cursor here.

HTH,

-- 
 Bastien



Re: [O] full outline functionality in .el files: how?

2013-01-24 Thread Thorsten Jolitz
Bastien b...@altern.org writes:

Hi Bastien,

 I don't understand what does not work exactly -- can you tell me?

ok, I checked more exactly in my init.el in outline-minor-mode:

(1)

M-x org-cycle on the top-level entries expands the entry one level, and
then collapses it again, i.e. cycling between two states only

(2)

C-u M-x org-cyle does nothing

(3)

C-u C-u M-x org-cyle actually does the global cycling through 3 states,
but it goes from OVERVIEW to SHOW ALL to CONTENTS (1. to 3. to 2.)

(4)

C-u C-u C-u M-x org-cyle makes the entire buffer visible the first time,
and does nothing when invoked again. 
 
-- 
cheers,
Thorsten




Re: [O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Andreas Leha
Hi Bastien,

Bastien b...@altern.org writes:

 Hi Andreas,

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Apologies for hijacking this thread.  But could someone tell me how to
 open that link directly in emacs?  My try with 'browse-url-emacs'
 failed.

Thanks for answering that OT question, although ...

 You cannot.  Get the file and open it.
  ^^  that is something I'd not expect to hear when it comes to
emacs


- Andreas




Re: [O] footnote placement

2013-01-24 Thread henry atting
Bastien b...@altern.org writes:

 Hi Henry,

 henry atting s...@online.de writes:

 how can I achieve that footnotes are inserted at the end of the top
 level headline? By default they are inserted at the end after a new
 headline ``footnotes''. 

 I remember seeing a hack for this, but maybe my memory is wrong.
 With Org's default features, you cannot.
  
 Secondly how to prevent html export from altering the given
 position?

 I don't understand... what do you mean?

Thanks Bastien. Okay, it is not possible by default. As a workaround I manually
put the footnotes where I want them to be. So far so good, but when I
export the file to html the footnotes are at the end of the html
document anyway. Hence my second question. It would not bother me to
change the footnotes' postion in the org file by hand if the org to html
exporter would respect my changes.
 
 Best,

Cheers,
henry





Re: [O] About `open formula'

2013-01-24 Thread Bastien
Hi Xue,

Xue Fuqiao xfq.f...@gmail.com writes:

 In (info (org) Editing and debugging formulas):

 `TAB (`org-table-fedit-lisp-indent')'
   Pretty-print or indent Lisp formula at point.  When in a line
   containing a Lisp formula, format the formula according to
   Emacs Lisp rules.  Another TAB collapses the formula back
   again.  In the open formula, TAB re-indents just like in
   Emacs Lisp mode.  

 What does the `open formula' mean?

It means in the non-collapsed formula, see the sentence before.

-- 
 Bastien



[O] Exporting to LaTeX to use it with \input

2013-01-24 Thread Seweryn Kokot
Hi,

I would like to have a main text of the document in LaTeX and only some parts as
org files (using tables and babel functionality). Then these files I want to
export to .tex files and include to the main tex file with \input{myorgfile1}.
My question: is it possible to export to LaTeX without preamble and postable? Or
how to automatically get rid of this redundant text to use it in \input?

Thanks in advance,
Seweryn






Re: [O] [org2blog] How to add section numbers?

2013-01-24 Thread Wenshan Ren

Bastien writes:

 Hi,

 Ren Wen shan renws1...@gmail.com writes:

 I started to use org2blog for blogging recently and it works great.
 Just
 wondering if it is possible to add section numbers like
 org-export-as-html does.

 For example, a org file like this:

 * Generally Not Used
 ** Except
 *** By Middle Aged

 * Computer
 ** Scientist

 will becomes:

 1. Generally Not Used
  1.2 Except
1.2.1 By Middle Aged

 2. Computer
  2.1 Scientist

 Thanks,

 See this:
 http://stackoverflow.com/questions/10340276/how-to-add-section-numbers-1-2-3-4-1-automatically-using-css

 With an example here:
 http://jsfiddle.net/PfcX2/1/

 HTH,

Hi Bastien,

Thank you, they make sense to me.

It uses CSS counter-increment property to add section numbers, I want to
know if it is possible to make use of labels such as h1 id=sec-1-1.

I found that blogs generated by org2blog actually contain section
numbering information (as the label mentioned above), it is just not
showing.

Best,

--
Wenshan Ren
Email: renws1...@gmail.com
Blog: wenshanren.org
Douban: www.douban.com/people/renws



Re: [O] Bug: Patch for org-docview: make normal links from docview: links on export from org to html [7.9.3d (release_7.9.3d-1-g115bd7 @ /home/vdyadov/Work/Tools/emacs/share/emacs/24.2/lisp/org/)]

2013-01-24 Thread Bastien
vdya...@elvees.com (Дядов Васил Стоянов) writes:

 Pathch for org-docview.el is attached.

I applied a slightly more general version of it:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=6f3cb7

Please add a proper ChangeLog for further patches.

Thanks!

-- 
 Bastien



[O] Contrib missing from (Cygwin) Emacs

2013-01-24 Thread Sebastien Vauban
Hello,

When trying to publish my Web site pages with the most recent Cygwin Emacs[1], I
get the following error:

--8---cut here---start-8---
Debugger entered--Lisp error: (error Can't find library org)
  signal(error (Can't find library org))
  error(Can't find library %s org)
  find-library-name(org)
  (file-name-directory (find-library-name org))
  (expand-file-name ../contrib (file-name-directory (find-library-name 
org)))
  (file-name-as-directory (expand-file-name ../contrib (file-name-directory 
(find-library-name org
  (expand-file-name scripts (file-name-as-directory (expand-file-name 
../contrib (file-name-directory (find-library-name org)
  (file-name-as-directory (expand-file-name scripts (file-name-as-directory 
(expand-file-name ../contrib (file-name-directory (find-library-name 
org))
  (expand-file-name ditaa.jar (file-name-as-directory (expand-file-name 
scripts (file-name-as-directory (expand-file-name ../contrib 
(file-name-directory (find-library-name org)))
  eval((expand-file-name ditaa.jar (file-name-as-directory (expand-file-name 
scripts (file-name-as-directory (expand-file-name ../contrib 
(file-name-directory (find-library-name org
  custom-initialize-reset(org-ditaa-jar-path (expand-file-name ditaa.jar 
(file-name-as-directory (expand-file-name scripts (file-name-as-directory 
(expand-file-name ../contrib (file-name-directory (find-library-name 
org
  custom-declare-variable(org-ditaa-jar-path (expand-file-name ditaa.jar 
(file-name-as-directory (expand-file-name scripts (file-name-as-directory 
(expand-file-name ../contrib (file-name-directory (find-library-name 
org))) (/usr/share/emacs/24.2/lisp/org/org-exp-blocks.elc . 6117) 
:group org-babel :type string)
  require(org-exp-blocks)
  
byte-code(\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\207
 [require org org-macs org-agenda org-exp-blocks ob-exp org-src] 2)
  require(org-exp)
  byte-code(\300\301!\210\300\302!\210\303\304\305\306\307\310\311\312\207 
[require org-exp format-spec custom-declare-group org-export-html nil Options 
specific for HTML export of Org-mode files. :tag Org Export HTML :group 
org-export] 8)
  require(org-html)
  byte-code(\300\301!\210\300\302!\207 [require org-html org-compat] 2)
  require(org-special-blocks)
  eval-buffer(#buffer  *load* nil /cygdrive/d/Users/sva/src/www/org-init.el 
nil t)  ; Reading at buffer position 1053
  load-with-code-conversion(/cygdrive/d/Users/sva/src/www/org-init.el 
/cygdrive/d/Users/sva/src/www/org-init.el nil t)
  load(/cygdrive/d/Users/sva/src/www/org-init.el nil t)
  command-line-1((--load ./org-init.el --funcall publish-www))
  command-line()
  normal-top-level()
--8---cut here---end---8---

It seems that `org-ditaa' and `org-exp-blocks' both expect to find an
../contrib directory. Such is not bundled with Emacs. Isn't the assumption
wrong, then or should `contrib' be bundled as well?

Best regards,
  Seb

[1] Org-mode version 7.8.11 (org.elc @ /usr/share/emacs/24.2/lisp/org/)

-- 
Sebastien Vauban




Re: [O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Daimrod
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Kyle Machulis k...@nonpolynomial.com writes:
 https://raw.github.com/eschulte/emacs24-starter-kit/master/starter-kit.org
 Apologies for hijacking this thread.  But could someone tell me how to
 open that link directly in emacs?  My try with 'browse-url-emacs'
 failed.

You can use Emacs-w3m[1] to browse the web from Emacs.

BTW, I've made functions to browse and copy URL in Emacs[2][3].

- `C-c b' to browse the URL at point
- `C-c y' to copy the URL at point

You can customize which browser is used to browse an URL with
`gu-first-browse-url-function' and `gu-second-browse-url-function' (by
default it uses `browse-url-browser-function' and `browse-url-generic').
The first one is used by default, the second one when you use a prefix
(`C-u C-c b').

[1] http://emacs-w3m.namazu.org/
[2] https://github.com/daimrod/Emacs-config/blob/master/elisp/graze-url.el
[3] https://github.com/daimrod/Emacs-config/blob/master/config-bindings.el#L73

-- 
Daimrod/Greg


pgpFNhLmPkczU.pgp
Description: PGP signature


Re: [O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Bastien
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

   ^^  that is something I'd not expect to hear when it comes to
 emacs

(when (switch-to-buffer-other-window
   (url-retrieve-synchronously

https://raw.github.com/eschulte/emacs24-starter-kit/master/starter-kit.org;))
  (write-file (read-from-minibuffer File: ))
  (org-mode))

-- 
 Bastien



Re: [O] BUG: coderef labels not stripped when tangling

2013-01-24 Thread Sebastien Vauban
Michael,

Michael Alan Dorman wrote:
 Sebastien Vauban wxhgmqzgw...@spammotel.com writes:
 Or a feature, with the consequence that you should put those refs as comments
 (with the appropriate syntax in your language).

 That is an excellent suggestion for resolving my immediate issue that
 had not occured to me at all.  It believe it does mean that the
 presentation of the code ends up with seemingly empty comments where the
 coderefs were, but that's a relatively minor thing.

Glad it helped!

 But, yes, those comments stay as well in your tangled code, which you may not
 like.

 It seems counter-intuitive to me that text that is regarded as
 meta-information when rendering for presentation is not treated
 similarly when tangling---a needless mismatch between the two processes.

I'll let Eric answer on this...

 But thanks for your workaround suggestion, I will definitely take
 advantage of it.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] agenda question about representing items [PATCH]

2013-01-24 Thread Bastien
Hi Arun,

Arun Persaud apers...@lbl.gov writes:

 thanks everyone for the feedback! With it I managed to use the
 %(expression) in org-agenda-prefix-format to show the breadcrumbs. In
 case that's useful for other people too, I attached a patch that adds a
 %b option to org-agenda-prefix-format to does the same. Would be great,
 if this could be included.

Thanks for the patch -- can you sign the FSF copyright assignment?
http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt

Otherwise I won't be able to apply it.

Thanks!

-- 
 Bastien



Re: [O] BUG: coderef labels not stripped when tangling

2013-01-24 Thread Bastien
Hi Michael,

Michael Alan Dorman mdor...@ironicdesign.com writes:

 It seems counter-intuitive to me that text that is regarded as
 meta-information when rendering for presentation is not treated
 similarly when tangling---a needless mismatch between the two
 processes.

I agree this is a bug, and a pretty ugly one I'd say.

I'll have a look in the next days or so, but perhaps
(hopefully!) Eric will beat me up.

Thanks for reporting this!

-- 
 Bastien



Re: [O] full outline functionality in .el files: how?

2013-01-24 Thread Bastien
Oh!  Now I understand why we miscommunicate...

You checked this link...


  http://orgmode.org/worg/org-faq.html#sec-5-4

But the webpage was perhaps not up to date and showed this
link instead:

  http://orgmode.org/worg/org-faq.html#sec-5-5

See the first link for my answer to Gregor, which
is about using orgstruct-mode folding capacity in
emacs-lisp-mode.

Also, the difference between Org's cycling and
those local cycling features may be related to the
fact that the org-cycle functions are not called
interactively -- at least in the first FAQ above.

Best,

-- 
 Bastien



Re: [O] Fixes for org-capture-templates-contexts

2013-01-24 Thread Bastien
Hi Paul,

Paul Sexton psexton...@gmail.com writes:

 Below are patches against org.el and org-capture.el.

it really helps to send patches with git format-patch, and to add a
ChangeLog... at least it speeds up the patch reviewing process for me!

 Are you sure it works correctly? 

Yes -- please re-read the docstring:

   '((c ((in-mode . message-mode
  ^^^^

Notice the parentheses here.  Please have a go with this syntaxe and
let me know, but I tested again and it works for me.

If that's okay for you, I'm fine with just adding the
in-buffer/not-in-buffer feature.

Thanks!

-- 
 Bastien



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Gregor Zattler
Hi Bastien,
* Bastien b...@altern.org [24. Jan. 2013]:
 Gregor Zattler telegr...@gmx.net writes:
 my agenda shows a line:

 No heading for this item in buffer or region.
 
 It means the agenda contains tasks like
 
 * TODO
 
 with no heading.
 
 how should I track down the problematic part of my org files? 
 
 You can run this in your Org buffer:
 
 M-: (while (and (re-search-forward org-complex-heading-regexp nil t) 
 (match-string 4))) RET
 
 It will stop at the problematic headlines.

That really helped to eliminate all empty headlines.  I later
checked via 

egrep -- ^[*]+[[:space:]]*$ 

on my agenda files that there are no further empty headlines.


But alas, the message No heading for this item in buffer or
region. still appears two times in my agenda -- for today.

When I move the cursor over this lines a message appears in the
echo area:

byte-code: Before first headline at position 64 in buffer org.org [14 times]

The second line of org.org begins at character 64 in the buffer.
It's a timestamp:

#Time-stamp: 2013-01-24 16:30:39 grfz

Till recently this was no problem since it is a comment line.
Obviously org-mode somehow interprets this timestamp, since the
messages disappeared after I changed the time stamp delimiter from
`' and `' respectively to `'.  I consider this to be a bug
since these time stamps are a standard Emacs feature and this
line is a comment org-mode-wise.


Thanks for your help to clean up my org files and tracking down
the offending lines in my org agenda files. 

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-



Re: [O] Contrib missing from (Cygwin) Emacs

2013-01-24 Thread Bastien


Hi Sébastien,

Sebastien Vauban
wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes:

 It seems that `org-ditaa' and `org-exp-blocks' both expect to find an
 ../contrib directory. Such is not bundled with Emacs. Isn't the assumption
 wrong, then or should `contrib' be bundled as well?

I don't know how Cygwin builds the Emacs package...

If this is a problem in Cygwin, it's a miracle (?) no Org user
reported it before!

I don't know how to fix this, things are fine in Org =7.9.

-- 
 Bastien




Re: [O] [org2blog] How to add section numbers?

2013-01-24 Thread Bastien
Wenshan Ren renws1...@gmail.com writes:

 It uses CSS counter-increment property to add section numbers, I want to
 know if it is possible to make use of labels such as h1
 id=sec-1-1.

I don't know.

 I found that blogs generated by org2blog actually contain section
 numbering information (as the label mentioned above), it is just not
 showing.

The label in the id parameter are numbered, but the CSS trick 
you want to use will certainly not use this label.

Best,

-- 
 Bastien



Re: [O] Editing comments or strings in Org mode

2013-01-24 Thread Samuel Wales
I like the idea a lot.  Thanks for posting it.  It will help with
lists in elisp files.

Also wondering about the opposite.  What if we could have
bidirectional links, and actually use an agenda file for some of the
entries instead of keeping the entries in the non-Org file?

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.



Re: [O] More decoration for babel output

2013-01-24 Thread Gunnar Wolf
Gunnar Wolf dijo [Wed, Jan 23, 2013 at 11:25:43AM -0600]:
  When exporting to HTML I always add some extra CSS to my org-mode
  config, for the purpose of identifying which chunks are input
  vs. output, and for identifying the language of the code in code
  chunks.  Language is identified by a little label on the box, and
  input/output is identified by green/red.
  
  Would this be helpful to include by default?  Patch attached.
 
 As for me, with slight adaptations, I am including it in my operating
 systems class notes. Thanks!

FWIW, the only changes I did to your css is to use darker backgrounds
(#33 instead of #F5FFF5), as the code is hardwired to somewhat
inconvenient colors (some very dark, some very bright) and the result
was hard to read.



Re: [O] Editing comments or strings in Org mode

2013-01-24 Thread François Pinard
Samuel Wales samolog...@gmail.com writes:

 What if we could have bidirectional links, and actually use an agenda
 file for some of the entries instead of keeping the entries in the
 non-Org file?

I'm not sure I understand the use case you have in head.  Maybe
executable links could be helpful to you?  I use them to generate Org
views I often need (they look like [[elisp:CODE][BUTTON NAME]]).

François



Re: [O] Contrib missing from (Cygwin) Emacs

2013-01-24 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
 Sebastien Vauban writes:

 It seems that `org-ditaa' and `org-exp-blocks' both expect to find an
 ../contrib directory. Such is not bundled with Emacs. Isn't the assumption
 wrong, then or should `contrib' be bundled as well?

 I don't know how Cygwin builds the Emacs package...

 If this is a problem in Cygwin, it's a miracle (?) no Org user
 reported it before!

 I don't know how to fix this, things are fine in Org =7.9.

I don't think it's related to Cygwin per se. AFAIK:

- `contrib' is not bundled within Emacs, while

- `org-ditaa' and `org-exp-blocks' both expect that directory along where
  org.el resides

in the current Org version...

Just grep for ../contrib:

./ob-ditaa.el:55:  ../contrib
./org-exp-blocks.el:252:   ../contrib

I guess the (relative) hardcoding should be avoided.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Nick Dokos
Gregor Zattler telegr...@gmx.net wrote:

 When I move the cursor over this lines a message appears in the
 echo area:
 
 byte-code: Before first headline at position 64 in buffer org.org [14 times]
 
 The second line of org.org begins at character 64 in the buffer.
 It's a timestamp:
 
 #Time-stamp: 2013-01-24 16:30:39 grfz
 
 Till recently this was no problem since it is a comment line.
 Obviously org-mode somehow interprets this timestamp, since the
 messages disappeared after I changed the time stamp delimiter from
 `' and `' respectively to `'.  I consider this to be a bug
 since these time stamps are a standard Emacs feature and this
 line is a comment org-mode-wise.
 
 

I am puzzled. The bug is almost certainly related to commit
211b137ef46d04b17b46f256696eb5c1c3a1d2be which changed org-agenda-skip
to check text properties rather than # explicitly. I can attest that
the bug does not show with a version earlier than that commit.

OTOH, it does not show *consistently* with the most recent version.
In a minimal test, I have the following file as the only file in the
agenda list:

--8---cut here---start-8---
# timestamp: 2013-01-24 Thu

* TODO foo
  SCHEDULED: 2013-01-24 Thu
  
--8---cut here---end---8---

and when I construct the agenda, I get the no-heading message; but if I
visit the file, and M-x describe-text-properties RET on the # in the
first line, it correctly says that the face is font-lock-comment-face;
constructing the agenda after that does *not* produce the message.

Are text properties assigned lazily perhaps? If so, they will need to be
somehow forced in this case.

Nick

PS. BTW, can you reproduce this behavior or am I tilting at windmills?





Re: [O] Still Wishing for Snooze

2013-01-24 Thread Andrew M. Nuxoll

Bastien:

I sense that your reply contains the key to the functionality that I 
want but I find I am unable to figure it out.  I'm sorry to bother you 
further but I would be grateful for a little more direction.


My first problem is that C-h is mapped to backspace on my computer.  I 
presume (C-h v) means view help on a particular item.


My second problem is that org-agenda-ignore is not a valid prefix for 
anything in my version of org-mode.  (I have version 7.9.3d 
installed.).  I *think* you intended to point me to variables that begin 
with org-agenda-todo-ignore instead.  Can you confirm this is so?


My third problem is that I can not figure out how to use these variables 
to accomplish my purpose.  I think part of the problem is that I am 
using custom agenda commands.  The relevant code snippet for the command 
I use most is here:

(setq org-agenda-custom-commands
 '(
   (o Today's Tasks
((agenda  ((org-agenda-ndays 1)))  ;; limits the agenda 
display to a single day

 (todo TODO))
((org-agenda-compact-blocks t)
 ))
 etc...


Would you please give me some more information?

Thank you,
:AMN:


On 01/23/2013 05:36 AM, Bastien wrote:

Hi Andrew,

Andrew M. Nuxoll nux...@up.edu writes:


1.  Add a date tag to an entry that indicates that it is inactive until a
certain date.  I'm picturing something like this:

* TODO [#B] Verify login to the virtual machines
   SCHEDULED: 2013-01-11 Tue +1w DELAY: 2013-01-24 Thu

2.  Add a command similar to org-deadline that I can use to attach a delay
date to a to-do item

3.  When I display my agenda, items that are delayed are not displayed.

My e-lisp is pretty rusty so *any* advice or help is great.  Could someone
help point me to the right files and functions I'll need to modify to
accomplish this?

C-h v org-agenda-ignore TAB will open many doors.

See C-h org-agenda-todo-ignore-timestamp RET for example:

   Non-nil means don't show entries with a timestamp.
   This applies when creating the global todo list.
   Valid values are:
   
   past Don't show entries for today or in the past.
   
   future   Don't show entries with a timestamp in the future.

The idea behind this is that if it has a future
timestamp, you don't want to think about it until the
date.
   
   all  Don't show any entries with a timestamp in the global todo list.

The idea behind this is that by setting a timestamp, you
have already taken care of this item.
   
   This variable can also have an integer as a value.  If positive (N),

   todos with a timestamp N or more days in the future will be ignored.  If
   negative (-N), todos with a timestamp N or more days in the past will be
   ignored.  If 0, todos with a timestamp either today or in the future will
   be ignored.  For example, a value of -1 will exclude todos with a
   timestamp in the past (yesterday or earlier), while a value of 7 will
   exclude todos with a timestamp a week or more in the future.
   
   See also `org-agenda-todo-ignore-with-date'.  See also the variable

   `org-agenda-tags-todo-honor-ignore-options' if you want to make his
   option also apply to the tags-todo list.
   



--
Andrew M. Nuxoll Phone: 503-943-7688
Asst Professor of Computer Science   Fax:   503-943-7316
University of Portland - MSC #145Email: nux...@up.edu
5000 N. Willamette Blvd  Web:   http://faculty.up.edu/nuxoll
Portland, OR  97203-5798 Office: Shiley Hall Rm 217



Re: [O] How to use org-capture with dynamic ID targets?

2013-01-24 Thread Bastien
Hi Darlan,

Darlan Cavalcante Moreira darc...@gmail.com writes:

 everything works as expected and a table in the headline with ID
 someIDstring is used. However, if I try

 (f The template description table-line
 (id some_variable)
 this is the template content
 :table-line-pos II-1
 :immediate-finish t)

Can you provide the full (setq org-capture-templates ...)
s-expression?

Did you tried this?

(setq org-capture-templates
 `((f The template description table-line
(id ,some_variable)
this is the template content
:table-line-pos II-1
:immediate-finish t)))

 then it does not work even if some_variable or (some_function) provides the
 correct ID value. It seems that
 (id something)
 will always interpret something as a string (no matter if I put it inside
 quotes or not).

Yes, it expects a string.

 Is it possible to achieve what I want with the current org-capture
 implementation? 

See above.  The problem being, of course, that the capture template
for f will use some_variable *statically* -- if the value of the
some_variable variable changed after you evaluated the s-expression
(setq org-capture-templates ...) then the new value will not be
known.

 If not, consider this as a feature request.

What feature exactly?  To allow a function here that would dynamically
set the id? 

 The reason behind this is that each month I want a different target table
 for this capture template and I already implemented a function that returns
 the correct ID. If I can somehow make the ID target type use the return
 value of this function then this capture template will use the correct
 table each month. If not, I would be forced to manually change the capture
 template in the beginning of each month (something I will definitely
 forget).

If you want to use a function ,some_variable will not work, check 
,@ constructs in the Elisp manual.

Thanks,

-- 
 Bastien



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Nick Dokos
Gregor Zattler telegr...@gmx.net wrote:

 When I move the cursor over this lines a message appears in the
 echo area:
 
 byte-code: Before first headline at position 64 in buffer org.org [14 times]
 
 The second line of org.org begins at character 64 in the buffer.
 It's a timestamp:
 
 #Time-stamp: 2013-01-24 16:30:39 grfz
 
 Till recently this was no problem since it is a comment line.
 Obviously org-mode somehow interprets this timestamp, since the
 messages disappeared after I changed the time stamp delimiter from
 `' and `' respectively to `'.  I consider this to be a bug
 since these time stamps are a standard Emacs feature and this
 line is a comment org-mode-wise.
 
 

It works fine on the slightly old

Org-mode version 7.9.3d (release_7.9.3d-826-gbe0d87.dirty @ 
/home/nick/elisp/org-mode/lisp/)

with the following file as the only agenda file:

--8---cut here---start-8---
# timestamp: 2013-01-24 Thu

* TODO foo
  SCHEDULED: 2013-01-24 Thu
--8---cut here---end---8---

If I get rid of the # or add something else before it, I get the
message you mention, but otherwise it is silent.

Assuming you are running a more recent version than the one above,
the bug may be because of a recent change to org-agenda-skip:
it used to check explicitly for # and skip the entry, but commit
211b137ef46d04b17b46f256696eb5c1c3a1d2be changed it to check a text
property. I guess the text property is not present or it is not checked
correctly.

Nick



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Bastien
Gregor Zattler telegr...@gmx.net writes:

 #Time-stamp: 2013-01-24 16:30:39 grfz

 Till recently this was no problem since it is a comment line.

This is not a comment line, comment lines start with [\t ]*# 
(note the space after the #).

-- 
 Bastien



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Bastien
Hi Gregor,

Gregor Zattler telegr...@gmx.net writes:

 But alas, the message No heading for this item in buffer or
 region. still appears two times in my agenda -- for today.

The attached patch fixes it.

Carsten, was there any special reason for allowing to add
an agenda entry before the first headline?  The following 
patch prevent this.

Thanks,

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f088e59..4236b0a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5406,9 +5406,6 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
 
 \(fn optional END) nil nil)
 
-(defconst org-agenda-no-heading-message
-  No heading for this item in buffer or region.)
-
 (defun org-agenda-get-timestamps (optional deadline-results)
   Return the date stamp information for agenda display.
   (let* ((props (list 'face 'org-agenda-calendar-event
@@ -5488,7 +5485,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
 	  category-pos (get-text-property b0 'org-category-position))
 	(save-excursion
 	  (if (not (re-search-backward org-outline-regexp-bol nil t))
-	  (setq txt org-agenda-no-heading-message)
+	  (throw :skip nil)
 	(goto-char (match-beginning 0))
 	(if (and (eq t org-agenda-skip-timestamp-if-deadline-is-shown)
 		 (assoc (point) deadline-position-alist))
@@ -5724,7 +5721,7 @@ please use `org-class' instead.
 		  (and (looking-at .*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$)
 		   (match-string 1)
 	  (if (not (re-search-backward org-outline-regexp-bol nil t))
-	  (setq txt org-agenda-no-heading-message)
+	  (throw :skip nil)
 	(goto-char (match-beginning 0))
 	(setq hdmarker (org-agenda-new-marker)
 		  inherited-tags
@@ -5941,7 +5938,7 @@ See also the user option `org-agenda-clock-consistency-checks'.
 		  warntime (get-text-property (point) 'org-appt-warntime)
 		  category-pos (get-text-property (point) 'org-category-position))
 		(if (not (re-search-backward ^\\*+[ \t]+ nil t))
-		(setq txt org-agenda-no-heading-message)
+		(throw :skip nil)
 		  (goto-char (match-end 0))
 		  (setq pos1 (match-beginning 0))
 		  (setq inherited-tags
@@ -6066,7 +6063,7 @@ FRACTION is what fraction of the head-warning time has passed.
 	  (setq category (org-get-category)
 		category-pos (get-text-property (point) 'org-category-position))
 	  (if (not (re-search-backward ^\\*+[ \t]+ nil t))
-		  (setq txt org-agenda-no-heading-message)
+		  (throw :skip nil)
 		(goto-char (match-end 0))
 		(setq pos1 (match-beginning 0))
 		(if habitp
@@ -6167,7 +6164,7 @@ FRACTION is what fraction of the head-warning time has passed.
 		(setq category (org-get-category)
 		  category-pos (get-text-property (point) 'org-category-position))
 		(if (not (re-search-backward org-outline-regexp-bol nil t))
-		(setq txt org-agenda-no-heading-message)
+		(throw :skip nil)
 		  (goto-char (match-beginning 0))
 		  (setq hdmarker (org-agenda-new-marker (point))
 			inherited-tags

-- 
 Bastien


Re: [O] TeX-master: TeX-master is let-bound

2013-01-24 Thread Christopher Schmidt
Christopher Schmidt christop...@ch.ristopher.com writes:
 The default value it t anyway.  The docstring suggests that this
 variable should be set via file variables.  I do not think org-mode
 should worry about AUCTeX.

Ping?

The default value of TeX-master is t.  Binding a symbol which might be
defvar'ed within the let-body does not work.  In fact, this might break
the Emacs instance, rendering any latex-mode buffer unusable.

To make a long story short, there is no excuse for the form in question.
Please remove it.  Everyone who messes with TeX-master should use
org-export-latex-final-hook to set TeX-master and/or add a local
variables list to the buffer.

2013-01-24  Christopher Schmidt  christop...@ch.ristopher.com

* org-latex.el (org-export-as-latex): Do not bind TeX-master.

--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -964,7 +964,6 @@ When PUB-DIR is set, use this as the publishing directory.
   (concat filename .tex)
 filename)))
 (auto-insert nil); Avoid any auto-insert stuff for the new file
-(TeX-master (boundp 'TeX-master))
 (buffer (if to-buffer
 (if (eq to-buffer 'string)
 (get-buffer-create *Org LaTeX Export*)
@@ -1105,9 +1104,11 @@ When PUB-DIR is set, use this as the publishing directory.
 (or (eq (char-before) ?\n)
(insert ?\n))

+(when (and to-buffer
+   (not (derived-mode-p 'latex-mode)))
+  (latex-mode))
 (run-hooks 'org-export-latex-final-hook)
-(if to-buffer
-	(unless (eq major-mode 'latex-mode) (latex-mode))
+(unless to-buffer
   (save-buffer))
 (org-export-latex-fix-inputenc)
 (run-hooks 'org-export-latex-after-save-hook)

Thank you,

Christopher


Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Nick Dokos
Bastien b...@altern.org wrote:

 Hi Gregor,
 
 Gregor Zattler telegr...@gmx.net writes:
 
  But alas, the message No heading for this item in buffer or
  region. still appears two times in my agenda -- for today.
 
 The attached patch fixes it.
 
 Carsten, was there any special reason for allowing to add
 an agenda entry before the first headline?  The following 
 patch prevent this.
 

I think you'd be better off fixing the lazily assigned text properties
and then you don't need to worry about adding restrictions. In addition,
this fix does not do anything for the following case:

If I slightly modify the previous example 

,
| # timestamp: 2013-01-24 Thu
| 
| * TODO foo
| #  SCHEDULED: 2013-01-24 Thu
`
  

to try to reproduce Rainer's problem, when I first construct the agenda,
I get *both* the TODO and the no-heading message: text properties are not
active. If I then visit the file (e.g. RET on the TODO item) and construct
the agenda again, neither the TODO nor the no-heading message appears.

Nick



Re: [O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Andreas Leha
Hi Bastien,

Bastien b...@altern.org writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

   ^^  that is something I'd not expect to hear when it comes to
 emacs

 (when (switch-to-buffer-other-window
(url-retrieve-synchronously
   
 https://raw.github.com/eschulte/emacs24-starter-kit/master/starter-kit.org;))
   (write-file (read-from-minibuffer File: ))
   (org-mode))

;-)

Thanks a lot for that!  Works nicely

Regards,
Andreas





Re: [O] Still Wishing for Snooze

2013-01-24 Thread Marc-Oliver Ihm

Hi Andrew,

some time ago I did somethin similar (see below), it works with properties and 
might
come close, to what you want ...

best regards, Marc


(defun org-date-state (arg)
  Save away state for current node; with prefix restore for all nodes if time has 
passed.
  (interactive P)
  (if arg
  (progn
(let ((today (format-time-string
  (substring (car org-time-stamp-formats) 1 -1)))
  (nvisited 0)
  (nchanged 0))
  (message Scanning...)
  (org-map-entries
   (lambda ()
 (let
 ((date_state (org-entry-get nil DATE_STATE))
  date state)
   (incf nvisited)
   (when date_state
 (unless (string-match (concat \\[
   org-ts-regexp1
   \\] \\(
   (regexp-opt org-todo-keywords-1)
   \\))
   date_state)
   (error Property DATE_STATE ('%s') does not consist of date and 
todo keyword !
  date_state))
 (setq date (match-string 1 date_state))
 (setq state (match-string 9 date_state))
 (unless (string today date)
   (org-todo state)
   (org-delete-property DATE_STATE)
   (search-forward-regexp org-property-start-re)
   (org-remove-empty-drawer-at PROPERTIES (point))
   (incf nchanged)
   nil 'agenda)
  (message Visited %d entries and changed %d of them nvisited 
nchanged)))
(org-entry-put nil DATE_STATE
   (concat
(format-time-string
 (org-time-stamp-format nil t)
 (org-read-date nil t))
 
(org-get-todo-state)))
(org-todo org-date-state-wait-state)))




Am 21.01.2013 19:20, schrieb Andrew M. Nuxoll:

A while ago I posted for help in adding an ability to snooze a to-do item:

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg20114.html

At the time, the only solution available was to create a manual copy of the 
item.  This approach creates as many problems as it solves for me. I've gotten 
so frustrated with this that I'm really to knuckle under and fix it myself.

I'd like to modify the org-mode code to support the following:

1.  Add a date tag to an entry that indicates that it is inactive until a 
certain date.  I'm picturing something like this:

* TODO [#B] Verify login to the virtual machines
   SCHEDULED: 2013-01-11 Tue +1w DELAY: 2013-01-24 Thu

2.  Add a command similar to org-deadline that I can use to attach a delay date 
to a to-do item

3.  When I display my agenda, items that are delayed are not displayed.

My e-lisp is pretty rusty so *any* advice or help is great.  Could someone help 
point me to the right files and functions I'll need to modify to accomplish 
this?

Thanks,
Andrew







Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Bastien
Nick Dokos nicholas.do...@hp.com writes:

 to try to reproduce Rainer's problem, when I first construct the agenda,
 I get *both* the TODO and the no-heading message: text properties are not
 active. If I then visit the file (e.g. RET on the TODO item) and construct
 the agenda again, neither the TODO nor the no-heading message
 appears.

I see -- it was not obvious to me you were trying without opening the
file in a buffer.  With my patch, I can reproduce the error, but only
the TODO (which appears instead of being skipped, not with the
timestamp line.  Yes, seems related to properties.  I'll digg further.

Thanks!

-- 
 Bastien



Re: [O] new exporter, conditional options according to backend

2013-01-24 Thread Andreas Leha
Hi Nicolas,

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

 Hello,

 Ezequiel Birman stormwa...@espiga4.com.ar writes:

 Is it possible to write something like this with the new exporter?

 #+OPTIONS: (if (and (boundp 'org-export-current-backend) (eq 
 org-export-current-backend 'e-beamer)) H:1 H:3)

 There is no `org-export-current-backend' in the new exporter. Besides,
 what you want is the default behaviour (see `org-e-beamer-frame-level'
 variable).

 From what I read in org-export.el the backend is stored in a plist, not
 sure how to get it's value when exporting.

 Or, maybe I need to write a filter function to be run from
 org-export-before-process-hook?

 Filters are different from hook. A function in a hook operates on an Org
 buffer. A filter function operates either on a string in output syntax
 or on the parse tree.

 If, for some reason, you want to modify export options on the fly, you
 could create a filter function for parse tree, and modify options plist
 from it:

 #+begin_src emacs-lisp
 (defun my-options-change-fun (tree backend info)
   (when (org-export-derived-backend-p backend 'e-beamer)
 (plist-put info :with-author nil))
   ;; Don't forget to return tree.
   tree)

 (add-to-list 'org-export-filter-parse-tree-functions
  'my-options-change-fun)
 #+end_src


 Regards,

Sorry for hijacking this thread.  But I am also interested in backend
specific options.  Could you give an example of how to achieve something
like this with the new exporter:

#+begin_src R :results graphics :file (if (and (boundp 
'org-export-current-backend) (eq org-export-current-backend 'e-latex)) 
foo.pdf foo.png)
  plot(1:10)
#+end_src

Thanks in advance,
Andreas




Re: [O] org-plus-contrib: Invalid function: org-no-popups

2013-01-24 Thread Achim Gratz
Moritz Ulrich writes:
 Any hints? Googling just pointed me to a mail thread where removing,
 restarting Emacs and re-installing the package fixed everything - that
 doesn't work for me.

You read that wrong.  What should work is installing, re-starting Emacs,
removing and re-installing the package in the same session, restarting
Emacs again.  But only if the package activation happens very early.

 I'm thankful for any pointers.

Another option is to remove all *.elc files from the package directory.
If a freshly started Emacs then works correctly, you can follow the
instructions on Worg of how to compile Org without make.


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

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




Re: [O] Contrib missing from (Cygwin) Emacs

2013-01-24 Thread Achim Gratz
Sebastien Vauban writes:
 - `org-ditaa' and `org-exp-blocks' both expect that directory along where
   org.el resides

No they don't, this is only used as a fallback if they can't find the
expected files elsewhere.  You need to configure where they should find
the JAR files.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Contrib missing from (Cygwin) Emacs

2013-01-24 Thread Charles

On 1/24/2013 1:27 PM, Sebastien Vauban wrote:

Hi Bastien,

Bastien wrote:

Sebastien Vauban writes:


It seems that `org-ditaa' and `org-exp-blocks' both expect to find an
../contrib directory. Such is not bundled with Emacs. Isn't the assumption
wrong, then or should `contrib' be bundled as well?

I don't know how Cygwin builds the Emacs package...

If this is a problem in Cygwin, it's a miracle (?) no Org user
reported it before!

I don't know how to fix this, things are fine in Org =7.9.

I don't think it's related to Cygwin per se. AFAIK:

- `contrib' is not bundled within Emacs, while

- `org-ditaa' and `org-exp-blocks' both expect that directory along where
   org.el resides

in the current Org version...

Just grep for ../contrib:

./ob-ditaa.el:55:  ../contrib
./org-exp-blocks.el:252:   ../contrib

I guess the (relative) hardcoding should be avoided.

Best regards,
   Seb


For my Org-mode in Cygwin I followed the instructions at

http://orgmode.org/worg/org-faq.html#keeping-current-with-Org-mode-development

This not allows you to have bleeding edge org-mode, but the contrib 
directory is now present in my Cygwin; I do  not believe that the Org 
contrib directory is in the Cygwin Emacs.


Regards,
Charlie Millar



Re: [O] Contrib missing from (Cygwin) Emacs

2013-01-24 Thread Bastien


Hi Sébastien,

yes, the default `org-ditaa-jar-path' value points
to the contrib/ directory, but a wrong value for this
variable does prevent publishing a web page -- unless
you want to publish ditaa shunk without setting the
`org-ditaa-jar-path' correctly.

Is it what you did?

Best,

-- 
 Bastien




Re: [O] org-plus-contrib: Invalid function: org-no-popups

2013-01-24 Thread Bastien
Achim Gratz strom...@nexgo.de writes:

 Moritz Ulrich writes:
 Any hints? Googling just pointed me to a mail thread where removing,
 restarting Emacs and re-installing the package fixed everything - that
 doesn't work for me.

 You read that wrong.  What should work is installing, re-starting Emacs,
 removing and re-installing the package in the same session, restarting
 Emacs again.  But only if the package activation happens very early.

Which is just too complex.

 I'm thankful for any pointers.

 Another option is to remove all *.elc files from the package directory.
 If a freshly started Emacs then works correctly, you can follow the
 instructions on Worg of how to compile Org without make.

I already suggested to *not* use ELPA at all for now.

-- 
 Bastien



Re: [O] Still Wishing for Snooze

2013-01-24 Thread Bastien
Hi Andrew,

Andrew M. Nuxoll nux...@up.edu writes:

 My first problem is that C-h is mapped to backspace on my computer. 
 I presume (C-h v) means view help on a particular item.

C-h v is normally bound to `describe-variable'.

So you can run this:

M-x describe-variable RET org-agenda-todo-ignore-timestamp RET

 My second problem is that org-agenda-ignore is not a valid prefix for
 anything in my version of org-mode.  

In recent Emacsen, the completion mechanism is clever enough to know
what to do when entering 

M-x describe-variable RET org-agenda-ignore TAB

On the first TAB, it offers org-agenda-t-ignore-

If you complete org-agenda-todo-ignore- and press TAB again,
you should see five variables.

 (I have version 7.9.3d
 installed.).  I *think* you intended to point me to variables that
 begin with org-agenda-todo-ignore instead.  Can you confirm this is
 so?

I do :)

 My third problem is that I can not figure out how to use these
 variables to accomplish my purpose.  I think part of the problem is
 that I am using custom agenda commands.  The relevant code snippet
 for the command I use most is here:
 (setq org-agenda-custom-commands
  '(
(o Today's Tasks
 ((agenda  ((org-agenda-ndays 1)))  ;; limits the agenda
 display to a single day
  (todo TODO))
 ((org-agenda-compact-blocks t)
  ))
  etc...

Try this:

(setq org-agenda-custom-commands
  '((X Todo test todo TODO
 ((org-agenda-todo-ignore-scheduled 2)

When listing todos, the ones that are 2 days or more in the future
will be ignored.

You can also use this for tags-todo if 
`org-agenda-tags-todo-honor-ignore-options' is set to t.

We don't have `org-agenda-agenda-honor-ignore-options' so
this is not relevant in agenda-type views.  Maybe we can 
consider this.

In your case, this does not solve your problem, since you
want an item-based decision, not an agenda-based one.

But... my first question would be... 

* TODO [#B] Verify login to the virtual machines
  SCHEDULED: 2013-01-11 Tue +1w DELAY: 2013-01-24 Thu

why not simply have this instead:

* TODO [#B] Verify login to the virtual machines
  SCHEDULED: 2013-01-25 Fri +1w

?

Maybe I miss something obvious in your workflow, and maybe 
this is something needed more widely.  Let us know!
 
 Would you please give me some more information?

Hope that helps,

-- 
 Bastien



Re: [O] Still Wishing for Snooze

2013-01-24 Thread Andrew M. Nuxoll

Bastien:

Thanks for your patience and continued assistance.

Here an example scenario that illustrates my problem:  Say, at the end 
of each week I need to sit down and generate a report on my progress to 
send to the boss.  So I have recurring, weekly TODO entry on Friday 
morning.  Well, one week the report is delayed because a coworker was 
ill and couldn't send me the data I needed on time.  So, I have to delay 
that TODO entry until Monday *just this one time.*  I need to get it off 
my agenda for the day but I don't want to mark is as completed because 
it's not.


Right now the only way to do that is to mark it as completed anyway but 
make a one-time copy of the TODO item with the new scheduled date.  The 
problem is that I have roughly thirty TODO items per day and, on any 
given day, I need to delay about 10-20% of them for various reasons.  
(It's the nature of my job though I don't think it's that unusual.)  So 
making a copy of a TODO item each time is inconvenient because I end up 
with dozens of copies floating about.


Furthermore, a delayed TODO item should have more urgency since it's 
been delayed.  But creating a copy means i can't do that. When Monday 
rolls around and it's time to prepare that report it shows up in green 
text like this in my agenda:

 Scheduled:  TODO [#B] Prepare TPS Report

but I want it to be in red text like this:
  Sched. 4x:  TODO [#B] Prepare TPS Report

This is why I'm looking for a distinct snooze or delay 
functionality.  I want a TODO item to disappear from the agenda until a 
specified date and then reappear again waiting to be done with all the 
urgency associated with that delay.


Any help would be appreciated.

:AMN:



On 01/24/2013 02:26 PM, Bastien wrote:

Hi Andrew,

Andrew M. Nuxoll nux...@up.edu writes:


My first problem is that C-h is mapped to backspace on my computer.
I presume (C-h v) means view help on a particular item.

C-h v is normally bound to `describe-variable'.

So you can run this:

M-x describe-variable RET org-agenda-todo-ignore-timestamp RET


My second problem is that org-agenda-ignore is not a valid prefix for
anything in my version of org-mode.

In recent Emacsen, the completion mechanism is clever enough to know
what to do when entering

M-x describe-variable RET org-agenda-ignore TAB

On the first TAB, it offers org-agenda-t-ignore-

If you complete org-agenda-todo-ignore- and press TAB again,
you should see five variables.


(I have version 7.9.3d
installed.).  I *think* you intended to point me to variables that
begin with org-agenda-todo-ignore instead.  Can you confirm this is
so?

I do :)


My third problem is that I can not figure out how to use these
variables to accomplish my purpose.  I think part of the problem is
that I am using custom agenda commands.  The relevant code snippet
for the command I use most is here:
 (setq org-agenda-custom-commands
  '(
(o Today's Tasks
 ((agenda  ((org-agenda-ndays 1)))  ;; limits the agenda
display to a single day
  (todo TODO))
 ((org-agenda-compact-blocks t)
  ))
  etc...

Try this:

(setq org-agenda-custom-commands
   '((X Todo test todo TODO
  ((org-agenda-todo-ignore-scheduled 2)

When listing todos, the ones that are 2 days or more in the future
will be ignored.

You can also use this for tags-todo if
`org-agenda-tags-todo-honor-ignore-options' is set to t.

We don't have `org-agenda-agenda-honor-ignore-options' so
this is not relevant in agenda-type views.  Maybe we can
consider this.

In your case, this does not solve your problem, since you
want an item-based decision, not an agenda-based one.

But... my first question would be...

* TODO [#B] Verify login to the virtual machines
   SCHEDULED: 2013-01-11 Tue +1w DELAY: 2013-01-24 Thu

why not simply have this instead:

* TODO [#B] Verify login to the virtual machines
   SCHEDULED: 2013-01-25 Fri +1w

?

Maybe I miss something obvious in your workflow, and maybe
this is something needed more widely.  Let us know!
  

Would you please give me some more information?

Hope that helps,




--
Andrew M. Nuxoll Phone: 503-943-7688
Asst Professor of Computer Science   Fax:   503-943-7316
University of Portland - MSC #145Email: nux...@up.edu
5000 N. Willamette Blvd  Web:   http://faculty.up.edu/nuxoll
Portland, OR  97203-5798 Office: Shiley Hall Rm 217




Re: [O] About `open formula'

2013-01-24 Thread Xue Fuqiao
On Thu, 24 Jan 2013 15:43:02 +0100
Bastien b...@altern.org wrote:

  What does the `open formula' mean?
 
 It means in the non-collapsed formula, see the sentence before.

Thanks a lot.

-- 
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao



Re: [O] Still Wishing for Snooze

2013-01-24 Thread Eric S Fraga
Andrew M. Nuxoll nux...@up.edu writes:

[...]

 Furthermore, a delayed TODO item should have more urgency since it's
 been delayed.  But creating a copy means i can't do that. When Monday
 rolls around and it's time to prepare that report it shows up in green
 text like this in my agenda:
  Scheduled:  TODO [#B] Prepare TPS Report

 but I want it to be in red text like this:
   Sched. 4x:  TODO [#B] Prepare TPS Report

Maybe I'm missing a key point here but wouldn't alternative TODO states
do what you want here, as in maybe defining a todo sequence like:

#+TODO: TODO(t) DLYD(d) | DONE(x)

with appropriate faces for the different states so that a DLYD one
stands out as you wish?  Then, on a Friday, you would change the state
of the item to DLYD so it would still appear on the Monday.  Whenever
you marked it DONE, it would go back to TODO if it were a repeated task.

This doesn't quite do what you want in that the DLYD task would still
appear on the agenda view on the Friday so maybe that is a stumbling
block.

Just some thoughts...  feel free to ignore! ;-)

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-837-ge37613




[O] keymap for read-date-minibuffer

2013-01-24 Thread Mark Edgington
Hello all,

I recently spent a while figuring out how to add custom-keybindings to
the read-date-minibuffer which appears when org-read-date is called.
The only way to do it currently is to use the
org-read-date-minibuffer-setup hook, and add keybindings to the
minibuffer-local-map there.  I'm wondering if it wouldn't be more
natural to just define an org-read-date-minibuffer-map that the end
user can modify, and to overlay this on top of the
minibuffer-local-map when org-read-date is called.  Thoughts?

Regards,

Mark



[O] Bug: org-insert-heading-respect-content inserts at the wrong level if target heading is invisible [7.9.2 (release_7.9.2-883-g6fb36e.dirty @ /home/dlm/share/org-mode.git/lisp/)]

2013-01-24 Thread James Harkins
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


I'm resending the issue that I reported the other day, now with a MCE.

SHORT DESCRIPTION:

Recent versions of MobileOrg for Android allow the user to create new headings 
under specific nodes. This creates an addheading edit, which is processed by 
finding the target parent node and then calling 
org-insert-heading-respect-content to make a new heading at the same level as 
the given parent. (Then that heading is demoted, and the content is inserted.)

If the target heading is invisible at this time, 
org-insert-heading-respect-content looks upward to the target heading's 
parents, finding the closest one that is visible. Then it inserts the new 
heading at this level.

That is, given a tree like this:

* I
** A
*** 1
** B
* II

If we try to insert a new heading 2 under A, we should get this (expected 
behavior):

* I
** A
*** 1
*** 2
** B
* II

Instead, we get:

* I
** A
*** 1
** B
** 2
* II

If the user doesn't discover the mistake, the subtree structure is corrupted 
and it may be hard to untangle.

Note: Several MobileOrg users have seen the same problem. This issue is not 
specific to my configuration.


STEPS TO REPRODUCE:

1. Create a file test.org with the following content:

* I
** A
*** 1
** B
* II


2. Cycle global visibility so that all top level headings are folded. You 
should see this in the buffer.

* I...
* II


3. From the scratch buffer, execute the following. The second expression 
extracts the bare minimum function calls from org-mobile-apply and 
org-mobile-edit to illustrate the issue. (I spent a lot of time with edebug, 
and I'm certain this is the actual sequence of events.)

(require 'org-mobile)

(org-with-point-at (org-mobile-locate-entry olp:test.org:I/A)
  (progn
(end-of-line 1)
(org-insert-heading-respect-content)
(org-demote)
(insert 2. This should be a third-level heading, but it isn't)
  )
)

4. Go back to test.org and expand all headings.

* I
** A
*** 1
** B
** 2. This should be a third-level heading, but it isn't
* II


FURTHER DETAILS:

With edebug, I found that the problem within org-insert-heading is the use of 
org-end-of-subtree here:

  (when (featurep 'org-inlinetask)
(while (and (not (eobp))
(looking-at \\(\\*+\\)[ \t]+)
(= (length (match-string 1))
org-inlinetask-min-level))
  (org-end-of-subtree nil t)))

I tried changing this to (org-end-of-subtree t t) -- using the invisible-ok 
option -- but it didn't make a difference in the result.

Alternately, the problem might be:

 (t
  ;; somewhere in the line
  (save-excursion
(setq previous-pos (point-at-bol))
(end-of-line)
(setq hide-previous (outline-invisible-p)))
  (and org-insert-heading-respect-content (org-show-subtree))

... where org-show-subtree does not actually show the desired parent node. I 
think org-end-of-subtree expects the proper parent to be visible at that point, 
but for some reason, that isn't actually happening.


Emacs  : GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-22 on batsu, modified by Debian
Package: Org-mode version 7.9.2 (release_7.9.2-883-g6fb36e.dirty @ 
/home/dlm/share/org-mode.git/lisp/)

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-agenda-files '(~/Documents/mobileorg/semester.org 
~/Documents/mobileorg/agenda_main.org
~/Documents/mobileorg/usconcert.org)
 org-agenda-window-setup 'current-window
 org-hide-leading-stars t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-mobile-files '(org-agenda-files ~/Documents/mobileorg/test.org)
 org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-mobile-inbox-for-pull ~/Documents/mobileorg/from-mobile.org
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-todo-keywords '((sequence TODO MAYBE INPROG MTG | POSTPONED 
DONE))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-directory ~/Documents/mobileorg
 org-blank-before-new-entry '((heading) 

Re: [O] [OT] open url in emacs was: Re: Using Org/babel for Emacs config files

2013-01-24 Thread Jambunathan K
Bastien b...@altern.org writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

   ^^  that is something I'd not expect to hear when it comes to
 emacs

 (when (switch-to-buffer-other-window
(url-retrieve-synchronously
   
 https://raw.github.com/eschulte/emacs24-starter-kit/master/starter-kit.org;))
   (write-file (read-from-minibuffer File: ))
   (org-mode))

M-x browse-url-emacs RET

-- 



Re: [O] How to track down No heading for this item in buffer or region.?

2013-01-24 Thread Nick Dokos
Bastien b...@altern.org wrote:

 Nick Dokos nicholas.do...@hp.com writes:
 
  to try to reproduce Rainer's problem, when I first construct the agenda,
  I get *both* the TODO and the no-heading message: text properties are not
  active. If I then visit the file (e.g. RET on the TODO item) and construct
  the agenda again, neither the TODO nor the no-heading message
  appears.
 
 I see -- it was not obvious to me you were trying without opening the
 file in a buffer.  With my patch, I can reproduce the error, but only
 the TODO (which appears instead of being skipped, not with the
 timestamp line.  Yes, seems related to properties.  I'll digg further.
 

Not quite: the file *is* opened in a buffer (the agenda code opens all the
files, I presume with find-file-noselect), but the text properties are
not up to date. It's only when I explicitly visit the buffer
that they get updated.

E.g. if you evaluate

--8---cut here---start-8---
(setq buf (find-file-noselect /path/to/test.org))
(with-current-buffer buf
  (setq s (buffer-substring 1 2)))
--8---cut here---end---8---

the echo area shows

,
| #(# 0 1 (fontified nil))
`

But if you visit the buffer with C-x b test.org RET and then
evaluate the second form again, you get 

,
| #(# 0 1 (fontified t font-lock-fontified t face font-lock-comment-face))
`

There is a section on lazy properties in the elisp manual but I don't
know how to use the mechanism described there: there are no examples in
current emacs code, some half-hearted experiments failed for unknown
reasons, and googling a bit found only one relevant thread in the emacs
group from 2004 - quoting Stefan Monnier from that thread:

#+BEGIN_QUOTE
  I think the lazy text properties that you refer to (i.e. variable
  buffer-access-fontify-functions) are a sadly perfect example of C code
  implemented before we knew what we needed.  It's implemented,
  documented, and 100% unused.
#+END_QUOTE

AFAICT, nothing has been done in this area since then.

Nick

PS. Here's the trivial test.org again for completeness:

--8---cut here---start-8---
# timestamp: 2013-01-24 Thu

* TODO foo
#  SCHEDULED: 2013-01-24 Thu
--8---cut here---end---8---



Re: [O] org-plus-contrib: Invalid function: org-no-popups

2013-01-24 Thread Achim Gratz
Bastien writes:
 I already suggested to *not* use ELPA at all for now.

I happen to think that this suggestion goes too far (if you think nobody
should use OIrg from ELPA, then you'd need to stop making it available
there and hopefully we already agreed that this isn't an option).  There
is actually no problem with ELPA when you install Org from it before
you've used Org (it wasn't designed to cope with any other situation).
In most cases that means simply using a fresh Emacs instance to install
Org from ELPA is good enough.  In those cases where Org is loaded during
initialization (and systems doing that really shouldn't do this before
package-initialize or else unload any features they have needed), one
can resort to 'emacs -Q' if the package directory has not been changed
from the defaults or '(unload-feature 'org t)' when that would be a
concern.


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

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Editing comments or strings in Org mode

2013-01-24 Thread Samuel Wales
Hi Francois,

On 1/24/13, François Pinard pin...@iro.umontreal.ca wrote:
 I'm not sure I understand the use case

Your Org in elisp solution allows limited Org functionality in Elisp
and other files.  You cannot put those files in the agenda, or do many
other things that you can do with agenda files.  The entries are not
in an Org context.  They are in an external file.

What I am suggesting as a possible alternative in some cases, is to
have all of your notes about the elisp file in your ordinary Org
agenda files.  However, this is not Babel.

Instead, it is a bidirectional Org-non-Org link.  A command in the
external file will find the nearest bidirectional link, then take you
to its dual entry in your Org files.  And a command in Org will take
you to the place in elisp that points to that entry.

So in elisp you will have:

;;; $[bidir da39a3ee5e6b4b0d3255bfef95601890afd80709]

And in your Org file you will have:

* my notes on that part of elisp
:PROPERTIES:
:ID: da39a3ee5e6b4b0d3255bfef95601890afd80709
:END:

Here are my notes.

===

This will allow you to use the full power of Org without tangling.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.