Re: [O] would take more than an org-mode strip-down.

2011-09-30 Thread Carsten Dominik
Dear James,

thanks a lot for your thoughts on Org-mode.  I admit that I had to
read them several times to fully understand what you are saying.
While you anchor your argument on the documenation (be it overabundant
or not the right one), I think you are making a number of much deeper
points.  I'll try to write a few thoughts back, and maybe we can get a
good discussion going.


1. Startup difficulties for non-EMacs users
   
   One of the fundamental aspect you discuss is the difficulty to
   enter the Org-mode world as a general computer user, possibly not
   familiar Emacs.

   Today's world expects programs to be self-explanatory, if possible
   without any documentation reading at all (no, I am not saying that
   this is what *you personally* expect, I mean in general).  In the
   world of iOS, it is standard that one can download an application
   and at least get started with it by playfully launching it.
   Manuals and Documentation are generally disliked.  This also has to
   with the fleeing nature of peoples use of programs.  It is common
   to spend more time looking for a tool or program than the time one
   uses it before discarding or at least ignoring it.  I have many
   apps on my iPod Touch which I have downloaded, used once for a very
   short time, and then not ever again.  So if there is a 70% chance
   that I will ditch the program after a week, the cost of reading
   documentation is extremely high. 

   Mind you, I do think that this is (today) a legitimate expectation.
   However, a user with this kind of expectation would be very
   difficult to make feel at home in Org-mode.  The main startup
   problem is already that is runs in Emacs, and a good new version of
   Emacs is not frequently part of a computer system for normal
   people.  Org-mode really lives in Emacs. If flourishes on so many
   ideas that are deeply ingrained in Emacs.  So much of Org-mode use
   is quite obvious when you already use and love Emacs.  The tags
   issue you mention is a great example.  Emacs solves these things
   using completion (see also Eric Fraga's post in this thread).  An
   Emacs user automatically tries to type a keyword like this by
   typing a few letters and then hitting M-TAB in order to do
   completion.  This is something the spine does for an Emacs user, no
   brain required.

   Obviously this will be very hard for a person that comes with a
   different expectation to this program.  And yes, this could be
   helped with putting more GUI-like elements into Org files.  For
   example, we could make tags look like buttons and let the user
   click on them in order to change this.  But, I and many Emacs users
   would see this as a distraction, a detour.  We even do have this
   feature, but it is not turned on by default.

   I think that the real issue here is that Org-mode was not
   (originally) intended for normal people.  It is a geeks program,
   and we take our pride from making vi users (vi is another
   programmers editor) jealous enough so that they will create a clone
   of the program.  We have not even begun to cater for another
   audience, and this is the thing you, James, are running up against.
   The website we have is not aimed at the general audience.  The fact
   that people like you even know about the program and consider using
   it speaks for the success Org-mode has been.

   If we, as the Org-mode community, would like to draw in a new class
   of people, the website would have to be changed.  We'd need a basic
   page, with only a link to the geek stuff.  And the installation
   instruction should be:

   a) Download and install Emacs
   b) Create a file with extension .org and edit it in Emacs.

   i.e. no links to how to install the latest version etc etc.  Russel
   Adam has pointed (earlier in this thread) to his intro video for
   Windows users, this has the right spirit, but still assumes users
   might want to update Org-mode.  You might have gotten off to a
   better start with such an entry page - but that does not mean you'd
   like to program because it would not work intuitively at first
   sight.

2. Outline as the basic paradigm

   Another issue you address is that for you it is not true that all
   ideas begin to take form through an Outline.  Because Outlines
   still have a linear structure.  I can totally see where you are
   coming from.  However, what is the alternative?  Mindmaps?  Or just
   a piece of paper?  

   The reason why, for me, outlines are the best approach is because
   there are so easily restructured.  The outline structure inherently
   cuts the information into many small pieces, and Org-mode excels in
   pushing these pieces around (we call this Structure Editing and
   Refiling).  This allows me to start just with a brain dump, and
   the to organize so that things make sense.  This may not work for
   the creative process of an artist, but for starting and organizing
   a project, I think it works amazingly 

Re: [O] Printing in indent mode

2011-09-30 Thread Jarmo Hurri
Jambunathan K kjambunat...@gmail.com writes:

 Is there a way to print the document tree in indent mode so that the
 hidden stars would not show up in the printed version?

 Don't you think exporting the buffer to say pdf is a better option
 than printing the buffer directly?

That would be very nice, but I do not know how to do this for a
hierarchical list so that the result would look like a list. I tried
org-export-as-pdf, but it gives me an output that is far from a list:
the result is a complete document, with a table of contents, section
numbering and each item in the list either as a section or a subsection.

--

Jarmo Hurri




Re: [O] FR: Output to online comments

2011-09-30 Thread Samuel Wales
On 2011-09-29, Samuel Wales samolog...@gmail.com wrote:
 I wonder if there could be an ASCII export option for unfilling filled
 paragraphs.  It would have to be as a separate backend.  For email,
 filled paragraphs (i.e. hard newlines) are often better.

s/separate backend/toggle in the export dispatcher/



Re: [O] small docstring typo in org-clone-subtree-with-time-shift

2011-09-30 Thread Brian van den Broek
On 29 Sep 2011 23:17, Achim Gratz strom...@nexgo.de wrote:

 Brian van den Broek brian.van.den.br...@gmail.com writes:
  I suspect that the optimal way is to generate a patch against the
  documentation. If that's right and someone would point me to what I'd
  need to read to learn how to do so (I've never produced a patch
  before), I'd be happy to learn and do it that way henceforward.

 Make your own clone of the Git repository.  Check out the master branch

snip patient and thorough seeming explanation

 Check How to contribute to Orgmode on the website.


 HTH,
 Achim.

Hi Achim,

Thanks for that, especially in a context where an RTFM would not have been
unwarranted.

As it happens, I've set aside some time for a pass through the manual in the
next while (for me, this is a semi-annual affair) and I pledge to repay your
kindness in providing these step by step instructions by making active use
of them!

Thanks again,

Brian vdB


Re: [O] Printing in indent mode

2011-09-30 Thread Jambunathan K
Jarmo Hurri jarmo.hu...@syk.fi writes:

 Jambunathan K kjambunat...@gmail.com writes:

 Is there a way to print the document tree in indent mode so that the
 hidden stars would not show up in the printed version?

 Don't you think exporting the buffer to say pdf is a better option
 than printing the buffer directly?

 That would be very nice, but I do not know how to do this for a
 hierarchical list so that the result would look like a list. I tried
 org-export-as-pdf, but it gives me an output that is far from a list:
 the result is a complete document, with a table of contents, section
 numbering and each item in the list either as a section or a subsection.

Please post an example org file and the hierarchical list that you want
to export. Also post a png image or a screenshot of what the output
should look like. 

I strongly believe there is a way to do what you want without resorting
to postscript printing.

Have you tried exporting to ASCII - C-c C-e a - and print that buffer
instead?

 --

 Jarmo Hurri




-- 



Re: [O] would take more than an org-mode strip-down.

2011-09-30 Thread Jambunathan K

This is a quote from Richard Stallman's speech  article.

, From http://www.gnu.org/gnu/rms-lisp.html
| Multics Emacs proved to be a great success — programming new editing
| commands was so convenient that even the secretaries in his office
| started learning how to use it. They used a manual someone had written
| which showed how to extend Emacs, but didn't say it was a
| programming. So the secretaries, who believed they couldn't do
| programming, weren't scared off. They read the manual, discovered they
| could do useful things and they learned to program.
`

Secretaries were able to embrace Emacs only because they didn't fear it
in the first place. May be they were a bit curious as well.

Remember, the secrataries referred to in this article are secretaries
who ran in to Geekiest of Geeks day in and day out in the years when
computers were even unheard of by the common masses.

Only words I can say to James Levine is this:

1. Have no fear. Be curious. Emacs is easy to learn and use.
2. Have no fear. Be curious. Orgmode is  easy to learn and use.

Both Emacs and Orgmode will make you *MORE* thoughtful. I wouldn't
hesitate to add this thoughtful men make the world a better place for
themselves and others.

That said, I would say discard Orgmode. Use pen and paper. Use notice
boards - much like the modern whiteboards or the ancient blackboards -
to exchange notes with your workers. 

Go with what works for you. 

Jambunathan K.






[O] Time range end in agenda view not displayed

2011-09-30 Thread michael holzer
Hi everyone,

I'm having a problem with the agenda view, hopefully someone can tell me
what I'm doing wrong:

When I have an entry that contains a time range, for example:

* timerange
  2011-09-30 Fri 14:00--2011-09-30 Fri 18:00

this shows up in the agenda view as:

  uni:14:00.. timerange

while I would expect something like:

  uni:14:00-18:00 timerange

as the manual says
(http://orgmode.org/org.html#Time_002dof_002dday-specifications).

Thanks for any help,
michael



Re: [O] Printing in indent mode

2011-09-30 Thread Giovanni Ridolfi
Jarmo Hurri jarmo.hu...@syk.fi writes:

Hi, Jarmo ,

 Jambunathan K kjambunat...@gmail.com writes:

 Is there a way to print the document tree in indent mode so that the
 hidden stars would not show up in the printed version?

 Don't you think exporting the buffer to say pdf is a better option
 than printing the buffer directly?

 That would be very nice, but I do not know how to do this for a
 hierarchical list so that the result would look like a list. I tried
 org-export-as-pdf, but it gives me an output that is far from a list:
 the result is a complete document, with a table of contents, section
 numbering and each item in the list either as a section or a
 subsection.

For a subtree:
* A list
:PROPERTIES:
:EXPORT_TITLE: 
:EXPORT_OPTIONS:  H:0 num:nil toc:nil \n:t @:t ::t |:t ^:t f:nil *:t tags:nil 
TeX:t LaTeX:nil skip:t p:nil  author:nil  email:nil  creator:nil timestamp:nil
:END:
** title of list
*** item 1
 item 1.2
* item 1.3
** item 1.4
*** item 2

C-c @  C-c C-e b [for html]

If you want to export the whole document, please configure the 
#+OPTIONS:  
line accordingly.

hth
Giovanni



Re: [O] Time range end in agenda view not displayed

2011-09-30 Thread Daniel Bausch
Hi Michael,

it's much easier to achieve, what you want.  Just write
2011-09-30 Fri 14:00-18:00
(at least as long as the times refer to the same day)

Daniel

Am Freitag 30 September 2011, 12:00:56 schrieb michael holzer:
 Hi everyone,
 
 I'm having a problem with the agenda view, hopefully someone can tell me
 what I'm doing wrong:
 
 When I have an entry that contains a time range, for example:
 
 * timerange
   2011-09-30 Fri 14:00--2011-09-30 Fri 18:00
 
 this shows up in the agenda view as:
 
   uni:14:00.. timerange
 
 while I would expect something like:
 
   uni:14:00-18:00 timerange
 
 as the manual says
 (http://orgmode.org/org.html#Time_002dof_002dday-specifications).
 
 Thanks for any help,
 michael




Re: [O] Time range end in agenda view not displayed

2011-09-30 Thread Memnon Anon
michael holzer michi_holzer_n...@gmx.at writes:

 When I have an entry that contains a time range, for example:

 * timerange
   2011-09-30 Fri 14:00--2011-09-30 Fri 18:00

 this shows up in the agenda view as:

   uni:14:00.. timerange

 while I would expect something like:

   uni:14:00-18:00 timerange

* STRT Reply Holzer
  2011-09-30 Fri 12:30-12:35

hth
Memnon




[O] [BUG] Re: Time range end in agenda view not displayed

2011-09-30 Thread Giovanni Ridolfi
michael holzer michi_holzer_n...@gmx.at writes:

 When I have an entry that contains a time range, for example:

 * timerange
   2011-09-30 Fri 14:00--2011-09-30 Fri 18:00

 this shows up in the agenda view as:

   uni:14:00.. timerange

 while I would expect something like:

   uni:14:00-18:00 timerange


|the manual says:
|Time ranges can be specified with two timestamps, 
|like ‘2005-05-10 Tue 20:30--2005-05-10 Tue 22:15’.
|
| 20:30-22:15 Marvin escorts the Hitchhikers to the bridge

I confirm this bug.

Org-mode version 7.7 0e9d401519c020af29a7e35da7acfca25e6c3be4
GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO

Giovanni




Re: [O] Time range end in agenda view not displayed

2011-09-30 Thread michael holzer
Thanks to everyone for the fast answers :)



[O] How to debug Specified time is not representable

2011-09-30 Thread Karl Voit
Hi!

When I get «Specified time is not representable» while creating the
Agenda view, I want to get more information *where* the problem is.

I found [1] and following and so I got it that there is no way of
managing timestamps before 1970 :-(

Is there a way to get to the problematic time stamp?

  1. http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00729.html
-- 
Karl Voit




Re: [O] [BUG] Re: Time range end in agenda view not displayed

2011-09-30 Thread Niels Giesen
Giovanni Ridolfi giovanni.rido...@yahoo.it writes:

 michael holzer michi_holzer_n...@gmx.at writes:

 When I have an entry that contains a time range, for example:

 * timerange
   2011-09-30 Fri 14:00--2011-09-30 Fri 18:00

 this shows up in the agenda view as:

   uni:14:00.. timerange

 while I would expect something like:

   uni:14:00-18:00 timerange


 |the manual says:
 |Time ranges can be specified with two timestamps, 
 |like ‘2005-05-10 Tue 20:30--2005-05-10 Tue 22:15’.
 |
 | 20:30-22:15 Marvin escorts the Hitchhikers to the bridge

 I confirm this bug.

 Org-mode version 7.7 0e9d401519c020af29a7e35da7acfca25e6c3be4
 GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO

 Giovanni



Funny enough, I noticed this too last week, so I whipped up this patch.
It inserts the range when start date is the same as the end date. Please
test (it's still young)  include in Org if you so please.
  
#+begin_src diff
From dcf81753aa5cab311f2a3a0272e4691e4bc6ea38 Mon Sep 17 00:00:00 2001
From: Niels Giesen niels.gie...@gmail.com
Date: Mon, 26 Sep 2011 11:43:55 +0200
Subject: [PATCH] Show timestamp ranges in agenda

* lisp/org-agenda.el (org-agenda-get-blocks): Show timestamp ranges in
  agenda if start day is same as end day
---
 lisp/org-agenda.el |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index b1fa5f5..e8effd5 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5396,7 +5396,9 @@ FRACTION is what fraction of the head-warning time has 
passed.
 org-agenda-timerange-leaders)
(1+ (- d0 d1)) (1+ (- d2 d1)))
   head category tags
-  (cond ((= d1 d0)
+  (cond ((and (= d1 d0) (= d2 d0))
+ (concat  start-time -- end-time 
))
+ ((= d1 d0)
  (concat  start-time ))
 ((= d2 d0)
  (concat  end-time ))
-- 
1.7.4.1
#+end_src

Regards, Niels.
-- 
http://pft.github.com/



Re: [O] How to debug Specified time is not representable

2011-09-30 Thread Jambunathan K
Karl Voit devn...@karl-voit.at writes:

 Hi!

 When I get «Specified time is not representable» while creating the
 Agenda view, I want to get more information *where* the problem is.

 I found [1] and following and so I got it that there is no way of
 managing timestamps before 1970 :-(

 Is there a way to get to the problematic time stamp?

   1. http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00729.html

Hope you have looked at C-h v org-read-date-force-compatible-dates 

A simple M-x grep-find on .org files for the year should work.

You may also try

M-x debug-on-entry RET ding RET

Look at the backtrace and see whether you can get some clues.

Works best if your orgmode is not compiled

-- 



Re: [O] How to debug Specified time is not representable

2011-09-30 Thread Nick Dokos
Karl Voit devn...@karl-voit.at wrote:

 Hi!
 
 When I get «Specified time is not representable» while creating the
 Agenda view, I want to get more information *where* the problem is.
 
 I found [1] and following and so I got it that there is no way of
 managing timestamps before 1970 :-(
 

Not quite true: Carsten introduced org-read-date-force-compatible-dates
which allows the user to take full responsibility for shooting
{him,her}self in the foot :-)

See 

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

You can try setting it to nil and see if your system dtrt, but you
should read the caveats in the doc string of the variable.

Nick

 Is there a way to get to the problematic time stamp?
 
   1. http://lists.gnu.org/archive/html/emacs-orgmode/2011-05/msg00729.html
 -- 
 Karl Voit
 
 



Re: [O] [BUG] Re: Time range end in agenda view not displayed

2011-09-30 Thread Michael Brand
Hi Niels

On Fri, Sep 30, 2011 at 16:41, Niels Giesen niels.gie...@gmail.com wrote:
 [...] I whipped up this patch. [...] Please test (it's still young) [...]

This is a nice water proofing as I like it. The patch passes my tests.

(The patch can be found here:)
http://patchwork.newartisans.com/patch/970

Michael



[O] Kill org files on agenda exit

2011-09-30 Thread Gene Cooley
Whenever I exit my agenda views, there are still all org agenda files open. Is 
there any possibility to kill those buffers on agenda exit?




Re: [O] Kill org files on agenda exit

2011-09-30 Thread Michael Brand
Hi Gene

On Fri, Sep 30, 2011 at 18:49, Gene Cooley genecoole...@yahoo.de wrote:
 Whenever I exit my agenda views, there are still all org agenda files open. 
 Is there any possibility to kill those buffers on agenda exit?

It seems you have used q to exit. This variant leaves the agenda
buffers open. To close them use the variant x.

Michael



[O] TABLES: Remove/add cell

2011-09-30 Thread Gustav Wikström
Hello!

How do I add or remove a single cell in a table?

Example:
I have the following table:
|1 |1 |
|2 |3 |
|3 |4 |
|4 |  |

Now I want to add an empty cell in @2$2 (below the heading) and thus move
the following cells in column 2 down one step.

After:
|1 |1 |
|2 |  |
|3 |3 |
|4 |4 |

Is this doable?

Regards
Gustav


Re: [O] TABLES: Remove/add cell

2011-09-30 Thread Michael Brand
Hi Gustav

Ehm - it is doable, but not by editing commands from Org table. Only
with several rectangular edits or an Org table formula with a few
tricks and a temporary column to be removed afterward. Probably not as
comfortable as you have expected:

- insert row in only one column
  start with:
  | a | 1 |   |
  | b | 3 |   |
  | c | 4 |   |
  | d |   |   |

  | a | 1 | 1 |
  | b | 3 |   |
  | c | 4 | 3 |
  | d |   | 4 |
  #+TBLFM: @1$3=$-1::@3$3..@$3=subscr(@2$2..@$2, @# - 2)

- remove again
  start with:
  | a | 1 |   |
  | b |   |   |
  | c | 3 |   |
  | d | 4 |   |

  | a | 1 | 1 |
  | b |   | 3 |
  | c | 3 | 4 |
  | d | 4 |   |
  #+TBLFM: @1$3=$-1::@2$3..@$3=subscr(@3$2..@$2, @# - 1)

See the Calc manual for subscr and the Org manual for @# and the rest.

If it does not work (e. g. org-version 6.33) then upgrade.

Michael

2011/9/30 Gustav Wikström gustav.e...@gmail.com:
 How do I add or remove a single cell in a table?
 Example:
 I have the following table:
 |        1 |        1 |
 |        2 |        3 |
 |        3 |        4 |
 |        4 |          |
 Now I want to add an empty cell in @2$2 (below the heading) and thus move
 the following cells in column 2 down one step.
 After:
 |        1 |        1 |
 |        2 |          |
 |        3 |        3 |
 |        4 |        4 |
 Is this doable?



Re: [O] TABLES: Remove/add cell

2011-09-30 Thread brian powell
* May want to turn org-mode/table off temporarily (or maybe it will
just make it easier) then you can do the rectangle edits michael was
referring to:
** Go to the point just to the right of the 4.
** C@ ---marks the point.
** Go to the 3.
** Cxrk
** Go to @2$2--i.e. where the 4 used to be.
** Cxry
* Emacs OrgMode makes all of this easier since it lines everything up
for you by covering down the columns (org-table-align)---making all
the cells easily edited by the usual rectangle-killing and
rectangle-yanking methods.
** The method above can be generalized for editing OrgMode tables
regardless of the number of symbols in the cells--since OrgMode aligns
them for you; and, EMACS is restricted only by the amount of RAM in
your computer.
*** Also, if you want to edit gygabyte size files, using similar
methods, I highly recommend QEMACS.



Re: [O] TABLES: Remove/add cell

2011-09-30 Thread Michael Brand
Oh, and there is a much easier solution, probably the easiest:

Transpose the table with this
http://orgmode.org/worg/org-hacks.html#sec-1-3-1
If the section numbering changed in the meantime: look for Transpose
tables (Juan Pechiar)

and split it into two (or three) tables:

| a | b | c | d |

| 1 | 3 | 4 |   |

(| e | f | g | h |)

Then you can use the very convenient editing functions of Org table on
the second part of the table, join the parts together and transpose
again.

Michael

2011/9/30 Michael Brand michael.ch.br...@gmail.com:
 Ehm - it is doable, but not by editing commands from Org table. Only
 with several rectangular edits or an Org table formula with a few
 tricks and a temporary column to be removed afterward. Probably not as
 comfortable as you have expected:

 - insert row in only one column
  start with:
  | a | 1 |   |
  | b | 3 |   |
  | c | 4 |   |
  | d |   |   |

  | a | 1 | 1 |
  | b | 3 |   |
  | c | 4 | 3 |
  | d |   | 4 |
  #+TBLFM: @1$3=$-1::@3$3..@$3=subscr(@2$2..@$2, @# - 2)

 - remove again
  start with:
  | a | 1 |   |
  | b |   |   |
  | c | 3 |   |
  | d | 4 |   |

  | a | 1 | 1 |
  | b |   | 3 |
  | c | 3 | 4 |
  | d | 4 |   |
  #+TBLFM: @1$3=$-1::@2$3..@$3=subscr(@3$2..@$2, @# - 1)

 See the Calc manual for subscr and the Org manual for @# and the rest.

 If it does not work (e. g. org-version 6.33) then upgrade.



Re: [O] TABLES: Remove/add cell

2011-09-30 Thread Gustav Wikström
This is similar to the way I've done it before. It makes it cumbersome if
there are many lines below the cell that is to be inserted though..

It would be nice to have as a function that inserts or deletes a cell in the
same way as one can insert and delete rows and columns. Maybe as a prefix
to M-S-left/right and M-S-up/down ?

/Gustav

On Fri, Sep 30, 2011 at 8:50 PM, brian powell briangpowel...@gmail.comwrote:

 * May want to turn org-mode/table off temporarily (or maybe it will
 just make it easier) then you can do the rectangle edits michael was
 referring to:
 ** Go to the point just to the right of the 4.
 ** C@ ---marks the point.
 ** Go to the 3.
 ** Cxrk
 ** Go to @2$2--i.e. where the 4 used to be.
 ** Cxry
 * Emacs OrgMode makes all of this easier since it lines everything up
 for you by covering down the columns (org-table-align)---making all
 the cells easily edited by the usual rectangle-killing and
 rectangle-yanking methods.
 ** The method above can be generalized for editing OrgMode tables
 regardless of the number of symbols in the cells--since OrgMode aligns
 them for you; and, EMACS is restricted only by the amount of RAM in
 your computer.
 *** Also, if you want to edit gygabyte size files, using similar
 methods, I highly recommend QEMACS.



[O] Time range end in agenda view not displayed

2011-09-30 Thread michael holzer
Hi everyone,

I'm having a problem with the agenda view, hopefully someone can tell me
what I'm doing wrong:

When I have an entry that contains a time range, for example:

* timerange
  2011-09-30 Fri 14:00--2011-09-30 Fri 18:00

this shows up in the agenda view as:

  uni:14:00.. timerange

while I would expect something like:

  uni:14:00-18:00 timerange

as the manual says
(http://orgmode.org/org.html#Time_002dof_002dday-specifications).

Thanks for any help,
michael




[O] looking for examples using babel/calc

2011-09-30 Thread orgm...@h-rd.org

Hi,

is there some documentation and are there some examples of using babel  
with calc?  I have no luck in getting it to work.


thanks.






[O] [PATCH][babel] add a string input to ob-octave

2011-09-30 Thread Litvinov Sergey
Please consider a tiny patch to add a string input variable to
ob-octave. I also add tests for ob-octave.
From 4848960cefc1b1486705f7aed022ba199189b6e1 Mon Sep 17 00:00:00 2001
From: Litvinov Sergey slitvi...@gmail.com
Date: Sat, 1 Oct 2011 02:04:49 +0200
Subject: [PATCH] Add string input variables to ob-octave.el. Add tests for ob-octave.el

---
 lisp/ob-octave.el   |6 +++-
 testing/README.org  |1 +
 testing/examples/ob-octave-test.org |   43 +++
 testing/lisp/test-ob-octave.el  |   55 +++
 4 files changed, 104 insertions(+), 1 deletions(-)
 create mode 100644 testing/examples/ob-octave-test.org
 create mode 100644 testing/lisp/test-ob-octave.el

diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 3d90954..cfc1f1d 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -117,7 +117,11 @@ specifying a variable of the same value.
   (if (listp var)
   (concat [ (mapconcat #'org-babel-octave-var-to-octave var
 			 (if (listp (car var)) ;  ,)) ])
-(format %s (or var nil
+(cond
+ ((stringp var)
+  (format \'%s\' (or var nil)))
+ (t
+  (format %s (or var nil))
 
 (defun org-babel-prep-session:octave (session params optional matlabp)
   Prepare SESSION according to the header arguments specified in PARAMS.
diff --git a/testing/README.org b/testing/README.org
index 2f16a55..221a33c 100644
--- a/testing/README.org
+++ b/testing/README.org
@@ -79,6 +79,7 @@ First tangle this file out to your desktop.
(list (concat org-dir /testing/examples/babel.org)
  (concat org-dir /testing/examples/normal.org)
  (concat org-dir /testing/examples/ob-awk-test.org)
+ (concat org-dir /testing/examples/ob-octave.org)
  (concat org-dir /testing/examples/ob-fortran-test.org)
  (concat org-dir /testing/examples/link-in-heading.org)
  (concat org-dir /testing/examples/links.org)))
diff --git a/testing/examples/ob-octave-test.org b/testing/examples/ob-octave-test.org
new file mode 100644
index 000..37cf3f9
--- /dev/null
+++ b/testing/examples/ob-octave-test.org
@@ -0,0 +1,43 @@
+#+Title: a collection of examples for ob-octave tests
+#+OPTIONS: ^:nil
+
+* Simple tests
+  :PROPERTIES:
+  :ID:   54dcd61d-cf6c-4d7a-b9e5-854953c8a753
+  :END:
+Number output
+#+begin_src octave :exports results :results silent
+ans = 10
+#+end_src
+
+Array output
+#+begin_src octave :exports results :results silent
+ans = 1:4'
+#+end_src
+
+* Input tests
+  :PROPERTIES:
+  :ID:   cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba
+  :END:
+Input an integer variable
+#+begin_src octave :exports results :results silent :var s=42
+ans = s
+#+end_src
+
+
+Input an array
+#+begin_src octave :exports results :results silent :var s='(1.0 2.0 3.0)
+ans = s
+#+end_src
+
+Input a matrix
+#+begin_src octave :exports results :results silent :var s='((1 2) (3 4))
+ans = s
+#+end_src
+
+Input a string
+#+begin_src octave :exports results :results silent :var s=test
+ans = s(1:2)
+#+end_src
+
+
diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el
new file mode 100644
index 000..f3972ec
--- /dev/null
+++ b/testing/lisp/test-ob-octave.el
@@ -0,0 +1,55 @@
+;;; test-ob-octave.el --- tests for ob-octave.el
+
+;; Copyright (c) 2010 Sergey Litvinov
+;; Authors: Sergey Litvinov
+
+;; Released under the GNU General Public License version 3
+;; see: http://www.gnu.org/licenses/gpl-3.0.html
+
+(org-test-for-executable octave)
+
+(let ((load-path (cons (expand-file-name
+			.. (file-name-directory
+			  (or load-file-name buffer-file-name)))
+		   load-path)))
+  (require 'org-test)
+  (require 'org-test-ob-consts))
+
+(require 'ob-octave)
+
+(ert-deftest ob-octave/input-none ()
+  Number output
+  (org-test-at-id 54dcd61d-cf6c-4d7a-b9e5-854953c8a753
+(org-babel-next-src-block)
+(should (= 10 (org-babel-execute-src-block)
+
+(ert-deftest ob-octave/output-vector ()
+  Vector output
+  (org-test-at-id 54dcd61d-cf6c-4d7a-b9e5-854953c8a753
+(org-babel-next-src-block 2)
+(should (equal '((1 2 3 4)) (org-babel-execute-src-block)
+
+(ert-deftest ob-octave/input-variable ()
+  Input variable
+  (org-test-at-id cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba
+(org-babel-next-src-block)
+(should (= 42 (org-babel-execute-src-block)
+
+(ert-deftest ob-octave/input-array ()
+  Input an array
+  (org-test-at-id cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba
+(org-babel-next-src-block 2)
+(should (equal '((1 2 3)) (org-babel-execute-src-block)
+
+(ert-deftest ob-octave/input-matrix ()
+  Input a matrix
+  (org-test-at-id cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba
+(org-babel-next-src-block 3)
+(should (equal '((1 2) (3 4)) (org-babel-execute-src-block)
+
+(ert-deftest ob-octave/input-string ()
+  Input a string
+  (org-test-at-id cc2d82bb-2ac0-45be-a0c8-d1463b86a3ba
+(org-babel-next-src-block 4)
+(should (equal te 

Re: [O] Time range end in agenda view not displayed

2011-09-30 Thread XeCycle
michael holzer michael_hol...@lavabit.com writes:

 Hi everyone,

 I'm having a problem with the agenda view, hopefully someone can tell me
 what I'm doing wrong:

 When I have an entry that contains a time range, for example:

 * timerange
   2011-09-30 Fri 14:00--2011-09-30 Fri 18:00

I think they should look like 2011-09-30 Fri 14:00-18:00.

 this shows up in the agenda view as:

   uni:14:00.. timerange

 while I would expect something like:

   uni:14:00-18:00 timerange

 as the manual says
 (http://orgmode.org/org.html#Time_002dof_002dday-specifications).

 Thanks for any help,
 michael




-- 
Carl Lei (XeCycle)
Department of Physics, Shanghai Jiao Tong University
OpenPGP public key: 7795E591
Fingerprint: 1FB6 7F1F D45D F681 C845 27F7 8D71 8EC4 7795 E591


pgptXrCPnausG.pgp
Description: PGP signature