Re: [O] BUG: footnote conflicts with code export to pdf

2011-10-22 Thread Nick Dokos
zwz  wrote:

> Steps to reproduce it:
> 
> This org file can be exported to pdf correctly.
> #+begin_src org
> * test
>   #+BEGIN_SRC c
>   void main(){
> int a;
>   }
>   #+END_SRC
> #+end
> 
> Then you modify it:
> #+begin_src org
> * test
>   #+BEGIN_SRC c
>   void main(){
> int a[5];
>   }
>   #+END_SRC
> #+end
> 
> It says "org-export-latex-preprocess: Wrong type argument: stringp, nil"
> when you try to export the file.
> 
> 

You didn't say what version of org you are using. I cannot reproduce it
in Org-mode version 7.7 (release_7.7.416.g93bd.dirty)

Nick



[O] BUG: footnote conflicts with code export to pdf

2011-10-22 Thread zwz
Steps to reproduce it:

This org file can be exported to pdf correctly.
#+begin_src org
* test
  #+BEGIN_SRC c
  void main(){
int a;
  }
  #+END_SRC
#+end

Then you modify it:
#+begin_src org
* test
  #+BEGIN_SRC c
  void main(){
int a[5];
  }
  #+END_SRC
#+end

It says "org-export-latex-preprocess: Wrong type argument: stringp, nil"
when you try to export the file.




Re: [O] Outline and org-mode don't insert text into folded sections logically

2011-10-22 Thread suvayu ali
Hi Bastien,

A few comments. I have also attached a small test file.

On Sat, Oct 22, 2011 at 15:53, Bastien  wrote:
>
> Here is a dummy patch that prevents the user from editing invisible
> parts of the buffer.  It doesn't prevent query-and-replace commands.
>
> Can people test it and comment it?
>
> Maybe throwing an error is a bit too much.  Maybe preventing all
> kind of edition in invisible parts of the buffer is too much as
> well -- looking forward reading comments on this.
>

Using org-reveal might be better. I see that org-reveal works for lists
but not for headlines or folded src_blocks (is that a regression?). If
not, something with similar functionality for headlines and src_blocks
would be great.

Now about something more subtle and open to subjective opinion. In the
example file, if you go to the beginning of a folded headline / list /
src_block and hit C-e, this should take you to the end of the ellipsis.
Now attempting to edit should either throw an error or unfold the item
(depending on whether you have the patch as is or with my proposal).
However if you press the cursor key to the right once after the C-e in
the last step, then you end up after the ellipsis and inserting text is
possible. The inserted text is placed right above the next entry. So in
the attached test file, if you do this with the first headline the
inserted text will be right before the second headline.

In my opinion this means the problem would still exist. I don't
understand overlays very well, but I was thinking if it could be
resolved by adding a new line to the ellipsis. I customised org-ellipsis
accordingly, although this didn't solve the problem it made it more
obvious when I edited the folded entry inadvertently.

I am not sure what would be an appropriate solution here. If there was a
way to determine if you are inside a folded entity instead of testing
for invisibility of `point' it might be better (maybe test if there is an
overlayed ellipsis?).

> Thanks,

Hope these comments help.

-- 
Suvayu

Open source is the future. It sets us free.
#+STARTUP: overview

* This is 1st headline
** Some sub-heading
Followed by some text

+ Maybe a list some multiline content, lets say a code block.
  #+begin_src sh :eval no
echo "This is $USER testing org"
  #+end_src
+ Second item in the list

* Text inserted before the 2nd headline
With some text underneath



Re: [O] Code block evaluation export bug ?

2011-10-22 Thread Nick Dokos
Thomas S. Dye  wrote:

> Nick Dokos  writes:
> 
> > While testing my response to Viktor's question, I ran into a problem.
> > I used a test file that is slightly modified from a previous post of Tom 
> > Dye's:
> >
> > * R tables
> >
> > #+TBLNAME: tbl-1
> > | column1 | column2 |
> > |-+-|
> > |  45 |  34 |
> > |  77 |  56 |
> >
> > #+tblname: tbl-2
> > | col1 | col2 |
> > |--+--|
> > | a| b|
> > | c| d|
> >
> > #+tblname: tbl-3
> > | c1 | c2 |
> > |+|
> > | A  | B  |
> > | C  | D  |
> >
> > #+BEGIN_SRC R :var x=tbl-1 :var y=tbl-2 :var z=tbl-3 :colnames yes :exports 
> > both :results value
> > z
> > #+END_SRC
> >
> >
> >
> > Evaluating the code block correctly produces the result
> >
> > ,
> > | 
> > | #+results:
> > | | c1 | c2 |
> > | |+|
> > | | A  | B  |
> > | | C  | D  |
> > `
> >
> > but exporting (to ascii, PDF, HTML or ODT) chops off the first row of
> > the result. For example, here
> > is the ascii:
> >
> > ,
> > | 
> > |   c1   c2  
> > |  +
> > |   CD   
> > `
> > ...
> 
> Aloha Nick,
> 
> I see the same behavior.
> 

Here's a progress report on this: the call chain is

,
| 
|   org-babel-process-params(((:comments . "") (:shebang . "") (:cache . "no") 
(:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "both") (:results 
. "replace value") (:var x (45 34) (77 56)) (:var y ("a" "b") ("c" "d")) (:var 
z ("A" "B") ("C" "D")) (:session . "none") (:rowname-names) (:result-type . 
value) (:result-params "replace" "value") (:padnewline . "yes") (:hlines . 
"no") (:colnames . "yes") (:colname-names (x "column1" "column2") (y "col1" 
"col2") (z "c1" "c2"
|   ...
|   (org-babel-exp-in-export-file lang (org-babel-process-params 
(org-babel-merge-params (nth 2 info) (\` ((:results \, (if silent "silent" 
"replace")))
|   ...  
|   org-babel-exp-results(("R" "z" ((:cache . "no") (:colname-names (x 
"column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:colnames . "yes") 
(:comments . "") (:exports . "both") (:hlines . "no") (:noweb . "no") (:padline 
. "") (:padnewline . "yes") (:result-params "replace" "value") (:result-type . 
value) (:results . "replace value") (:rowname-names) (:session . "none") 
(:shebang . "") (:tangle . "no") (:var x (45 34) (77 56)) (:var y ("a" "b") 
("c" "d")) (:var z ("A" "B") ("C" "D"))) "" nil 0) block nil 
"6443d36b0252c9e3192f813429018760bee3c11d")
|   ...  
|   org-babel-exp-do-export(("R" "z" ((:cache . "no") (:colname-names (x 
"column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:colnames . "yes") 
(:comments . "") (:exports . "both") (:hlines . "no") (:noweb . "no") (:padline 
. "") (:padnewline . "yes") (:result-params "replace" "value") (:result-type . 
value) (:results . "replace value") (:rowname-names) (:session . "none") 
(:shebang . "") (:tangle . "no") (:var x (45 34) (77 56)) (:var y ("a" "b") 
("c" "d")) (:var z ("A" "B") ("C" "D"))) "" nil 0) block 
"6443d36b0252c9e3192f813429018760bee3c11d")
|   
|   org-babel-exp-src-block(...)
| 
|   org-export-blocks-preprocess()
|   ...
|   org-export-preprocess-string(...)
|   ...
|   org-export-as-ascii(nil nil nil "*Org ASCII Export*")
|   org-export-as-ascii-to-buffer(nil)
|   ...
|   org-export(nil)
`

So far, so good: x, y and z are still 2x2 tables. But evaluating the last form, 
we get

((:var x (77 56)) (:var y ("c" "d")) (:var z ("C" "D")) (:colname-names (x 
"column1" "column2") (y "col1" "col2") (z "c1" "c2")) (:rowname-names) 
(:result-params "replace" "value" "replace" "value") (:result-type . value) 
(:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . 
"no") ...)

The first row of each table has disappeared. Looks like a problem with 
org-babel-process-params.
Eric, can you take a look?

Thanks,
Nick




Re: [O] Output to shell when calling emacsclient?

2011-10-22 Thread Herbert Sitz
Nick Dokos  hp.com> writes:
> The message function will cause output to the echo area of emacs as well 
> as to the
> standard output of the emacsclient command:
> ,
> | $ emacsclient --eval '(message "Hi there")'
> | "Hi there"
> `

Nick --  Thanks, it does indeed work for me in Linux.  

Can't get it to work in Windows, though.  In Windows it runs in the gui server
with correct output in Emacs server in the Messages buf and on the minibuf
command line.  But not output in the terminal.

Strange because I can get the shell to redirect the output to a file:

> emacsclientw --eval ^"(message \^"Hi there\^")^" >  output.txt

But if I don't enter the redirect to a file the output never shows up in the
terminal.

Maybe someone knows the explanation for this?

-- Herb







Re: [O] BUG: Export images to LaTeX

2011-10-22 Thread Nick Dokos
Anthony Lander  wrote:

> 
> On 11-Oct-21, at 7:26 PM, Nick Dokos wrote:
> 
> > Anthony Lander  wrote:
> > 
> >> Hi List,
> >> 
> >> I've run into a strange problem with the latest org pull. Exporting 
> >> inlined images with the LaTeX exporter works or not depending on whether I 
> >> include org-jsinfo in org-modules(!). This is with emacs -q on the 
> >> 24.0.90.1 emacs recent release.
> >> 
> >> Can someone please try to reproduce this to confirm?
> > 
> > Pretty weird - I can reproduce this by omitting org-jsinfo from org-modules 
> > and 
> > starting with a minimal .emacs.
> 
> Thanks for reproducing this. It is indeed weird, as you describe below. 
> 
> Unfortunately, I pull infrequently, so I can't really narrow down when it 
> started happening.
> 
>   -Anthony
> 
> > 
> > But there seems to be something else as well: after the export (where I get 
> > the
> > href link that Anthony mentions) I require org-jsinfo and reexport and get 
> > the
> > \includegraphics, again as mentioned. I then unload-feature org-jsinfo, and
> > try again: I get an error because org-export-options-filters now contains a 
> > function
> > from org-jsinfo that is no longer present. So I reset 
> > org-export-options-filters back
> > to nil: this time the reexport succeeds, but I get the \includegraphics, 
> > not the \href:
> > the act of loading and unloading org-jsinfo seems to have changed the state 
> > enough
> > so that latex export now does the right thing.
> > 
> > And no, it's not a remnant of the previous export: I delete the .tex file 
> > and recreate
> > it in this last case.
> > 


Oy, vey: this was painful (and I'm still not sure I got it right):
setting export options for the various backends looks like the Wild
West - everybody takes the law into his own hands and becomes judge,
jury and executioner.

The whole thing hinges on the value of :inline-images in the export
options plist: without org-jsinfo in the picture, this turns out to be
nil in the latex exporter, but with org-jsinfo, it becomes 'maybe and
that's enough to make the difference you observe.

Part of the weirdness seems to be [fn:1] that :inline-images originated
in the html exporter and then was pressed into action in the latex
exporter - the proverbial panda's thumb.

When org-jsinfo is loaded, it adds org-jsinfo-handle-options to
org-export-options-filters and that adds :inline-info 'maybe to the
latex default export options plist. The latex exporter then "works":
even when org-jsinfo is unloaded, org-export-latex-options-plist still
contains the :inline-images 'maybe setting. This is the kind of side
effect that makes the hair in the back of my neck stand up in horror :-)

But with all the the ways of getting options into the export plist,
I couldn't find a good way to do it for latex. I think that the
best way is to imitate what jsinfo does and add an options handler
to org-export-options-filters, say org-latex-handle-options. These
functions take a plist as input, modify it and return the modified
list as their output, something like this:

--8<---cut here---start->8---
(defun org-latex-handle-options (exp-plist)
  (let ((inlineimg (plist-get exp-plist :inline-images)))
(if inlineimg
exp-plist
  (plist-put exp-plist :inline-images t

(add-to-list 'org-export-options-filters (function org-latex-handle-options))
--8<---cut here---end--->8---

But I think the whole area of export options needs a radical reorg and
cleanup.

Nick

Footnotes:

[fn:1] this is pure conjecture on my part



Re: [O] Output to shell when calling emacsclient?

2011-10-22 Thread Nick Dokos
Herbert Sitz  wrote:

> I'm running --eval commands from the shell using emacsclient (and on windows
> emacsclientw).  
> 
> The --batch option does not seem to be an option with emacsclient, although it
> works fine with plain emacs.  However, I would still like to print output to 
> the
> shell that I'm issuing the emacsclient command in.  Is there some way to do 
> this?
> 

The message function will cause output to the echo area of emacs as well as to 
the
standard output of the emacsclient command:

,
| $ emacsclient --eval '(message "Hi there")'
| "Hi there"
`

Nick




Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Christian Moe

Hi,

Eric Schulte wrote:





I can think of three options for how to handle this situation.

1. If it turns out to be possible/desirable my preferred solution
here would be to add general property support for appending values
to properties when properties are over specified

(...)


2. Adding a "#+PROPERTY:" line authoring helper similar to the
table formula helper making it more natural to edit such long
property lines.

3. It may be possible to add syntax for extending #+PROPERTY:
specifications across multiple lines, something like

#+PROPERTY: var MAINVERSION=0,

> #+PROPERTY+: SVNVERSION=(vc-working-revision (buffer-file-name)),
(...)

These are all interesting ideas, as was Darlan's alternative 
suggestion to Eric's suggestion (1), namely to use a special inherit 
argument.


I'd like to toss out a different idea, which I think is brilliant, but 
which may go down in flames once we've had a time to think it through. 
(And sorry if it's been proposed before; I came to Org just as 
Org-Babel was being stabilized.)


In short, let Babel assign to any declared variables of a src block 
the values of any properties at point with the same name. In other words:


- The :var header argument / :var: property could declare variables 
without assigning values, that is, you could have

`:var foo=1, bar, baz=3' to tell Babel that `bar' is a variable too.

- When a variable is declared, but no value assigned, Babel would look 
for a property (e.g. `:bar: 2') at point with the same name as the 
variable.


- If property inheritance is turned on, this means a variable can be 
specified at any level of the outline.


- If no further changes were made (such as the property accumulation 
Eric suggested), it would still be possible to /declare/ variables 
only at /one/ level of the outline besides in the code block and 
calls, since declarations all belong to the same `:var:' property. 
However, this approach would mean that declarations could be kept 
short and there would be a great deal of modularity in what values 
would be assigned.


Two examples follow.

---

Example 1.

Darlan suggested a special "inherit" argument, as follows:

* Code with foo
  :PROPERTIES:
  :var:  foo=1
  :END:

** Code with foo and bar
   :PROPERTIES:
   :var:  bar=2, inherit
   :END:
   src_block
** Code with foo and baz
   :PROPERTIES:
   :var:  baz=3, inherit
   :END:
   src_block


Here is the same example under my proposal and with property 
inheritance turned on:


* Code with foo
  :PROPERTIES:
  :foo:  1
  :END:

** Code with foo and bar
   :PROPERTIES:
   :bar:  2
   :END:

   src_block :var foo, bar

** Code with foo and baz
   :PROPERTIES:
   :baz:  3
   :END:

   src_block :var foo, baz

Instead of declaring foo,bar and foo,baz in the src_blocks, we could 
define them once and for all at the top of the outline:


* Code with foo
  :PROPERTIES:
  :foo:  1
  :var: foo, bar, baz
  :END:

** Code with foo and bar
   :PROPERTIES:
   :bar:  2
   :END:

   src_block

** Code with foo and baz
   :PROPERTIES:
   :baz:  3
   :END:

   src_block

Under the first subhead, Org-babel would know (because the :var: 
property is inherited) to look for foo, bar and baz properties. It 
would find values for foo and bar (bar is defined as a property of 
that subhead, foo is inherited from the top-level heading). It would 
not find any value for baz. At this point, since no value could be 
assigned to baz, it would be ignored and would not be passed to the 
code block.


---

Example 2.

Let's take Rainer's problem :

On 10/22/11 5:52 PM, Eric Schulte wrote:


#+BABEL: :var MAINVERSION=0
#+BABEL: :var SVNVERSION=(vc-working-revision (buffer-file-name))
#+BABEL: :var SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) 
org-current-export-file)))
#+BABEL: :var SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) 
org-current-export-file)) 'up-to-date) 0 13)
#+BABEL: :var DISP_PACKAGE="seedDisp_0.4-13.tar.gz"



Have a buffer-level property for all the long lines (sorry if my email 
client wraps these lines):


#+PROPERTY: SVNVERSION (vc-working-revision (buffer-file-name))
#+PROPERTY: SVNSTATE ( symbol-name (vc-state (or (buffer-file-name) 
org-current-export-file)))
#+PROPERTY: SVNSTATENUM (if (eq (vc-state (or (buffer-file-name) 
org-current-export-file)) 'up-to-date) 0 13)

#+PROPERTY: DISP_PACKAGE "seedDisp_0.4-13.tar.gz"

Also, we have a buffer-level line declaring all these variables, and 
including MAINVERSION with the ordinary assignment. Thanks to last 
night's change, we can list them all on one line.


#+PROPERTY: var MAINVERSION=0, SVNVERSION, SVNSTATE, SVNSTATENUM, 
DISP_PACKAGE


I don't know what kind of code this example applies to, but let's 
imagine that we also have a header that resets one of these properties:


* Variant for main version 1
  :PROPERTIES:
  :MAINVERSION: 1
  :END:

...and below that, we finally have a code block, with a header that 
declares a variable locally:


#+HEADERS:

[O] Output to shell when calling emacsclient?

2011-10-22 Thread Herbert Sitz
I'm running --eval commands from the shell using emacsclient (and on windows
emacsclientw).  

The --batch option does not seem to be an option with emacsclient, although it
works fine with plain emacs.  However, I would still like to print output to the
shell that I'm issuing the emacsclient command in.  Is there some way to do 
this?

Thanks,

Herb




Re: [O] org-lrn

2011-10-22 Thread Johannes Hess
Hah, of course i did not know about org-drill, that one looks pretty good.
:)

On Sat, Oct 22, 2011 at 8:12 PM, John Hendy  wrote:

> On Sat, Oct 22, 2011 at 1:07 PM, Johannes Hess
>  wrote:
> > I was trying out http://ankisrs.net/ and thought that it would be nicer,
> if
> > one could learn stuff from within emacs.
> > So I threw together https://github.com/warsus/org-lrn, which basically
> > implements the supermemo-2-algorithm
> > (http://www.supermemo.com/english/ol/sm2.htm) and stores everything in
> > org-file format, so it should be really easy to share and collaborate on
> > decks.
>
> Great concept. I do recall this coming up before. Would you be able to
> summarize differences between this and org-drill?
> --- Worg summary: http://orgmode.org/worg/org-contrib/org-drill.html
> --- Repo: https://bitbucket.org/eeeickythump/org-drill
>
> I've used Anki, but have not looked into org for these purposes, but
> would certainly consider it since I take a lot of notes in org for
> work and home learning.
>
> Great idea and way to take action on it!
>
>
> John
>
>
> > Also you can use the nice org-capture to really quickly add new entries
> (see
> > the example configfile).
> > It's probably not much more than a prototype and i'm a pretty busy, but
> > thought the concept was useful enough to post it.
> >
> >
>


Re: [O] org-lrn

2011-10-22 Thread John Hendy
On Sat, Oct 22, 2011 at 1:07 PM, Johannes Hess
 wrote:
> I was trying out http://ankisrs.net/ and thought that it would be nicer, if
> one could learn stuff from within emacs.
> So I threw together https://github.com/warsus/org-lrn, which basically
> implements the supermemo-2-algorithm
> (http://www.supermemo.com/english/ol/sm2.htm) and stores everything in
> org-file format, so it should be really easy to share and collaborate on
> decks.

Great concept. I do recall this coming up before. Would you be able to
summarize differences between this and org-drill?
--- Worg summary: http://orgmode.org/worg/org-contrib/org-drill.html
--- Repo: https://bitbucket.org/eeeickythump/org-drill

I've used Anki, but have not looked into org for these purposes, but
would certainly consider it since I take a lot of notes in org for
work and home learning.

Great idea and way to take action on it!


John


> Also you can use the nice org-capture to really quickly add new entries (see
> the example configfile).
> It's probably not much more than a prototype and i'm a pretty busy, but
> thought the concept was useful enough to post it.
>
>



Re: [O] Org-mode Standardized Code Block Keywords

2011-10-22 Thread Chris Malone
Hi Eric,

Here is the CSV output from google moderator - do with it  what you wish:

Series URL,Series Name,Topic Name,Time Created,Author Name,Author 
Location,Text,Attachment URL,Tags,Plus Votes,Minus Votes
http://www.google.com/moderator/#15/e=ffe1e&t=ffe1e.42&q=ffe1e.56ec36,Org-mode 
Standardized Code Block Keywords,Vote for your preferred format,2011-10-21 
11:29:06 GMT,Chris M,,"1. source
2. call
3. data",,,3,0
http://www.google.com/moderator/#15/e=ffe1e&t=ffe1e.42&q=ffe1e.56aff7,Org-mode 
Standardized Code Block Keywords,Vote for your preferred format,2011-10-21 
12:27:18 GMT,Darlan Cavalcante Moreira,"Fortaleza, Brazil",1. srcname 2. call 
3. name,,,1,1


Chris

On Oct 22, 2011, at 8:35 AM, Eric Schulte wrote:

> Darlan Cavalcante Moreira  writes:
> 
>> With many people making suggestions and voting It can be a lot of work for
>> someone to collect all of the votes. In fact, I was going to suggest using
>> Doodle for this (http://www.doodle.com/), but Chris was faster with the
>> google moderator. Anyway, if the final result is sent to the list,
>> including who voted in what, then we would not depend on the external link
>> to know why the decision was made.
>> 
> 
> I would agree with Jambunathan that it is easier to keep all the
> activity on list.  As I'll be reading the thread anyways it is no
> problem for me to manually tally the votes.
> 
> Also, the requirement to "sign in" with google is off-putting, although
> I can be a curmudgeon when it comes to google's persistent attempts to
> tie data to my personal google profile.
> 
> If someone could report the results of the spreadsheet on list then I'll
> add them to my own running count.
> 
> Many thanks -- Eric
> 
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte/




[O] org-lrn

2011-10-22 Thread Johannes Hess
I was trying out http://ankisrs.net/ and thought that it would be nicer, if
one could learn stuff from within emacs.
So I threw together https://github.com/warsus/org-lrn, which basically
implements the supermemo-2-algorithm (
http://www.supermemo.com/english/ol/sm2.htm) and stores everything in
org-file format, so it should be really easy to share and collaborate on
decks.
Also you can use the nice org-capture to really quickly add new entries (see
the example configfile).
It's probably not much more than a prototype and i'm a pretty busy, but
thought the concept was useful enough to post it.


Re: [O] Bill-of-materials

2011-10-22 Thread Frozenlock
Of course I do, it would be an honor! ;-)

On Sat, Oct 22, 2011 at 12:32 PM, Nick Dokos  wrote:
> Bastien  wrote:
>
>> Hi Frozenlock,
>>
>> Frozenlock  writes:
>>
>> > This is a much better version of the little add-on I've written:
>> >
>> > Bill-of-materials (org-bom.el)
>>
>> Thanks -- I add this to Worg/org-contrib/index.org.  Please check the
>> description when it goes online and improve it if necessary.
>>
>> > I've used this for over 6 months now, daily.
>> > If you ever need to quickly make a quote for a client, or simply
>> > make easy to-buy list, this should help you.
>> >
>> > You can find the code here: http://pastebin.com/K11QpQ6Q
>>
>> I used http://pastebin.com/raw.php?i=K11QpQ6Q as the location for
>> getting the raw code -- hopefully pastebin will keep this URL valid.
>>
>
> Seems like org-bom.el is a good candidate for contrib/ (assuming
> Frozenlock agrees).
>
> Nick
>



Re: [O] org-mode entering dates

2011-10-22 Thread Nick Dokos
Jude DaShiell  wrote:

> I found control-c followed by (.) makes a date in agenda entry form, would 
> c-u+c-c+. do a date with brackets around it rather than inequality signs?  
> If so, that's what I need.
> 
> Jude 
> If I got a nickel for every message I've already sent supporting Microsoft
> Windows and its applications I'd have enough to retire on comfortably no
> matter what the stock market did.
> 

If you mean like this

[2011-10-22 Sat]

then you need C-c !  which is bound to org-time-stamp-inactive.

Nick



Re: [O] Bill-of-materials

2011-10-22 Thread Nick Dokos
Bastien  wrote:

> Hi Frozenlock,
> 
> Frozenlock  writes:
> 
> > This is a much better version of the little add-on I've written:
> >
> > Bill-of-materials (org-bom.el)
> 
> Thanks -- I add this to Worg/org-contrib/index.org.  Please check the
> description when it goes online and improve it if necessary.
> 
> > I've used this for over 6 months now, daily.
> > If you ever need to quickly make a quote for a client, or simply
> > make easy to-buy list, this should help you.
> >
> > You can find the code here: http://pastebin.com/K11QpQ6Q
> 
> I used http://pastebin.com/raw.php?i=K11QpQ6Q as the location for
> getting the raw code -- hopefully pastebin will keep this URL valid.
> 

Seems like org-bom.el is a good candidate for contrib/ (assuming
Frozenlock agrees).

Nick



Re: [O] FYI: Org mode testing framework, Emacs 23 and 22

2011-10-22 Thread Eric Schulte
"Sebastien Vauban"  writes:

> Hi Bastien,
>
> Bastien wrote:
>> Hi Eric and David,
>> Eric Schulte  writes:
>>
>>> I suppose the next step here would be to talk to Bastien about setting
>>> up such a system on the org-mode server.
>>
>> For the record, I'm all for a server-side setup that will test
>> latest Org on a regular basis.
>>

Fantastic.

>>
>> Jason, depending on our server resources, would that be feasible
>> to run regular (cron'ed) tests?  What is the best frequency?
>
> Wouldn't the best frequency be: at every commit?
>
> That's not for the minute (maybe even less) it takes to run the 102 tests, I
> guess...
>

$ time emacs -Q --batch \
-l ~/.emacs.d/src/org/testing/org-test.el \
--eval "(setq org-confirm-babel-evaluate nil)" \
-f org-test-run-batch-tests 2>/dev/null 1>/dev/null \
4.00s user 0.44s system 56% cpu 7.834 total

So at 8 seconds (on my machine) it shouldn't put too much load on the
server to run after every commit, we would just want to be sure that
multiple instances of the test suite are not run at once.  A check to
only run the suite if it is not currently running shouldn't be difficult
to run.

I can work with Jason offline to figure out how to set this up.

Cheers -- Eric

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



Re: [O] Source blocks for tiny snippets

2011-10-22 Thread Eric Schulte
suvayu ali  writes:

> Hi everyone,
>
> I was wondering what people do when they need to put a few (1 or 2)
> lines of code snippets in org files? I like the syntax highlighting one
> gets in an org buffer and in HTML export with code blocks. Is there some
> work around other than have code blocks for every line I want to
> include?
>
> As an example consider this paragraph:
>
> Edit job options for number of events and other configurations
> : $ $EDITOR $GAUSSOPTS/.py
> The number of events in a job can be customised with the option
> : LHCbApp().EvtMax = nEvts
> To run the generator only, set the property below.
> : Gauss().Phases = ["Generator"]
> To turn on full monitoring and dump an ntuple to a root file, include
> the opts files as below. It can be customised further to suit the needs.
> : importOptions('$GAUSSOPTS/.opts')
>
> In the above example you have a mix of bash and python snippets.
>

Currently there is no more concise way to specify code blocks other than
the normal code block format.  Although it doesn't currently exist maybe
an option could be added to hide the #+BEGIN/END_SRC lines so that they
don't appear in the buffer.  That combined with a helper for specifying
code blocks (I use yasnippets for this) should serve.

Best -- Eric

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



Re: [O] Org-mode Standardized Code Block Keywords

2011-10-22 Thread Eric Schulte
Darlan Cavalcante Moreira  writes:

> With many people making suggestions and voting It can be a lot of work for
> someone to collect all of the votes. In fact, I was going to suggest using
> Doodle for this (http://www.doodle.com/), but Chris was faster with the
> google moderator. Anyway, if the final result is sent to the list,
> including who voted in what, then we would not depend on the external link
> to know why the decision was made.
>

I would agree with Jambunathan that it is easier to keep all the
activity on list.  As I'll be reading the thread anyways it is no
problem for me to manually tally the votes.

Also, the requirement to "sign in" with google is off-putting, although
I can be a curmudgeon when it comes to google's persistent attempts to
tie data to my personal google profile.

If someone could report the results of the spreadsheet on list then I'll
add them to my own running count.

Many thanks -- Eric

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



Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Eric Schulte
Darlan Cavalcante Moreira  writes:

> It's excellent that now babel understands multiple values in the "var"
> property (I was one of the people that wanted this), but "There Is One More
> Thing".
>
> Would it be feasible to inherit variables from parent sub-trees?
> Effectively, I'd like to append new values in lower level sub-trees, but
> AFAIK setting the var property in a sub-tree will still replace the value
> set in the parent sub-tree.
>

Currently every new property specification entirely replaced previous
specifications with the same name.

>
> That is, in the example below the level-2 sub-trees would not have the foo
> variable passed to babel.
> * Code with foo
>   :PROPERTIES:
>   :var:  foo=1
>   :END:
>
> ** Code only with bar
>:PROPERTIES:
>:var:  bar=2
>:END:
>src_block
> ** Code only with baz
>:PROPERTIES:
>:var:  baz=3
>:END:
>src_block
>
> Maybe a special keyword, such as "inherit" (or "append") could be used to
> incorporate variables defined in the parent sub-tree, such that the example
> would become
> * Code with foo
>   :PROPERTIES:
>   :var:  foo=1
>   :END:
>
> ** Code with foo and bar
>:PROPERTIES:
>:var:  bar=2, inherit
>:END:
>src_block
> ** Code with foo and baz
>:PROPERTIES:
>:var:  baz=3, inherit
>:END:
>src_block
>
> This should not affect global variables and "inherit" would inherit
> variables defined only in the parent sub-tree (unless it also contains the
> inherit keyword).
>
> As a use case scenario, suppose I need to perform simulations for a few
> different scenarios, each with small variations. This would allow me to
> define common variables for a scenario in a higher level sub-tree and more
> specific variables in the lower level sub-trees.
>

This sounds somewhat similar to my suggestion in reply to Rainer's
email.

Best -- Eric

>
> --
> Darlan Cavalcante
>
>
> At Fri, 21 Oct 2011 22:24:25 +0200,
> Christian Moe  wrote:
>> 
>> Hi,
>> 
>> Yes, that works nicely, and should solve Rainer's problem.
>> I haven't been able to think of anything else that can't be handled by 
>> properties.
>> 
>> And I do think it's a good idea to winnow down the syntax a bit, even 
>> if things break. I just like to grumble.
>> :-)
>> 
>> Yours,
>> Christian
>> 
>> On 10/21/11 7:37 PM, Eric Schulte wrote:
>> > Nice idea.  This same issue with "var" arose when we first started
>> > allowing header arguments to be specified inside subtree properties.
>> > I've just implemented your suggestion so the following are now possible.
>> >
>> > #+PROPERTY: var foo=1, bar=2
>> > #+PROPERTY: cache yes
>> >
>> > #+begin_src emacs-lisp
>> >(+ foo bar)
>> > #+end_src
>> >
>> > #+results[be32e67491d4e92f75769aebe423c20ca01626fe]:
>> > : 3
>> >
>> > and
>> >
>> > #+begin_src emacs-lisp :var foo="this", bar="that"
>> >(concat foo " " bar)
>> > #+end_src
>> >
>> > #+results[3cde077efa81f1ca24a62ac264dbd5776b6e0054]:
>> > : this that
>> >
>> > Thanks for the suggestion and I hope the above is a sufficient
>> > replacement for the now-missing #+BABEL: syntax.
>> >
>> > Cheers -- Eric
>> 
>> 

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



Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Eric Schulte
>
> Just to add to it: at the moment I have e.g:
>
> #+BABEL: :var MAINVERSION=0
> #+BABEL: :var SVNVERSION=(vc-working-revision (buffer-file-name))
> #+BABEL: :var SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) 
> org-current-export-file)))
> #+BABEL: :var SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) 
> org-current-export-file)) 'up-to-date) 0 13)
> #+BABEL: :var DISP_PACKAGE="seedDisp_0.4-13.tar.gz"
>
> which would look horrible in one line and a nightmare to edit.
>
> Any suggestions how this cold be changed?
>

Hmm, I don't see any easy solution for the above.  I'm sorry to have
removed this functionality.

I can think of three options for how to handle this situation.

1. If it turns out to be possible/desirable my preferred solution here
   would be to add general property support for appending values to
   properties when properties are over specified rather than simply
   replacing the value.  Perhaps this could be done with a variable like
   org-accumulating-properties which could hold a list of those
   properties which should accumulate values rather than overwriting
   them.

2. Adding a "#+PROPERTY:" line authoring helper similar to the table
   formula helper making it more natural to edit such long property
   lines.

3. It may be possible to add syntax for extending #+PROPERTY:
   specifications across multiple lines, something like

   #+PROPERTY:  var MAINVERSION=0,
   #+PROPERTY+: SVNVERSION=(vc-working-revision (buffer-file-name)),
   #+PROPERTY+: SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) 
org-current-export-file))),
   #+PROPERTY+: SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) 
org-current-export-file)) 'up-to-date) 0 13),
   #+PROPERTY+: DISP_PACKAGE="seedDisp_0.4-13.tar.gz"

   FWIW I would like to have a similar extender for #+TBLFM: lines.
   Actually this choice may be my preferred solution.

What do you think?

>
> In addition: I would like to have a warning if #+BABEL is present in the org
> file, so that one remembers that it has to be changed.
>

#+begin_src emacs-lisp
  (add-hook 'org-mode-hook
(lambda ()
  (save-excursion
(goto-char (point-min))
(when (re-search-forward (org-make-options-regexp '("BABEL")))
  (message "This file contains a \"#+BABEL:\" line.")
#+end_src

Cheers -- Eric

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



Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Eric Schulte
> Will
>
> #+PROPERTY: var foo=1
> #+PROPERTY: var bar=2
>
> also work, or result in one variable not signed?
>

Try it out :)

This is a question about property behavior not specific to code blocks.
I believe that the second line will override the first, which is why it
was necessary to be able to specify multiple variables in a single
#+PROPERTY: instance.

Cheers -- Eric

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



Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Eric Schulte
>
> Just to clarify my understanding: on a #+PROPERTY line, you *have* to
> say
>
> #+PROPERTY: var a=1, b=2
>
> but in the code block itself, you can say *either*
>
> #+begin_src emacs-lisp :var a=1, b=2
> ...
>
>
> *or*
>
> #+begin_src emacs-lisp :var a=1 :var b=2
> ...
>

correct

>
> Experimentally, both of these currently work: do you have any plans to
> outlaw the last form?
>

no

>
> Also, how does the comma-separated list of variable assignments interact
> with a language where comma has syntactic significance? I was primarily
> thinking of python where e.g. a=[1,2,3] or a=(1,2) is a legal
> construct. AFAICT, that never worked in babel[fn:1], so it may not
> matter much, but it may be a good idea to come up with a quoting
> mechanism so things like that can be added in the future if necessary.
>

The syntax of the language is not used in the header argument form, only
code-block constructs are used here, which largely amounts to data and
code block references, indexing into variables, and emacs-lisp forms.
There are cases where the above do contain ", " but they are parsed
correctly, e.g.,

#+headers: :var data=foo(bar=1, baz=2), fuz=5

and

#+headers: :var data=table[0,0]

will both be parsed correctly.

>
> Thanks,
> Nick
>
> Footnotes:
>
> [fn:1] I checked in 7.7 to avoid the recent churn with the following
> code block
>
>
> #+begin_src python :var a='(1,2)'
> len(a)
> #+end_src
>
> and I get 
>
> ,
> |   File "", line 3
> | a=[1, [\,, 2]]
> |  ^
> | SyntaxError: unexpected character after line continuation character
> `
>
> in the org babel error output buffer.

you can use elisp in assignment forms, but not syntax from the language
of the code block, so the above could be re-written as

#+begin_src python :var a='(1 2)
  len(a)
#+end_src

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



Re: [O] [RFC] Standardized code block keywords

2011-10-22 Thread Eric Schulte
>
> Let me help revise the documentation when the dust settles and the
> syntax changes are in place.  As it stands now, #+data: doesn't show up
> in the index to the manual, and the entry for #+tblname: leads only to
> a description of its use in spreadsheets.
>

Thanks Tom, any help with the documentation will be much appreciated.

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



Re: [O] Byte compiler warnings

2011-10-22 Thread Achim Gratz
Hi Bastien,

thanks for fixing.  I've just pulled again.

>> In org-agenda-get-blocks:
>> org-agenda.el:5434:42:Warning: assignment to free variable `category-pos'
>> org-agenda.el:5434:20:Warning: reference to free variable
>> `category-pos'
>
> I just fixed this.

I'm still getting the same error with commit e0c1855 included.  The rest
of your fixes did quell the warnings from the byte compiler.



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

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




Re: [O] org-capture and XEmacs, indenting too far

2011-10-22 Thread Michael Sperber

Robert Pluim  writes:

> Hi, I'm using XEmacs 21.5  (beta29) "garbanzo" d27c1ee1943b+ [Lucid]
> (i686-pc-cygwin, Mule) of Mon Oct 18 2010 on RPluim, with the following
> org-capture-templates
>
> (("t" "Todo" entry (file+headline "~/org/notes.org" "Tasks") "* TODO %?"))
>
> The problem is that for some reason the resulting TODO heading is has 2
> extra spaces, and is placed at too deep a level, giving:
>
> * Tasks
> ***   TODO a task
>
> I've tested this on a fairly recent emacs24 build, and everything works
> fine there, so this is probably something XEmacs specific.  Can anyone
> suggest any way to track this down (I'd bisect, but I've yet to find a
> 'good' version)?

I finally got around to looking into this: The reason is that, in
org-capture mode, `outline-level' is bound to outline.el's function,
which is off by one compared to org-mode's.  I used this patch to fix
it:

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index e1b8a4f..cfa35d5 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -848,6 +848,7 @@ it.  When it is a variable, retrieve the value.  Return 
whatever we get."
   (goto-char (org-capture-get :pos))
   (org-set-local 'org-capture-target-marker
 (move-marker (make-marker) (point)))
+  (org-set-local 'outline-level 'org-outline-level)
   (let* ((template (org-capture-get :template))
 (type (org-capture-get :type)))
 (case type

Could somebody review and maybe apply this?

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



Re: [O] Byte compiler warnings

2011-10-22 Thread Bastien
Hi Achim,

Achim Gratz  writes:

> Recently the byte compiler has become increasingly dissatisfied with the
> orgmode code again... :-)
>
> Emacs24 complains about these:
>
> In org-agenda-get-blocks:
> org-agenda.el:5434:42:Warning: assignment to free variable `category-pos'
> org-agenda.el:5434:20:Warning: reference to free variable
> `category-pos'

I just fixed this.

> That actually has been there for a while.

Yes, my bad.

> In org-edit-src-code:
> org-src.el:295:14:Warning: reference to free variable `eq'

This is also fixed.

> That's most likely a bug involving a comparison, in any case if "eq" really 
> is a variable it
> surely needs a different name.
>
> In org-babel-get-lob-one-liner-matches:
> ob.el:191:21:Warning: reference to free variable
> `org-babel-inline-lob-one-liner-regexp'

Fixed.

> In org-babel-execute:shen:
> ob-shen.el:68:32:Warning: reference to free variable `result-params'
> ob-shen.el:72:19:Warning: reference to free variable `result'

I expect Eric will take care of this.
>
> In end of data:
> org.el:20874:1:Warning: the function `cdlatex-compute-tables' is not known to
> be defined.

Fixed.

> I don't know if a package needs to be required or the function
> declared.

The function needs to be declared.

> Emacs23 additionally complains about:
>
> In org-mode:
> org.el:4870:9:Warning: assignment to free variable `bidi-paragraph-direction'
>
> In end of data:
> org.el:20874:1:Warning: the function `format-spec' might not be defined at
> runtime.
>
> It looks like these functions don't exist in Emacs23 and need to be
> protected via version-dependent wrappers.

On my todo list.

Thanks for the careful check!

-- 
 Bastien



[O] bug in getting category

2011-10-22 Thread Daniel Clemente

Hi,
  with org-mode from today I created a file miso.org with this content:
---
* aaa
  :PROPERTIES:
  :CATEGORY: bbb
  :END:
** TODO ccc


  Then I used an ~/.emacs which said:

(progn (add-to-list 'load-path "/w/org-mode/lisp") (require 'org-install) 
(require 'org) (require 'org-agenda))
(org-agenda-get-day-entries "/home/dc/miso.org" '(10 22 2011) :todo)



  And after running „emacs“ I got:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("^ +" nil)
  (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
  (progn (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil 
txt))) (setq txt  …
  (unwind-protect (progn (if (string-match "^ +" txt) (setq txt (replace-match 
"" nil nil tx…
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn (if 
(string-match "^ +" txt) …
  (save-match-data (if (string-match "^ +" txt) (setq txt (replace-match "" nil 
nil txt))) (setq …
  org-format-agenda-item("" nil #("bbb" 0 3 (fontified nil org-category 
"miso")) nil)
  (setq marker (org-agenda-new-marker (match-beginning 0)) category 
(org-get-category) txt (match-string 1) …
  (catch :skip (save-match-data (beginning-of-line) (setq beg (point) end 
(save-excursion (out…
  (while (re-search-forward regexp nil t) (catch :skip (save-match-data 
(beginning-of-line) (se…
  (let* ((props (list (quote face) nil (quote done-face) (quote 
org-agenda-done) (quote org-not…
]*\\)")) marker priority category tags todo-state ee txt beg end) (goto-char 
(point-min)) (whil…
  org-agenda-get-todos()
  (setq rtn (org-agenda-get-todos))
  …



  The second time I ran the code from .emacs I got it right:

(#("TODO ccc" 0 8 (org-category #("bbb" 0 3 ...) fontified nil tags nil 
org-highest-priority 65 org-lowest-priority 67 prefix-length 0 ...)))


  Which seems to be inappropriate, as in previous versions I get:

(#("TODO ccc" 0 8 (fontified nil org-category nil tags nil org-highest-priority 
65 org-lowest-priority 67 prefix-length 0 ...)))




  Via git bisect I traced the bug to:

ca733df0d41eccced5f8f1abb85d525cb12dd21f is the first bad commit
commit ca733df0d41eccced5f8f1abb85d525cb12dd21f
Author: Carsten Dominik 
Date:   Mon Jan 3 13:12:42 2011 +0100

Move the category property refresh to org-get-category where possible




  Greetings,

Daniel



Re: [O] [PATCH 5/5] Avoid conflict between bulk command and loop-over-headlines

2011-10-22 Thread Bastien
Hi David,

I have tested the latest versions of this serie of patches.
Everything works as expected.  

Please all check out this new option:

,[ org-loop-over-headlines-in-active-region ]
| Shall some commands act upon headlines in the active region?
| 
| When set to `t', some commands will be performed in all headlines
| within the active region.
| 
| When set to a string, those commands will be performed on the
| matching headlines within the active region.  Such string must be
| a tags/property/todo match as it is used in the agenda tags view.
| 
| The list of commands is:
| - `org-schedule'
| - `org-deadline'
`

Having it for `org-schedule' and `org-deadline' is just a beginning, 
I'm willing to implement this for `org-archive' too.  If you have other
ideas on where it could be useful, please share.

Thanks a lot David for the clean implementation!

Best,

-- 
 Bastien



Re: [O] BUG: Export images to LaTeX

2011-10-22 Thread Jambunathan K
>> Unfortunately, I pull infrequently, so I can't really narrow down
>> when it started happening.
>>
>>   -Anthony
>
> You can use git bisect to identify the commit that caused the breakage.
>
> ORIG_HEAD should point at the commit you used to be on before your last
> pull.

I frequently use

git reflog --date=relative

to see my git activity.

> -Bernt
>
>

-- 



[O] Byte compiler warnings

2011-10-22 Thread Achim Gratz

Recently the byte compiler has become increasingly dissatisfied with the
orgmode code again... :-)

Emacs24 complains about these:

In org-agenda-get-blocks:
org-agenda.el:5434:42:Warning: assignment to free variable `category-pos'
org-agenda.el:5434:20:Warning: reference to free variable `category-pos'

That actually has been there for a while.

In org-edit-src-code:
org-src.el:295:14:Warning: reference to free variable `eq'

That's most likely a bug involving a comparison, in any case if "eq" really is 
a variable it
surely needs a different name.


In org-babel-get-lob-one-liner-matches:
ob.el:191:21:Warning: reference to free variable
`org-babel-inline-lob-one-liner-regexp'

That one is a bit older IIRC.


In org-babel-execute:shen:
ob-shen.el:68:32:Warning: reference to free variable `result-params'
ob-shen.el:72:19:Warning: reference to free variable `result'

I guess Eric knows what to do with this.


In end of data:
org.el:20874:1:Warning: the function `cdlatex-compute-tables' is not known to
be defined.

I don't know if a package needs to be required or the function declared.


Emacs23 additionally complains about:

In org-mode:
org.el:4870:9:Warning: assignment to free variable `bidi-paragraph-direction'

In end of data:
org.el:20874:1:Warning: the function `format-spec' might not be defined at
runtime.

It looks like these functions don't exist in Emacs23 and need to be
protected via version-dependent wrappers.


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] BUG: Export images to LaTeX

2011-10-22 Thread Bernt Hansen
Anthony Lander  writes:

> On 11-Oct-21, at 7:26 PM, Nick Dokos wrote:
>
>> Anthony Lander  wrote:
>> 
>>> I've run into a strange problem with the latest org pull. Exporting
>>> inlined images with the LaTeX exporter works or not depending on
>>> whether I include org-jsinfo in org-modules(!). This is with emacs
>>> -q on the 24.0.90.1 emacs recent release.
>>> 
>>> Can someone please try to reproduce this to confirm?
>> 
>> Pretty weird - I can reproduce this by omitting org-jsinfo from org-modules 
>> and 
>> starting with a minimal .emacs.
>
> Thanks for reproducing this. It is indeed weird, as you describe below. 
>
> Unfortunately, I pull infrequently, so I can't really narrow down when it 
> started happening.
>
>   -Anthony

You can use git bisect to identify the commit that caused the breakage.

ORIG_HEAD should point at the commit you used to be on before your last
pull.

-Bernt



Re: [O] Alignment Regexp Should Recognize Currencies

2011-10-22 Thread Daniel E . Doherty
Bastien,

I thought this issue was going to die.  Thanks for reviving it.  I am
still interested and would love to hear Carsten's views.

Maybe numeric fields could have the grouping character (,) and currency
symbols stripped before being used for coumputation?

Regards,

At Sat, 22 Oct 2011 12:43:55 +0200,
bzg wrote:
> 
> Hi Daniel,
> 
> Daniel E. Doherty  writes:
> 
> > I noticed that the regular expression for recognizing what columns are
> > numeric in a table for purposes of right-aligning does not pick up
> > dollar values with commas.
> >
> > For example, $23,821,415.18 would be treated as "text" and left-aligned,
> > which I don't believe is what one would expect.
> 
> To me, values that are right-aligned are those who are ready for further
> computation, and letting $3 be right-aligned would be confusing.
> 
> But I understand your need.
> 
> Carsten, what do you think?
> 
> -- 
>  Bastien



Re: [O] table editing probably broken

2011-10-22 Thread Bernt Hansen
Saving the file shouldn't realign the table.

C-c C-c in the table should realign it on demand.

-Bernt

Jude DaShiell  writes:

> I wrote a table in org-mode and am using version 7.7 and it was not 
> reformatted correctly when it was saved by emacs.  My .emacs file and the 
> table I made follow:
> cut here.
> (setq emacspeak-play-emacspeak-startup-icon t)
> (add-hook 'text-mode-hook 'turn-on-auto-fill)
> (add-hook 'mail-setup-hook 'spook)
> (add-hook 'mail-setup-hook 'fortune-to-signature)
> (setq mh-send-uses-spost-flag t)
>  (setq mail-user-agent 'mh-e-user-agent)
>  (setq browse-url-browser-function 'w3m-browse-url)
>  (require 'w3m-load)
>  (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
> (require 'org-install)
>  (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
>   (global-set-key "\C-cl" 'org-store-link)
>  (global-set-key "\C-ca" 'org-agenda)
> (setq org-log-done t)
>  (global-font-lock-mode 1)
>  (add-to-list 'load-path "~/elisp/muse/lisp")
>   (add-to-list 'load-path "~/elisp/planner")
>(add-to-list 'load-path "~/elisp/remember")
>(setq planner-project "WikiPlanner")
> (setq muse-project-alist
>'(("WikiPlanner"
> ("~/plans"   ;; Or 
> wherever you want your planner files to be
>  :default 
> "index"
>   
> :major-mode planner-mode
>   
>  :visit-link planner-visit-link
>   
>   (require 'planner)
> (add-hook 'text-mode-hook
>   
> (lambda ()
>   
> (when (y-or-n-p "Auto Fill 
> mode? ")
>   
>   
> (turn-on-auto-fill
> ;;
>   
> (global-set-key (kbd "C-c q") 'refill-mode)
>   
>   
> (add-to-list 'load-path "~/elisp/bbdb-2.35/lisp");; (1)
>   
>   (require 
> 'bbdb)
>   
>   
> (bbdb-initialize 'gnus 'message)
>   
>   (setq 
> bbdb-north-american-phone-numbers-p nil)
>   
>   (add-hook 
> 'gnus-startup-hook 'bbdb-insinuate-gnus)
>   
>   (add-hook 
> 'mh-folder-mode-hook 'bbdb-insinuate-mh)
>   
>   (add-hook 
> 'rmail-mode-hook 'bbdb-insinuate-rmail)
>   
>   (add-hook 
> 'mail-setup-hook 'bbdb-insinuate-sendmail)
> (require 'org-habit)
> (add-to-list 'load-path (expand-file-name "~/org-mode/lisp"))
> (add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . 
> org-mode))
> (setq org-agenda-files '("/tmp/test.org"))
> (global-set-key "\C-cb" 'org-iswitchb)
> (blink-cursor-mode -1)
> (setq require-final-newline t)
> (setq case-fold-search t)
> (global-set-key [(meta g)] 'goto-line)
> (setq crypt-encryption-type 'gpg)
>
> cut here.
> | month | year | leap year |
> |-
> | January | 0 | 0 |
> | February | 31 | 31 |
> | March | 59 | 60 |
> | April | 90 | 91 |
> | May | 120 | 121 |
> | June | 151 | 152 |
> | July | 181 | 182 |
> | August | 212 | 213 |
> | September | 243 | 244 |
> | October | 273 | 274 |
> | November | 304 | 305 |
> | December | 334 | 335 |
> |-
>
>

Re: [O] org-mode entering dates

2011-10-22 Thread Bernt Hansen
Jude DaShiell  writes:

> I found control-c followed by (.) makes a date in agenda entry form, would 
> c-u+c-c+. do a date with brackets around it rather than inequality signs?  
> If so, that's what I need.

Hi Jude,

C-c . does active timestamps and
C-c ! does inactive timestamps

Regards,
Bernt



Re: [O] org-mode entering dates

2011-10-22 Thread Chris Pettitt
C-! creates an inactive timestamp with angle brackets.

Jude DaShiell  shellworld.net> writes:

> 
> I found control-c followed by (.) makes a date in agenda entry form, would 
> c-u+c-c+. do a date with brackets around it rather than inequality signs?  
> If so, that's what I need.








Re: [O] Outline and org-mode don't insert text into folded sections logically

2011-10-22 Thread Bastien
Jambunathan K  writes:

>> Good idea.  There is `post-self-insert-hook' but there is no
>> `pre-self-insert-hook' that would check whether the point is in 
>> an invisible area of the buffer, and send a warning about this.
>
> In org-self-insert-command check for visibility at point and take the
> required action.

That's it.  Thanks!

Here is a dummy patch that prevents the user from editing invisible
parts of the buffer.  It doesn't prevent query-and-replace commands.

Can people test it and comment it?

Maybe throwing an error is a bit too much.  Maybe preventing all 
kind of edition in invisible parts of the buffer is too much as 
well -- looking forward reading comments on this.

Thanks,

>From 442f30b74f3f4eb888b63cb5d2cd04542952f84a Mon Sep 17 00:00:00 2001
From: Bastien Guerry 
Date: Sat, 22 Oct 2011 15:50:52 +0200
Subject: [PATCH] Prevent `self-insert-command' in invisible regions.

* org.el (org-self-insert-command): Throw an error when the
user is trying to use self-insert-command in invisible regions.
---
 lisp/org.el |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index d82ae0c..627faa3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17328,6 +17328,9 @@ If the cursor is in a table looking at whitespace, the whitespace is
 overwritten, and the table is not marked as requiring realignment."
   (interactive "p")
   (cond
+   ((eq (car (get-char-property-and-overlay
+	  (point) 'invisible)) 'outline)
+(error "Attempt to edit an invisible part of the buffer"))
((and org-use-speed-commands
 	 (setq org-speed-command
 	   (run-hook-with-args-until-success
-- 
1.7.6.1


-- 
 Bastien


Re: [O] BUG: Export images to LaTeX

2011-10-22 Thread Bastien
Hi Anthony,

Anthony Lander  writes:

> I've run into a strange problem with the latest org pull. Exporting
> inlined images with the LaTeX exporter works or not depending on
> whether I include org-jsinfo in org-modules(!). This is with emacs -q
> on the 24.0.90.1 emacs recent release.
>
> Can someone please try to reproduce this to confirm?

Mhh.. I don't have org-infojs in org-modules and I cannot 
reproduce this -- anyone else?  

-- 
 Bastien



Re: [O] Current patches to make org-mode run on XEmacs

2011-10-22 Thread Bastien
Michael Sperber  writes:

> Thanks.  One bit slipped through:
>
> diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el
> index 14d7d5d..44ed82b 100644
> --- a/lisp/ob-calc.el
> +++ b/lisp/ob-calc.el
> @@ -28,7 +28,6 @@
>  ;;; Code:
>  (require 'ob)
>  (require 'calc)
> -(require 'calc-store)
>  (unless (featurep 'xemacs)
>(require 'calc-trail)
>(require 'calc-store))

Applied, thanks a lot for the careful check.

-- 
 Bastien



Re: [O] Current patches to make org-mode run on XEmacs

2011-10-22 Thread Michael Sperber

Carsten Dominik  writes:

> Hi Michael,
>
> I have checked these in, with the following exceptions:

Thanks.  One bit slipped through:

diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el
index 14d7d5d..44ed82b 100644
--- a/lisp/ob-calc.el
+++ b/lisp/ob-calc.el
@@ -28,7 +28,6 @@
 ;;; Code:
 (require 'ob)
 (require 'calc)
-(require 'calc-store)
 (unless (featurep 'xemacs)
   (require 'calc-trail)
   (require 'calc-store))

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



[O] org-mode entering dates

2011-10-22 Thread Jude DaShiell
I found control-c followed by (.) makes a date in agenda entry form, would 
c-u+c-c+. do a date with brackets around it rather than inequality signs?  
If so, that's what I need.

Jude 
If I got a nickel for every message I've already sent supporting Microsoft
Windows and its applications I'd have enough to retire on comfortably no
matter what the stock market did.




Re: [O] Current patches to make org-mode run on XEmacs

2011-10-22 Thread Bastien
Carsten Dominik  writes:

> I have checked these in, with the following exceptions:
>
> - Somewhere you have a call to `org-ref', I guess this must be
> `org-re'

I fixed this one.

> - The special hunk you are mentioning is not longer in org.el,
>   I guess it was removed somehow in some other commit...
>
> Hope this makes XEmacs run smoothly with Org.

Same here!  I have had requests about this recently.

-- 
 Bastien



Re: [O] direct link to mails in gmail

2011-10-22 Thread Niels Giesen
suvayu ali  writes:

> On Sat, Oct 22, 2011 at 13:43, Niels Giesen  wrote:
>> suvayu ali  writes:
>>
>>> On Sat, Oct 22, 2011 at 8:48 AM, Niels Giesen  
>>> wrote:
 Too bad I have set up Emacs to use emacs-w3m, in which this does not work 
 --
 probably the hash part is handled by client-side JavaScript.
>>>
>>> You can try this:
>>>
>>> https://mail.google.com/mail/h/
>>
>> That link simply visits the HTML-version of gmail, but does not let one
>> select an article via the URL - as far as I know.
>>
>
> In that case you can try the "Message text garbled?" or "Show original" link.

Ok. This one seems to do the trick to show the original of a single
message:

https://mail.google.com/mail/h/?&v=om&th=MESSAGE-ID

And this one can be used for conversation view:

https://mail.google.com/mail/h/?&v=c&s=l&th=MESSAGE-ID

It seems v=c means view=conversation. But this is not enough by and of
itself, s=l is necessary too, whatever that means. Left out, your Inbox
will be presented.

Summing up, if you want to visit gmails articles without using
JavaScript, you may use this:

#+LINK: gmail https://mail.google.com/mail/h/?&v=c&s=l&th=
for HTML-only browsers/settings or
#+LINK: gmail https://mail.google.com/mail/?shva=1#all/
for JS-enabled browsers

or something like

#+begin_src emacs-lisp
  (org-add-link-type
   "gmail"
   (lambda (link)
 (browse-url
  ;; or "https://mail.google.com/mail/?shva=1#all/"; for js-browser
  (concat "https://mail.google.com/mail/h/?&v=c&s=l&th="; link
#+end_src

to have the link type globally.

Then use this in an Org file:

[[gmail:1331f3490dff1205][conversation about gmail links]]

This way, if Google decides to change it's url structure, all you have
to do is redefine your link type, instead of all email links.


> Hope that helps.

-- 
http://pft.github.com/



Re: [O] direct link to mails in gmail

2011-10-22 Thread suvayu ali
On Sat, Oct 22, 2011 at 13:43, Niels Giesen  wrote:
> suvayu ali  writes:
>
>> On Sat, Oct 22, 2011 at 8:48 AM, Niels Giesen  wrote:
>>> Too bad I have set up Emacs to use emacs-w3m, in which this does not work --
>>> probably the hash part is handled by client-side JavaScript.
>>
>> You can try this:
>>
>> https://mail.google.com/mail/h/
>
> That link simply visits the HTML-version of gmail, but does not let one
> select an article via the URL - as far as I know.
>

In that case you can try the "Message text garbled?" or "Show original" link.

Hope that helps.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] BUG: Export images to LaTeX

2011-10-22 Thread Anthony Lander

On 11-Oct-21, at 7:26 PM, Nick Dokos wrote:

> Anthony Lander  wrote:
> 
>> Hi List,
>> 
>> I've run into a strange problem with the latest org pull. Exporting inlined 
>> images with the LaTeX exporter works or not depending on whether I include 
>> org-jsinfo in org-modules(!). This is with emacs -q on the 24.0.90.1 emacs 
>> recent release.
>> 
>> Can someone please try to reproduce this to confirm?
> 
> Pretty weird - I can reproduce this by omitting org-jsinfo from org-modules 
> and 
> starting with a minimal .emacs.

Thanks for reproducing this. It is indeed weird, as you describe below. 

Unfortunately, I pull infrequently, so I can't really narrow down when it 
started happening.

  -Anthony

> 
> But there seems to be something else as well: after the export (where I get 
> the
> href link that Anthony mentions) I require org-jsinfo and reexport and get the
> \includegraphics, again as mentioned. I then unload-feature org-jsinfo, and
> try again: I get an error because org-export-options-filters now contains a 
> function
> from org-jsinfo that is no longer present. So I reset 
> org-export-options-filters back
> to nil: this time the reexport succeeds, but I get the \includegraphics, not 
> the \href:
> the act of loading and unloading org-jsinfo seems to have changed the state 
> enough
> so that latex export now does the right thing.
> 
> And no, it's not a remnant of the previous export: I delete the .tex file and 
> recreate
> it in this last case.
> 
> Nick
> 




[O] org-mode table editor works

2011-10-22 Thread Jude DaShiell
I forgot to hit the tab character before filling out the first 
line/record, once I did that everything worked normally.

Jude 
If I got a nickel for every message I've already sent supporting Microsoft
Windows and its applications I'd have enough to retire on comfortably no
matter what the stock market did.




Re: [O] direct link to mails in gmail

2011-10-22 Thread Niels Giesen
suvayu ali  writes:

> On Sat, Oct 22, 2011 at 8:48 AM, Niels Giesen  wrote:
>> Too bad I have set up Emacs to use emacs-w3m, in which this does not work --
>> probably the hash part is handled by client-side JavaScript.
>
> You can try this:
>
> https://mail.google.com/mail/h/

That link simply visits the HTML-version of gmail, but does not let one
select an article via the URL - as far as I know.

-- 
http://pft.github.com/



[O] table editing probably broken

2011-10-22 Thread Jude DaShiell
I wrote a table in org-mode and am using version 7.7 and it was not 
reformatted correctly when it was saved by emacs.  My .emacs file and the 
table I made follow:
cut here.
(setq emacspeak-play-emacspeak-startup-icon t)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(add-hook 'mail-setup-hook 'spook)
(add-hook 'mail-setup-hook 'fortune-to-signature)
(setq mh-send-uses-spost-flag t)
 (setq mail-user-agent 'mh-e-user-agent)
 (setq browse-url-browser-function 'w3m-browse-url)
 (require 'w3m-load)
 (autoload 'w3m-weather "w3m-weather" "Display weather report." t)
(require 'org-install)
 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
  (global-set-key "\C-cl" 'org-store-link)
   (global-set-key "\C-ca" 'org-agenda)
(setq org-log-done t)
   (global-font-lock-mode 1)
   (add-to-list 'load-path "~/elisp/muse/lisp")
(add-to-list 'load-path "~/elisp/planner")
 (add-to-list 'load-path "~/elisp/remember")
 (setq planner-project "WikiPlanner")
  (setq muse-project-alist
 '(("WikiPlanner"
  ("~/plans"   ;; Or 
wherever you want your planner files to be
   :default 
"index"

:major-mode planner-mode

 :visit-link planner-visit-link

  (require 'planner)
  (add-hook 'text-mode-hook

(lambda ()

(when (y-or-n-p "Auto Fill 
mode? ")

  
(turn-on-auto-fill
;;  
  
(global-set-key (kbd "C-c q") 'refill-mode)

  (add-to-list 
'load-path "~/elisp/bbdb-2.35/lisp");; (1)

  (require 
'bbdb)

  
(bbdb-initialize 'gnus 'message)

  (setq 
bbdb-north-american-phone-numbers-p nil)

  (add-hook 
'gnus-startup-hook 'bbdb-insinuate-gnus)

  (add-hook 
'mh-folder-mode-hook 'bbdb-insinuate-mh)

  (add-hook 
'rmail-mode-hook 'bbdb-insinuate-rmail)

  (add-hook 
'mail-setup-hook 'bbdb-insinuate-sendmail)
(require 'org-habit)
(add-to-list 'load-path (expand-file-name "~/org-mode/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . 
org-mode))
(setq org-agenda-files '("/tmp/test.org"))
(global-set-key "\C-cb" 'org-iswitchb)
(blink-cursor-mode -1)
(setq require-final-newline t)
(setq case-fold-search t)
(global-set-key [(meta g)] 'goto-line)
(setq crypt-encryption-type 'gpg)

cut here.
| month | year | leap year |
|-
| January | 0 | 0 |
| February | 31 | 31 |
| March | 59 | 60 |
| April | 90 | 91 |
| May | 120 | 121 |
| June | 151 | 152 |
| July | 181 | 182 |
| August | 212 | 213 |
| September | 243 | 244 |
| October | 273 | 274 |
| November | 304 | 305 |
| December | 334 | 335 |
|-

cut here.
Jude 
If I got a nickel for every message I've already sent supporting Microsoft
Windows and its applications I'd have enough to retire on comfortably no
matter what the stock market did.




[O] org-mode entering dates

2011-10-22 Thread Jude DaShiell
As opposed to time stamps, I tried +0d and wanted to have org-mode 
substitute today's date in a field and that didn't work.  For what I'm 
doing I want to have one date per line/record and two separate times which 
happen on that date.  What is the correct way to have org-mode place only 
today's date in a field without the time?  I have no problem with the 
weekday being part of that date either.



Jude  If I got a nickel for every message I've 
already sent supporting Microsoft Windows and its applications I'd have 
enough to retire on comfortably no matter what the stock market did.




Re: [O] Alignment Regexp Should Recognize Currencies

2011-10-22 Thread Bastien
Hi Daniel,

Daniel E. Doherty  writes:

> I noticed that the regular expression for recognizing what columns are
> numeric in a table for purposes of right-aligning does not pick up
> dollar values with commas.
>
> For example, $23,821,415.18 would be treated as "text" and left-aligned,
> which I don't believe is what one would expect.

To me, values that are right-aligned are those who are ready for further
computation, and letting $3 be right-aligned would be confusing.

But I understand your need.

Carsten, what do you think?

-- 
 Bastien



Re: [O] Odd export of a selected tree

2011-10-22 Thread Bastien
Hi Eythan,

eythan...@gmail.com (Eythan Weg) writes:

> Hi,
>
> Consider a  file containing something like:
>
>  * Test :export:
>  * Test 2
>
>
> And now export it, say to ascii format.
>
> I get a buffer containing:  
>
>  1 Test  :export:
>
>
> Is this expected?

Use (setq org-export-with-tags nil) or #+OPTIONS: tags:nil 
directly in your org buffer.  The :export: tag will still do 
its job.

HTH,

-- 
 Bastien



Re: [O] Google Tasks integration

2011-10-22 Thread Bastien
Hi Brad,

Brad Collette  writes:

> Is there any work going on to be able to take advantage of this API
> from org-mode?

Not to my knowledge, but interactions with various API is definitely 
something we want.

-- 
 Bastien



Re: [O] Outline and org-mode don't insert text into folded sections logically

2011-10-22 Thread Jambunathan K
Bastien  writes:

> Hi Suvayu,
>
> suvayu ali  writes:
>
>> I think this might be the right time to ask for a feature request,
>> unfold a tree if someone tries to edit it. This will prevent many
>> "mishaps".
>
> Good idea.  There is `post-self-insert-hook' but there is no
> `pre-self-insert-hook' that would check whether the point is in 
> an invisible area of the buffer, and send a warning about this.

In org-self-insert-command check for visibility at point and take the
required action.

> Any idea on how to implement this?

-- 



Re: [O] Outline and org-mode don't insert text into folded sections logically

2011-10-22 Thread suvayu ali
Hi Bastien,

On Sat, Oct 22, 2011 at 12:13 PM, Bastien  wrote:
>
> suvayu ali  writes:
>
>> I think this might be the right time to ask for a feature request,
>> unfold a tree if someone tries to edit it. This will prevent many
>> "mishaps".
>
> Good idea.  There is `post-self-insert-hook' but there is no
> `pre-self-insert-hook' that would check whether the point is in
> an invisible area of the buffer, and send a warning about this.
>
> Any idea on how to implement this?
>

Sorry, I had been meaning to take a look at this for a long time but
haven't had the time so far. :(

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] org-ruby 0.6 released; project needs new maintainer

2011-10-22 Thread Bastien
Hi Brian,

Brian Dewey  writes:

> I just released version 0.6.0 of the org-ruby gem. This native Ruby
> gem can convert org-mode files into HTML, which is useful in web
> services where you don't want to run a version of Emacs for
> conversion. For example, this gem is used on GitHub to render .org
> for readme files or wiki pages.

So *you* are the one we need to thank for this use of Org within 
github?  Thanks :)

> At this point, I also want to put a call out to the org community for
> someone to take over maintenance of this gem. I no longer use org
> files (long story), so working on this code no longer fits into my
> daily tasks. Is there anybody with both Org and Ruby experience who
> wants to run with this project?

I don't speak ruby and can't help here.  

The first thing is to advertize org-ruby here:
http://orgmode.org/worg/org-tools/index.html

Can you provide a patch against this org file?
http://repo.or.cz/w/Worg.git/blob_plain/HEAD:/org-tools/index.org

Make it clear that org-ruby is looking for a maintainer.

Thanks,

-- 
 Bastien



[O] How to simply log things

2011-10-22 Thread Karl Voit
Hi!

I do have the requirements to log certain things. Those things are
not regularly and are «triggered» externally. So far I have used
following method:

,
| ** TODO foobar happened
| DEADLINE: <2031-10-05 Sun .+240m -1d>
| :LOGBOOK:
| - State "DONE"   from "TODO"   [2011-10-05 Wed 00:16]
| - State "DONE"   from "TODO"   [2011-09-24 Sat 15:27]
| - State "DONE"   from "TODO"   [2011-09-08 Thu 08:49]
| - State "DONE"   from "TODO"   [2011-08-05 Fri 08:35]
| :END:
| :PROPERTIES:
| :CREATED: <2011-07-12 Tue 14:27>
| :LAST_REPEAT: [2011-10-05 Wed 00:16]
| :END:
`

What it does: whenever I go to this heading and invoke C-c C-t to
set it to DONE, a new line will be created in the LOGBOOK drawer.
This is all I need: a simple timestamp related to a topic/heading.

With the .+240m recurrence definition[1], the TODO basically stays
in my Org-mode file and never shows up in my agenda (which is what I
want to achieve).

Although it works perfectly I got the feeling that this is some kind
of dirty workaround where Org-mode might provide something that is
«cleaner». 

Am I right?

  1. Initially I used .+999m but that exceeded UNIX epoch causing 
 troubles :-)
-- 
Karl Voit




Re: [O] Outline and org-mode don't insert text into folded sections logically

2011-10-22 Thread Bastien
Hi Suvayu,

suvayu ali  writes:

> I think this might be the right time to ask for a feature request,
> unfold a tree if someone tries to edit it. This will prevent many
> "mishaps".

Good idea.  There is `post-self-insert-hook' but there is no
`pre-self-insert-hook' that would check whether the point is in 
an invisible area of the buffer, and send a warning about this.

Any idea on how to implement this?

-- 
 Bastien



Re: [O] [bug-report] #+LaTeX_CLASS: whitespaces in the parameter list are not omitted

2011-10-22 Thread Bastien
Hi Torsten,

Torsten Wagner  writes:

> The error message on export was correct to say
> org-export-latex-set-initial-vars: No definition for class
> `koma_article ' in `org-export-latex-classes' (again notice the space)

Should be fixed now, thanks!

-- 
 Bastien



[O] Converting DateBk(6)/jPilot data to Org-mode

2011-10-22 Thread Karl Voit
Hi!

After a decade of happily using PalmOS/DateBk (DateBk6) I am
switching my PIM[3] to Org-mode[1]. My vast amount of data is being
converted through jPilot[2] CSV export and self-written Python
scripts.

If someone wants to go the same path, contact me. I am glad to share
my Python scripts. They are currently works-for-me solutions I don't
want to publish (need personal modifications, one-time-shots, German
CSV header, ...). If you are able to program Python a little bit,
these scripts should work well for you too. Even with UTF-8 :-)

  1. http://suderei.supersized.org/archives/168-Org-mode.html
  2. http://www.jpilot.org/
  3. http://en.wikipedia.org/wiki/Personal_information_management
-- 
Karl Voit




Re: [O] direct link to mails in gmail

2011-10-22 Thread suvayu ali
On Sat, Oct 22, 2011 at 8:48 AM, Niels Giesen  wrote:
> Too bad I have set up Emacs to use emacs-w3m, in which this does not work --
> probably the hash part is handled by client-side JavaScript.

You can try this:

https://mail.google.com/mail/h/

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] OPatches for org-generic-export

2011-10-22 Thread Bastien
Hi Robert,

I applied your first two patches, but 3-4-5 don't apply against 
current HEAD.

I agree with Wes it's good to have a minimal example on how to use
org-export-generic and HTML is the right choice for that; but I also
agree with you that this example should not be presented as a core
function of the exporter, this creates a useless maintainance burden.

Could you submit a patch to document this HTML exporter on Worg ?  

Then I will reapply your last three patches, once you resent them 
to me.  Please also provide correct ChangeLogs.

Thanks a lot!

-- 
 Bastien



Re: [O] OPatches for org-generic-export

2011-10-22 Thread Bastien
Jambunathan K  writes:

> http://repo.or.cz/w/org-mode/org-jambu.git/tree/refs/heads/private:/contrib/odt/tests

This is a very nice test file.

Jambunathan, do you have an idea on how could we integrate an export
test suite into org-mode/test/, using ERT and (part of) your file?

-- 
 Bastien



Re: [O] Patch for bug in adjusting time ranges in Agenda

2011-10-22 Thread Niels Giesen
Carsten Dominik  writes:

> On 21.10.2011, at 10:54, Christian Egli wrote:
>
>> Hi Carsten
>> 
>> Carsten Dominik  writes:
>> 
>>> I have just checked in a slightly modified patch.
>> 
>> I think there is a problem with this checkin. The variable
>> org-agenda-move-date-from-past-immediately-to-today is not defined.
>> Should this be a defcustom somewhere?
>
> Yes, I forgot to put that in.  Done now.
>

Hmm. Found another bug, which presumably existed with my original patch
too:

#+begin_example
  Week-agenda (W42):
  Monday 17 October 2011 W42
org:Scheduled:  finish plugin
org:(1/3):  finish plugin
  Tuesday18 October 2011
org:(2/3):  finish plugin
  Wednesday  19 October 2011
org:(3/3):  finish plugin
  Thursday   20 October 2011
  Friday 21 October 2011
  Saturday   22 October 2011
org:Sched. 6x:  finish plugin
  Sunday 23 October 2011
#+end_example

When on the line
: org:Scheduled:  finish plugin
or on the line
: org:Sched. 6x:  finish plugin

`org-agenda-later' doesn't work properly. This is because org-marker is
at the beginning of the timestamp at these kind of entries, not the end.

This causes both `org-at-date-range-p' to return nil and (presuming it
did return t) the re-search-backward code to fail.

On the other entries (the 1/3, 2/3 and 3/3 lines) shifting the date does
work, as the marker is at the end of the date range.

I am not sure as to the proper course of action here:

1. should the initial marker point to the end of the date range?
2. should `org-at-date-range-p' return t too at the beginning of a date range?
3. should `org-date-later' handle the case where the marker is at the
   beginning of a date range itself?

   
-- 
http://pft.github.com/



Re: [O] [PATCH 2/5] Added trac-wiki and tikiwiki export settings.

2011-10-22 Thread Bastien
"Robert P. Goldman"  writes:

> ---
>  contrib/lisp/org-export-generic.el |  107 
> +++-
>  1 files changed, 93 insertions(+), 14 deletions(-)

Applied, thanks.

-- 
 Bastien



Re: [O] [PATCH 1/5] bind org-export-current-backend in generic exporter.

2011-10-22 Thread Bastien
"Robert P. Goldman"  writes:

> This is needed for org-export-preprocess-string to function correctly.

Applied, thanks.

-- 
 Bastien



[O] [Accepted] [O, 2/5] Added trac-wiki and tikiwiki export settings.

2011-10-22 Thread Bastien Guerry
Patch 999 (http://patchwork.newartisans.com/patch/999/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1319213609-40770-3-git-send-email-rpgoldman%40real-time.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O,2/5] Added trac-wiki and tikiwiki export settings.
> Date: Fri, 21 Oct 2011 21:13:26 -
> From: Robert P. Goldman 
> X-Patchwork-Id: 999
> Message-Id: <1319213609-40770-3-git-send-email-rpgold...@real-time.com>
> To: emacs-orgmode@gnu.org
> Cc: "Robert P. Goldman" 
> 
> ---
>  contrib/lisp/org-export-generic.el |  107 
> +++-
>  1 files changed, 93 insertions(+), 14 deletions(-)
> 
> 
> diff --git a/contrib/lisp/org-export-generic.el 
> b/contrib/lisp/org-export-generic.el
> index 29e90b8..e3a8680 100644
> --- a/contrib/lisp/org-export-generic.el
> +++ b/contrib/lisp/org-export-generic.el
> @@ -187,8 +187,8 @@ in this way, it will be wrapped."
>   ; section prefixes/suffixes can be 
> direct strings or lists as well
>   :body-section-prefix "\n"
>   :body-section-suffix "\n"
> -; :body-section-prefix ("\n" "\n" "\n")
> -; :body-section-suffix ("\n" "\n" "\n")
> + ;:body-section-prefix 
> ("\n" "\n" "\n")
> + ;:body-section-suffix 
> ("\n" "\n" "\n")
>  
>  
>   ; if preformated text should be 
> included (eg, : prefixed)
> @@ -263,28 +263,28 @@ in this way, it will be wrapped."
>   :body-header-section-numbers 3
>   :body-section-prefix "\n"
>  
> -; :body-section-header-prefix  "\n"
> -; :body-section-header-format  "%s\n"
> -; :body-section-header-suffix  (?\$ ?\# ?^ ?\~ ?\= ?\-)
> + ;:body-section-header-prefix  
> "\n"
> + ;:body-section-header-format  
> "%s\n"
> + ;:body-section-header-suffix  
> (?\$ ?\# ?^ ?\~ ?\= ?\-)
>  
>   :body-section-header-prefix  ("" "" "" "* " "  + " "- ")
>   :body-section-header-format  "%s\n"
>   :body-section-header-suffix  (?~ ?= ?- "\n" "\n" "\n")
>  
> -; :body-section-marker-prefix  ""
> -; :body-section-marker-chars   (?\$ ?\# ?^ ?\~ ?\= ?\-)
> -; :body-section-marker-suffix  "\n"
> + ;:body-section-marker-prefix  ""
> + ;:body-section-marker-chars   
> (?\$ ?\# ?^ ?\~ ?\= ?\-)
> + ;:body-section-marker-suffix  
> "\n"
>  
>   :body-line-export-preformated t
>   :body-line-format "%s\n"
>   :body-line-wrap   75
>  
> -; :body-text-prefix "\n"
> -; :body-text-suffix "\n"
> + ;:body-text-prefix "\n"
> + ;:body-text-suffix "\n"
>  
>  
>   :body-bullet-list-prefix  (?* ?+ ?-)
> -; :body-bullet-list-suffix  (?* ?+ ?-)
> + ;:body-bullet-list-suffix  
> (?* ?+ ?-)
>   )
>  
>  ;;
> @@ -350,8 +350,8 @@ in this way, it will be wrapped."
>  
>   :body-section-prefix "\n"
>   :body-section-suffix "\n"
> -; :body-section-prefix ("\n" "\n" "\n")
> -; :body-section-suffix ("\n" "\n" "\n")
> + ;:body-section-prefix 
> ("\n" "\n" "\n")
> + ;:body-section-suffix 
> ("\n" "\n" "\n")
>  
>   :body-line-export-preformated t
>   :body-line-format "%s\n"
> @@ -360,7 +360,7 @@ in this way, it will be wrapped."
>   :body-text-suffix "\n"
>  
>   :body-bullet-list-prefix  (?* ?+ ?-)
> -; :body-bullet-list-suffix  (?* ?+ ?-)
> + ;:body-bullet-list-suffix  
> (?* ?+ ?-)
>   )
>  
>  ;;
> @@ -429,6 +429,85 @@ in this way, it will be wrapped."
>   :body-list-format  "%s\n"
>  
>   )
> +("trac-wiki" 
> + :file-suffix ".txt"
> + :key-binding ?T
> +
> + ;; lifted from wikipedia exporter
> + :header-prefix  ""
> + :header-suffix  ""
> +
> + :title-format   "= %s =\n"
> +
> + :date-exportnil
> +
> + :toc-exportnil
> +
> + :body-header-section-numbers   nil
> + :body-section-prefix   "\n"
> +
> + :body-section-header-prefix("== " "=== " " "
> +  "= " "== " "=== ")
> + 

[O] [Accepted] [O, 1/5] bind org-export-current-backend in generic exporter.

2011-10-22 Thread Bastien Guerry
Patch 996 (http://patchwork.newartisans.com/patch/996/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1319213609-40770-2-git-send-email-rpgoldman%40real-time.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O,1/5] bind org-export-current-backend in generic exporter.
> Date: Fri, 21 Oct 2011 21:13:25 -
> From: Robert P. Goldman 
> X-Patchwork-Id: 996
> Message-Id: <1319213609-40770-2-git-send-email-rpgold...@real-time.com>
> To: emacs-orgmode@gnu.org
> Cc: "Robert P. Goldman" 
> 
> This is needed for org-export-preprocess-string to function correctly.
> 
> ---
> contrib/lisp/org-export-generic.el |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/contrib/lisp/org-export-generic.el 
> b/contrib/lisp/org-export-generic.el
> index bb42b60..29e90b8 100644
> --- a/contrib/lisp/org-export-generic.el
> +++ b/contrib/lisp/org-export-generic.el
> @@ -617,6 +617,7 @@ underlined headlines.  The default is 3."
> (buffer-substring
>  (if (org-region-active-p) (region-beginning) (point-min))
>  (if (org-region-active-p) (region-end) (point-max
> +  (org-export-current-backend 'org-export-generic)
>(lines (org-split-string
>(org-export-preprocess-string
> region
> 



Re: [O] bug#9435: 23.3.50; infinite loop in org-submit-bug-report

2011-10-22 Thread Bastien
Hi Leo,

Leo  writes:

> I am running Org-mode version 7.7.
>
> 1. emacs -q
> 2. (setq org-modules (quote (org-bbdb org-bibtex org-gnus org-info org-habit 
> org-inlinetask org-irc org-protocol org-w3m org-mouse)))
> 3. M-x org-mode
> 4. From the menubar Org => Send bug report
>
> You should observe the infinite loop. A backtrace is shown in
> http://paste.pound-python.org/raw/11999/.

I am unable to reproduce this with either Emacs 23.3.1 or Emacs
24.0.90.1.  

-- 
 Bastien



Re: [O] [PATCH]: New Add defun org-mode-or-derived-mode-p

2011-10-22 Thread Bastien
Hi Tassilo,

Tassilo Horn  writes:

> Ups, I've slightly misread your suggestion.  Currently, there is only
> one place in org-src.el that check for being a mode derived from
> org-mode or org-mode itself.  The second is useless, because
> (derived-mode-p 'org-mode) is true for org-mode, too.
>
> But as I've said, I've misread your suggestion and made a patch that
> completely erases org-mode-p and all its calls.  Feel free to apply or
> discard it. :-)

I applied this patch -- thanks for it.

IMHO another reason for using (eq major-mode 'org-mode) instead of
(org-mode-p) is that new contributors are likely to use this more
explicit (though longer) expression before they find out that a 
defsubst is available for that.

-- 
 Bastien



Re: [O] [PATCH] Improve documentation + fix typos

2011-10-22 Thread Bastien
Hi Rafael,

Rafael Laboissiere  writes:

> You will find here attached three patches for org-mode.  Two of them
> improve the "External links" node of the info documentation.  The other
> one just fixes minor typos.

I just applied all three of them, thanks a lot.

-- 
 Bastien



Re: [O] How to reuse page keywords for LaTeX with pdfkeywords and hyperref package?

2011-10-22 Thread Bastien
PS: Here is a list of hyperref options:
http://en.wikibooks.org/wiki/LaTeX/Hyperlinks#Customization

-- 
 Bastien



Re: [O] How to reuse page keywords for LaTeX with pdfkeywords and hyperref package?

2011-10-22 Thread Bastien
Hi Mikhail,

Mikhail Titov  writes:

> In case someone else also wants page keywords to appear in latex export.
> Here is the link to original thread
> http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01429.html .
> There is a patch at the bottom that does that. It assumes that hyperred
> package is used and doesn't check that!

Yes, hyperref is in ̀org-export-latex-default-packages-alist' and is
available.

> I'm not sure if I'm doing it right as I don't know lisp and emacs
> much.

I pushed a commit with a slightly adapted version of your patch.

Please check it does the right thing for you.

Further improvements in this area: have a defcustom allowing the user 
to select what hyperref options he wants in the .tex output.  Maybe you
can improve your ELisp trying to provide a patch for this?   

Thanks,

-- 
 Bastien



[O] [Accepted] Variable publishing-directory? (resent with patch as attachment)

2011-10-22 Thread Bastien Guerry
Patch 895 (http://patchwork.newartisans.com/patch/895/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C7ipqk3qfxn.fsf%40mack.tetzco.de%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Variable publishing-directory? (resent with patch as attachment)
> Date: Thu, 18 Aug 2011 13:17:56 -
> From: Kai Tetzlaff 
> X-Patchwork-Id: 895
> Message-Id: <7ipqk3qfxn@mack.tetzco.de>
> To: emacs-orgmode@gnu.org
> 
> Bastien  writes:
> 
> Hi Bastien,
> 
> > The patch looks good but I'd like to understand it better.
> > Can you send an example configuration working with your patch?
> 
> In org-publish-project-alist, i have HTML publishing projects which
> should be published to different target directories depending on e.g.
> where emacs is running (which i determine in my init files using the MAC
> address of the default GW, the name the machine, ...).
> 
> Here is an example: At home, i publish to a local directory
> (:publishing-directory "~/tmp/publish-test") but at work i would like to
> publish directly to a webserver (:publishing-directory
> "/plinkx:doxydoc:~/public_html/publish-test" - this is on w32, using
> tramps PuTTY/plink). To avoid having to change the definition of the
> publishing project when i change locations i would like to construct the
> actual value of :publishing-directory by calling a function:
> 
>  ("publishing-dir-test"
>  :base-directory "~/Documents/Work/RS"
>  :recursive t
>  :base-extension "org"
>  :exclude-tags ("intern")
>  :publishing-directory '(expand-file-name "publish-test" 
> kt:org-default-publishing-dir)
>  :publishing-function org-publish-org-to-html)
> 
> Depending on the location i'm in, 'kt:org-default-publishing-dir' would
> be set to either "~/tmp" or "/plinkx:doxydoc:~/public_html". Without the
> patch, the example above does not work as the value of
> :publishing-directory does not get evaluated.
> 
> > Also, please try to send git patch using these conventions:
> > http://orgmode.org/worg/org-contribute.html#sec-5
> >
> > Thanks a lot!
> 
> Thanks for the hint. I've attached a revised version of the patch which
> includes a changelog/commit msg - i hope that works for you.
> 
> 
> Publish: allow dynamic construction of the publish destination.
> 
> * org-publish.el (org-publish-file): Added 'eval'ing the value of the
>  :publishing-directory property before using it as destination of the
>  publishing project. This allows to construct the publish destination
>  directory dynamically at run-time using the return value of a
>  function.
> 
> TINYCHANGE
> ---
>  lisp/org-publish.el |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-publish.el b/lisp/org-publish.el
> index e2213c5..518c1bf 100644
> --- a/lisp/org-publish.el
> +++ b/lisp/org-publish.el
> @@ -684,7 +684,7 @@ See `org-publish-projects'."
>(pub-dir
> (file-name-as-directory
>  (file-truename
> - (or (plist-get project-plist :publishing-directory)
> + (or (eval (plist-get project-plist :publishing-directory))
>   (error "Project %s does not have :publishing-directory defined"
>  (car project))
>tmp-pub-dir)
> -- 
> 1.7.5.4
> 
> 



[O] Sync with Outlook/Exchange (was: Recurring events with exceptions)

2011-10-22 Thread Karl Voit
* Skip Collins  wrote:
> On Wed, Oct 19, 2011 at 6:02 AM, Eric S Fraga  wrote:
>> Yes, I have been informed that we are moving to Outlook/exchange in the
>> new year, something I am dreading...
>
> Lemerre's approach only syncs with the Outlook client, not the
> Exchange server. He suggests using RFC-2446 (iCalendar) as a basis for
> a more general solution. I think that trying to establish a smoothly
> syncing connection between org and exchange by using iCalendar is a
> recipe for frustration. This is mostly because Exchange's
> implementation of the standard is lacking.

Just a side note:

In my opinion, this is a *very important issue* for Org-mode.
Personally I know several people who would love to use
Emacs/Org-mode but are forced to use Outlook because of Exchange in
their office.

Whenever I present Org-mode to a variety of people, the question of
Outlook/Exchange support is one of the first being asked.

For now I am in the lucky position of no dependency to Exchange but I
guess this can change in the future.


PS: Please adopt the subject line to changing subject - especially
for important ones like here. Thanks! :-)

-- 
Karl Voit




Re: [O] Bill-of-materials

2011-10-22 Thread Bastien
Hi Frozenlock,

Frozenlock  writes:

> This is a much better version of the little add-on I've written:
>
> Bill-of-materials (org-bom.el)

Thanks -- I add this to Worg/org-contrib/index.org.  Please check the
description when it goes online and improve it if necessary.

> I've used this for over 6 months now, daily.
> If you ever need to quickly make a quote for a client, or simply
> make easy to-buy list, this should help you.
>
> You can find the code here: http://pastebin.com/K11QpQ6Q

I used http://pastebin.com/raw.php?i=K11QpQ6Q as the location for
getting the raw code -- hopefully pastebin will keep this URL valid.

> The tutorial is included with it, but here is an eye-friendly version:
>
> http://frozenlock.wordpress.com/2011/10/20/bom-bills-of-materials/

Thanks!

-- 
 Bastien



Re: [O] outline-demote incorrectly demotes leaf nodes

2011-10-22 Thread Michael Brand
Hi Carsten

On Fri, Oct 21, 2011 at 16:40, Carsten Dominik
 wrote:
> On Oct 19, 2011, at 5:39 PM, Michael Brand wrote:
>> (define-key org-mode-map [remap outline-promote] 'org-promote-subtree)
>> (define-key org-mode-map [remap outline-demote] 'org-demote-subtree)
>> [...]
>
> Would you like to carefully think about which other functions you
> might want to have remapped ...

I started to go through the functions that are bound in
outline-mode-prefix-map to compare their behavior with that of the Org
equivalents. Now I stumbled upon
outline/org-forward/backward-same-level. All four doc strings state
"Stop at the first and last subheadings of a superior heading", but
the Org ones don't. As I remember, Org "motion on same level" C-c
C-f/b once stopped. Git bisect shows that this had been the case
before the "motion on same level" functionality moved into the new
functions org-forward/backward-same-level with
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=0eaf3cce
At that time the (error "No following same-level heading")
disappeared.

I assume that Org mode should still stop as documented and like
Outline mode. If this is true I'd like to ask you if you could help to
resolve this. Of course I tried to do it myself but have to admit that
it would mean too much effort for me to understand what happens before
and after the commit with the three optimization levels that it
implements.

> and then prepare a patch?

I'll add the two new pairs from above and probably some more into a
follow-up to this
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=b2632dc4
when I'll be finished with going through outline-mode-prefix-map.

Michael



Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Christian Moe

On 10/21/11 8:40 PM, Rainer M Krug wrote:



Just to add to it: at the moment I have e.g:

#+BABEL: :var MAINVERSION=0
#+BABEL: :var SVNVERSION=(vc-working-revision (buffer-file-name))
#+BABEL: :var SVNSTATE=( symbol-name (vc-state (or (buffer-file-name)
org-current-export-file)))
#+BABEL: :var SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name)
org-current-export-file)) 'up-to-date) 0 13)
#+BABEL: :var DISP_PACKAGE="seedDisp_0.4-13.tar.gz"

which would look horrible in one line and a nightmare to edit.

Any suggestions how this cold be changed?


Wow. I guess I was wrong to imagine your problem was solved.

If your code blocks share the same language, and it supports sessions, 
I'd bite the bullet and transform them into #+HEADERS lines for the 
first src block, then reuse them through a session. Does that make sense?


If your variables are going to be used by different src blocks in 
different languages, I don't have any elegant solution.


Yours,
Christian














Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines

2011-10-22 Thread Sebastien Vauban
Hi Darlan,

Darlan Cavalcante Moreira wrote:
> It's excellent that now babel understands multiple values in the "var"
> property (I was one of the people that wanted this), but "There Is One More
> Thing".
>
> Would it be feasible to inherit variables from parent sub-trees?
> Effectively, I'd like to append new values in lower level sub-trees, but
> AFAIK setting the var property in a sub-tree will still replace the value
> set in the parent sub-tree.

#+PROPERTY:  var foo="level0"

* Overview

Global vars and local-to-this-subtree vars seem correctly handled.

Effectively, vars set in higher level trees are not passed correctly to the
code block.

* Test code
  :PROPERTIES:
  :var:  bar="level1"
  :END:

** Using the different vars
   :PROPERTIES:
   :var:  baz="level2"
   :END:

#+srcname: test
#+begin_src sh :var foo="valueforthiscodeblock"
echo $foo
echo $bar
echo $baz
#+end_src

#+results: test
| valueforthiscodeblock |
|   |
| level2|

As you can see, the "bar" variable is unknown to the code block.

Best regards,
  Seb

-- 
Sebastien Vauban