Re: [O] Long table, landscape or sideways, LaTeX PDF

2011-06-15 Thread Alan E. Davis
This is what worked TO AN EXTENT (no page breaks in table):


  (At top of org file:)
#+ATTR_LaTeX: longtable align=l|lp{3cm}r|l
#+LATEX_HEADER: \usepackage{pdflscape}

 #+LaTeX: \begin{center} \begin{landscape}
#+LaTeX: {}\begin{sidewaystable}\footnotesize

[ORG TABLE HERE]

#+LaTeX:\end{landscape} \end{center}
#+LaTeX: \end{sidewaystable}

-

No such thing as breaking across the page happened.  Neither was I able to
use longtable to do so.

Alan


Re: [O] Long table, landscape or sideways, LaTeX PDF

2011-06-15 Thread suvayu ali
On Tue, Jun 14, 2011 at 10:49 PM, Nick Dokos nicholas.do...@hp.com wrote:
 It works for me very smoothly. I have attached an example org file and
 the exported tex and pdf files.


 Try with and without the \footnotesize: do you see any difference? I don't
 think there is one - for confirmation, look at the tex file: both the
 placement stuff and the \footnotesize have disappeared, so how could
 they make any difference?


Yes you are correct. There was no adjoining text so I didn't notice
the regular size fonts. I think the placement option is getting
completely ignored when longtable is present.

That being said, if I put the \footnotesize after the #+LATEX
\begin{landscape} line, it does get exported and the table has smaller
fonts. The #+LATEX: \end{landscape} also successfully limits its scope
to just the table.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Long table, landscape or sideways, LaTeX PDF

2011-06-15 Thread Alan E. Davis
This works.  My table was quite wide: about two landscape sheets wide, so I
was looking for a solution for width.  Technically, I guess it's only a long
table, if it's printed sideways?  Don't know if that makes sense.

Thank you for this.  Good example.

Alan

2011/6/15 Suvayu Ali fatkasuvayu+li...@gmail.com

 Hi Nick and Alan,

 On Wed, 15 Jun 2011 01:00:11 -0400
 Nick Dokos nicholas.do...@hp.com wrote:

  suvayu ali fatkasuvayu+li...@gmail.com wrote:
 
   On Tue, Jun 14, 2011 at 7:50 PM, Alan E. Davis lngn...@gmail.com
   wrote:
(I would
like to use the \footnotesize feature also).
   ...
  
   For the use of \footnotesize, you can look at the following Worg
   page: http://orgmode.org/worg/org-hacks.html#sec-1_6_1
 
  Actually, I don't think the trick works with longtable - at least, I
  can't see any difference (checking the tex file shows no evidence of
  the attributes.) And fwiw, the other trick of resetting the size
  (http://thread.gmane.org/gmane.emacs.orgmode/42196/focus=42785)
  doesn't seem to work either - the commands are probably very
  different. In fact, trying to place a \footnotesize or \scriptsize
  into the tex file was a bust - I tried a few places and either got
  errors or no changes in size. So I don't know how to change the size
  in LaTeX, let alone in org.
 

 It works for me very smoothly. I have attached an example org file and
 the exported tex and pdf files.

  Nick
 



 --
 Suvayu

 Open source is the future. It sets us free.



Re: [O] problem with utf8 todo keywords

2011-06-15 Thread Carsten Dominik

On 11.6.2011, at 20:56, harven wrote:

 Hi,
 
 I use emacs 23.2.1 together with org 6.33.
 I am trying to add the character ▶ as a todo keyword with no success.
 
 Starting with emacs -Q, I execute the following 
 code in the scratch buffer
 (setq org-todo-keywords
 '((sequence \u25b6 ok)
  (sequence \u25b8 ok)))
 Then I open a simple .org file containing
 
 * ▶ first
 * ▸ second
 
 Only the second keyword is highlighted. 
 Why is it not the case with the first keyword ?

Most likely this is because the second character has
syntax word, while the first does not.  The regular expression
matching TODO words for font-lock expects the TODO keyword
to have word syntax (at least the first and last character of it).

Try this:

(add-hook 'org-mode-hook
   (lambda ()
 (modify-syntax-entry (string-to-char \u25b6) w)
 (modify-syntax-entry (string-to-char \u25b8) w)))


Matt, maybe this information could go into the FAQ?

- Carsten




Re: [O] Long table, landscape or sideways, LaTeX PDF

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

 Yes you are correct. There was no adjoining text so I didn't notice
 the regular size fonts. I think the placement option is getting
 completely ignored when longtable is present.
 
 That being said, if I put the \footnotesize after the #+LATEX
 \begin{landscape} line, it does get exported and the table has smaller
 fonts. The #+LATEX: \end{landscape} also successfully limits its scope
 to just the table.
 

... or before - the longtable environment does not reset the size to
\normalsize (as the table environment does - that's what caused all the
problems in the first place), so you can change the font size as you
would normally.

Nick



Re: [O] [PATCH] Allow S-left/S-right editing in indented clocktables

2011-06-15 Thread Carsten Dominik
Applied, thanks.

- Carsten

On 13.6.2011, at 19:00, Achim Gratz wrote:

 
 It wasn't possible to use S-up/down/left/right on the clocktable BEGIN
 line when the whole table was indented.  Interestingly enough calling
 the function directly would work, it turned out to be a regexp in org.el
 that was still pinned to bol.  There was a second one further down that
 is used to recognize dynamic blocks that got the same treatment.
 
 0001-Allow-S-left-S-right-editing-in-indented-clocktables.patch
 
 Achim.
 -- 
 +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+
 
 Samples for the Waldorf Blofeld:
 http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




[O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Rainer M Krug
Hi

when using the newest version of org-mode (Org-mode version 7.5
(release_7.5.391.gfacc)), I get the following warning when closing emacs,

Current desktop was not loaded from a file. Overwrite this desktop file?

although it has loaded the desktop file. When I use 7.5 (and te one from I
guess yesterday), the message did not occur.

I have (desktop-save-mode 1) on my emacs.org.


Cheers,

Rainer

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

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

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

email:  rai...@krugs.de

Skype:  RMkrug


[O] Time-proportional agenda view

2011-06-15 Thread Jacek Generowicz

Hello,

When viewing the agenda, I would like to get an immediate visual clue
about the time-span of entries. For example, if I have the following
items

* Boring meeting
2011-06-15 Wed 08:00--2011-06-15 Wed 13:00
* Lunch with mistress
2011-06-15 Wed 13:00--2011-06-15 Wed 14:00

my agenda would (visually) suggest that there is a short Boring
meeting, followed by copious free time, followed by a Lunch with
mistress of approximately the same length as the Boring
meeting. Perhaps something like this


 8:00.. 
 9:00-13:00 Boring Meeting
10:00.. 
11:00.. 
12:00.. 
13:00-14:00 Lunch with mistress


Whereas the following gives clearer immediate visual clues about how
the time is distributed.


 8:00.. 
 9:00-13:00 Boring Meeting
10:00.. Boring Meeting
11:00.. Boring Meeting
12:00.. Boring Meeting
13:00-14:00 Lunch with mistress


In other words, the Boring meeting is scheduled to run *right up to*
Lunch with mistress: this is made clear by the latter style, but in
the former style I would have to read the time range indicated on the
Boring meeting line and work out that it eats up all the time until
Lunch with mistress.


Is there some way of getting agenda views to look more like the latter
example?  Is there some pretty agenda view export functionality that
gives better geometric reflection of the time spans of entries? (I
suspect that overlapping entries would get very messy when represented
by text, but could be dealt with elegantly in a more graphical medium.)

Thank you.




Re: [O] org-bbdb-anniversaries gives error 'bad sexp'

2011-06-15 Thread Philipp Haselwarter
thanks, got it working now (with some fiddling).

looks like `calendar-date-style' is not honored /at all/, if you don't
use -MM-DD format (as stated in the org-bbdb.el header, admittedly),
it just blows up in your face :)


-- 
Philipp Haselwarter



[O] how to control exported src color

2011-06-15 Thread silent
hi,

I met a problem:

I use #+BEGIN_SRC html #+END_SRC in org, and export to html
but the source code's highlight color is not good,

could you please tell me how can I change the color ?


thanks!
attachment: org-exported_html_code.png

Re: [O] org-bbdb-anniversaries gives error 'bad sexp'

2011-06-15 Thread Carsten Dominik

On Jun 13, 2011, at 6:15 PM, Philipp Haselwarter wrote:

 thanks, got it working now (with some fiddling).
 
 looks like `calendar-date-style' is not honored /at all/, if you don't
 use -MM-DD format (as stated in the org-bbdb.el header, admittedly),
 it just blows up in your face :)

While I think the org-bbdb code could be made more forgiving,
I strongly feel that calendar-date-style is an evil variable,
especially if it is applied to input.  One should never rely on it.

my 5c.

- Carsten






Re: [O] how to control exported src color

2011-06-15 Thread Jambunathan K
silent silent2...@gmail.com writes:

 hi,

 I met a problem:

 I use #+BEGIN_SRC html #+END_SRC in org, and export to html
 but the source code's highlight color is not good,

Does your Emacs buffers look that way?

 could you please tell me how can I change the color ?

M-x customize-group RET org-export-htmlize

is a good starting point. But you have to do some homework.

Jambunathan K.

-- 



Re: [O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Eric Schulte
Hi Rainer,

I was able to reproduce this query-on-close behavior with the following
minimal config.

#+begin_src sh
  emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval (desktop-save-mode 1)
#+end_src

however, I think this prompting behavior is expected, and when I
switched to the following alternative

#+begin_src sh
  emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval '(desktop-read 
~/Desktop/)'
#+end_src

I received no prompt on exit.  As far as I can tell there is not an
Org-mode bug here, however I could very well have missed something.

Cheers -- Eric

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

 Hi

 when using the newest version of org-mode (Org-mode version 7.5
 (release_7.5.391.gfacc)), I get the following warning when closing emacs,

 Current desktop was not loaded from a file. Overwrite this desktop file?

 although it has loaded the desktop file. When I use 7.5 (and te one from I
 guess yesterday), the message did not occur.

 I have (desktop-save-mode 1) on my emacs.org.


 Cheers,

 Rainer

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



Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Rather than feeling our way forward step by step it seems that simply
following the behavior of noweb would both
1. allow for easy transition between noweb and babel
2. benefit from the years of experience and design accumulated in the
   noweb project

Does anyone on this list know the noweb system well enough to specify
its behavior in this regard, and to describe what functional changes
would be required to bring Babel into line with noweb behavior?

Thanks -- Eric

Achim Gratz strom...@nexgo.de writes:

 Eric Schulte schulte.e...@gmail.com writes:
 Thanks for sharing your thoughts.  How would you feel about moving away
 from special source block names and moving towards implementing this
 behavior with a header argument?

 I'm not feeling strongly either way... I'm wanting to use Babel for some
 stuff at work, but haven't got around to learn it well enough to set
 things in motion.  So my current investment is still small.  :-)

  Specifically two header arguments
 which would both take the name of a named code block, these header
 arguments would be as follows

 - append :: will append the current code block's body to the named code
 block during tangling

 - overwrite :: will overwrite the named code block's body with the body
of the current code block

 for simple concatenate the value of the append header argument could be
 easily set on the file or subtree level.

 This looks good, but it sort of turns the tables (I hope I get this
 right, it was a longer day than I hoped).  With noweb references, you
 need to resolve the name of the source block at the target.  With the
 header arguments you propose you need to resolve the target block name
 at the source.  Both ways are useful, but it seems that it would be
 difficult to track all targets from a single source even if supposedly
 one could have a list of targets (that would only be useful for
 overwrite unless you are really lucky).  This asymmetry is
 inescapeable when you try to use source blocks like include files.
 Another problem arises when you need to (again) reorder source blocks at
 the target.  You can't do that from the source, since not only would the
 source then need to know all targets, it would also need to know all
 other sources and their ordering in all targets.

 I feel that for many reasons (most of which have been discussed in
 relation to a header argument solution earlier in this thread) such a
 solution would be simpler and more consistent with the rest of Babel
 than the current name-based solution.

 I'd think if there was an API to get at the contents of the header
 arguments (perhaps using or modeled after the properties API), both the
 forward and backward resolution could use the same internal mechanism
 and noweb references could be changed (or extended) to (optionally) use
 a match with some header argument (e.g. :id or :srcname).  So let's say
 that'd then allow:

   :id bla

 to build a list of all source blocks with that header argument and
 tangle them in list order.  And since noweb references now really expect
 a list, you can just as well feed them a custom function that cobbles
 that list from multiple header arguments or properties.

 Thinking along those lines I'm beginning to wonder if not the whole
 header should be put into a drawer (I've often wished this was the case
 for #+TBLFM).



 Regards,
 Achim.

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



[O] How to filter by tag/todo in agenda view

2011-06-15 Thread Mark S

Hello!

I know how to filter inside the TODO list, but I can't seem to find how  
your filter inside of the agenda view. Is there a way?


Thanks!
Mark



Re: [O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Nick Dokos
Eric Schulte schulte.e...@gmail.com wrote:


 I was able to reproduce this query-on-close behavior with the following
 minimal config.
 
 #+begin_src sh
   emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval (desktop-save-mode 1)
 #+end_src
 
 however, I think this prompting behavior is expected, and when I
 switched to the following alternative
 
 #+begin_src sh
   emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval '(desktop-read 
 ~/Desktop/)'
 #+end_src
 
 I received no prompt on exit.  As far as I can tell there is not an
 Org-mode bug here, however I could very well have missed something.
 

 Rainer M Krug r.m.k...@gmail.com writes:
 
  when using the newest version of org-mode (Org-mode version 7.5
  (release_7.5.391.gfacc)), I get the following warning when closing emacs,
 
  Current desktop was not loaded from a file. Overwrite this desktop file?
 
  although it has loaded the desktop file. When I use 7.5 (and te one from I
  guess yesterday), the message did not occur.
 
  I have (desktop-save-mode 1) on my emacs.org.
 


Maybe this will help?

,
| desktop-save is a variable defined in `desktop.el'.
| Its value is ask-if-new
| 
| Documentation:
| Specifies whether the desktop should be saved when it is killed.
| A desktop is killed when the user changes desktop or quits Emacs.
| Possible values are:
|t -- always save.
|ask   -- always ask.
|ask-if-new-- ask if no desktop file exists, otherwise just save.
|ask-if-exists -- ask if desktop file exists, otherwise don't save.
|if-exists -- save if desktop file exists, otherwise don't save.
|nil   -- never save.
| The desktop is never saved when `desktop-save-mode' is nil.
| The variables `desktop-dirname' and `desktop-base-file-name'
| determine where the desktop is saved.
`

Nick



Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Hi Neeum,

You are correct, the current implementation only specially concatenates
blocks during tangling, *not* during noweb resolution.

It would be possible to also implement the concatenation behavior during
noweb expansion, however I'd prefer to first wait for a response to my
recent other email to this thread asking for a more clear explication of
existing noweb behavior.

The only remaining times when such concatenation behavior could be
implemented would be during block reference expansion, and during block
evaluation, but I think expanding at those times would be unnecessary
and confusing.

Thanks -- Eric

Neeum Zawan mailingli...@nawaz.org writes:

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

 Could you try the attached example file?  I first evaluated the
 following elisp code to set the combination variable's value to append.

 Your example works if there are no noweb references. 

 See the  modified one where I have noweb references. Note that when
 expanding the reference, it inserts only the first block it finds. 



  
 #+begin_src emacs-lisp :tangle yes :noweb yes
 foo

 Random text

 bar
 #+end_src



 * continued code blocks
:PROPERTIES:
:tangle:   yes
:comments: yes
:END:
 #+srcname: foo
 #+begin_src emacs-lisp
   (message foo:%S 1)
 #+end_src

 #+begin_src emacs-lisp
   (message un-named)
 #+end_src
 #+srcname: bar
 #+begin_src emacs-lisp
   (message bar:%S 1)
 #+end_src

 #+srcname: foo
 #+begin_src emacs-lisp
   (message foo:%S 2)
 #+end_src

 #+srcname: bar
 #+begin_src emacs-lisp
   (message bar:%S 2)
 #+end_src

 #+begin_src emacs-lisp :tangle no :results silent
   (with-temp-buffer
 (insert-file-contents scraps.el)
 (eval-buffer))
 #+end_src

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



Re: [O] Time-proportional agenda view

2011-06-15 Thread Karl Voit
* Jacek Generowicz jacek.generow...@cern.ch wrote:
 Hello,

Hi!

 When viewing the agenda, I would like to get an immediate visual clue
 about the time-span of entries. 

I'd like to have more visual clue too.

 For example, if I have the following items

 * Boring meeting
  2011-06-15 Wed 08:00--2011-06-15 Wed 13:00
 * Lunch with mistress
  2011-06-15 Wed 13:00--2011-06-15 Wed 14:00

What about additionally having:
* Telephone call customer
  2011-06-15 Wed 12:00--2011-06-15 Wed 13:30

  8:00.. 
  9:00-13:00 Boring Meeting
 10:00.. Boring Meeting
 11:00.. Boring Meeting
 12:00.. Boring Meeting
 13:00-14:00 Lunch with mistress

How to visualize overlapping things? Not that easy without those
boxes the usual calendar app has. What are you thinking here?

My first quick idea (hack) for this problem:

  8:00.. 
  9:00-13:00 # Boring Meeting
 10:00.. #
 11:00.. #
 12:00-13:30 ## Telephone call customer
 13:00-14:00 ## Lunch with mistress

Those «#» characters visualize the number of parallel items.

Besides implementation difficulties: how would you like to see this
situation in your agenda view? Do you have a better idea?

Or is there a chance of having some ASCII-art boxes for
time-spanning entries?

-- 
Karl Voit




Re: [O] HTML5 presentations

2011-06-15 Thread Eric S Fraga
Eric Schulte schulte.e...@gmail.com writes:

 Tassilo Horn tass...@member.fsf.org writes:

 Vinh Nguyen vinhdi...@gmail.com writes:

 After the recent org-mode to S5 discussion, I stumbled onto
 [these](https://gist.github.com/509761) code.  It offers a way to
 export org files to HTML5 presentations.  I think it looks quite nice.
  I see it being better than S5 in that no ui folder is required.
 What do you all think?  Is it worthy of being incorporated into
 org-mode?

 Just tried it, and it's pretty cool!  Easy to use and nicely looking.


 This is very cool, I just added the link to the non-beamer presentation
 engine page on Worg.

 http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

 Best -- Eric

What browser(s) are people using for this?  Conkeror doesn't work well
at all and iceweasel (aka firefox) 3.5.19 sort of works.

thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.391.gfaccb.dirty)



Re: [O] Status google calendar sync

2011-06-15 Thread Eric S Fraga
Stephen Eglen s.j.eg...@damtp.cam.ac.uk writes:

 Thank you very much Arun, this page looks great:

 http://orgmode.org/worg/org-tutorials/org-google-sync.html

 When going from org - google, do I need to do anything about using
 org-icalendar-store-UID?  I'd rather not have to populate my org files
 with :ID: entries.

 Stephen

The UID entries are necessary if you intend to upload a file that
contains entries that you previously uploaded.  Without these, any
pre-existing entry will be duplicated in google's calendar.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.391.gfaccb.dirty)



Re: [O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Eric Schulte

 I can not reproduce your example, as I am getting an can not open
 org-entities, but have you tried it with org-mode 7.5 as well as the newest
 git? My point is, that up to a recent git version (probably yesterday), this
 question was *not* there, but it is there at with the newest git version.


I have only tried to reproduce this with the newest version of org-mode,
and with that minimal setup I posted in my previous email.  With that
setup there was *no* prompt when exiting Emacs if the desktop
configuration had been loaded from a file -- i.e., the correct behavior.

I'd suggest trying to run from a similar minimal configuration, and then
see if the problem persists?  If so, then it is due to something else on
your systems aside form the Org-mode version (e.g., OS or Emacs), and if
not then it is due to interaction with something else in your config.

Sorry, I can't be of more help without the ability to reproduce the
problem.

Cheers -- Eric

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



Re: [O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Rainer M Krug
On Wed, Jun 15, 2011 at 8:31 PM, Eric Schulte schulte.e...@gmail.comwrote:

 
  I can not reproduce your example, as I am getting an can not open
  org-entities, but have you tried it with org-mode 7.5 as well as the
 newest
  git? My point is, that up to a recent git version (probably yesterday),
 this
  question was *not* there, but it is there at with the newest git version.
 

 I have only tried to reproduce this with the newest version of org-mode,
 and with that minimal setup I posted in my previous email.  With that
 setup there was *no* prompt when exiting Emacs if the desktop
 configuration had been loaded from a file -- i.e., the correct behavior.

 I'd suggest trying to run from a similar minimal configuration, and then
 see if the problem persists?  If so, then it is due to something else on
 your systems aside form the Org-mode version (e.g., OS or Emacs), and if
 not then it is due to interaction with something else in your config.

 Sorry, I can't be of more help without the ability to reproduce the


I completely understand.

I created the attached init.el file. In my setup, ~/.emacs.d/org-mode is a
symbolic link. If I set it to org-7.7, everything works as expected desktop
is loaded and saved without question), but when linking it to the git
version, the desktop is loaded, but when closing it giveas me the above
mentioned question:

Current desktop was not loaded from a file. Overwrite this desktop file?

As I said, the desktop *is* loaded.

Hope you can reproduce it with this setup,

Rainer

problem.

 Cheers -- Eric

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




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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

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

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

email:  rai...@krugs.de

Skype:  RMkrug
;;; init.el --- Where all the magic begins
;;
;; This file loads both
;; - Org-mode : http://orgmode.org/ and
;; - Org-babel: http://orgmode.org/worg/org-contrib/babel/org-babel.php#library-of-babel
;;
;; It then loads the rest of our Emacs initialization from Emacs lisp
;; embedded in literate Org-mode files.

;; Load up Org Mode and Org Babel for elisp embedded in Org Mode files
(add-to-list 'load-path ~/.emacs.d/org-mode/lisp)
(add-to-list 'load-path ~/.emacs.d/org-mode/contrib/lisp)

;; load up Org-mode and Org-babel
(require 'org-install)

(desktop-save-mode 1)
;; load up the main file
;; (org-babel-load-file ~/.emacs.d/emacs.org)



[O] [PATCH] Org-Velocity incremental display

2011-06-15 Thread Paul M. Rodriguez

This patch makes Org-Velocity display search results incrementally, and
implements a more general approach to completion based on dabbrev. The
documentation has also been rewritten.

Paul Rodriguez.

diff --git a/contrib/lisp/org-velocity.el b/contrib/lisp/org-velocity.el
index b3d4006..4bba504 100644
--- a/contrib/lisp/org-velocity.el
+++ b/contrib/lisp/org-velocity.el
@@ -1,10 +1,10 @@
 ;;; org-velocity.el --- something like Notational Velocity for Org.
 
-;; Copyright (C) 2010 Paul M. Rodriguez
+;; Copyright (C) 2010, 2011 Paul M. Rodriguez
 
 ;; Author: Paul M. Rodriguez paulmrodrig...@gmail.com
 ;; Created: 2010-05-05
-;; Version: 2.3
+;; Version: 2.4
 
 ;; This file is not part of GNU Emacs.
 
@@ -22,87 +22,121 @@
 ;; Suite 330, Boston, MA 02111-1307 USA
 
 ;;; Commentary:
-;; Org-Velocity.el implements an interface for Org inspired by the
-;; minimalist notetaking program Notational Velocity.  The idea is to
-;; allow you to maintain, amass and access brief notes on many
-;; subjects with minimal fuss.
-
-;; It can be used in two ways: to store and access notes from any
-;; buffer a universal bucket file; or as a method for navigating any
-;; Org file.
-
-;; The name of the bucket-file (`org-velocity-bucket') and whether to
-;; always use it (`org-velocity-always-use-bucket-file') are set
-;; through Customize.  If the bucket file is set but not always to be
-;; used, then calling Org-Velocity outside of Org-mode uses the bucket
-;; file; calling it in Org mode uses the current buffer.  If no bucket
-;; file is set then Org-Velocity only works when called from Org.
-;; Even if the bucket file is always to be used, calling
-;; `org-velocity-read' with an argument will use the current file.
-
-;; The interface, unlike its inspiration, is not incremental.
-;; Org-Velocity prompts for search terms in the usual way; if the user
-;; has customized `org-velocity-use-completion', completion is offered
-;; on the headings in the target file.  If the search multiple times
-;; in the target file, a buffer containing a buttonized list of the
-;; headings where it occurs is displayed.  Results beyond what can be
-;; indexed are discarded.  After clicking on a heading, or typing a
-;; character associated with it, the user is taken to the heading.
-;; (Typing 0 forces a new heading to be created.)  If
-;; `org-velocity-edit-indirectly' is so set, the heading and its
-;; subtree are displayed in an indirect buffer.  Otherwise the user is
-;; simply taken to the proper buffer and position.
-
-;; If the user simply hits RET at the prompt, without making a choice,
-;; then the search is restored for editing.  A blank search quits.
-;; This method of selection is obviously not as slick as the original,
-;; but probably more useful for a keyboard-driven interface.
-
-;; If the search does not occur in the file the user is offered a
-;; choice to create a new heading named with the search.  Org-Velocity
-;; will use `org-capture' or `org-remember' if they are loaded,
-;; preferring `org-capture'.  Otherwise the user is simply taken to a
-;; new heading at the end of the file.
+;; Org-Velocity.el is an interface for Org inspired by the minimalist
+;; notetaking program Notational Velocity. The idea is to let you
+;; amass and access brief notes on many subjects with minimal fuss.
+;; Each note is an entry in an ordinary Org file.
+
+;; Org-Velocity can be used in two ways: when called outside Org, to
+;; store and access notes in a designated bucket file; or, when called
+;; inside Org, as a method for navigating any Org file. (Setting the
+;; option `org-velocity-always-use-bucket' disables navigation inside
+;; Org files by default, although you can still force this behavior by
+;; calling `org-velocity-read' with an argument.)
+
+;; Org-Velocity prompts for search terms in the minibuffer. A list of
+;; headings of entries whose text matches your search is updated as
+;; you type; you can end the search and visit an entry at any time by
+;; clicking on its heading.
+
+;; RET displays the results. If there are no matches, Org-Velocity
+;; offers to create a new entry with your search string as its
+;; heading. If there are matches, it displays a list of results where
+;; the heading of each matching entry is hinted with a number or
+;; letter; clicking a result, or typing the matching hint, opens the
+;; entry for editing in an indirect buffer. 0 forces a new entry; RET
+;; reopens the search for editing.
+
+;; You can customize every step in this process, including the search
+;; method, completion for search terms, and templates for creating new
+;; entries; M-x customize-group RET org-velocity RET to see all the
+;; options.
 
 ;; Thanks to Richard Riley, Carsten Dominik, Bastien Guerry, and Jeff
 ;; Horn for their suggestions.
 
 ;;; Usage:
 ;; (require 'org-velocity)
-;; (setq org-velocity-bucket (concat org-directory /bucket.org))
+;; (setq org-velocity-bucket (expand-file-name bucket.org org-directory))
 ;; 

Re: [O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Rainer M Krug
On Wed, Jun 15, 2011 at 7:35 PM, Nick Dokos nicholas.do...@hp.com wrote:

 Eric Schulte schulte.e...@gmail.com wrote:


  I was able to reproduce this query-on-close behavior with the following
  minimal config.
 
  #+begin_src sh
emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval (desktop-save-mode
 1)
  #+end_src
 
  however, I think this prompting behavior is expected, and when I
  switched to the following alternative
 
  #+begin_src sh
emacs -Q -l ~/.emacs.d/src/org/lisp/org.el --eval '(desktop-read
 ~/Desktop/)'
  #+end_src
 
  I received no prompt on exit.  As far as I can tell there is not an
  Org-mode bug here, however I could very well have missed something.
 

  Rainer M Krug r.m.k...@gmail.com writes:
 
   when using the newest version of org-mode (Org-mode version 7.5
   (release_7.5.391.gfacc)), I get the following warning when closing
 emacs,
  
   Current desktop was not loaded from a file. Overwrite this desktop
 file?
  
   although it has loaded the desktop file. When I use 7.5 (and te one
 from I
   guess yesterday), the message did not occur.
  
   I have (desktop-save-mode 1) on my emacs.org.
  


 Maybe this will help?

 ,
 | desktop-save is a variable defined in `desktop.el'.
 | Its value is ask-if-new
 |
 | Documentation:
 | Specifies whether the desktop should be saved when it is killed.
 | A desktop is killed when the user changes desktop or quits Emacs.
 | Possible values are:
 |t -- always save.
 |ask   -- always ask.
 |ask-if-new-- ask if no desktop file exists, otherwise just save.
 |ask-if-exists -- ask if desktop file exists, otherwise don't save.
 |if-exists -- save if desktop file exists, otherwise don't save.
 |nil   -- never save.
 | The desktop is never saved when `desktop-save-mode' is nil.
 | The variables `desktop-dirname' and `desktop-base-file-name'
 | determine where the desktop is saved.
 `


Might be, but my point is, that the behaviour has changed in org-mode - and
that should not be.

Cheers,

Rainer



 Nick




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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

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

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

email:  rai...@krugs.de

Skype:  RMkrug


Re: [O] Status google calendar sync

2011-06-15 Thread Eric S Fraga
Nick Dokos nicholas.do...@hp.com writes:
 Philipp Haselwarter philipp.haselwar...@gmx.de wrote:

Nick  Philipp,

 Unfortunately, both the awk script and the org-export-icalendar seem to
 have quite a hard time with repeating entries.

Yes.  I have extended my awk script to cater for ical events that span
days which does appear to work (to some degree).  See updated version
attached.  This does not handle generic repeated events unfortunately,
but mostly because I'm not sure what the ical format for these might be
(and have been too lazy to look into it).  If you have a good example
(or set of examples) of ical calendar entries that describe repeated
events, I'm happy to work on the awk script further.



ical2org.awk
Description: ical 2 org awk script

[...]

 I agree - I have been thinking (unfortunately mostly only thinking)
 about it and it seems to me that many of the pieces are there, but there
 is a non-trivial amount of work to do this and do it right:

 o icalendar.el should be the basis of this, but unfortunately, it is too
   closely tied to the diary (and is incomplete or buggy in various
 ways).

it would indeed be nice to have an Emacs solution to the google - org
step.

[...]

 o These converters are ripe for what Kernighan and Plauger call a
   left-corner development approach: just bite the smallest useful
   subset and add features as needed, deliberately and carefully. Both
   the current implementation of org-icalendar and Eric F.'s awk script
   would be useful in this respect: they basically cover the basic
   functionality needed (but perhaps not completely, as Philipp points
   out).

In some sense, this is indeed my modus operandum but it's not
necessarily the best approach after a while...

 BTW, the reason I've become interested in this is that recently I
 started being bombarded with meeting invitations generated from (what
 else?) M$ Outlook. My former method of adding the invitations to my
 Org

yes, I am seeing the same thing; I would love to have an automated or
semi-automated procedure to take these things in gnus and create a
capture event.  I look forward to seeing what you have been up to in
this respect!

[...]

 turns-you-to-stone-if-you-look-at-it-ugly) and there are bugs (the most
 serious of which is the icalendar timezone stuff that I referred to in a
 recent thread). I'm trying to fixg the bugs and am working on the
 back-end usability stuff in order to survive the onslaught - but the
 icalendar stuff in the middle is likely to remain unspeakably ugly in
 the foreseeable future - I just have no time for it.

time zones are a nightmare, especially with respect to Google.

 So if anybody is interested, I hope this is useful as a starting
 point.

Very interested and happy to contribute as much as I can!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.391.gfaccb.dirty)


[O] [bug] Problem with insert anniversary agenda function (was Re: org-bbdb-anniversaries gives error 'bad sexp')

2011-06-15 Thread Eric S Fraga
Carsten Dominik carsten.domi...@gmail.com writes:

 On Jun 13, 2011, at 6:15 PM, Philipp Haselwarter wrote:

 thanks, got it working now (with some fiddling).
 
 looks like `calendar-date-style' is not honored /at all/, if you don't
 use -MM-DD format (as stated in the org-bbdb.el header, admittedly),
 it just blows up in your face :)

 While I think the org-bbdb code could be made more forgiving,
 I strongly feel that calendar-date-style is an evil variable,
 especially if it is applied to input.  One should never rely on it.

 my 5c.

 - Carsten

Although I am likely to agree with you on this, any interactions with
Emacs's diary requires working with it.  

This reminds me of a problem with the insert anniversary function in the
default agenda view (i a).  This function ignores the
calendar-date-style and inserts dates in the american style, which of
course means that diary entries are quietly ignored if you have
calendar-date-style set to anything other than 'american...

Not a big deal...  I don't use anniversaries *that* often!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.391.gfaccb.dirty)



Re: [O] No definition for class error in export to latex

2011-06-15 Thread Eric S Fraga
Levy, Roger rl...@ucsd.edu writes:

 Hi,

 I am an org-mode newbie and trying to learn how to export to latex and
 html from the command line, and have encountered a difficulty when I
 include a custom class in the latex header.  Here's a sample file
 (test-file.org) I'm using:

 ***

 #+TITLE: Test
 #+LaTeX_CLASS: apa

 file contents

 ***

 and here is the command I'm using:

 /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \
 --visit=test-file.org \
 --funcall org-export-as-latex-batch

 which gives me the output

 OVERVIEW
 Exporting to LaTeX...
 No definition for class `apa' in `org-export-latex-classes'

 and no .tex file output.  From within Aquamacs, I don't get this error, 
 presumably because I have the following in my .emacs file:

 (add-to-list 'org-export-latex-classes
'(apa
  \\documentclass{apa}
[NO-DEFAULT-PACKAGES]
\\usepackage{graphicx}
\\usepackage{apacite}
  (\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s})
  (\\subsubsection{%s} . \\subsubsection*{%s})
 ))

 How can I make this modification of org-export-latex-classes from the command 
 line?  I have tried putting the above content in a file ($HOME/tmp/add.el) 
 and making the call

 /Applications/Aquamacs.app/Contents/MacOS/Aquamacs -batch \
 --load $HOME/tmp/add.el \
 --visit=test-file.org \
 --funcall org-export-as-latex-batch

 but this gives me the error

   Symbol's value as variable is void: org-export-latex-classes

 I would be very grateful for any suggestions!  This is GNU Emacs
 23.3.1 (Aquamacs 2.2) and Org mode 7.5.

I don't use this version of Emacs (not on a Mac) so cannot guarantee
anything I say will be relevant... but have you tried adding

   (require 'org-latex)

before you set the org-export-latex-classes variable?  I'm assuming that
org mode is actually already loaded by default.

HTH.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.391.gfaccb.dirty)



Re: [O] HTML5 presentations

2011-06-15 Thread Eric Schulte
Eric S Fraga e.fr...@ucl.ac.uk writes:

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

 Tassilo Horn tass...@member.fsf.org writes:

 Vinh Nguyen vinhdi...@gmail.com writes:

 After the recent org-mode to S5 discussion, I stumbled onto
 [these](https://gist.github.com/509761) code.  It offers a way to
 export org files to HTML5 presentations.  I think it looks quite nice.
  I see it being better than S5 in that no ui folder is required.
 What do you all think?  Is it worthy of being incorporated into
 org-mode?

 Just tried it, and it's pretty cool!  Easy to use and nicely looking.


 This is very cool, I just added the link to the non-beamer presentation
 engine page on Worg.

 http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

 Best -- Eric

 What browser(s) are people using for this?  Conkeror doesn't work well
 at all and iceweasel (aka firefox) 3.5.19 sort of works.


I've been using Firefox 4 and everything works well for me, although
I've done more testing of s5 presentations than of html5 presentations.

Best -- Eric

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



Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes:
 It would be possible to also implement the concatenation behavior during
 noweb expansion, however I'd prefer to first wait for a response to my
 recent other email to this thread asking for a more clear explication of
 existing noweb behavior.

 The only remaining times when such concatenation behavior could be
 implemented would be during block reference expansion, and during block
 evaluation, but I think expanding at those times would be unnecessary
 and confusing.

I'm having trouble understanding the difference between what you discuss
in the first paragraph and in the second. What's the difference between
noweb expansion and block reference expansion?

As for actual noweb behavior, I don't really know - will have to play
with it and let you know...






Re: [O] How to filter by tag/todo in agenda view

2011-06-15 Thread Michael Brand
Hi Mark

Yes, there are several filters for the block of type agenda. These are
the notes that I made to remember me of them:
- org-agenda-entry-types
- org-agenda-skip-function
  - match can be implemented with 'regexp/'notregexp
- org-agenda-skip-*
- org-agenda-todo-ignore-scheduled
  see also org-agenda-skip-function 'scheduled/'timestamp
- org-agenda-todo-ignore-deadlines
  see also org-agenda-skip-function 'deadline/'timestamp

Michael

On Wed, Jun 15, 2011 at 20:07, Mark S throa...@yahoo.com wrote:
 Hello!

 I know how to filter inside the TODO list, but I can't seem to find how your
 filter inside of the agenda view. Is there a way?

 Thanks!
 Mark



Re: [O] HTML5 presentations

2011-06-15 Thread Joost Kremers
On Wed, Jun 15, 2011 at 07:19:46PM +0100, Eric S Fraga wrote:
 What browser(s) are people using for this?  Conkeror doesn't work well
 at all and iceweasel (aka firefox) 3.5.19 sort of works.

since it's an html5 presentation, you'll need a browser with html5 support.
i don't think firefox 3.6 has it, you'll need firefox 4. chrome and the latest
internet explorer should also work.


-- 
Joost Kremers
Life has its moments



Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Achim Gratz
Eric Schulte schulte.e...@gmail.com writes:
 Does anyone on this list know the noweb system well enough to specify
 its behavior in this regard, and to describe what functional changes
 would be required to bring Babel into line with noweb behavior?

Far from knowing it well, but the basics are, well basic:

Documentation text is started via '@', code chunks are defined via
'chunk_name=' and a given chunk can be extended by 'chunk_name='
with the same name again, which allows to intermingle documentation and
definition in a linear fashion.  Code chunk references are just
'chunk_name' without the equal sign and can be used non-linearly.
For comparison with Babel the noweb Hackers Guide is probably a good
source since it describes the pipeline representation which is used by
the tools (and should maybe be emulated by the Babel backend).

http://www.cs.tufts.edu/~nr/noweb/guide.html

Notably, noweb assumes a tree (or forest) of code chunks of which the
root nodes are to be tangled.

Babel probably needs to take care of another two layers of complexity
since it goes at least one step further than LP: after the equivalent of
tangling all root chunks (producing the runnable programs) it needs to
produce and integrate back into the documentation their results by
running them and optionally keeping track of session information if they
are not independent.

That still assumes that the final documentation can be arrived at after
running all programs and collecting their results, but the real fun
starts when one of those programs produces another program that also
needs to be run.  :-)


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

Waldorf MIDI Implementation  additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs




Re: [O] HTML5 presentations

2011-06-15 Thread Juan Pechiar
On Wed, Jun 15, 2011 at 07:19:46PM +0100, Eric S Fraga wrote:
 What browser(s) are people using for this?  Conkeror doesn't work well
 at all and iceweasel (aka firefox) 3.5.19 sort of works.

Hi,

Opera 11 (OSX) seems to work OK, only that slides start to appear
shifted the higher the slide number shown. (~5% left for each slide).

.j.





Re: [O] BUG: Newest org-mode interferes with desktop save

2011-06-15 Thread Nick Dokos
Rainer M Krug r.m.k...@gmail.com wrote:


 I created the attached init.el file. In my setup, ~/.emacs.d/org-mode
 is a symbolic link. If I set it to org-7.7, everything works as
 expected desktop is loaded and saved without question), but when
 linking it to the git version, the desktop is loaded, but when closing
 it giveas me the above mentioned question:
 
 Current desktop was not loaded from a file. Overwrite this desktop file?
 
 As I said, the desktop *is* loaded.
 
 Hope you can reproduce it with this setup,
 

Here's a caution: when desktop.el is loaded, it adds to after-init-hook a
function that reads the desktop file. However, after-init-hook gets called
at the end of initialization: if you try to reproduce using something like

emacs -q -l init.el

it's not going to work - after-init-hook gets runs between the -q and -l
so to speak, whereas desktop.el does not get loaded until init.el is loaded:
that initializes the hook too late to do any good.

Probably the best way to do it is to create a dummy user foo, copy init.el
to /home/foo/.emacs and then invoke emacs as

   emacs -u foo

Using this method, I cannot reproduce the problem with or without org in
the init file: here's the one that I used which also sets a couple of
desktop hooks that make some noise which is recorded in the *Messages*
buffer - that helps to verify that things work according to
expectations:

--8---cut here---start-8---
;;; -*- mode: emacs-lisp -*-
(setq debug-on-error t)
(require 'desktop)
(desktop-save-mode 1)
(add-to-list 'desktop-after-read-hook (function (lambda () (message got a 
desktop file
(add-to-list 'desktop-no-desktop-file-hook (function (lambda () (message no 
desktop file read

;;; I tried with and without the following five lines
;;; I also tried with them placed *before* the desktop stuff
(add-to-list 'load-path (expand-file-name ~nick/src/emacs/org/org-mode/lisp))
(add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode))
(require 'org-install)
(global-set-key \C-cl 'org-store-link)
(global-set-key \C-ca 'org-agenda)
--8---cut here---end---8---

Nick





Re: [O] Screencast of Search Features in org-mode?

2011-06-15 Thread Nathan Neff
On Wed, May 18, 2011 at 1:48 PM, Nathan Neff nathan.n...@gmail.com wrote:
 I seem to recall seeing an excellent screencast of using the
 built-in search features of org-mode.

 Can anyone point me to it?

 I've looked on Work, under screencasts and am missing it.

 I found the advanced search tutorial on Worg, but I thought there
 was a screencast that went along with it, or had similar content.

I'd like to bump this question -- I remember seeing a good screencast
about searching in org-mode, but can't find it.

Thanks,
--Nate

 Thanks,
 --Nate




Re: [O] Query for tags, and bring results into headline?

2011-06-15 Thread Nathan Neff
On Wed, May 18, 2011 at 12:37 PM, Matt Lundin m...@imapmail.org wrote:
 Nathan Neff nathan.n...@gmail.com writes:

 Thanks Matt!

 If it's not too much trouble for you, may I ask how I would filter
 out DONE, etc questions?


 Sure, no problem at all!

 #+begin: insert-links :match questions/-DONE

 Or, if you want to filter out all inactive todos:

 #+begin: insert-links :match questions/!

This is cool.

Thanks!

--Nate


 Best,
 Matt

 On Mon, May 16, 2011 at 12:08 PM, Matt Lundin m...@imapmail.org wrote:
 Matt Lundin m...@imapmail.org writes:

 You could then create a dblock by typing C-c C-c on the following

 #+begin: insert-links :match questions
 #+end:

 Correction: this should be:

 --8---cut here---start-8---
 #+begin: insert-links :match questions
 #+end:
 --8---cut here---end---8---

 Best,
 Matt





[O] git server issue, repo.or.cz and orgmode.org

2011-06-15 Thread Erik Iverson

Hello,

I pull git daily both at home and work.  I noticed a bunch of updates this 
morning at work, as expected. But at home,  I keep getting:


$ git pull
Already up-to-date.

$ git log -1
commit 90f6765cdf77c1414726d899f00c77da43f45758
Author: Eric Schulte schulte.e...@gmail.com
Date:   Mon Jun 13 14:58:56 2011 -0700

ob-tangle: no longer inserting newlines between appended code blocks

* lisp/ob-tangle.el (org-babel-tangle-combine-named-blocks): No longer
  inserting newlines between appended code blocks.

I know I pulled newer updates at work, so I was confused.  Then I looked where I 
was pulling from at home, I set this up quite a while ago. From my .git/config 
file:


[remote origin]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://repo.or.cz/org-mode.git

Now, the orgmode.org site I notice tells you to clone:

git clone git://orgmode.org/org-mode.git

So that must be the problem! I don't know if these two are supposed to remain in 
sync or not, but if so, something isn't working as of Monday.  Perhaps I missed 
an announcement, but I do remember orgmode.org was down on Monday evening, so 
perhaps that plays into it, or perhaps it is just a coincidence.  At any rate, I 
think I'll just clone the orgmode.org repo, as the org site tells me to.  Just 
thought other long time git pullers might want to know about this.


--Erik

p.s., of course, I'm willing to admit that I may have done something silly to 
cause this, I hope not!




Re: [O] git server issue, repo.or.cz and orgmode.org

2011-06-15 Thread suvayu ali
On Wed, Jun 15, 2011 at 7:14 PM, Erik Iverson er...@ccbr.umn.edu wrote:
 Perhaps I missed an announcement,

AFAIK, the repository at repo.or.cz serves as a mirror to the
orgmode.org repository and it might be a little behind.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Neeum Zawan
Eric Schulte schulte.e...@gmail.com writes:

 Rather than feeling our way forward step by step it seems that simply
 following the behavior of noweb would both
 1. allow for easy transition between noweb and babel
 2. benefit from the years of experience and design accumulated in the
noweb project

 Does anyone on this list know the noweb system well enough to specify
 its behavior in this regard, and to describe what functional changes
 would be required to bring Babel into line with noweb behavior?

Looking at the basic functionality:

...= starts a code block. Further uses of it will just append. No
delimiter for end (it ends when you start another code/doc block). 

It can be referenced using ... (without the = symbol). The location
of the reference is not relevant. 

So by default, no overwriting or ordering. 

However, noweb is extensible, and Achim linked to the syntax one can use
to extend it. I haven't read those details. 

Hope that helps.




Re: [O] git server issue, repo.or.cz and orgmode.org

2011-06-15 Thread Bernt Hansen
Erik Iverson er...@ccbr.umn.edu writes:

 [remote origin]
   fetch = +refs/heads/*:refs/remotes/origin/*
   url = git://repo.or.cz/org-mode.git

 Now, the orgmode.org site I notice tells you to clone:

 git clone git://orgmode.org/org-mode.git

 So that must be the problem! I don't know if these two are supposed to
 remain in sync or not, but if so, something isn't working as of
 Monday.  Perhaps I missed an announcement, but I do remember
 orgmode.org was down on Monday evening, so perhaps that plays into it,
 or perhaps it is just a coincidence.  At any rate, I think I'll just
 clone the orgmode.org repo, as the org site tells me to.  Just thought
 other long time git pullers might want to know about this.

There's no need to reclone - just change the source address in your
.gitconfig so it points at the orgmode.org source.  All of the SHA1s are
identical and you can just fetch and pull normally once you switch
repositories.

-- 
Bernt



Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes:

 Eric Schulte schulte.e...@gmail.com writes:
 Does anyone on this list know the noweb system well enough to specify
 its behavior in this regard, and to describe what functional changes
 would be required to bring Babel into line with noweb behavior?

 Far from knowing it well, but the basics are, well basic:

 Documentation text is started via '@', code chunks are defined via
 'chunk_name=' and a given chunk can be extended by 'chunk_name='
 with the same name again, which allows to intermingle documentation and
 definition in a linear fashion.  Code chunk references are just
 'chunk_name' without the equal sign and can be used non-linearly.
 For comparison with Babel the noweb Hackers Guide is probably a good
 source since it describes the pipeline representation which is used by
 the tools (and should maybe be emulated by the Babel backend).

 http://www.cs.tufts.edu/~nr/noweb/guide.html


Hi Achim,

Thanks for sending along this reference.  That combined with the related
Literate Programming Simplified [1] serve as a very interesting
introduction to Noweb.  I have not studied noweb previously and I am
impressed by the simplicity of the pipelined filter-based design.

Noweb and Babel are certainly very different beasts.  Noweb achieves
sparse simplicity allowing use with a variety of tools while Babel lives
inside the very rich environment of Org-mode documents.  Noweb enables
literate programming LP while babel is a reproducible research tool
which also provides support for LP.

It seems that lifting a solution whole-piece from noweb will not make
sense, as noweb does not have a need for unique code block names in the
same way as babel.

How about the following solution, which is based on a new :noweb-ref
header argument.

When expanding ``noweb'' style references the bodies of all code block
with /either/ a block name matching the reference name /or/ a :noweb-ref
header argument matching the reference name will be concatenated
together to form the replacement text.

By setting this header argument at the sub-tree or file level, simple
code block concatenation may be achieved.  For example, when tangling
the following Org-mode file, the bodies of code blocks will be
concatenated into the resulting pure code file.

#+begin_src sh :tangle yes :noweb yes :shebang #!/bin/sh
  fullest-disk
#+end_src

* the mount point of the fullest disk
  :PROPERTIES:
  :noweb-ref: fullest-disk
  :END:

** query all mounted disks
#+begin_src sh
  df \
#+end_src

** strip the header row
#+begin_src sh
  |sed '1d' \
#+end_src

** sort by the percent full
#+begin_src sh
  |awk '{print $5   $6}'|sort -n |tail -1 \
#+end_src

** extract the mount point
#+begin_src sh
  |awk '{print $2}'
#+end_src

This should provide feature-parity with noweb, and satisfy most LP needs.

Best -- Eric

Footnotes: 
[1]  www.cs.tufts.edu/~nr/pubs/lpsimp.pdf

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


Re: [O] Literate Programming - Continue a Source Block?

2011-06-15 Thread Eric Schulte
Neeum Zawan mailingli...@nawaz.org writes:

 Eric Schulte schulte.e...@gmail.com writes:
 It would be possible to also implement the concatenation behavior during
 noweb expansion, however I'd prefer to first wait for a response to my
 recent other email to this thread asking for a more clear explication of
 existing noweb behavior.

 The only remaining times when such concatenation behavior could be
 implemented would be during block reference expansion, and during block
 evaluation, but I think expanding at those times would be unnecessary
 and confusing.

 I'm having trouble understanding the difference between what you discuss
 in the first paragraph and in the second. What's the difference between
 noweb expansion and block reference expansion?


By block reference I meant when variables are assigned to the values of
blocks through reference.  So in the following example the number
block has its body returned through reference expansion.

#+source: number
#+begin_src emacs-lisp
  4
#+end_src

#+begin_src emacs-lisp :var num=number
  (* num 2)
#+end_src

Best -- Eric

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