Re: [O] org-edit-file ?

2011-07-21 Thread Sebastian Rose
Dov Grobgeld dov.grobg...@gmail.com writes:
 I'm not sure that emacs is the best tool to e.g. generate a template png
 file of a given size and given background, or a svg file. I still don't feel
 that any of the proposed solutions solves the file:foo.svg edit scenario,
 where foo.svg does not exist yet. Also I would rather differentiate between
 opening a few for viewing and opening a file for editing, as e.g. eog and
 inkview are good for viewing, whereas gimp and inkscape are better for
 editing.



I used to do what you request on a dayly base creating SVGs from
GPX-Data.  I Use a special link type:

[[track:((12.0399212 14.919293)(32.12394 15.342345))FILE.svg][Name of track]]


See
https://github.com/SebastianRose/org-osm/blob/de4634518c8dd7713ff702412cfc7ae89852a074/org-osm-link.el

and follow the function `osm-org-link-follow'.

If the SVG-Map for the track does not exist, it calls code from
https://github.com/SebastianRose/org-osm/blob/de4634518c8dd7713ff702412cfc7ae89852a074/osm-maps.el
to create it.

It's seems a bit complicated in that example, as the name and size of
the resulting SVG image depends on the area, customized zoom factor
a.s.o.  but this second file boils down to approx. 50 lines for your use
case.

Either a PNG (not tested for a long time - I don't think it works)
or an SVG (I use this on a dayly basis) is created, depending on your
choice.  You'll need image-magick to create PNGs while SVG is a simple
text (XML) format, so emacs should be as good as any tool to create it.

The track is drawn on top of background-images I download from
Openstreetmap.org (customize google-maps if you like those better) in
the function `osm-draw-track'.  That's where your SVG-template would
come to life.

Once that file exists, it's easy to open it an editor.  The function
mentioned first calls `osm-org-image-viewer-function' which in turn
opens the prepared image:


In your case (provided inkscape is in your path):




binxhUP8DvJdL.bin
Description: application/emacs-lisp


and don't forget to share the results :)


Best wishes

   Sebastian


Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 * Add message hook to include selected text as body
 Thanks to Deniz Dogan
 #+begin_src emacs-lisp
   (add-hook 'message-mode-hook
 (lambda ()
   (let (text)
 (with-current-buffer (other-buffer)
   (when (region-active-p)
 (setq text
   (buffer-substring (region-beginning)
 (region-end)
 (when text
   (end-of-buffer)
   (insert text)
 #+end_src

 This is doing exactly as expected.


How about inserting as ascii (just change the `(setq text...' lines)?


  (add-hook 'message-mode-hook
(lambda ()
  (let (text)
(with-current-buffer (other-buffer)
  (when (region-active-p)
(setq text
  (org-export-region-as-ascii  (region-beginning)
   (region-end) t 
'string
(when text
  (end-of-buffer)
  (insert text)


This inserts the ascii export.  Thanks for sharing :)


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Sending org buffer as mail?

2010-12-16 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 OK - I asked on the emacs help list, and got a response. I added the
 followig to my emacs.org:

 * Add message hook to include selected text as body
 Thanks to Deniz Dogan
 #+begin_src emacs-lisp
   (add-hook 'message-mode-hook
 (lambda ()
   (let (text)
 (with-current-buffer (other-buffer)
   (when (region-active-p)
 (setq text
   (buffer-substring (region-beginning)
 (region-end)
 (when text
   (end-of-buffer)
   (insert text)
 #+end_src


I finally added an  `(if (org-mode-p)' for my local usage:


(add-hook 'message-mode-hook
  (lambda ()
(let (text)
  (with-current-buffer (other-buffer)
(when (region-active-p)
  (setq text
(if (org-mode-p)
(org-export-region-as-ascii  (region-beginning)
 (region-end) t 'string)
  (buffer-substring (region-beginning)
(region-end))
  (when text
(end-of-buffer)
(insert text)


Best wishes

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Can I change the link name in TOC?

2010-11-09 Thread Sebastian Rose
Water Lin water...@sohu.com writes:
 While I generate the table of content of my org file, the link of each
 sub-title will be something like #sec-2.2

 But when I change the sequence of the title, the anchor will be changed.

 I want to maintain permalinks for each anchors. Is it possbile to change
 the #sec-2.2 into something like #test-keywords?

 BTW: I am using Chinese for my sub-title, so I think use the title words
 for anchor is not suitable.

 Thanks

 Water Lin


This is, what custom IDs are for:

--8---cut here---start-8---
* Headline
  :PROPERTIES:
  :CUSTOM_ID: myID
  :END:
--8---cut here---end---8---



Now refer to to Headline like this:

   a href=my-file.html#myIDHeadline/a




 Sebastian 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Using macros in worg

2010-11-03 Thread Sebastian Rose
Benny Simonsen be...@slbs.dk writes:
 Hi

 I would like to use org-mode + git to generate a web page. I would
 also like to use the #+MACRO:  directives as defined in Worg
 /macrs.setupfile.

 I have downloaded cloned the git repository for Worg
 (git clone http://repo.or.cz/r/Worg.git) for an example.

 How is the setup to expand the macros?

Hi Benny,


there's no special setup needed.

On worg, the marcos are included through constructs like this in the
Org file's header:

#+SETUPFILE:  ../macros.setupfile


i.e. the relative path to the macros.setupfile.


That's it.


   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Using macros in worg

2010-11-03 Thread Sebastian Rose
Benny Simonsen be...@slbs.dk writes:
 there's no special setup needed.

 I had an old org-mode, after upgrade the macros are expanded :)

 I would like to auto-publish the web page when I push to the central server.


You might be interested in this document:

   http://orgmode.org/worg/worg-setup.php

and in the scripts in .git/hooks/  (which come with git).


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] no line break after subheading?

2010-10-26 Thread Sebastian Rose
Matt Price mopto...@gmail.com writes:
 Hi eveyrone,

 I'm coming up on this with some frequency now -- I often need to write
 documents in a pretty compact format, in which subheadings really need to be
 on the same line as their component text.  so for instance here:

 ** Timeline
 *** September 2011
 Research team assembles initial documents

 should be rendered (written in html for convenience, since i don't speak
 latex):

 H2 Timeline /H2
 pbSemtember 2011:/b Research team assembles initial documents/p

 Do folks think this is something I can do from org somehow, or is my best
 bet to export to odt and redo the formatting in openoffice (that's what i do
 now but of course it's a bit frustrating to have to do so, esp. since it
 means that i'm stuck in Openoffice once I send a document out for
 comments).


Hi Matt,


looks like a case for the generic exporter to me.

See `org-generic-alist' in the file contrib/lisp/org-export-generic.el
for an example.


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-25 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 OK, I will use class.  I could make a special case for the docbook
 exporter..


+1

 Having to set /anything/ on each cell just to align a column is not optimal
 either, but since some browsers don't honor colgroups, it's  the most robust
 way.


How refer to all right-aligned `td' elements in a certain tables without
some special attribute anyway.  `class' preferred since this is CSS2 and
will work in commen browsers.  I'm not sure how which browsers will
understand  the selector  `table#special td[align=right] {...}'.





BTW: Org mode's exports to XHTML, not HTML 4.01 or HTML 5 (which is a
proposal, not a standard or recommendation yet).  Still,
'td align=right' is valid XHTML, too.





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-25 Thread Sebastian Rose
Christian Moe m...@christianmoe.com writes:
 Maybe someone with a browser where colgroups actually do work (Opera!) can 
 check

 1. if they only work with the align attribute, and not with CSS, and

 2. whether they still work (take precedence) now that the individual cells are
 aligned with CSS for their class.

They _never_ took precedence, as soon as I used a style like this:

  /* My default for all td elements */
  td { text-align:left; }

The `td' style will alway be a better CSS-match than the col's style
or class attribute, even then the col's align attribute.  It's even the
expected behaviour according to CSS standards since that what's the `C'
in CSS means.  I have to remove my favourite default style for td
elements from my stylesheet to make that work in Opera, too.  In current
FF it does not work at all.

Here's another test:

CSS:
--8---cut here---start-8---
  col.right  { text-align:right;vertical-align:top;background-color:red; }
  col.left   { text-align:left;vertical-align:top;background-color:green; }
  col.center { text-align:center;vertical-align:top;background-color:blue; }
--8---cut here---end---8---



A table:

--8---cut here---start-8---
table  border=0 summary=
caption/caption
colgroupcol class=left /col class=center /col class=right /
/colgroup
thead
trthA/ththB/ththC/th/tr
/thead
tbody
trtd1/tdtd bar/tdtdtext/td/tr
trtd12/tdtd test/tdtd300/td/tr
trtd9/tdtd foo/tdtd4/td/tr
/tbody
/table
--8---cut here---end---8---


The only `style' that works that way is the `background-color'.  In
Opera and FF at least.

Means, the `class' attribute in col elements doesn't work very well
(but 'col class=odd /col class=even /' might make sense with
alternating colors)..

Both, 'align' and the 'style' attribute will be overwritten by a default
style for a td element in the users stylesheet (some prefere center,
some left alignment as the default).



It's common practice to have `style' or `class' attribute in td
elements.  That's what classes are for in the end.  Make HTML elements
members of a group with certain properties.

Why not jut go with it?


Look at `magento's code, Drupal, whatever.  They even use more those
usefull classes, e.g. `first' and `last' for the first and last elements
of lists.  HTML elements without classes are hard to find.  The reason
is, that HTML is just a document structure.  Classes (and IDs) make
those elements live.

first last right left content footnote menu comment
big small light dark pro contra - classes make the
difference.

Plus 'class=right' is easy to change in central place left
entrirely to the user:  the stylesheet.

XML is not meant to avoid clutter.  And if it was, something went
terribly wrong, I guess :)



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-23 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 OK, found it.  It was in my .emacs which I didn't use for ages...

 But:

  colgroupcol align=right //colgroupcolgroupcol align=left
 //colgroupcolgroupcol align=left //colgroup

 must be:

  colgroupcol align=right /col align=left /col align=left
 //colgroup


 i.e. colgroup and /colgroup have to occur only once each and
 wrap the col ... / definitions.

 The /colgroup after each col ... / happens only for the second
 table.

 Hi Sebastian,

 Are you sure about this?  Because the  is special syntax for Org to define
 column groups, and I believe it is OK to have multiple column groups in
 a table.

No

I've checked, and it is indeed valid!

Oups...

I've never seen it anywhere


Everything is fine then.  Thanks again for the fix!


   Sebastian


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-23 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 How about this (line-wrapped for readability):


 tr
  td class=right1/td
  td class=leftbar/td
  td class=lefttext/td
 tr

 instead of

 tr
  td style=text-align:right1/td
  td style=text-align:leftbar/td
  td style=text-align:lefttext/td
 tr

 ??


 Combined with the ways to add IDs and classes to tables, we could then style
 the
 columns better.

 I would like to set this for right aligned td tags as default:

   td.right { font-family:monospace;text-align:right; }

 OK, fair enough.  But I don't think I will make the monospace
 the Org default, it looks a bit odd.  BUt of cause you can change
 this.

Great!


 I have now in the default style:

   td, th { vertical-align: top;  }
   th.right  { text-align:right;  }
   th.left   { text-align:left;   }
   th.center { text-align:center; }
   td.right  { text-align:right;  }
   td.left   { text-align:left;   }
   td.center { text-align:center; }

 Is there a way to write this more compactly?

 - Carsten


No, if you don't want to remove all whitespace :)

A, that's cool!!!  Thank you!!!




   Sebastian


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-23 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 I have now in the default style:

   td, th { vertical-align: top;  }
   th.right  { text-align:right;  }
   th.left   { text-align:left;   }
   th.center { text-align:center; }
   td.right  { text-align:right;  }
   td.left   { text-align:left;   }
   td.center { text-align:center; }

 Is there a way to write this more compactly?

 - Carsten


But this is, what I often use:

  /* Aligns block elements, too: */
  .right  {margin-left:auto; margin-right:0px;  text-align:right;}
  .left   {margin-left:0px;  margin-right:auto; text-align:left;}
  .center {margin-left:auto; margin-right:auto; text-align:center;}

These are CSS classes I use frequently.  It works for all HTML elements
AND aligns table to the right in all important browsers.  I first
thought OK, we can do this ourselves per stylesheet, but why not offer
this little goodie out-of-the-box?

Try:


(THERE'S A BUG: #+STYLE: lines are not wrapped in style tags anymore) 


--8---cut here---start-8---
#+STYLE:  .right  {margin-left:auto; margin-right:0px;  text-align:right;}
#+STYLE:  .left   {margin-left:0px;  margin-right:auto; text-align:left;}
#+STYLE:  .center {margin-left:auto; margin-right:auto; text-align:center;}

* Tables

#+ATTR_HTML: class=left
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |

#+ATTR_HTML: class=center
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |

#+ATTR_HTML: class=right
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
--8---cut here---end---8---



   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-22 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Sebastian,

 my guess would be that you have customized the td and th tags?  If yes, please
 reset the customization, you need the new default values  (which you then can
 still modify).

 Please check the variables org-export-table-header-tags and
 org-export-table-data-tags.


I've checked them, but they are not customized:

Hide Org Export Table Data Tags:
 Opening tag: td%s
 Closing tag: /td
  State : STANDARD.

Hide Org Export Table Header Tags:
 Opening tag: th scope=%s
 Closing tag: /th
  State : STANDARD.


The export of the OPs table works as expected.  But the table I've sent
is different in that it just uses empty `' marks for grouping and
creating lines.


  Sebastian



 |   | A   | B|C |
 |---+-+--+--|
 |   | 1   | bar  | text |
 |   | 12  | test |  300 |
 |   | 9   | foo  |4 |
 | / |   |||


 now gives me:

 table border=0 cellspacing=0 cellpadding=6 rules=groups
 frame=hsides
 caption/caption
 colgroupcol align=right //colgroup
 colgroupcol align=left //colgroup
 colgroupcol align=left //colgroup
 thead


 and I have no style attributes in the td tags.

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-22 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 On Oct 22, 2010, at 3:59 PM, Sebastian Rose wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Sebastian,

 my guess would be that you have customized the td and th tags?  If yes,
 please
 reset the customization, you need the new default values  (which you then 
 can
 still modify).

 Please check the variables org-export-table-header-tags and
 org-export-table-data-tags.


 I've checked them, but they are not customized:

Hide Org Export Table Data Tags:
 Opening tag: td%s
 Closing tag: /td
  State : STANDARD.

 This does look right.


Hide Org Export Table Header Tags:
 Opening tag: th scope=%s
 Closing tag: /th
  State : STANDARD.

 This does not look right, it should be

 Opening tag: th scope=%s%s
 Closing tag: /th




 The export of the OPs table works as expected.  But the table I've sent
 is different in that it just uses empty `' marks for grouping and
 creating lines.

 While I do not think it is particularly nice that you
 try to fool the parser in this way :-/
 it actually behaves quite well :-D

 Here is what I get when I export this table:

 ---
 table border=2 cellspacing=0 cellpadding=6 rules=groups 
 frame=hsides
 caption/caption
 colgroupcol align=right //colgroupcolgroupcol align=left /
/colgroupcolgroupcol align=left //colgroup
 thead
 trth scope=col style=text-align:rightA/thth scope=col
 style=text-align:leftB/thth scope=col style=text- 
 align:leftC/th/tr
 /thead
 tbody
 trtd style=text-align:right1/tdtd style=text-
 align:leftbar/tdtd style=text-align:lefttext/td/tr
 trtd style=text-align:right12/tdtd style=text-
 align:lefttest/tdtd style=text-align:left300/td/tr
 trtd style=text-align:right9/tdtd style=text-
 align:leftfoo/tdtd style=text-align:left4/td/tr
 /tbody
 /table
 ---


 The left/right comes from the analysis of the number of numbers
 in each column...

 So I must assume that maybe some of your files did not
 update correctly or you have some old compiled files... ?


OK, found it.  It was in my .emacs which I didn't use for ages...

But:

  colgroupcol align=right //colgroupcolgroupcol align=left 
//colgroupcolgroupcol align=left //colgroup

must be:

  colgroupcol align=right /col align=left /col align=left 
//colgroup


i.e. colgroup and /colgroup have to occur only once each and
wrap the col ... / definitions.

The /colgroup after each col ... / happens only for the second
table.  The rest is just fine :)


Correct:

 |   | A   | B|C |
 |---+-+--+--|
 |   | 1   | bar  | text |
 |   | 12  | test |  300 |
 |   | 9   | foo  |4 |
 | / | l | l  |  r |


Wrong:

 |   |  A | B| C|
 |---++--+--|
 |   |  1 | bar  | text |
 |   | 12 | test | 300  |
 |   |  9 | foo  | 4|
 | / |  |||


Thanks for the fix!


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-22 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 On Oct 22, 2010, at 3:59 PM, Sebastian Rose wrote:

 Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Sebastian,

 my guess would be that you have customized the td and th tags?  If yes,
 please
 reset the customization, you need the new default values  (which you then 
 can
 still modify).

 Please check the variables org-export-table-header-tags and
 org-export-table-data-tags.


 I've checked them, but they are not customized:

Hide Org Export Table Data Tags:
 Opening tag: td%s
 Closing tag: /td
  State : STANDARD.

 This does look right.


Hide Org Export Table Header Tags:
 Opening tag: th scope=%s
 Closing tag: /th
  State : STANDARD.

 This does not look right, it should be

 Opening tag: th scope=%s%s
 Closing tag: /th




 The export of the OPs table works as expected.  But the table I've sent
 is different in that it just uses empty `' marks for grouping and
 creating lines.

 While I do not think it is particularly nice that you
 try to fool the parser in this way :-/
 it actually behaves quite well :-D

 Here is what I get when I export this table:

 ---
 table border=2 cellspacing=0 cellpadding=6 rules=groups 
 frame=hsides
 caption/caption
 colgroupcol align=right //colgroupcolgroupcol align=left /
/colgroupcolgroupcol align=left //colgroup
 thead
 trth scope=col style=text-align:rightA/thth scope=col
 style=text-align:leftB/thth scope=col style=text-
 align:leftC/th/tr
 /thead
 tbody
 trtd style=text-align:right1/tdtd style=text-
 align:leftbar/tdtd style=text-align:lefttext/td/tr
 trtd style=text-align:right12/tdtd style=text-
 align:lefttest/tdtd style=text-align:left300/td/tr
 trtd style=text-align:right9/tdtd style=text-
 align:leftfoo/tdtd style=text-align:left4/td/tr
 /tbody
 /table
 ---


 The left/right comes from the analysis of the number of numbers
 in each column...

 So I must assume that maybe some of your files did not
 update correctly or you have some old compiled files... ?

 - Carsten

Hi Carsten,


one more, sorry.


How about this (line-wrapped for readability):


 tr
  td class=right1/td
  td class=leftbar/td
  td class=lefttext/td
 tr

instead of

 tr
  td style=text-align:right1/td
  td style=text-align:leftbar/td
  td style=text-align:lefttext/td
 tr

??


Combined with the ways to add IDs and classes to tables, we could then style the
columns better.

I would like to set this for right aligned td tags as default:

   td.right { font-family:monospace;text-align:right; }

since most of the time I want fixed width fonts in right aligned cells.



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-21 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 On Oct 21, 2010, at 9:36 AM, Christian Moe wrote:

 On 10/21/10 2:25 AM, Sebastian Rose wrote:
 (...)

 |l  |l  |r  |
 | A   | B   |   C |
 | 1   | 2   |   3 |
 | 12  | 13  | 300 |
 | 9   | 11  |   4 |


 I get

 colgroupcol align=left /col align=left /col align=right /
 /colgroup

 as expected.

 That's interesting. From the same example I get

 colgroupcol align=right /col align=right /col align=right
 //colgroup

 ...using freshly pulled 7.01trans. What might account for the difference?

 Actually, I also get what Christian gets.  Sebastian, how did you get 
 something
 different?


I guess I just didn't pull for a few days.

Nononono, just kidding :)

I tried my own table, which is different:

a) The l line is the last one.
b) There's an empty extra column, the first one, as the docs propose.
   This column contains in the first cell of the l | r line  a
   slash: 

|   | A   | B   |   C |
|   | 1   | 2   |   3 |
|   | 12  | 13  | 300 |
|   | 9   | 11  |   4 |
| / | l | l | r |


All this does not help.  But the third difference might be the key:

c) The table is a captured column view (#+BEGIN: columnview...) with
   293 lines. 




  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-21 Thread Sebastian Rose
Sebastian Rose sebastian_r...@gmx.de writes:
 Carsten Dominik carsten.domi...@gmail.com writes:
 On Oct 21, 2010, at 9:36 AM, Christian Moe wrote:

 On 10/21/10 2:25 AM, Sebastian Rose wrote:
 (...)

 |l  |l  |r  |
 | A   | B   |   C |
 | 1   | 2   |   3 |
 | 12  | 13  | 300 |
 | 9   | 11  |   4 |


 I get

 colgroupcol align=left /col align=left /col align=right /
 /colgroup

 as expected.

 That's interesting. From the same example I get

 colgroupcol align=right /col align=right /col align=right
 //colgroup

 ...using freshly pulled 7.01trans. What might account for the difference?

 Actually, I also get what Christian gets.  Sebastian, how did you get 
 something
 different?


 I guess I just didn't pull for a few days.

 Nononono, just kidding :)

 I tried my own table, which is different:

 a) The l line is the last one.
 b) There's an empty extra column, the first one, as the docs propose.
This column contains in the first cell of the l | r line  a
slash: 

 |   | A   | B   |   C |
 |   | 1   | 2   |   3 |
 |   | 12  | 13  | 300 |
 |   | 9   | 11  |   4 |
 | / | l | l | r |


 All this does not help.  But the third difference might be the key:

 c) The table is a captured column view (#+BEGIN: columnview...) with
293 lines. 


Well, OK, forget it...
It was just that my ls and rs matched with the sensible thing to do
for each column.

Seems it's just looking at the numbers and says OK, numbers only, right
aligned,  just as you said in a previous mail.


 |   | A   | B|   C  |
 |---+-+--+--|
 |   | 1   | bar  | text |
 |   | 12  | test |  300 |
 |   | 9   | foo  |4 |
 | / | l | l  |  r |


gives us

colgroupcol align=right /col align=left /col align=left /
/colgroup


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Publishing htaccess files with a project

2010-10-20 Thread Sebastian Rose
Jeff Horn jrhorn...@gmail.com writes:
 We had a bit of a discussion off list, but I still haven't been able
 to get the behavior I am after. See below.

 snip
 When I make the change as you have suggested above, I get the original
 file not found error.

 From the *Messages* buffer:
 --
 Select command:
 Publishing file /Users/jeffreyhorn/org/ftr/.htaccess using
 `org-publish-attachment'
 org-publish-attachment: Opening input file: No such file or directory,
 /Users/jeffreyhorn/org/ftr/.htaccess
 --

 This is my project definition as it stands now:
 --
 (ftr-htaccess
 :base-directory ~/org/ftr/
 :publishing-directory ~/Sites/FTR/
 :recursive t
 :base-extension org
 :exclude .org
 :include (.htaccess)
 :publishing-function org-publish-attachment)
 --
 /snip

 With this configuration, Sebastian and I were expecting the
 org-publish-attachment function to pick up the .htaccess file and push
 it to the publishing-directory. Instead, publishing exits with very
 little information (and no Backtrace is triggered). The information I
 have available is quoted above.


The problem is, that `org-publish-get-base-files' seems to put basenames
into `org-publish-temp-files' instead of absolute paths.

I'm currently working on it  (probably my fault anyway).


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Publishing htaccess files with a project

2010-10-20 Thread Sebastian Rose
Jeff Horn jrhorn...@gmail.com writes:
 The problem is, that `org-publish-get-base-files' seems to put basenames
 into `org-publish-temp-files' instead of absolute paths.

 Ah. Thanks for the info. That makes sense.

 I'm currently working on it  (probably my fault anyway).

 I really appreciate your help, and I don't blame anyone for the
 problems I run into using org-mode. It's constantly being developed,
 so bugs are annoying but expected. I can tell you org-mode has done
 more for me despite the minor annoyances than most highly-polished
 commercial software for my Mac.



OK.  Not to forget the things learned or reading the documentation might
have helped... 


  C-h v org-publish-project-alist

says:


The :include property may be used to include extra files.  Its value
may be a list of filenames to include. The filenames are considered
relative to the base directory.



(setq org-publish-project-alist
  '((test-htaccess
 :base-directory ~/org/
 :base-extension org
 :exclude .org
 :include (subdir/one/.htaccess subdir/two/.htaccess)
 :publishing-directory ~/public_html/
 :recursive t
 :publishing-function org-publish-attachment)))



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Aligning Columns in HTML Export Tables

2010-10-20 Thread Sebastian Rose
Bernt Hansen be...@norang.ca writes:
 Jeff Horn jrhorn...@gmail.com writes:

 Is there a way to specify a particular column in org-mode that will be
 exported right-aligned in HTML?

 | A | B | C |
 | 1 | 2 | 3 |

 For the table above, I would like column C right aligned when I export
 to HTML, but the other column aligned in the default way (left
 aligned?).

 I think this is supposed to work but it seems the exporters do not
 honour the alignment details.

 | l | l | r |
 | A   | B   |   C |
 | 1   | 2   |   3 |
 | 12  | 13  | 300 |
 | 9   | 11  |   4 |


I get 

colgroupcol align=left /col align=left /col align=right /
/colgroup

as expected.

In Opera it works for me, if I remove the styles for `td' from my
stylesheet.  The styles for table data cells will overrule the align
attribute in the col tag.

Current Firefox seems to ignore the align attribute, although it's valid
XHTML.


The only save way to get the alignment right would be to use a style
attribute for each and every table cell directly:

   td style=text-align:right




   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Babel for blogging

2010-10-18 Thread Sebastian Rose
Manuel Giraud manuel.gir...@univ-nantes.fr writes:
 Eric S Fraga ucec...@ucl.ac.uk writes:

 On Fri, 15 Oct 2010 11:07:05 -0600, Eric Schulte schulte.e...@gmail.com 
 wrote:
 
 Hi Manuel,
 
 The following works for me, it creates an index of all files in the same
 directory as the Org-mode file.
 
 --8---cut here---start-8---
 * index
 
 Create an index automatically with an elisp code block.
 
 #+begin_src emacs-lisp :exports results :results raw
   (mapconcat
(lambda (file)
  (unless (file-directory-p file)
(format - [[%s][%s]] (file-name-sans-extension file) file)))
(directory-files (or default-directory
 (file-name-directory (buffer-file-name
\n)
 #+end_src
 --8---cut here---end---8---

 Maybe the format statement should look like this instead (swap the two
 arguments to the format string around):

 :   (format - [[%s][%s]] file (file-name-sans-extension file

 Also, maybe change the link to include the current directory:

 :   (format - [[./%s][%s]] file (file-name-sans-extension file

 Just some thoughts late on a Friday night... ;-)

 Thanks that does the trick. But searching the org-mode source (version
 7.01trans) , I discovered that this function is already here (called
 sitemap instead of index). So now, I can generate the correct sitemap
 with the following project:


 (setq org-publish-project-alist
   '((orgfiles
  :base-directory ~/org/
  :base-extension org
  :publishing-directory ~/public_html/
  :publishing-function org-publish-org-to-html
  :section-numbers nil
  :table-of-contents nil
  :auto-sitemap t
  :sitemap-title Blog
  :style link rel=\stylesheet\
  href=\blog.css\
  type=\text/css\/)
 (css
  :base-directory ~/org/
  :base-extension css
  :publishing-directory ~/public_html/
  :publishing-function org-publish-attachment)
 (blog :components (orgfiles css

 What's missing now is that the sitemap list is ordered alphabetically
 and I'd like to have it sorted by modification time or, even better, by
 there #+date tag.


It's there, too.

See 

  C-h v org-publish-project-alist



If you create a sitemap file, adjust the sorting like this:

  :sitemap-sort-foldersWhere folders should appear in the
   sitemap. Set this to `first' (default) or
   `last' to display folders first or last,
   respectively. Any other value will mix
   files and folders. 
  :sitemap-alphabetically  The site map is normally sorted
   alphabetically. Set this explicitly to
   nil to turn off sorting. 
  :sitemap-ignore-case Should sorting be case-sensitive?
   Default nil. 




Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Publishing bug: FOOTNOTE DEFINITION NOT FOUND: 0

2010-10-17 Thread Sebastian Rose
Erik L. Arneson dyb...@lnouv.com writes:
 On Sun, 17 Oct 2010, Erik L. Arneson wrote:
 I'm running into a very strange bug when publishing to HTML.  Even when
 a page contains no footnotes, a footnote section is added with one
 footnote an the text FOOTNOTE DEFINITION NOT FOUND: 0.

 I am, by the way, running the latest 7.01trans from Git.  I just now did
 an update and this strange footnote behavior is still happening.


Do you have a `[0]' somewhere in your text?

I just found, that that footnote section is generated for this piece of
text.


Work-around:  ~[0]~



HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Publishing htaccess files with a project

2010-10-16 Thread Sebastian Rose
Jeff Horn jrhorn...@gmail.com writes:
 Hi orgsters,

 I'm wondering how I should publish .htaccess files? My current setup
 is a source directory under ~/org/, which is kept at Dropbox, and a
 publishing directory under ~/Sites/, which is not. Since data loss is
 pyschologically crippling, I like to keep *all* my source files
 (images, css, whatnot) in the source directory.

 I have a static project setup that pushes css, images, and a few other
 filetypes to the publishing directory. How can I do the same with
 .htaccess? I tried adding htaccess to :base-extenstions, but that
 unfortunately did nothing.

Hi Jeff,



use the property :include :

 (setq org-publish-project-alist
 '((org-htaccess
 :base-directory ~/org/
 :recursive t
 :base-extension xxx;; non-exestent
 :include (.htaccess)
 :publishing-directory ~/public_html/
 :publishing-function org-publish-attachment)
  ...


and make org-htaccess part of your compound project.



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Applying inline styles to a section for exported HTML

2010-10-16 Thread Sebastian Rose
Jeff Horn jrhorn...@gmail.com writes:
 I'm aware we can define #+ATTR_HTML: for styling of divs containing
 images and tables. Is there similar functionality for section divs?
 Simply adding the required option below or above the section didn't do
 the trick.

 Since section divs aren't named semantically[1], I can't simply add a
 class style to my CSS file. I basically want to turn a section in my
 org file into a callout/sidebar box. Any ideas?

 Best,
 Jeff

 [1] What I mean is, a section * Word is identified with an id and a
 class of section-1 or something similar if it is the first section
 in a document. If it had an id of word, I could simply a style for
 that id in my style sheet.


Maybe custom IDs are your friends?



* A Word on Words
  :PROPERTIES:
  :CUSTOM_ID: word
  :END:

  Content



You can add that property like this:

C-c C-x p CU TAB



HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Tiny piece of customization for ctrl-c ctrl-c within a timestamp

2010-10-16 Thread Sebastian Rose
Marc-Oliver Ihm i...@online.de writes:
 Hello !


 I sometimes find myself adjusting timestamps just by editing its text;
 e.g. changing 2010-10-16 Su to 2011-10-16 Su. However after that
 editing, the day of week is usually wrong (or might be right, I just
 dont know).

Hi Marc-Oliver,



http://orgmode.org/manual/Creating-timestamps.html#Creating-timestamps

describes all you need to change timestamps without errors:

   S-left
   S-right
   Change date at cursor by one day. These key bindings conflict
   with shift-selection and related modes (see Conflicts).
   S-up
   S-down
   Change the item under the cursor in a timestamp. The cursor can
   be on a year, month, day, hour or minute. When the timestamp
   contains a time range like `15:30-16:30´, modifying the first
   time will also shift the second, shifting the time block with
   constant length. To change the length, modify the second
   time. Note that if the cursor is in a headline and not at a
   timestamp, these same keys modify the priority of an item. (see
   Priorities). The key bindings also conflict with shift-selection
   and related modes (see Conflicts).



Also, `C-c .'  while on a timestamp you may use the calendar interface
to change the timestamp.   Days of the week will be OK.



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PATCH] Alphabetical ordered lists

2010-10-04 Thread Sebastian Rose

Sorry for not following this thread closely.

But from what I read, I thought it might be better to have a _command_
to sort existing lists alphabetically?

That way, there is nothing that has to be turned on globally, that
could intefere with Org mode's syntax.


Excuse me, if that's of topic or already discussed.


   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Testing --- again...

2010-10-04 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Hi,

 So, I've been using the framework in the combined-testing branch this
 morning writing tests to strap down my daily Babel bug fixes, and I'm
 really liking ERT.

 I wonder, can we commit to the combined-testing branch, and if so could
 we fold it into the master branch?  It would make my test driven bug
 fixing a much smoother process, and would remove the need to rebase the
 combined-testing branch against master and git push -f the changes up
 to repo.or.cz which just feels wrong.


Yes,  commit to that branch.  And yes, fold it into master,  if there
are no objections.  In the worst case there will be more contributions.




Eric, can we keep track with the ERT development for a little while?
That will not be done automatically, right?   But, as you know,
Christian is working on it to get it into Emacs, and we should use the
version that finally will make it there.

  git submodul update

Should that be called once to avoid conflicts?


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Testing --- again...

2010-10-03 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Eric Schulte schulte.e...@gmail.com writes:
 To illustrate my suggestions, I've thrown together a couple simple Babel
 tests roughly following this outline, currently up in the
 `schulte-testing' branch of the Org-mode repo.

 To try it out
 1) load the testing/org-test.el file
 2) run `org-load-tests' to load up the entire org-mode test suite
 3) run `ert' to run the test suite.
 4) or jump to the definition of `org-babel-get-src-block-info' and run
`org-test-current-function' to just run the tests for that function

 Best -- Eric

Yes.  I know how running tests looks like:  It looks good :)

Hahaa, I like that code.  It looks so simple :)


To load all files below testing/  is a good suggestion probably.  The
unloading and loading as I implemented it is simply superfluous, if we
suggest that testers no how to eval a buffer or defun (and if they can
change it, they can eval it).



* Question:

  (defun org-test-current-function ()
Test the current function.
(interactive)
(ert (car (which-function
  
  `org-test-test-current-defun' in the ert-testing branch does that, too.
  (But with that superfluous loading/unloading stuff though :-/) But it
  encloses each test inside save-excursion and Co.
  
  What does which-func.el that this function does not:
  
  #part type=application/emacs-lisp disposition=inline
  (defun org-test-which-func ()
Return the name of the current defun.
(save-excursion
  (save-match-data
(end-of-line)
(beginning-of-defun)
(if (looking-at (defun[[:space:]]+\\([^([:space:]]*\\)[[:space:]]*()
  (match-string-no-properties 1)
  (error No defun found around point.)
  #/part
  
  ??



* Keymap

  We should add keys to the org-mode-map.
  
   C-c t
  
  is still free here.  Or is it in you use it for babel somehow?
  
   C-c t f org-test-test-current-function
   C-c t b org-test-test-current-buffer-file




* ERT Selectors

  I see a little namespace problem coming up.  Imagine testing org.el.
  Which ert selector would we use?
  
  ^org ???  :-/

  Should we create hashes of filenames as selectors (just kidding)?
  Or use the entire filename ^org.el?  The relative path
  ^lisp/org.el? 






* About the directory structure:

  It does not burden the user, as tests are loaded and executed
  automatically (per function, per file or all, depending on the command
  used).  But imagine the entire thing grows and someone would add tests
  for all the stuff in emacs/lisp/.  Or add tests files for single
  functions simply because there is so much to test that one file would
  be hard to handle.
  This could cause a lot of clutter.

  Is this too hypothetical?  Hmmm - it might be...

  If you checkout ert-testing, eval testing/org-test.el and do

 M-x org-test-edit-buffer-file-tests

  you're in your test file in the correct directory (which is created if
  it doesn't exist).

 M-x org-test-edit-current-defuns-tests

  creates a file named after the defun you're in.  You'll need to be in
  an elisp file of course.  The testing/ directory will resemble the
  directory structure of the project.

  Every one who saw that directory structure simply asked don't you
  think it's overkill? :D  I'll probably drop that.

  

  We could go on on two rails for a while.  I'll need this week to dig
  deeper into ERT and come to conclusions.

  It would be a good thing if we could agree about the keys and the
  selectors (again: ^org), so that it's painless to switch branches ;)






  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How to modify org-export-latex-emphasis-alist

2010-10-03 Thread Sebastian Rose
Thomas S. Dye t...@tsdye.com writes:
 Aloha all,

 I use this patch locally to let the LaTeX url package typeset and break lines 
 in
 long path names.  Is there a way to make this change  from my .emacs, so I can
 continue to use the Org-mode master branch  and not my url branch?  Or, is 
 there
 a better way to implement this  without changing the Org-mode core?


Put this in your configuration file (.emacs probably):

(setq org-export-latex-emphasis-alist
  '((* \\textbf{%s} nil)
(/ \\emph{%s} nil)
(_ \\underline{%s} nil)
(+ \\st{%s} nil)
(= \\url{%s} nil)
(~ \\verb t)))


HTH

   Sebastian


 Changes from master to url
   Modified lisp/org-latex.el
 diff --git a/lisp/org-latex.el b/lisp/org-latex.el
 index 9a62457..920591a 100644
 --- a/lisp/org-latex.el
 +++ b/lisp/org-latex.el
 @@ -230,7 +230,7 @@ are written as utf8 files.
  (/ \\emph{%s} nil)
  (_ \\underline{%s} nil)
  (+ \\st{%s} nil)
 -(= \\verb t)
 +(= \\url{%s} nil)
  (~ \\verb t))
Alist of LaTeX expressions to convert emphasis fontifiers.
  Each element of the list is a list of three elements.

 All the best,
 Tom


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] non-frame text in beamer export

2010-10-03 Thread Sebastian Rose
Neil Hepburn nhepb...@ualberta.ca writes:
 Greetings

 I have recently started using org-mode to generate Beamer
 presentations for lecture notes. I always create lecture note
 printouts for my students using the beamerarticle package. I like to
 put additional explanatory material into these notes that don't show
 up on the slide show. The way I do this is to put the extra material
 outside of a frame environment and then use the option
 [ignorenonframetext] in the latex header, i.e., 
 \documentclass[ignorenonframetext]{beamer}

 Is there a way to add extra material in an org file that it won't get
 put into a frame environment when I export the file? 


I never tried the beamer package.  But there is a workaround.  There are
the export options based on tags:

  #+EXPORT_SELECT_TAGS: export
  #+EXPORT_EXCLUDE_TAGS: noexport


You could just use the second one and toggle as needed:


 --8---cut here---start-8--
#+EXPORT_EXCLUDE_TAGS: ignore

* This will be exported

**  This here not  :ignore:
This section is not exported because of the ignore tag.
 --8---cut here---end---8--



To create the print version, comment out the exclude tags line:


 --8---cut here---start-8--
#  #+EXPORT_EXCLUDE_TAGS: ignore

* This will be exported

**  This here not  :ignore:
This section _is_ exported in spite of the ignore tag.
 --8---cut here---end---8--
 


Does that work?


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Testing --- again...

2010-10-03 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Hi,

 I've taken the liberty of merging our two testing branches into the new
 combined-testing branch.  This now includes both ert and jump.el as
 git submodules, which can be installed with

   git submodule init
   git submodule update

 after checking out the branch.  In merging the two org-test.el files, I
 was able to remove much of the existing code through using which-func,
 jump.el.  The new navigation functionality will work regardless of the
 directory structure, so tests for file

   lisp/org-foo.el

 can be located in either of the following

   testing/lisp/test-org-foo.el
   testing/lisp/org-foo.el/test.el

 Additionally the navigation functions defined in jump.el should be
 easily extensible to accommodate new naming schemas, so ideally every
 test author for a particular file can use whatever naming system they
 prefer.  Note that the navigation function `org-test-jump' when called
 with a prefix argument uses your code from
 `org-test-edit-buffer-file-tests' to create the test file if it is not
 already present.

 I think I retained most of the functionality from your version of
 org-test.el in the merge but please let me know if I broke something.
 In my mind this merged version should be small clean and maintainable
 and hopefully flexible enough to handle whatever needs we identify
 during the course of writing the tests.  How would you feel about using
 this as the new base of test development?

 Best -- Eric

 also I have some inline comments below


Hi Eric,


that's good news!


 Sebastian Rose sebastian_r...@gmx.de writes:
   What does which-func.el that this function does not:
   
   #part type=application/emacs-lisp disposition=inline
   (defun org-test-which-func ()
 Return the name of the current defun.
 (save-excursion
   (save-match-data
 (end-of-line)
 (beginning-of-defun)
 (if (looking-at 
 (defun[[:space:]]+\\([^([:space:]]*\\)[[:space:]]*()
   (match-string-no-properties 1)
   (error No defun found around point.)
   #/part
   
   ??


 I'm not sure that it does include anything new, but it's nice to re-use
 existing packages.


And a dependency.



 * Keymap

   We should add keys to the org-mode-map.
   
C-c t
   
   is still free here.  Or is it in you use it for babel somehow?
   
C-c t f org-test-test-current-function
C-c t b org-test-test-current-buffer-file



 Wouldn't we want the keys in the elisp-mode key map, since we'll be
 doing the testing work from elisp?

Errrmmm, yes, we definetively want the keys in the emacs-lisp key map :)


  Although I guess we may want to run
 tests from within Org-mode files, but then we could do that with a Babel
 block and dump the results to a table. :)

Ho ho ho ho ho!



 * ERT Selectors

   I see a little namespace problem coming up.  Imagine testing org.el.
   Which ert selector would we use?
   
   ^org ???  :-/

   Should we create hashes of filenames as selectors (just kidding)?
   Or use the entire filename ^org.el?  The relative path
   ^lisp/org.el? 


 oh, good point, maybe we'd need to use the eql or tag ert selectors
 in this case.



It's a flaw in Org's namespace actually.  A defun's name in org.el could
clash with the name of a defun in another file in org-mode/lisp/.
The defun `org-imenu-get-tree' in org.el could clash with a defun with
that very name in a new file org-imenu.el.

I guess we'll have to handle org.el in a special way.



   If you checkout ert-testing, eval testing/org-test.el and do

  M-x org-test-edit-buffer-file-tests


 In the combined-testing branch you'd do this by calling org-test-jump
 with a prefix argument.


Perfect.



   Every one who saw that directory structure simply asked don't you
   think it's overkill? :D  I'll probably drop that.


 heh, yea I'd lean towards getting into the writing of tests and then
 leaving our implementation flexible enough so that we can adopt this
 more fine-grained directory structure when/if it becomes necessary.


Eric, so just let's skip the directory structure.  We could always
enforce something like that once we feel it's necessary.

We just want some reliable way to load the sensible tests (for a defun,
file, module or whatever) and execute them with just a key stroke.

Adding new tests for an existing elisp file should be just as easy.

As jump.el and which-func.el do part of that job reliably it's perfectly
fine to go that way.




  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Testing --- again...

2010-10-02 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Sebastian,

 the lack of a testing suite for Org-mode is really frustrating,
 and even more frustrating is that we have had like seven attempts
 to start one, and each of these lead to nothing.  So I would
 be perfectly happy to give a free hand, write access to the repo
 and a full directory in the distribution to implement one.
 Once there is a framework, I am sure many people would be
 willing to contribute tests.


There was no support for testing in Emacs and I could not see something
coming up.  I guess that was one of the main reasons, that nothing
happened.  The existing tests use a undocumented framework wich consists
of many source files itself, so that I was not able to get my head
around that in half an hour (which is by far too long for most of us).

I asked on emacs-devel and Stefan Monier told me that there was some
consensus that ERT _should_ go into Emacs (24?) or at least to
elpa.gnu.org.  Christian Ohlert already sprang into action, so I'm
optimistic that ERT is the right choice on the long run.


So.  The framework will be ERT.  I'll just right a few commands and
functions that make it _dead simple to right and execute tests_.



 More comments below.

 On Oct 2, 2010, at 5:51 AM, Sebastian Rose wrote:

 Hi,


 I thought about testing again recently.  This is something, that never
 really got started.  For a reason:  there's no framework for testing.

 I therefore wrote a very rough proposal,  found  on
 http://github.com/SebastianRose/org-test

 The idea is, to provide two simple commands:


  *  org-test-test-current-defun
 will search for tests for the defun point is in or behind
 (`beginning-of-defun') and execute them surrounded by

  (let ((select (or selector ^org))
  (deactivate-mark nil))
(save-excursion
  (save-match-data


  *  org-test-test-buffer-file
 will search for tests for the entire file and execute them the same
 way.

 FIrst:  I have *no* clue about testing.

 Second, I am surprised that you want to structure it by function.  I would 
 have
 thought that it could be structure by file at the most.  And then there will
 be tests that involve code from many files.


It's both actually (see below).  But a simple function could easily have
5 or more invariants.  For each invariant a test should be written.
That makes 5 tests.  Having those (_optional_) per function test files
will help finding certain test easily.  Some functions will also need
lot's of other test code, e.g.  let bindings that emulate different
setups or code that creates temporary directory structures (publishing)
and the like.

Naming (again: optionally) files like the functions they are written for
and putting them into a directory named after the code file makes things
easy to find --- even without docs.


 ...

 The idea is to search the directory structure from the current source
 file upwards for a directory named tests/ if it exists.  Else ask the
 user.  Similar to what `add-change-log-entry' does.

 Below that directory, a tree like the source tree exists:

 project
   +-- lisp/
   | +-- a.el
   | `-- b/
   | +-- b.el
   |
   `-- tests/
 +-- a.el/
 | +-- tests.el
 | `-- a-defun.el
 `-- b/
 +-- b.el/
   +-- tests.el
   `-- b-defun.el

 If this setup exists, when editing defun-x in lisp/a.el,
 `M-x org-test-test-current-defun' will load tests/a.el/defun-x.el
 (fallback: tests.el there) and execute all tests with selector
 ^a-defun.

 Well, OK, this is fine.  But under a.el and b.el there should also be
 general tests that are not function dependent, and there should be a place
 to put tests that you do not want to assign to a specific file.


That's what tests.el is for currently (besides that it is the fallback
for function tests).

`org-test-test-buffer-file' simply loads _all_ *.el files in a file's
test directory.  With prefix argument, it loads tests.el only.



 We do have a testing directory already, you can use that.
 I would prefer the tests to be in testing, not in lisp/testing
 if possible. I would like to have the lisp directory contain
 only code.  If possible.


That's already possible.  The directory tests (will rename that to
testing) is searched in the same directory as `buffer-file-name' and
from there up the directory tree.  It could be place entirely outside
the project tree.

 It would be OK to have a lisp subdirectory in testing,
 just as it would be OK to have contrib/lisp in testing
 for the contributed packages.

That's what it has to be like (it is).  We couldn't use the autmatic
test search otherwise.  E.g. emacs/lisp/ has many sub-directories each
of which could hold files with the same basename (in theory).


The above graph was wrong, sorry.  This is the current structure:

...

 `-- tests/
   +-- lisp/
 +-- a.el/
 | +-- tests.el

[Orgmode] Re: Testing --- again...

2010-10-02 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 It would be OK to have a lisp subdirectory in testing,
 just as it would be OK to have contrib/lisp in testing
 for the contributed packages.

That's what it is like.

You probably did not notice, because org-test.el is supposed to live
inside testing/, so it's not obvious.



   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Testing --- again...

2010-10-02 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Hi,

 This is exciting.

 Rather than impose a complete directory/layout schema before-hand I'd
 lean towards starting with a little more chaos and then letting the
 structure of the test directory develop /naturally/.  From the
 discussion below it sounds like an initial structure of

 testing/lisp/
 testing/contrib/lisp/


I believe it makes sense enforcing rules.  Many developers plus power
users will want to be able to use the test system.  No system is what we
had in the past.

The idea is, to have a system to automate the laoding of tests.  How
should a function like `org-test-test-current-defun' find the tests
otherwise?

  sh$ cd org-mode
  sh$ find . -name '*.el' | wc -l
  146

Also, we could provide services like setup temporary directories,
buffers and files for tests.  This cannot be automated in a save way, if
there is no structure.  The tests are written in elisp.  Hence one could
do whatever he likes ;)

It's like Perl.  You don't need to follow the conventions, but it will
make your live easier (hopefully).

Just what I think.


 may make sense, reserving the top level for meta testing stuff, like
 functions for running tests, common fixtures, example files, etc...

 I have two questions.

 1) while waiting for ert to be included into Emacs, should we include an
ert distribution as part of the Org-mode repository (maybe using git
sub-modules) or should we just agree that users should have a certain
version of ert installed locally?  I'm honestly not sure which of
these options sounds preferable.


I thought about this, too.  I guess not.  Developers and users that want
to test will be able to follow the current ERT git repo.

But ERT is just 7 *.el files plus 1 texinfo file.

An what I don't know is:

   How would git submodules work?




 2) should the initial population of the testing/ directory take place in
a separate branch of the repository or in the master branch?  Again I
don't know which I would prefer, branches add complication but could
result in cleaner commit histories.


I'll start on a branch first and constantly rebase as long as the
structure evolves.  The first simple commit will be what you can see on
github, with some doc strings adjusted.

  

   Sebastian

  

 Best -- Eric

 Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Sebastian,

 the lack of a testing suite for Org-mode is really frustrating,
 and even more frustrating is that we have had like seven attempts
 to start one, and each of these lead to nothing.  So I would
 be perfectly happy to give a free hand, write access to the repo
 and a full directory in the distribution to implement one.
 Once there is a framework, I am sure many people would be
 willing to contribute tests.

 More comments below.

 On Oct 2, 2010, at 5:51 AM, Sebastian Rose wrote:

 Hi,


 I thought about testing again recently.  This is something, that never
 really got started.  For a reason:  there's no framework for testing.

 I therefore wrote a very rough proposal,  found  on
 http://github.com/SebastianRose/org-test

 The idea is, to provide two simple commands:


  *  org-test-test-current-defun
 will search for tests for the defun point is in or behind
 (`beginning-of-defun') and execute them surrounded by

  (let ((select (or selector ^org))
 (deactivate-mark nil))
(save-excursion
  (save-match-data


  *  org-test-test-buffer-file
 will search for tests for the entire file and execute them the
 same
 way.

 FIrst:  I have *no* clue about testing.

 Second, I am surprised that you want to structure it by function.  I
 would have
 thought that it could be structure by file at the most.  And then
 there will
 be tests that involve code from many files.

 But I guess


 If you use one of these commands, all currently registered ERT tests
 are
 deleted, and files are reloaded (since you're likely to work on the
 tests, too).  To repeat the tests without reloading, you will use the
 ERT commands like `ert-results-rerun-all-tests', bound to `r' in the
 ERT
 results buffer.



 I choose ERT (git clone http://github.com/ohler/ert.git) because
 that's
 likely to go into Emacs core (or elpa.gnu.org).




 The idea is to search the directory structure from the current source
 file upwards for a directory named tests/ if it exists.  Else ask
 the
 user.  Similar to what `add-change-log-entry' does.

 Below that directory, a tree like the source tree exists:

 project
   +-- lisp/
   | +-- a.el
   | `-- b/
   | +-- b.el
   |
   `-- tests/
 +-- a.el/
 | +-- tests.el
 | `-- a-defun.el
 `-- b/
 +-- b.el/
   +-- tests.el
   `-- b-defun.el

 If this setup exists, when editing defun-x in lisp/a.el,
 `M-x org-test-test-current-defun' will load tests/a.el/defun-x.el
 (fallback: tests.el there) and execute all tests with selector
 ^a-defun.

 Well

Re: [Orgmode] bug: babel: Export of temporary buffers fails

2010-10-02 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Hi Puneeth,

 I believe that export is only allowed from buffers visiting files, when
 I tried to reproduce your problem exporting from a buffer without a file
 name I get the following error message

   (error Need a file name to be able to export)

 which is thrown by org-latex, org-docbook, or org-html on attempted
 export.

 Unless I'm missing something, it is not a problem that Babel expects
 org-current-export-file to have a value.

 Best -- Eric

 Puneeth puncha...@gmail.com writes:

 Hello,

 Export of temporary buffers with babel src blocks fails.

 Line 118 of ob-exp.el has

 (set-buffer (get-file-buffer org-current-export-file))

 But the value of org-current-exp-file is nil for a temporary buffer.

 The following commit brought in that change.

 commit efdf78172d9f7c0070c781d136a9b49a2a56fcc4
 Author: Eric Schulte schulte.e...@gmail.com
 Date:   Sat Sep 18 19:01:49 2010 -0600

 ob-exp: resolving code block parameters in the original file on export

 * lisp/ob-exp.el (org-babel-exp-src-blocks): now switching back to the
   original file before resolving code block parameters to ensure
   headline and buffer wide parameters are taken into consideration
   when only a narrowed portion of the file is exported


Usually an Org file NAME.org is exported to NAME.html, NAME.txt and so
forth.


You can still export to a temporary buffer (`A' instead of `a', `H'
instead of `h') ...


HTH


   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Testing --- again...

2010-10-02 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 Hi Sebastian,

 Sebastian Rose sebastian_r...@gmx.de writes:

 Eric Schulte schulte.e...@gmail.com writes:
 Hi,

 This is exciting.

 Rather than impose a complete directory/layout schema before-hand I'd
 lean towards starting with a little more chaos and then letting the
 structure of the test directory develop /naturally/.  From the
 discussion below it sounds like an initial structure of

 testing/lisp/
 testing/contrib/lisp/


 I believe it makes sense enforcing rules.  Many developers plus power
 users will want to be able to use the test system.  No system is what we
 had in the past.

 The idea is, to have a system to automate the laoding of tests.  How
 should a function like `org-test-test-current-defun' find the tests
 otherwise?

   sh$ cd org-mode
   sh$ find . -name '*.el' | wc -l
   146

 Also, we could provide services like setup temporary directories,
 buffers and files for tests.  This cannot be automated in a save way, if
 there is no structure.  The tests are written in elisp.  Hence one could
 do whatever he likes ;)

 It's like Perl.  You don't need to follow the conventions, but it will
 make your live easier (hopefully).

 Just what I think.


 Point well taken, I suppose my point is more a matter of personal taste,
 and I fully understand if we disagree and would yield to your judgment
 as you've put more thought into this.  But having said that here's my
 thoughts and opinions :)

 Could we just load every test in tests/lisp by default, and then use the
 existing `ert' selection method to select and run tests.  For example if
 we enforce our conventions on the level of test function name rather
 than on file name, we could (I believe) do something like the following.
 Say every test for a particular function (say org-export) includes that
 name of that function in the test name (say test-org-export), then we
 could use something simple like the following to run the tests for the
 current function (i.e. function around the point)


 (defun org-test-current-function ()
   Test the current function.
   (ert (format %S (which-function


I have no function called `which-function' !?

But yes, those prefixes are (and have to be) part of our standard.
The entire Emacs elisp structure is build on that way of namespacing.

It's basically working like that (but I used more lines to get to the
function name...).

All this is _not_ meant to get in the way of ERT.  I just hope a) to add
some support to get people started and b) provide some help and
maintainance of that testing stuff.


E.g. `org-test-run-tests (optional selector)'  runs tests enclosed in 

  (let ((deactivate-mark nil))
(save-excursion
  (save-match-data
  ;; ... run tests here
  )))

But yes, I guess the art is to do not too much.


 This way we could maintain a much simpler directory structure inside of
 tests/ (or testing/) in which we don't need a separate file name for
 every function, but rather maybe one test file per elisp file
 (e.g. test-ob.el for ob.el), and possibly other files for tests
 organized around concepts that span multiple files (e.g. test-blocks.el
 or somesuch).


H - I see.  But you'd still test single units of code, and a single
unit of code lives in one source file, not in many source files.  Even
though many source files are involved, which is always the case when you
execute code.


 I may well be misunderstanding the framework you are proposing, so maybe
 the best thing to do is to just get started and then see how things
 develop.

OK. Same here :)

I just pushed my little starter to a new branch ert-testing.  Pooha,
git always a little challenging in such rare situations :)


 BTW: back when I worked on ruby-on-rails projects I developed jump.el
 [1] for jumping between functions and their tests, I could probably
 fairly easily apply this to the org-mode repo if that's desirable.


That's such a helpful little tool I think of!  I'll check that, too :)


I just created the branch ert-testing and pushed my little starter.


 may make sense, reserving the top level for meta testing stuff, like
 functions for running tests, common fixtures, example files, etc...

 I have two questions.

 1) while waiting for ert to be included into Emacs, should we include an
ert distribution as part of the Org-mode repository (maybe using git
sub-modules) or should we just agree that users should have a certain
version of ert installed locally?  I'm honestly not sure which of
these options sounds preferable.


 I thought about this, too.  I guess not.  Developers and users that want
 to test will be able to follow the current ERT git repo.

 But ERT is just 7 *.el files plus 1 texinfo file.

 An what I don't know is:

How would git submodules work?


 using git submodules we could specify a location (e.g. tests/ert) and a
 version (some particular git commit) for the org-mode repository.  Then
 running

   git submodule init

[Orgmode] Testing --- again...

2010-10-01 Thread Sebastian Rose
Hi,


I thought about testing again recently.  This is something, that never
really got started.  For a reason:  there's no framework for testing.

I therefore wrote a very rough proposal,  found  on
http://github.com/SebastianRose/org-test

The idea is, to provide two simple commands:


  *  org-test-test-current-defun
 will search for tests for the defun point is in or behind
 (`beginning-of-defun') and execute them surrounded by

  (let ((select (or selector ^org))
(deactivate-mark nil))
(save-excursion
  (save-match-data


  *  org-test-test-buffer-file
 will search for tests for the entire file and execute them the same
 way.

If you use one of these commands, all currently registered ERT tests are
deleted, and files are reloaded (since you're likely to work on the
tests, too).  To repeat the tests without reloading, you will use the
ERT commands like `ert-results-rerun-all-tests', bound to `r' in the ERT
results buffer.



I choose ERT (git clone http://github.com/ohler/ert.git) because that's
likely to go into Emacs core (or elpa.gnu.org).




The idea is to search the directory structure from the current source
file upwards for a directory named tests/ if it exists.  Else ask the
user.  Similar to what `add-change-log-entry' does.

Below that directory, a tree like the source tree exists:

project
   +-- lisp/
   | +-- a.el
   | `-- b/
   | +-- b.el
   |
   `-- tests/
 +-- a.el/
 | +-- tests.el
 | `-- a-defun.el
 `-- b/
 +-- b.el/
   +-- tests.el
   `-- b-defun.el

If this setup exists, when editing defun-x in lisp/a.el,
`M-x org-test-test-current-defun' will load tests/a.el/defun-x.el
(fallback: tests.el there) and execute all tests with selector
^a-defun.
`M-x org-test-test-buffer-file' in that same source file will load all
*.el files in tests/a.el/ and execute all ERT tests for selector ^a.


Thus tests for
org-mode/lisp/org-protocol.el
will be searched in the directory
org-mode/tests/lisp/org-protocol.el/*.el


Once the basic route of testing is clear, I'd like to translate the
existing tests for org-html.el to work with ERT, which will involve
writing more tools (create output buffers, compare output with control
files using ediff etc.).  I know Lennart Borgman has wrote that stuff
for nXhtml already.  I hope we can use his stuff and help here.

The directory org-mode/lisp/tests/ would not need to be part of the
official Org mode package.  It could as well be checked out
separately, if tests is part of org-mode/lisp/.gitignore (e.g.).


Any thoughts?




  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-protocol / Chrome on Linux

2010-09-30 Thread Sebastian Rose
Mattias Jämting matt...@jwd.se writes:
 Yes i'm running a pretty standard Ubuntu 10.04 setup.

 I managed to get it working on chrome by removing the
 encodeURIComponent command on location.href.

 I could simulate it in the terminal like this.

 matt...@helium:~$ xdg-open org-protocol://capture://http%3A%2F%2Forgmode.org
 Error showing URL: Operation not supported
 matt...@helium:~$ xdg-open org-protocol://capture://http://orgmode.org
 matt...@helium:~$ (worked)

 Strange that it worked in FF. Maybe Chrome and FF encodes URIs differently?


Ooops!

I just was going to blame Google.

Looking into the ECMA standard, I found this:

15.1.3 URI Handling Function Properties

   ... ...

   A URI is composed of a sequence of components separated by
   component separators. The general form 
   is:
 Scheme : First / Second ; Third ? Fourth

   where the italicised names represent components and the “:”, “/”,
   “;” and “?” are reserved characters used as separators. The
   encodeURI and decodeURI functions are intended to work with
   complete URIs; they assume that any reserved characters in the
   URI are intended to have special meaning and so are not
   encoded. The encodeURIComponent and decodeURIComponent functions
   are intended to work with the individual component parts of a
   URI; they assume that any reserved characters represent text and
   so must be encoded so that they are not interpreted as reserved
   characters when the component is part of a complete URI.


That document states encodeURI is to be used with complete URIs (as
the name says...).  Funny.  Chrome is the only browser that works like
that :)

I'll go and adjust the docs.


Thanks for your Report!!


   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-protocol / Chrome on Linux

2010-09-30 Thread Sebastian Rose
Sebastian Rose sebastian_r...@gmx.de writes:
 Mattias Jämting matt...@jwd.se writes:
 Yes i'm running a pretty standard Ubuntu 10.04 setup.

 I managed to get it working on chrome by removing the
 encodeURIComponent command on location.href.

 I could simulate it in the terminal like this.

 matt...@helium:~$ xdg-open org-protocol://capture://http%3A%2F%2Forgmode.org
 Error showing URL: Operation not supported
 matt...@helium:~$ xdg-open org-protocol://capture://http://orgmode.org
 matt...@helium:~$ (worked)

 Strange that it worked in FF. Maybe Chrome and FF encodes URIs differently?


 Ooops!

 I just was going to blame Google.

 Looking into the ECMA standard, I found this:

 15.1.3 URI Handling Function Properties

... ...

A URI is composed of a sequence of components separated by
component separators. The general form 
is:
  Scheme : First / Second ; Third ? Fourth

where the italicised names represent components and the “:”, “/”,
“;” and “?” are reserved characters used as separators. The
encodeURI and decodeURI functions are intended to work with
complete URIs; they assume that any reserved characters in the
URI are intended to have special meaning and so are not
encoded. The encodeURIComponent and decodeURIComponent functions
are intended to work with the individual component parts of a
URI; they assume that any reserved characters represent text and
so must be encoded so that they are not interpreted as reserved
characters when the component is part of a complete URI.


 That document states encodeURI is to be used with complete URIs (as
 the name says...).  Funny.  Chrome is the only browser that works like
 that :)

 I'll go and adjust the docs.


 Thanks for your Report!!




Actually --- errr --- there is nothing to adjust.  The docs are exactly
right. 

This is because of some örfflkjsgs in xdg-open.

No one ever said something about xdg-open.  Org-protocol is supposed to
work with emacsclient:

matt...@helium:~$ emacsclient org-protocol://capture://http%3A%2F%2Forgmode.org


works.


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-30 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Sebastian,

 I believe I have fixed the bug.  But please note that there is a
 typo in your function osm-org-link-export, in the last line it
 must be target, not taget.

 HTH

 - Carsten

Hi Carsten,


it's fixed indeed!  Thanks a bunch!


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-29 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Sebastian,

 is this still an open issue?  If you, can you please summarize
 again and show the code you are using for your link definition?
 I am not sure if I have up to date information.

 - Carsten


Hi Carsten,


it's still an issue when exporting to ASCII.  The reason is, that my
track links have long paths (all the coordinates of the track plus
the desired filename, see the comments in the code for an example link).
That causes the footnote for a track to span pages (worsed case).

See the example ASCII export on the bottom of this mail.

Anyway, I'll rarely export the files to ASCII, so it's not urgent at
all.



The code is here:

   http://github.com/SebastianRose/org-osm/blob/master/org-osm-link.el


The function to export those links is:



binerAyB6wbzv.bin
Description: application/emacs-lisp





 On Sep 6, 2010, at 3:13 PM, Sebastian Rose wrote:
 Org file:

 * Test links

  [[track:((9.707032442092896 52.37033874553582))test.svg][test-track]]




 ASCII-export:

 1 Test links
 ~

  [test-track]


  [test-track]: track:((9.707032442092896 52.37033874553582))test.svg


  Sebastian
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Toolbar buttons for common actions (helping emacs newbees)

2010-09-29 Thread Sebastian Rose
Richard Moreland rich...@ncogni.to writes:
 Hi Olivier,

 The icons I have been using in MobileOrg are from Glyphish[1].   I
 don't know how they would look in a toolbar, but they are nice and
 simple.  I also checked out icons from the Tango Project[2].

 Hope this helps,
 Richard

 [1] http://glyphish.com/
 [2] http://tango.freedesktop.org/Tango_Icon_Library



Shouldn't we use tool-bar icons the way Emacs does?
Emacs uses the icons of my current Desktop theme (Gnus does not
though).


   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] ELPA

2010-09-28 Thread Sebastian Rose
Eric Schulte schulte.e...@gmail.com writes:
 I would think that it only makes sense to have one Org-mode package in
 ELPA, namely the bleeding edge git version of Org-mode.  ELPA serves as
 a way to distribute packages which are not (or can't be) part of Emacs,


package.el in emacs-24 lists Org-mode as built-in.  That's the version
included in Emacs, not a package on elpa.gnu.org as I thought.

The bleeding edge package would be the only one there.


 I don't think it makes sense to use ELPA to re-distribute the version of
 Org-mode which users already have installed as part of their Emacs
 install.  Un-installing the bleeding edge Org-mode would be equivalent
 to downgrading to the Emacs version.

+1

 Also, I would tend to think that this would make the most sense if we
 automate the ELPA integration s.t. every time a new revision is pushed
 up the to git repository, the ELPA version is automatically upgraded
 (with a git commit hook).  If this isn't currently possible in ELPA then
 I'd agree with a point Jambunathan makes in this thread that this is a
 trick we can help ELPA to learn.

 The reason I think the above is important is that very frequently the
 answer to a question is oh, I fixed that, please pull the latest from
 git, and we'll be constantly frustrating users if ELPA can't keep up
 with git.

 Best -- Eric



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [PATCH] Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-27 Thread Sebastian Rose
David Maus dm...@ictsoc.de writes:
 Also I guess the decoding is secure.  Means we could change the
 comment of this function:

 (defun org-protocol-unhex-compound (hex)
   Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ö'.
 Note: this function falls back on single byte decoding if a
 character sequence is not valid utf-8.
 See `org-protocol-unhex-single-byte-sequence'.


 Should I send another patch against master?  (Too late here... for
 me...)

 Not necessary, following patch removed this sentence and added a
 proper commit message (please see: Commit messages and ChangeLog
 entries on http://orgmode.org/worg/org-contribute.php).

 I took the new patch under review in patchtracker -- If someone else
 wants to jump on it, just go ahead.

 Best,
   -- David


Thanks David!


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PROPOSAL] Quick and easy installation instructions

2010-09-27 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 org-install would figure out where org.el is, add to .emacs and query
 for compilation.  This wouod make things independent from make and
 other tools.

 Yes I wondered about making something like that yesterday (would it make
 sense to have emacs do everything, including the download?

 This rings a bell - I think Sebastian Rose implemented that already.  Let
 search!


It's in contrib/lisp/org-track.el.

But as Org mode is on ELPA already,

   M-x package-list-packages

and this kind of package handling is part of emacs-24 already, I guess
that's a better way to go?



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Testing code

2010-09-27 Thread Sebastian Rose

Hi,


I'd like to write a few simple tests for the modified hex-decoding
functions I wrote for org-protocol.el.
These functions and the patch is easier to understand and maintain if
there are some simple tests, I guess.

Could we have a short introduction in writing tests on Worg (or is it
there)?

Tehom wrote something below testing/html/ ...


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [PROPOSAL] Quick and easy installation instructions

2010-09-27 Thread Sebastian Rose
Dan Davison davi...@stats.ox.ac.uk writes:
 Sebastian Rose sebastian_r...@gmx.de writes:

 Carsten Dominik carsten.domi...@gmail.com writes:
 org-install would figure out where org.el is, add to .emacs and query
 for compilation.  This wouod make things independent from make and
 other tools.

 Yes I wondered about making something like that yesterday (would it make
 sense to have emacs do everything, including the download?

 This rings a bell - I think Sebastian Rose implemented that already.  Let
 search!


 It's in contrib/lisp/org-track.el.

 But as Org mode is on ELPA already,

 Great, I didn't know that. I'm not seeing it listed when I do M-x
 package-list-packages. What do I need to do to see Org listed there?

 Dan


You need emacs-24.1.  It comes with a modified version of package.el
that pulls from elpa.gnu.org.

Don't know if this requires extra work to provide Org mode packages on
both sites.  


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Testing code

2010-09-27 Thread Sebastian Rose
Sebastian Rose sebastian_r...@gmx.de writes:
 I'd like to write a few simple tests for the modified hex-decoding
 functions I wrote for org-protocol.el.
 These functions and the patch is easier to understand and maintain if
 there are some simple tests, I guess.

 Could we have a short introduction in writing tests on Worg (or is it
 there)?


Hm - there's a little tutorial in org-tests/.  But ert has grown and
consists now of 7 el files plus one texinfo file.  As this seems easy to
use and comes with at least some documentation, I'll use ert [1] for a
start.

Once the tests are written, we can easily convert to something else.



  Sebastian


[1] http://github.com/ohler/ert

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: ditaa set-up on windows box

2010-09-27 Thread Sebastian Rose
 does `org-ditaa-jar-path' have the correct value?
 You can find out this way:

 M-: org-ditaa-jar-path RET

 Yes, it does.

 Can you execute 

java -jar c:\path\to\ditaa.jar --help

 on the command line using the value of that variable? 

 Doing this gives the following error:

 C:\Documents and Settings\mhellerjava -jar C:\Documents and 
 Settings\mheller\.e
 macs.d\org-mode\contrib\scripts\ditaa.jar --help
 Exception in thread main java.util.zip.ZipException: The system cannot find 
 th
 e file specified
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(Unknown Source)
 at java.util.jar.JarFile.init(Unknown Source)
 at java.util.jar.JarFile.init(Unknown Source)


OK, it's a Java problem.

The packages java.util.zip and java.util.jar come with your Java
installation.  Jave couldn't access *.jar packages ortherwise.

Seems your Java is outdated.  An update/re-install will help.





HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: ditaa set-up on windows box

2010-09-27 Thread Sebastian Rose
Markus Heller helle...@gmail.com writes:
 Sebastian Rose sebastian_r...@gmx.de writes:

 Markus Heller helle...@gmail.com writes:
 C:\Documents and Settings\mhellerjava -jar C:\Documents and 
 Settings\mheller\.e
 macs.d\org-mode\contrib\scripts\ditaa.jar --help
 Exception in thread main java.util.zip.ZipException: The system cannot 
 find th
 e file specified
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(Unknown Source)
 at java.util.jar.JarFile.init(Unknown Source)
 at java.util.jar.JarFile.init(Unknown Source)


 Oh - or could the spaces in the path trigger that problem?

 You could try to put ditaa.jar to 

C:\ditaa.jar

 and retry.

 That would move the error to Org-mode.

 I did this, and now I get:

 C:\java -jar ditaa.jar --help
 Exception in thread main java.lang.UnsupportedClassVersionError: 
 org/stathissi
 deris/ascii2image/core/CommandLineConverter (Unsupported major.minor version 
 49.
 0)
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)


I guess you're still using Java 1.4 and some of the current ditaa
components require at least java 5 (v. 1.5).


 And neither java.util.zip nor java.util.jar exist on my system, although

java.util and java.zip live in rt.jar as most important packages do.

 I've just re-installed the Java Runtime Environment jre1.6.0_07.

Which is what I use here (java version 1.6.0_21)

But I guess

   java -version

will show an elder version.



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] compiling org without make

2010-09-26 Thread Sebastian Rose
Hi Gez,


Gez regis...@geekanddiva.com writes:
 1. How I find out which version of orgmode I have? I'm assuming from
 http://orgmode.org/ that it's 6.21b, but is there a way of confirming
 this? 

M-x org-version


 2. Do I need to compile at all?  At least in order to get started
 learning and using it? 

No.  I never compile the sources.


 3. Whether or not I compile, how do I install the downloaded
 org-mode files?  Should I just copy them into \emacs-23.2\lisp\org
 (where my org lisp files are now) and let them overwrite where
 necessary? 

Add this to your .emacs file (adjust the path):

  (add-to-list 'load-path C:org-mode/lisp/)

This way, the sources of the downloaded Org-mode will be found before
the ones that come with emacs.


 3. In the example path in the function on
 http://orgmode.org/worg/org-hacks.php#compiling-org-without-make, the
 org-lisp-directory is under .emacs.d but my org files are under
 \emacs-23.2\lisp\org - does this matter?


Yes.  You'd need to adjust this line:

;; Customize:
(setq my/org-lisp-directory ~/.emacs.d/org/lisp)


 4. Assuming the path is ok as it is, how do I enter the path into the
 function - do I write the whole path - e.g.
 Q:\progs\emacs-23.2\lisp\org ? 

No need for parameters, ones the path is adjusted (item 3.).


 5. What option should I choose for org-compile-sources in the
 function? (I don't know what it means.) 

Just change this line

  (setq  my/org-compile-sources t)

to this:

  (setq  my/org-compile-sources nil)

if you do not want to compile the sources.


 6. Finally, how do I use this function?  Do I write it to my .emacs
 and then call it?  What is the command? 


M-x  my/compile-org  RET


That's it.


HTH

   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-26 Thread Sebastian Rose

The binary representation of 127 is 0111  and valid ascii char. DEL
actually (sh$ man ascii)

 Right, and that's why it is encoded: No control characters in a URI.

Great ! :)

 The final algorithm for the shiny new unicode aware percent encoding
 function would be:

  - percent encode all characters in TABLE
  - percent encode all characters below 32 and above 126
- encode the char in utf-8
- percent escape all bytes of the encoded char

 The remaining problem is keeping backward compatibility. There are Org
 files out there where á is encoded as %E1 and not %C3A1.  The
 percent decoding function should be able to recognize these old
 escapes and return the right value.  

 I looks like this could be done by changing the behavior of
 `org-protocol-unhex-string'.  Currently it returns the empty string
 for %E1 because it does not represent a valid utf-8 encoded unicode
 char.  Maybe we could say: If the percent encoded sequence does not
 form a valid char, use the old method (extended ASCII?) to decode the
 sequences.

Well, yes.  The function _should_ return something if the end of the
string is reached or something else but a `%' is found.

I'll have to find out where the function has to look up the correct
char.  167 will be a different character for different encodings.


This will not handle cases like `Größe' though.


Are there cases where strings are encoded the way you showed above, and
decoded using `org-unhex-string'?


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-26 Thread Sebastian Rose
David Maus dm...@ictsoc.de writes:
 Sebastian Rose wrote:
David Maus dm...@ictsoc.de writes:
  sh$  man utf-8

 Thanks!  I finally get a grip on one of my personal nightmares.


It's not that bad, is it? :D

 Even better: It makes sense ;)

 The attached patch is the first step in this direction: It modifies
 the algorithm of `org-link-escape', now iterating over the input
 string with `mapconcat' and escaping all characters in the escape
 table or are between 127 and 255.

Between 128 (1000 ) and 255 ??

The binary representation of 127 is 0111  and valid ascii char. DEL
actually (sh$ man ascii)

 Right, and that's why it is encoded: No control characters in a URI.

 The final algorithm for the shiny new unicode aware percent encoding
 function would be:

  - percent encode all characters in TABLE
  - percent encode all characters below 32 and above 126
- encode the char in utf-8
- percent escape all bytes of the encoded char

 The remaining problem is keeping backward compatibility. There are Org
 files out there where á is encoded as %E1 and not %C3A1.  The
 percent decoding function should be able to recognize these old
 escapes and return the right value.


There is no chance to do it in a secure way.  But here's what's
possible.


These all work as expected:

(org-protocol-unhex-string %E1) ; á
(org-protocol-unhex-string %A1) ; ¡
(org-protocol-unhex-string %E1%A1)  ; á¡
(org-protocol-unhex-string %C3%B6)  ; still german ö


Also, capturing text from this page still works:
http://www.jnto.go.jp/jpn/


diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 21f28e7..f37ce1c 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -305,7 +305,7 @@ part.
 
 (defun org-protocol-unhex-string(str)
   Unhex hexified unicode strings as returned from the JavaScript function
-encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'.
+encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ö'.
   (setq str (or str ))
   (let ((tmp )
 	(case-fold-search t))
@@ -321,7 +321,11 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'.
 
 
 (defun org-protocol-unhex-compound (hex)
-  Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ü'.
+  Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ö'.
+Note: this function also decodes single byte encodings like
+`%E1' (\á\) if not followed by another `%[A-F0-9]{2}' group.
+Singlebyte decoding is not secure though, since we could have
+two single byte characters above 128 in a row.
   (let* ((bytes (remove  (split-string hex %)))
 	 (ret )
 	 (eat 0)
@@ -353,9 +357,22 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'.
 	(setq val (logxor val xor))
 	(setq sum (+ (lsh sum shift) val))
 	(if ( eat 0) (setq eat (- eat 1)))
-	(when (= 0 eat)
+	(cond
+	 ((= 0 eat) ;multi byte
 	  (setq ret (concat ret (org-protocol-char-to-string sum)))
 	  (setq sum 0))
+	 ((not bytes)   ; single byte(s)
+	  (let ((bytes (remove  (split-string hex %)))
+		(ret ))
+	(message bytes: %s bytes)
+
+	(while bytes
+	  (let* ((b (pop bytes))
+		 (a (elt b 0))
+		 (b (elt b 1)))
+		 (setq ret
+			   (concat ret (char-to-string
+	(+ (lsh a 4) b)
 	)) ;; end (while bytes
 ret ))
 


Best wishes

  Sebastian
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-26 Thread Sebastian Rose

rrrggrgrggrgr

premature and wrong patch, sorry.  Again against master:

diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 21f28e7..d69d584 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -305,7 +305,7 @@ part.
 
 (defun org-protocol-unhex-string(str)
   Unhex hexified unicode strings as returned from the JavaScript function
-encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'.
+encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ö'.
   (setq str (or str ))
   (let ((tmp )
 	(case-fold-search t))
@@ -321,7 +321,11 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'.
 
 
 (defun org-protocol-unhex-compound (hex)
-  Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ü'.
+  Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ö'.
+Note: this function also decodes single byte encodings like
+`%E1' (\á\) if not followed by another `%[A-F0-9]{2}' group.
+Singlebyte decoding is not secure though, since we could have
+two single byte characters above 128 in a row.
   (let* ((bytes (remove  (split-string hex %)))
 	 (ret )
 	 (eat 0)
@@ -353,12 +357,30 @@ encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'.
 	(setq val (logxor val xor))
 	(setq sum (+ (lsh sum shift) val))
 	(if ( eat 0) (setq eat (- eat 1)))
-	(when (= 0 eat)
+	(cond
+	 ((= 0 eat) ;multi byte
 	  (setq ret (concat ret (org-protocol-char-to-string sum)))
 	  (setq sum 0))
+	 ((not bytes)   ; single byte(s)
+	  (setq ret (org-protocol-unhex-single-byte-sequence hex
 	)) ;; end (while bytes
 ret ))
 
+(defun org-protocol-unhex-single-byte-sequence(hex)
+  Unhexify hex-ecncoded single byte character sequences.
+  (let ((bytes (remove  (split-string hex %)))
+	(ret ))
+(while bytes
+  (let* ((b (pop bytes))
+	 (a (elt b 0))
+	 (b (elt b 1))
+	 (c1 (if ( a ?9) (+ 10 (- a ?A)) (- a ?0)))
+	 (c2 (if ( b ?9) (+ 10 (- b ?A)) (- b ?0
+	(setq ret
+	  (concat ret (char-to-string
+			   (+ (lsh c1 4) c2))
+ret))
+
 (defun org-protocol-flatten-greedy (param-list optional strip-path replacement)
   Greedy handlers might receive a list like this from emacsclient:
  '( (\/dir/org-protocol:/greedy:/~/path1\ (23 . 12)) (\/dir/param\)
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-26 Thread Sebastian Rose

Also I guess the decoding is secure.  Means we could change the comment
of this function:

(defun org-protocol-unhex-compound (hex)
  Unhexify unicode hex-chars. E.g. `%C3%B6' is the German Umlaut `ö'.
Note: this function falls back on single byte decoding if a
character sequence is not valid utf-8.
See `org-protocol-unhex-single-byte-sequence'.


Should I send another patch against master?  (Too late here... for me...)


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] ditaa set-up on windows box

2010-09-25 Thread Sebastian Rose
Markus Heller helle...@gmail.com writes:
 Hello everyone,

 this might be a little OT, but I'm having a hard time to get ditaa to
 run properly.  The org-mode part works, it's the Java part that's giving
 me trouble, I'm getting loads of Exception in thread main
 java.lang.misc stuff goes here errors, and I have no Java experience
 whatsoever. 

 I'm on a windoze XP box, and I was wondering if a fellow user might be
 willing to share his/her set-up.

 Thanks and Cheers
 Markus


Hi Markus,



does `org-ditaa-jar-path' have the correct value?
You can find out this way:

M-: org-ditaa-jar-path RET

Can you execute 

   java -jar c:\path\to\ditaa.jar --help

on the command line using the value of that variable? 



If not, I suspect you use an outdated version of Org mode and need to
set `org-ditaa-jar-path' to the correct value yourself.  Nowadays this
variable is set to the correct value automatically and ditaa.jar comes
with the development version of Org mode.



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: orgmode as a reference system: Storing private/sensitive information and syncing across devices.

2010-09-24 Thread Sebastian Rose
Paul Sexton psex...@xnet.co.nz writes:
 Check out: http://ccrypt.sourceforge.net/

 There is an emacs package provided, ps-ccrypt.el,  which provides seamless
 loading  saving of encryted files. I have been using it with my org agenda
 file for several months with no problems. 

 Paul


Emacs comes with everything you need. See the epa package in Emacs for
seamless encryption. 

M-x customize-group RET epa RET


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Yet another way to use maps --- the light way

2010-09-23 Thread Sebastian Rose
Hi,


there is a light and easy way to use google and openstreetmap.org maps
if you define them as a custom link type:


(setq org-link-abbrev-alist
  '((gmap
 . http://maps.google.com/maps?q=%s;)
(omap
  . http://nominatim.openstreetmap.org/search?q=%spolygon=1;)))



Now
  [[gmap:Falkenstr 10, Hannover, Germany][Falkenstraße]]

and
  [[omap:Falkenstr 10, Hannover, Germany]]

show a map in your browser.  LaTeX and HTML export works out the box
with the advantage, that this export can legally be published on the
internet without any additional action (API license key).  Even on
commercial sites, as it's just a link to google.  OSM is no problem
anyway.


This way it's possible to show a certain place on earth, but not a track
or route.



There's a (known) bug in the LaTeX eporter:

[[Falkenstraße 10, Hannover, Germany]]

will _not_ work, because the german Umlaut will be distorted somehow
(unless fixed already)



  Sebastian


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode screencasts

2010-09-23 Thread Sebastian Rose
Hi Richard,


great idea.

There are some screencasts around that could serve as a basis.  I'd
gladly rework my two little screencasts about org-protocol:

http://www.youtube.com/watch?v=h7Z2PiAcgh8
http://www.youtube.com/watch?v=G2xjwxEj-c8

I used Wink[1] to create those screnncasts.  But I guess it's not what
we should use (flash)?


To make all screencasts look the same, we would need to make them all on
the same system.  That's a problem.
For simple movies, just inside emacs, we could write an elisp file for
you to execute.  But as soon as other applications are involved, we'll
have a problem to solve.



 Sebastian


---
[1] http://www.debugmode.com/wink/

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-23 Thread Sebastian Rose
David Maus dm...@ictsoc.de writes:
  sh$  man utf-8

 Thanks!  I finally get a grip on one of my personal nightmares.


It's not that bad, is it? :D


 The
 attached patch is the first step in this direction: It modifies the
 algorithm of `org-link-escape', now iterating over the input string
 with `mapconcat' and escaping all characters in the escape table or
 are between 127 and 255.


Between 128 (1000 ) and 255 ??

The binary representation of 127 is 0111  and valid ascii char. DEL
actually (sh$ man ascii)

;)



Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Yet another way to use maps --- the light way

2010-09-23 Thread Sebastian Rose
Memnon Anon gegendosenflei...@googlemail.com writes:
 Hi,

 Sebastian Rose sebastian_r...@gmx.de writes:

 there is a light and easy way to use google and openstreetmap.org maps
 if you define them as a custom link type:

 (setq org-link-abbrev-alist
   '((gmap
  . http://maps.google.com/maps?q=%s;)
 (omap
   . http://nominatim.openstreetmap.org/search?q=%spolygon=1;)))

 Now
   [[gmap:Falkenstr 10, Hannover, Germany][Falkenstraße]]

 and
   [[omap:Falkenstr 10, Hannover, Germany]]
 [...]

 This works fine for viewing in an external browser like conkeror or ff,
 but fails for me in emacs w3m.

 Memnon


Yes.  For this to work, you'd to do something like this (untested):


(defun org-follow-gmap-link (path)
  Follow a google-map link when clicked.
  (browse-url-mozilla
   (concat http://maps.google.com/maps?q=; path)))

(org-add-link-type gmap 'org-follow-gmap-link nil)


(defun org-follow-omap-link (path)
  Follow a osm-map link when clicked.
  (browse-url-mozilla
   (concat
http://nominatim.openstreetmap.org/search?q=;
path polygon=1)))

(org-add-link-type omap 'org-follow-omap-link nil)




HTH

   Sebastian


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-22 Thread Sebastian Rose
David Maus dm...@ictsoc.de writes:
 Sebastian Rose wrote:
Is there a reason for this distinction between multibyte and unibyte?
I favour the shotgun-approach if not.  It's bullet-proof.

The JavaScript function `encodeURIComponent()' encodes the German Umlaut
`ü' as `%C3%B6' regardless of the sources encoding actually.  That's why
I wrote the two functions `org-protocol-unhex-string' and
`org-protocol-unhex-compound' (s. org-protocol.el).

 Ah, yes.  From my understandig of the RFC %C3%BC is a valid
 representation of the ü character.  

 I do not yet fully understand
 how to unescape such a representation.  E.g. Is %C3%BC a hexencoded
 multibyte char or a succession of two singlebyte chars?


It's a hexencoded multibyte char.

JavaScript implementations seem to turn non-ascii singlebyte chars into
multibyte chars first, then encode the result.

This means if a page is iso-8859-1 encoded (singlebyte `ü'), JavaScript
will recode the `ü'.  It's funny, but that's what I found when writing
org-protocol.el 


`org-protocol-unhex-string' and `org-protocol-unhex-compound' decode
such a representation.

The trick is in the utf-8 encoding itself.  If a byte starts with a 1,
another byte will follow.  The number of leading `1's denotes the amount
of bytes used for one character.   On a GNU/Linux system try

  sh$  man utf-8


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [bug] org-link-escape and (wrong-type-argument stringp nil)

2010-09-20 Thread Sebastian Rose
David Maus dm...@ictsoc.de writes:
 Sébastien Vauban wrote:
Hello,

With current git pull, and such an Org file (in UTF-8 encoding):

 ...

I get the following error when trying to export it via PDFLaTeX:

 The problem is, that the 'É' character is not in Org's default list
 for link escapes but `string-match' matches for the lower case
 character.  Adding more chars to `org-link-escape-chars' would solve
 the problem, but this seems to be a broder issue:

 Regular links (URIs) are restricted to a special set of ASCII
 characters and non-ascii chars are hex-encoded.  Currently Org escapes
 links to Org mode headlines using the table mentioned above.  But Org
 files and hence Org headlines might be Unicode, containing multibyte
 characters that cannot be hex-escaped in the normal fashion.

 Maybe something like this would be a solution:

  - Org only escapes square brackets when escaping a link to an Org
mode headline
  - `org-link-escape' uses a shotgun-approach: Every char that is not
allowed according to the specs (Cf. RFC3986) is percent encoded if
the link sequence does not contain multibyte chars; If the sequence
does contain multibyte chars, `org-link-escape' produces an IRI
(Cf. RFC3987).



Is there a reason for this distinction between multibyte and unibyte?
I favour the shotgun-approach if not.  It's bullet-proof.



The JavaScript function `encodeURIComponent()' encodes the German Umlaut
`ü' as `%C3%B6' regardless of the sources encoding actually.  That's why
I wrote the two functions `org-protocol-unhex-string' and
`org-protocol-unhex-compound' (s. org-protocol.el).


I'll have to take a look at that RFC you mentioned :)



Best wishes

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] exporting to a specified directory

2010-09-20 Thread Sebastian Rose
Bastien bastien.gue...@wikimedia.fr writes:
 Hi Erik,

 Erik Iverson er...@ccbr.umn.edu writes:

 Can you set some option in an org-mode buffer telling the
 exporter to write the HTML and PDF versions of the document
 in a specific directory?  I know the publishing mechanism
 does this, just wondering if there is a simple variable
 to set per file to set this on export, or do I need to
 set up a publishing project?

 AFAIK, you need to setup a publishing project for this.


...but you could always export a single file to a temporary buffer and
write that to which ever directory you like.


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: orgmode as a reference system: Storing private/sensitive information and syncing across devices.

2010-09-20 Thread Sebastian Rose
Marcelo de Moraes Serpa celose...@gmail.com writes:
 Hmm, never heard about it :)

 But I assume that -- at least in terms of network security -- having
 the WebDav server below a HTTPS layer is enough. This would at least
 put a layer of security for when I'm syncing between devices (in this
 case OSX-WebDav-MobileOrg). I know, however, there might be other
 holes or someone might even me able to just sit in front of my
 computer and fiddle through the org text files, so that might be a
 good use-case for org-crypt.


Hi Marcelo,



unencrypted data is _not_ secure.

Encrypt your data and you'll have a chance to lock your bank account
card just in time, once your iPod gets lost (or stolen).

(Is it necessary to carry sensitive data around on your iPod??? Can't
believe it...)


As you might have guessed, I'm one of those more neurotic persons.
And more and more people join us --- to late in many cases.  Encryption
is cheep.  Unencrypted data can be expensive.



   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How can I get document metadata?

2010-09-19 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 Is there an org function to get the title, author, etc. of an org document?

 --Aidan

How about

C-h f org-parse-local-options


BTW:

C-h f org-par TAB TAB

is your friens ;)


HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] How can I get document metadata?

2010-09-19 Thread Sebastian Rose
Sebastian Rose sebastian_r...@gmx.de writes:
 Aidan Gauland aidal...@no8wireless.co.nz writes:
 Is there an org function to get the title, author, etc. of an org document?

 --Aidan

 How about

 C-h f org-parse-local-options


 BTW:

 C-h f org-par TAB TAB

 is your friens ;)


 HTH

   Sebastian



This is awkward to use:

(org-parse-local-options
  (org-get-local-options)
  'org-export-headline-levels) 


Is that function still in use? 

`grep -Fr org-parse-local-options'  reveals nothing.



Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: How can I get document metadata?

2010-09-19 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 Sebastian Rose sebastian_rose at gmx.de writes:
 This is awkward to use:

 (org-parse-local-options
   (org-get-local-options)
   'org-export-headline-levels)

 Is that function still in use?

 `grep -Fr org-parse-local-options'  reveals nothing.

 Not only is it awkward, it (org-get-local-options) doesn't seem to get
 me everything.  For example, the title isn't in the list returned by
 org-get-local-options.



(org-get-current-options) finds most export related options, the names
of which can be found in org-exp.el.


I'm not an expert in this area.  But here is what I found so far.
You could take a look at certain files and funcitons in org-mode/lisp/:

1.)  `org-publish-file' in org-publish.el
 Here the call to
 (org-publish-get-project-from-filename filename)
 is of interest, as this returns all options set for the project the
 file belongs to eventually.

2.)  `org-export-as-html' in org-html.el
 Here I find the call to
 (org-infile-export-plist)
 Which returns the in-file plist of options.



This should do for a start:


(let ((opt-plist
   (org-export-process-option-filters
(org-combine-plists (org-default-export-plist)
 (org-publish-get-project-from-filename buffer-file-name)
 (org-infile-export-plist)

  ;; the calculated style:
  (message %s (plist-get opt-plist :style))

  ;; or show the entire content of the property list:
  (message %S opt-plist))



Note, that e.g. the :title might be empty in this plist, because unset.
In that case, Org uses the filename as title.



HTH

  Sebastian

 

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment

2010-09-17 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 Sebastian Rose sebastian_rose at gmx.de writes:
 This here works for both --- here it does.

 Uh, not quite.  Now what should be in techy/programs/ is in
 techy/programs/techy/programs/ (non-org files, that is).  At least now
 all files are treated consistently. :P

 --Aidan

Hi Aidan,



did you revert the previous patch?  The second patch was against master
again. 

Here is how I tested it:

I changed to a subdirectory of my :base-directory (here $BASE):

$ cd ${BASE}/subdirectory
$ cp ~/images/first.jpg .# a simple image
$ ln -s ~/images/second.jpg  # a link to an image
$ ln -s ~/images/screenshots/# a link to a directory


When exporting, I get this tree in :publishing-directory ($PUB):


$PUB/
 |-- subdirectory/
 |   |-- first.jpg
 |   |-- second.jpg
 |   `-- screenshots/
 |   |-- some.png
 |   `-- other.png
 

which is what you expected, is that right?



Thanks for your patience!

I think we really _should_ make symbolic links work.



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Patch] Bug: Inconsistency with org-publish-attachment

2010-09-17 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 Sebastian Rose sebastian_rose at gmx.de writes:
 did you revert the previous patch?  The second patch was against master
 again.

 I ran git reset --hard then applied the second patch.

 I changed to a subdirectory of my :base-directory (here $BASE):

 $ cd ${BASE}/subdirectory
 $ cp ~/images/first.jpg .# a simple image
 $ ln -s ~/images/second.jpg  # a link to an image
 $ ln -s ~/images/screenshots/# a link to a directory

 When exporting, I get this tree in :publishing-directory ($PUB):

 $PUB/
  |-- subdirectory/
  |   |-- first.jpg
  |   |-- second.jpg
  |   `-- screenshots/
  |   |-- some.png
  |   `-- other.png

 which is what you expected, is that right?

 Yes, that's what I expected.  What I'm getting is a little different.

 $PUB/
 `-- subdirectory/
 |-- screenshots/
 |   `-- subdirectory/
 |   `-- screenshots/
 |   |-- other.png
 |   `-- some.png
 `-- subdirectory/
 |-- first.jpg
 |-- second.jpg

 This is how the project is defined...
 (setq 
  org-publish-project-alist
  '((static
 :base-directory ~/org-bug/
 :publishing-directory ~/org-bug-pub/
 :publishing-function org-publish-attachment
 :recursive t
 :base-extension css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png)))

 And published with this sexp.
 (org-publish static)

 Perhaps the discrepancy between our setups is git commit (not sure if
 I'm using the right terms there)?  git log shows
 878d94b47225729bfffaca9c57a5bdeb344a8ffb at the top of its output.

 Thanks for your help!
 --Aidan


Ahrrgh :)

I just pulled, because I couldn't find that commit.

That commit already includes the (obviously wrong) first patch...


Here's the patch that reverts the first attempt and applies the new
one.   Hope this works :)



  Sebastian


diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index 7534524..90b0339 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -578,18 +578,13 @@ See `org-publish-org-to' to the list of arguments.
   Publish a file with no transformation of any kind.
 See `org-publish-org-to' to the list of arguments.
   ;; make sure eshell/cp code is loaded
-  (let* ((rel-dir
-	  (file-relative-name
-	   (file-name-directory filename)
-	   (plist-get plist :base-directory)))
-	 (pub-dir
-	  (expand-file-name
-	   (concat (file-name-as-directory pub-dir) rel-dir
 (unless (file-directory-p pub-dir)
   (make-directory pub-dir t))
 (or (equal (expand-file-name (file-name-directory filename))
 	   (file-name-as-directory (expand-file-name pub-dir)))
-	(copy-file filename pub-dir t
+  (copy-file filename
+		 (expand-file-name (file-name-nondirectory filename) pub-dir)
+		 t)))
 
 
 ;;; Publishing files, sets of files, and indices
@@ -606,13 +601,13 @@ See `org-publish-projects'.
 		  (error File %s not part of any known project
 			 (abbreviate-file-name filename)
 	 (project-plist (cdr project))
-	 (ftname (file-truename filename))
+	 (ftname (expand-file-name filename))
 	 (publishing-function
 	  (or (plist-get project-plist :publishing-function)
 	  'org-publish-org-to-html))
 	 (base-dir
 	  (file-name-as-directory
-	   (file-truename
+	   (expand-file-name
 	(or (plist-get project-plist :base-directory)
 		(error Project %s does not have :base-directory defined
 		   (car project))
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Patch] Bug: Inconsistency with org-publish-attachment

2010-09-17 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 On Sat, Sep 18, 2010 at 12:18:42AM +0200, Sebastian Rose wrote:
 That commit already includes the (obviously wrong) first patch...
 
 Here's the patch that reverts the first attempt and applies the new
 one.   Hope this works :)

 Yup, this one works!  Bug squashed.  Go ahead and commit it.

 Thanks again,
 Aidan


Yiiihaa!  Thanks for testing!


Best wishes

   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [Patch] Re: Bug? Inconsistency with org-publish-attachment

2010-09-16 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 On Thu, Sep 16, 2010 at 12:40:34AM +0200, Sebastian Rose wrote:
 Aidan Gauland aidal...@no8wireless.co.nz writes:
  Sebastian Rose sebastian_rose at gmx.de writes:
  It would be a bug.
 
  But I cannot reproduce it (current Org mode from git, emacs24).
 
  I just figured out why: I store all my images in ~/images/ and just
  have symbolic links to them in my Org website directory.
 
  Can you reproduce it now that you have this piece of information?


 Ah, OK.  That might be because of some call to

   (file-truename file...)

 or similar.  `file-truename' removes symbolic links in filenames.

 Functions like this are called to make sure, the file is published only
 if needed (i.e. the file has changed since last export).

 I'm not sure currently if it's clever to remove such calls (see
 lisp/org-publish.el and search `file-truename').

 What if `file-truename' was used only to get the path of the actual
 file to copy, but the (relative) path of the link is used as the
 destination?

 --Aidan

Hi Aidan,



`org-publish-attachment' is wrong or called with wrong arguments.


This patch fixes it.

As always, there might be a better way to fix it,
but this way the function `org-publish-attachment' will work regardless
of parameters.  Someone will always call this function with the wrong
`PUB-DIR' parameter...


Aidan, would like to apply the patch and verify it works for you?



Best wishes,


  Sebastian



diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index de52410..f32aa94 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -578,13 +578,18 @@ See `org-publish-org-to' to the list of arguments.
   Publish a file with no transformation of any kind.
 See `org-publish-org-to' to the list of arguments.
   ;; make sure eshell/cp code is loaded
+(let* ((rel-dir
+	(file-relative-name
+	 (file-name-directory filename)
+	 (plist-get plist :base-directory)))
+   (pub-dir
+	(expand-file-name
+	 (concat (file-name-as-directory pub-dir) rel-dir
   (unless (file-directory-p pub-dir)
 (make-directory pub-dir t))
   (or (equal (expand-file-name (file-name-directory filename))
 	 (file-name-as-directory (expand-file-name pub-dir)))
-  (copy-file filename
-		 (expand-file-name (file-name-nondirectory filename) pub-dir)
-		 t)))
+  (copy-file filename pub-dir t
 
 
 ;;; Publishing files, sets of files, and indices
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] inline images in org-mode

2010-09-16 Thread Sebastian Rose
Robert Goldman rpgold...@sift.info writes:
 I was looking for a way to put illustrations in my org-mode files so
 that I could actually look at them while editing the org stuff.  I found
 a post a while ago suggesting using iimage mode (which is included with
 the Aquamacs that I use, and is readily available if you don't have it
 with your emacs).

 I found I needed to do a little customization to make iimage work for
 me, so I thought I would post the details in case they were useful to
 anyone else.


Hi Robert,


just use `org-display-inline-images' or `org-toggle-inline-images'.
Not sure if it works with Aquamacs.


HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Any way to limit which subtrees to export based on TODO keywords?

2010-09-16 Thread Sebastian Rose
Scot Becker scot.bec...@gmail.com writes:
 The TODO keyword COMMENT should do what you're after.

And toggle it with `C-c ;'

 I can't believe I didn't think of that.  I even use that one already
 in other files.  Thanks,

 Scot


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] inline images in org-mode

2010-09-16 Thread Sebastian Rose
Robert Goldman rpgold...@sift.info writes:
 ... Is there some
 magic I can put in the Local Variables block that will cause the images
 to be displayed on startup?

 # org-display-inline-images: t



# Local Variables:
# mode: Org
# eval: (org-display-inline-images)
# End:


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Problem when previewing latex fragments

2010-09-16 Thread Sebastian Rose
Darlan Cavalcante Moreira darc...@gmail.com writes:
 Hello list,

 When I run org-preview-latex-fragment (C-c C-x C-l) I get the error
 ,
 ! org-create-formula-image: Symbol's function definition is void:
 ! org-export-latex-fix-inputenc
 `

 However, I run org-reload it works (until I close my gtd.org file and open
 it again). I'm running the latest version of org and the variable
 org-export-with-LaTeX-fragments is set to nil (but as I understand it is
 only used for exporting and not for previewing).

 To test if this is due to some configuration, I run emacs with the -q
 option and executed in the scratch buffer only the code below to load the
 new version

 (progn (cd ~/Org-mode-dev/) (normal-top-level-add-subdirs-to-load-path))
 (org-reload)
 Then I oppened my gtd.org file and tryed C-c C-x C-l, but I got the same
 error.

 Does anyone else has this problem?

 --
 Darlan

 ps: Emacs version is 23.1.50.1 (emacs-snapshot in Ubuntu 10.04)


make autoloads


???

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment

2010-09-16 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 Sebastian Rose sebastian_rose at gmx.de writes:
 `org-publish-attachment' is wrong or called with wrong arguments.
 
 This patch fixes it.
 
 As always, there might be a better way to fix it,
 but this way the function `org-publish-attachment' will work regardless
 of parameters.  Someone will always call this function with the wrong
 `PUB-DIR' parameter...
 
 Aidan, would like to apply the patch and verify it works for you?

 That fixes the problem, but introduces/reveals another:

 All symlinks in artsy/photography/images/ are dereferenced and copied
 to published/artsy/photography/images/, but all regular files in
 artsy/photography/images/ are copied to
 published/artsy/photography/images/artsy/photography/images/.

 So the patch works only if there are only symlinks.  (Not sure about
 only regular files.  It may have broken something.)


Arrrgh, yes...

So my first guess was the better one.

This here works for both --- here it does.


diff --git a/lisp/org-publish.el b/lisp/org-publish.el
index de52410..90b0339 100644
--- a/lisp/org-publish.el
+++ b/lisp/org-publish.el
@@ -601,13 +601,13 @@ See `org-publish-projects'.
 		  (error File %s not part of any known project
 			 (abbreviate-file-name filename)
 	 (project-plist (cdr project))
-	 (ftname (file-truename filename))
+	 (ftname (expand-file-name filename))
 	 (publishing-function
 	  (or (plist-get project-plist :publishing-function)
 	  'org-publish-org-to-html))
 	 (base-dir
 	  (file-name-as-directory
-	   (file-truename
+	   (expand-file-name
 	(or (plist-get project-plist :base-directory)
 		(error Project %s does not have :base-directory defined
 		   (car project))
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [Patch] Re: Bug? Inconsistency with org-publish-attachment

2010-09-16 Thread Sebastian Rose

Aidan,


that patch was against current master of course.



 Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Bug? Inconsistency with org-publish-attachment

2010-09-15 Thread Sebastian Rose
Aidan Gauland ai...@dimension8.tehua.net writes:
 I have a (sub)project for publishing a website.  It uses
 org-publish-attachment with the recursive option.

 (static
  :base-directory ~/doc-aidan/windmill-hill/main/
  :publishing-directory ~/doc-aidan/windmill-hill/published/
  :publishing-function org-publish-attachment
  :recursive t
  :base-extension css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png)

 I have all the files scattered throughout the source directory's
 hierarchy.  Their location is preserved when copied to the publishing
 directory /except/ for the images (I only have png images right now),
 which are just dumped in the root of the publishing directory.

 Is this a bug, or am I doing something wrong?


It would be a bug.

But I cannot reproduce it (current Org mode from git, emacs24).


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Question about local variables block

2010-09-15 Thread Sebastian Rose
Robert Goldman rpgold...@sift.info writes:
 I've been putting local variables blocks at the bottom of some of my
 org-mode files (in particular, those files that I share with others).

 The problem is that having a local variables block at the bottom of the
 file, at least if it uses # as a virtual comment character, doesn't
 dovetail nicely with org's folding behavior.  I find if I fold the
 bottom-most header line in such an org-mode file, my local variables
 block gets folded into that header inappropriately.

 So is there some way to format a local variables block at the bottom of
 a file so that org-mode knows that it's a local variables block and not
 part of the outline?


Not that I'm aware of it.

But you could use a special comment section:



* COMMENT local varibles

# Local Variables:
# mode: org
# fill-column: 70
# End:




HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Emacs version

2010-09-15 Thread Sebastian Rose
Sébastien Vauban wxhgmqzgw...@spammotel.com writes:
 Hi Sebastian,

 Sebastian Rose wrote:
 It would be a bug.
 But I cannot reproduce it (current Org mode from git, emacs24).

 I see that many of you already have Emacs 24. Did you build it yourself from
 the sources, or is there a package (in my case, for Ubuntu) that allows to get
 everything installed seamlessly?


I build it from sources.  I update about weekly.  There are little bugs
from time to time, but you could jump back to previous version if you
use bzr or, highly recommended, git:

  http://repo.or.cz/w/emacs.git

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Bug? Inconsistency with org-publish-attachment

2010-09-15 Thread Sebastian Rose
Aidan Gauland aidal...@no8wireless.co.nz writes:
 Sebastian Rose sebastian_rose at gmx.de writes:
 It would be a bug.
 
 But I cannot reproduce it (current Org mode from git, emacs24).

 I just figured out why: I store all my images in ~/images/ and just
 have symbolic links to them in my Org website directory.

 Can you reproduce it now that you have this piece of information?


Ah, OK.  That might be because of some call to 

  (file-truename file...)

or similar.  `file-truename' removes symbolic links in filenames.

Functions like this are called to make sure, the file is published only
if needed (i.e. the file has changed since last export).

I'm not sure currently if it's clever to remove such calls (see
lisp/org-publish.el and search `file-truename').


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] options and batch exporting

2010-09-15 Thread Sebastian Rose
Samuel Potter sfp.l...@gmail.com writes:
 Hi all,
 Sorry if this has been answered before -- wasn't able to track down a
 solution on my own. I have an org-mode file that has a set of
 #+OPTIONS: and #+STYLE: headers that I'd like to export to HTML from a
 shell script. Unfortunately, when I do so, it seems that the headers
 are being ignored. Any advice? 

 I'm running:

 emacs --batch --load=$ORGPATH --visit=CA_Cell.org --funcall org-mode 
 --funcall org-export-as-html

 where $ORGPATH is the path to org.el.


This does not work here either.  You'll need to set $ORGPATH to the path
to  your  org-install.el.

org-install.el is automatically build for you through

   sh$  make autoloads



Best wishes


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change color in fontified html export for strings

2010-09-14 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 On 14/09/10 10:16, Eric S Fraga wrote:
 On Tue, 14 Sep 2010 10:05:32 +0200, Rainer M Krug r.m.k...@gmail.com wrote:
 
 [...]
 
 The string

 style .string {color: #ff4500;}/style

 is in the html file, but it is not used - the color is hardcoded as
 #00:
 
 so this has nothing to do with CSS as style specifications can only
 affect specific tags, not hard-coded style information.

 Agreed.


M-x customize-variable RET org-export-htmlize-output-style

and set it to 'css'

HTH

  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] export of .org file from within a different .org file

2010-09-14 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 Hi

 I have an org file (report.org) which creates a report.

 Now I want to do a few things with the resulting report, before I create
 it to run a simulation, and afterwards copy it into a directory with a
 name linked to some parameter of the simulation. I am now using a
 seperate .org file (sim.org) which essentially looks as follow:

 --
 * Simulate
 #+begin_src R
   ...
 #+end_src

 * Create Report
 #+begin_src sh :exports results
   emacs --batch --visit=rep.sim.org
 --execute='(org-export-as-html-and-open nil)'
 #+end_src

 * Do some copying
 #+begin_src sh
   cp rep.sim.html DifferentName.html
   ...
 #+end_src
 --

 As you can see, I am using sh to do a task in emacs - which is quite
 ridiculous, but I don't know how to do it in elisp. So:

 how can I translate
 emacs --batch --visit=rep.sim.org
 --execute='(org-export-as-html-and-open nil)'

 into elisp?


Could be done better maybe, but this works:

(let ((buf (find-file-noselect ~/path/to/file.org)))
  (with-current-buffer buf
(org-export-as-html-and-open nil)
(kill-buffer buf)))



Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change color in fontified html export for strings

2010-09-14 Thread Sebastian Rose
Eric S Fraga ucec...@ucl.ac.uk writes:
 Thanks Sebastian.  I think that will definitely help the OP.  However,
 at least on my system, I believe the variable is actually
 org-export-htmlize-output-type (type, not style).


Yes, sorry Eric, right: org-export-htmlize-output-type


Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Templates - newline in string?

2010-09-14 Thread Sebastian Rose
Marco Alberti marco.albe...@unife.it writes:
 Hi all,
 when customizing org-capture-templates, how do I insert newlines in the 
 template
 string? I tried RET, C-RET and such, but nothing works,  and I couldn't find
 documentation.
 Thanks,
 Marco

Hi Marco,


just type

   `C-q C-j'

as you would do when searching for a string containing a newline and
similar.


   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Nested exports - Exporting a sub.org file while exporting main.org

2010-09-14 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 Hi

 I want to export a subdocument (sub.org) while exporting a main document
 (main.org), but I am getting an
 Args out of range: 0,0
 error message after the sub.org document is exported.

 Am I doing something wrong or is it not possible to have nested exports?

Hi Rainer,


in Org mode you would rather set up a special publishing project for
such a task:

(setq org-publish-project-alist
  '((main-and-sub
 :base-directory ~/org/
 :auto-sitemap nil  ; NO sitemap for this project !!
 :recursive t
 :base-extension org
 :publishing-directory ~/public_html/org/
 :publishing-function org-publish-org-to-html
 )
(one-more-project
 ;;...
 )))

See also:

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

This describes my publishing setup:

http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php




Best wishes

   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change color in fontified html export for strings

2010-09-14 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 On 14/09/10 13:41, Sebastian Rose wrote:
 Eric S Fraga ucec...@ucl.ac.uk writes:
 Thanks Sebastian.  I think that will definitely help the OP.  However,
 at least on my system, I believe the variable is actually
 org-export-htmlize-output-type (type, not style).
 
 
 Yes, sorry Eric, right: org-export-htmlize-output-type

 I found the variable - but then all the highlighting is gone. I assume,
 I have to use CSS sylesheet for that. That is an overkill for me at the
 moment.

 Is there really no way, just to change the color of one entity in the
 htmlization of code?


Ahhh, sorry, yes, there is one:

   M-x customize-variable RET org-export-html-style RET

You should leave your `org-export-htmlize-output-type' setting as
discussed before.

Set `org-export-html-style' to, e.g., 

  style .string { color:#006600; } /style



HTH

   Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Change color in fontified html export for strings

2010-09-13 Thread Sebastian Rose
Rainer M Krug r.m.k...@gmail.com writes:
 Hi

 when exporting code blocks to html, strings are exported as yellow
 (#00), which is really difficult to read. Is there a possibility to
 customize the colors (specifically the one used for strings) used for
 the fontification when exporting to html?

 Thanks,

 Rainer


Change the CSS styles for strings using a stylesheet. 

This is the htmlize-related section of my CSS stylesheet:


pre.src .comment {
  color: #77;
  font-style: italic;
}
pre.src .comment-delimiter {
  color: #77;
  font-style: italic;
}
.constant {
  color: #ff4500;
}
.default {
  color: #00;
}
.builtin {
  color: #ff;
}
.function-name {
  color:#ff;
}
.html-tag {
  color: #ff;
}
.keyword {
  color: #a52a2a;
  font-weight: bold;
}
.string {
  color: #006400;
}
.type {
  font-weight:bold;
  color:#238b8b;
}
.preprocessor {
  color:#FF;
}
.variable-name {
  color: #4d4d4d;
  font-weight:bold;
}
.org-meta-line {
  color: #99;
}
.css-selector {
  color: #ff;
  font-weight:bold;
}
.css-property {
  color: #00;
  font-weight:bold;
}
.makefile-targets {
  font-weight:bold;
  color: #ff;
}
pre.src .doc {
  color:#77;
}
/* ENDE htmlize.el */



  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: not exporting TODOs but exporting their subordinates

2010-09-08 Thread Sebastian Rose
Sam Cramer samcra...@gmail.com writes:
 When working on a document, I tend to sprinkle TODO headlines throughout the
 doc.  These are really very loosely structured; they just represent things
 that I need to do somewhat near the area that I'm looking at.

 I mark these lines with a :noexport: tag in order to prevent them from being
 exported.  As such, they're not part of the document structure per-se, and I
 often mark them as top level headlines.  Since EXPORT_EXCLUDE_TAGS applies
 to a tree and not to a title, this prevents the export of any subordinate
 items.

 Here's an example:

 * An amazing headline
 ** stuff
 ** more stuff
 * TODO clean up the stuff above :noexport:
 ** this is stuff that I would like exported


 In the example above, I'd like to have the everything but the TODO headline
 exported, including the this is stuff I would like exported line.

 I guess that I could always have my TODO lines be at a very deep level.  Is
 there any other solution I should consider?

 Thanks,
 Sam

Here's my proposal:


 * An amazing headline
 ** stuff
 ** more stuff
 *** TODO clean up the stuff above :noexport:
 ** this is stuff that I would like exported

Or just use inline tasks.  They are made for this purpose.


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Org now fontifies code blocks

2010-09-07 Thread Sebastian Rose
Bastien bastien.gue...@wikimedia.fr writes:

 Carsten Dominik carsten.domi...@gmail.com writes:

 I *do* like the idea mentioned earlier to use a different background
 when fontification is turned on.  Just a slight grey instead of white,
 for example.  That would help distinguish things in export mode.

 +1

+2

 Or maybe a different font?  


Since some month I have blue color for such blocks.
I simply use `org-block' face for this.

C-c '

is so easy to hit.


 People might want to use an Inconsolata-link font for normal text, 
 and a Terminal-like font for code excerpts.

I'll google Inconsolata-link font now... ;)


  Sebastian


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-06 Thread Sebastian Rose
Bastien bastien.gue...@wikimedia.fr writes:
 Sebastian Rose sebastian_r...@gmx.de writes:

 Yes.  But I want to avoid the footnote style for my custom track:
 links.  Look at the track I ran today.

 (Er.. that's a crazy link!)


 Actually it would make sense to handle how custom type links are
 exported in the custom type file itself.

 For example org-bbdb.el would have a function `org-bbdb-export-link'
 taking care of the various way BBDB links have to be represented in
 HTML, LaTeX, etc.

Yes!!!

We could then have the entire address as footnote!  Very useful!!!


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-06 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:
 Hi Sebastian,

 I have just pushed the code that was needed to allow custom link
 formatting for ASCII export, like you have implemented it.  This was
 simple an omission in the ascii exporter.
 So I hope it will work now

 - Carsten


C-c C-e A


gives me:

Debugger entered--Lisp error: (void-variable type)
  (assoc type org-link-protocols)
  (nth 2 (assoc type org-link-protocols))
  (setq fnc (nth 2 (assoc type org-link-protocols)))
  (functionp (setq fnc (nth 2 ...)))
  (if (functionp (setq fnc ...)) (setq rpl (or ... rpl)) (when (and desc0 ...) (if org-export-ascii-links-to-notes ... ...)))
  (if (and ( ... 8) (equal ... coderef:)) (setq line (replace-match ... t t line)) (setq rpl (concat [ ... ])) (if (functionp ...) (setq rpl ...) (when ... ...)) (setq line (replace-match rpl t t line)))
  (while (string-match org-bracket-link-regexp line) (setq link (match-string 1 line) desc0 (match-string 3 line) desc (or desc0 ...)) (if (and ... ...) (setq line ...) (setq rpl ...) (if ... ... ...) (setq line ...)))
  (while (setq line (pop lines)) (when (and link-buffer ...) (org-export-ascii-push-links ...) (setq link-buffer nil)) (setq wrap nil) (setq line (org-html-expand-for-ascii line)) (while (string-match org-bracket-link-regexp line) (setq link ... desc0 ... desc ...) (if ... ... ... ... ...)) (when custom-times (setq line ...)) (cond (... ... ... ...) (... ... ... ...) (t ... ... ... ... ...)))
  (let* ((opt-plist ...) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (level-offset ...) (opt-plist ...) (org-current-export-dir ...) (org-current-export-file buffer-file-name) (custom-times org-display-custom-times) (org-ascii-current-indentation ...) (level 0) line txt (umax nil) (umax-toc nil) (case-fold-search nil) (bfname ...) (filename ...) (filename ...) (buffer ...) (org-levels-open ...) (odd org-odd-levels-only) (date ...) (author ...) (title ...) (email ...) (language ...) (quote-re0 ...) (todo nil) (lang-words nil) (region ...) (lines ...) thetoc have-headings first-heading-pos table-open table-buffer link-buffer link desc desc0 rpl wrap fnc) (let (...) (org-unmodified ...)) (setq org-min-level (org-get-min-level lines level-offset)) (setq org-last-level org-min-level) (org-init-section-numbers) (setq lang-words (or ... ...)) (set-buffer buffer) (erase-buffer) (fundamental-mode) (org-install-letbind) (mapc (lambda ... ...) org-export-plist-vars) (org-set-local (quote org-odd-levels-only) odd) (setq umax (if arg ... org-export-headline-levels)) (setq umax-toc (if ... ... umax)) (unless body-only (when ... ... ...) (if ... ...) (cond ... ... ...) (if ... ...) (unless ... ...)) (if (and org-export-with-toc ...) (progn ... ... ... ...)) (org-init-section-numbers) (while (setq line ...) (when ... ... ...) (setq wrap nil) (setq line ...) (while ... ... ...) (when custom-times ...) (cond ... ... ...)) (org-export-ascii-push-links (nreverse link-buffer)) (normal-mode) (when thetoc (goto-char ...) (if ... ... ...) (mapc ... thetoc) (or ... ...)) (goto-char (point-min)) (let (beg end) (while ... ... ... ... ...)) (let (beg end) (goto-char ...) (while ... ... ... ... ...) (goto-char ...) (while ... ... ... ...)) (run-hooks (quote org-export-ascii-final-hook)) (or to-buffer (save-buffer)) (goto-char (point-min)) (or (org-export-push-to-kill-ring ASCII) (message Exporting... done)) (if (eq to-buffer ...) (prog1 ... ...) (current-buffer)))
  org-export-as-ascii(nil nil nil *Org ASCII Export*)
  org-export-as-ascii-to-buffer(nil)
  call-interactively(org-export-as-ascii-to-buffer)
  (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message Background process \%s\: started p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...)))
  (let* ((bg ...) subtree-p (help [t]   insert the export option template\n[v]   limit export to visible part of outline tree\n[1]   only export the current subtree\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer\n\n[h] export as HTML  [H] to temporary buffer   [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to temporary buffer\n[p] export as LaTeX and process to PDF[d] ... and open PDF file\n\n[D] export as DocBook   [V] export as DocBook, process to PDF, and open\n\n[j] export as TaskJuggler [J] ... and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic exporter\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files   [c] ...as one combined file\n\n[F] publish current file  [P] publish current project\n[X] publish a project...  [E] publish every projects) (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... 

Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-06 Thread Sebastian Rose
Bastien bastien.gue...@wikimedia.fr writes:
 Sebastian Rose sebastian_r...@gmx.de writes:

 C-c C-e A

 gives me:

 Debugger entered--Lisp error: (void-variable type)

 This should now be fixed in git - please pull and try.

Yes, it is fixed.


I still can return what ever I want with no effect (ASCII only):




bin61JVw1aEg0.bin
Description: application/emacs-lisp


Org file:

* Test links

  [[track:((9.707032442092896 52.37033874553582))test.svg][test-track]]


ASCII-export:

1 Test links 
~

  [test-track]


  [test-track]: track:((9.707032442092896 52.37033874553582))test.svg


  Sebastian
___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-05 Thread Sebastian Rose
Carsten Dominik carsten.domi...@gmail.com writes:

 Hi Sebastian,

 On Sun, Sep 5, 2010 at 3:37 AM, Sebastian Rose sebastian_r...@gmx.de wrote:
 Hi,


 I have problems to export a custom link type to ASCII.

 The code is here:

   http://github.com/SebastianRose/org-osm/blob/master/org-osm-link.el

   line 66 ff.


 Do you mean that it does not honor your export formatting as defined
 in org-osm-link-export ?


Exactly.

This affects bbdb: links as well.  file: links work as expected (or as I
expect??).

* Test links

  [[track:((9.707032442092896 52.37033874553582) (9.711474180221558 52.375238282987))2010-test-file.svg][test-track]]
  [[track:((9.707032442092896 52.37033874553582) (9.711474180221558 52.375238282987))unterverzeichnis/testtrack.svg][test-track im Unterverzeichnis]]
  [[bbdb:Sebastian%20Rose][Sebastian Rose, Hannover]]
  [[file:~/emacs/gnus/News/drafts/drafts/1::This%20affects%20bbdb%20links%20as%20well][Mail to Carsten]]

Exports to  ASCII like this:

1 Test links 
~

  [test-track]
  [test-track im Unterverzeichnis]
  [Sebastian Rose, Hannover]
  [Mail to Carsten]



  [test-track]: track:((9.707032442092896 52.37033874553582) (9.711474180221558 52.375238282987))2010-test-file.svg
  [test-track im Unterverzeichnis]: track:((9.707032442092896 52.37033874553582) (9.711474180221558 52.375238282987))unterverzeichnis/testtrack.svg
  [Sebastian Rose, Hannover]: bbdb:Sebastian%20Rose
  [Mail to Carsten]: file:~/emacs/gnus/News/drafts/drafts/1::This%20affects%20bbdb%20links%20as%20well


Hmmm  this seems so deliberate...  For bbdb links this even seems to
make sense...  But how could I avoid this footnote like behaviour?



  Sebastian




 HTML export works as expected.


 Example Org file:

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

 * Test links

  [[track:((9.707032442092896 52.37033874553582) (9.711474180221558 
 52.375238282987))FILENAME.svg][DESCRIPTION]]

  --8---cut here---end---8--




 Results in ASCII (just the section with the link):

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

 1 Test links
 ~

  [DESCRIPTION]

  [DESCRIPTION]: track:((9.707032442092896 52.37033874553582) 
 (9.711474180221558 52.375238282987))FILENAME.svg


  --8---cut here---end---8--



 HTML works:

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

 div id=outline-container-1 class=outline-2
 h2 id=sec-1span class=section-number-21/span Test links /h2
 div class=outline-text-2 id=text-1


 p
 a href=FILENAME.svgDESCRIPTION/a
 /p/div
 /div
 ...
  --8---cut here---end---8--




 Now as write this, I found I could as well use a bbdb link and come to
 similar results...

 :-(


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] A few stats and figures about org/worg and the mailing list

2010-09-05 Thread Sebastian Rose
Bastien bastien.gue...@wikimedia.fr writes:
 http://orgmode.org/worg/org-worg-stats.php
 http://orgmode.org/worg/org-mailing-list.php#sec-3

 Thanks to Eric Schulte for write the babel file which 
 produced the commits stats (I'll update this graph from
 time to time.)


This is so coool!

Reminders on the biggest events on this mailing list.
POLL: the 40 variables project ...

Wow!  Thanks Eric!

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-05 Thread Sebastian Rose
Bastien bastien.gue...@wikimedia.fr writes:
 Hi Sebastian,

 Sebastian Rose sebastian_r...@gmx.de writes:

 Hmmm  this seems so deliberate...  For bbdb links this even seems to
 make sense...  But how could I avoid this footnote like behaviour?

 Actually, I've wished for a long time that we can have a *real* footnote
 behavior for links when exporting to ASCII.

 For example:

   This [[http://orgmode.org][Org]] thingy is great.

 Would be exported to:

   This Org¹ thingy is great.

   ¹ http://orgmode.org

 I'm putting this on my TODO list...




Yes.  But I want to avoid the footnote style for my custom track:
links.  Look at the track I ran today.

Who reads a footnote like this one (lines are not wrapped on export):


[2010-09-05--30.994--5:32]: track:((9.707050323377189 52.37053766338069)
(9.711363315473136 52.37529308313076)
(9.710655212293204 52.37074846474)
(9.71125602711254 52.3756658283)
(9.711813926587638 52.37641963648109)
(9.712114333997306 52.37687810926805)
(9.711763858795166 52.37705320097925)
(9.71047211417 52.377611655826854)
(9.709560871015128 52.37804391862884)
(9.707973003278312 52.37848927587801)
(9.706943035016593 52.37867265696918)
(9.705913066754874 52.37875124863228)
(9.705312251935538 52.37875124863228)
(9.704174995313224 52.378607163809775)
(9.70301628101879 52.37839758504682)
(9.701170921216544 52.37801772100373)
(9.699819087873038 52.37788673264495)
(9.697952270398673 52.37772954610157)
(9.696850776672363 52.377747447957255)
(9.695484638104972 52.37788673264495)
(9.694218635449943 52.378174906521316)
(9.693617820630607 52.378332091479415)
(9.692695140729484 52.37871195281822)
(9.691901206861075 52.379000121309296)
(9.691257476697501 52.379301386357405)
(9.68996286392212 52.38010518640359)
(9.690570831189689 52.38041473935315)
(9.689862728009757 52.38100415016248)
(9.689083099365234 52.38151976904499)
(9.688382148633536 52.38192099578275)
(9.687008857617911 52.38247109401651)
(9.685442447553214 52.3830604773757)
(9.684004783521232 52.383610561412425)
(9.68355417240673 52.383937989132725)
(9.68106508244091 52.384854773830995)
(9.68057155598217 52.384959548012894)
(9.680585861206055 52.385278671203096)
(9.680464267621574 52.38591560093584)
(9.680078029523429 52.38613824042515)
(9.676988124738273 52.3866620936179)
(9.675486087689933 52.38700259485967)
(9.67482089985424 52.38723832495006)
(9.673662185559806 52.38765739755821)
(9.673275947461661 52.38761810967017)
(9.668962955365714 52.38928126633751)
(9.667868614087638 52.389674128841754)
(9.667088985443115 52.38994083686471)
(9.66608762730175 52.39022413047344)
(9.664649963269767 52.39052531893909)
(9.66357707966381 52.39065626980484)
(9.660937785993156 52.390878885385035)
(9.659457206616935 52.39099674023763)
(9.65759038914257 52.39116697446916)
(9.655358791242179 52.39137649262204)
(9.651060104370117 52.391957463824156)
(9.651045799146232 52.391795525944076)
(9.650745391736564 52.391795525944076)
(9.65059518803173 52.39127173366993)
(9.650402068982658 52.39140268232121)
(9.645123481641349 52.391743146996376)
(9.644050598035392 52.39180862067127)
(9.642348289489746 52.391734853683936)
(9.640660285840568 52.39157291498709)
(9.638042449842033 52.39125863878343)
(9.636197090039786 52.39104912007113)
(9.635725021253165 52.39104912007113)
(9.6120285987854 52.388605098155104)
(9.60939645756298 52.38843005224972)
(9.606513977050781 52.38844794976713)
(9.60456132888794 52.388526524031036)
(9.602937698255118 52.38858720070138)
(9.593839645276603 52.38918959791672)
(9.590985774884757 52.38938603001387)
(9.58881855724 52.389608652000526)
(9.587101936231193 52.38985746348047)
(9.585750102887687 52.39009317832562)
(9.57517147053295 52.39243716300863)
(9.570751190076408 52.3934323367367)
(9.556417465100822 52.396627216511874)
(9.556117057691154 52.3949638125)
(9.554314613233146 52.39707238631737)
(9.55339192023 52.3970592931519)
(9.552597999463615 52.39719022463179)
(9.55148220051342 52.39750445859858)
(9.54998016346508 52.39802817690401)
(9.549422263989982 52.398132919819226)
(9.549765586743888 52.398800650059)
(9.550387859235343 52.399010131973554)
(9.54998016346508 52.398800650059)
(9.550001621137199 52.39876137208931)
(9.55244779575878 52.39851261080267)
(9.554328918457031 52.39846504052878

[Orgmode] BUG ??? Cannot export custom link type to ASCII :-(

2010-09-04 Thread Sebastian Rose
Hi,


I have problems to export a custom link type to ASCII.

The code is here:

   http://github.com/SebastianRose/org-osm/blob/master/org-osm-link.el

   line 66 ff.


HTML export works as expected.


Example Org file:

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

* Test links

  [[track:((9.707032442092896 52.37033874553582) (9.711474180221558 
52.375238282987))FILENAME.svg][DESCRIPTION]]

 --8---cut here---end---8--




Results in ASCII (just the section with the link):

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

1 Test links
~

  [DESCRIPTION]

  [DESCRIPTION]: track:((9.707032442092896 52.37033874553582) 
(9.711474180221558 52.375238282987))FILENAME.svg


 --8---cut here---end---8--



HTML works:

 --8---cut here---start-8--
 
div id=outline-container-1 class=outline-2
h2 id=sec-1span class=section-number-21/span Test links /h2
div class=outline-text-2 id=text-1


p
a href=FILENAME.svgDESCRIPTION/a
/p/div
/div
...
 --8---cut here---end---8--
 



Now as write this, I found I could as well use a bbdb link and come to
similar results...

:-(


  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] [ANN] List improvement v.2

2010-09-03 Thread Sebastian Rose
Eric S Fraga ucec...@ucl.ac.uk writes:
 org-toggle-checkbox (C-c C-x C-b) doesn't seem to do anything now?  I
 have to put in the checkboxes manually (not a severe problem
 obviously :-).


That works here as well as `C-c C-c'




  Sebastian

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


  1   2   3   4   5   6   7   8   >