Re: [O] Seeking advice for conditional code

2013-02-01 Thread Eric S Fraga
Sebastien Vauban  writes:

> One important aspect here, is that, with LP, you can present your program in
> an order which makes sense for the "story". It can be tangled in a totally
> different order.

Well said.  This is a subtle point but a very important one!  Combined
with the possibility of tangling different combinations of code, LP is
very liberating.  Org + babel have completely changed how I approach
programming, so much so that I don't know where to start if I have to
write code alone in a non-org file ;-)

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




Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-02-01 Thread Eric S Fraga
Martin Beck  writes:

> If it is possible to use more than one "agenda" block in the block agenda 
> and turn off the time grid for all but the first, this should do perfectly 
> what
> I need. 

One of my agenda custom views looks like this:

#+begin_src emacs-lisp
("v" "Startup View"
  (
(todo "INPR" (quote(org-agenda-overriding-header "Currently active tasks: 
")))
(todo "WAIT" (quote(org-agenda-overriding-header "Tasks waiting on others: 
")))
(agenda "" ((org-agenda-time-grid nil)
  (org-deadline-warning-days 365)
  (org-agenda-entry-types (quote (:deadline)))
  (org-agenda-skip-entry-if (quote scheduled))
  (org-agenda-ndays 1)
  (org-agenda-overriding-header "Unscheduled upcoming deadlines:")))
(agenda "" ((org-agenda-ndays 1)
  (org-deadline-warning-days 1)))
(todo "" (quote(org-agenda-overriding-header "Unscheduled No Deadline TODO: 
"
#+end_src

Note the =org-agenda-time-grid nil= setting.

HTH,
eric
-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3d-898-g005917




[O] Scheduling makes link disappear

2013-02-01 Thread Thomas Morgan
Dear Org mode hackers,

In an Org TODO list, scheduling an item that contains a link can cause
the link to disappear.

Here's how to reproduce this:

Run `emacs -Q -l setup.el'.

Type `M-x org-agenda' , then `t' to show a TODO list.
This splits the frame horizontally into two windows,
each one 84 columns wide on this computer.

Move point to the TODO item, which looks like this:

  test-case:  TODO Visit test link

Type `C-c C-s RET' to schedule the item for today.
Now the line looks like this:

  test-case:  TODO Visit 

I expected it to look something like this:

  test-case:  TODO Visit this linkS => Scheduled to 
<2013-01-28 Mon>

And in fact this is how it looks when the window is wider
(172 columns).

I'm ttaching `setup.el' and `test-case.org'.

Thanks,
Thomas



setup.el
Description: application/emacs-lisp
* TODO Visit [[http://www.this-is-a-long-long-long-long-long-long-long-domain-name.com/][test link]]









[O] [PATCH] Fix error handling deadline lead time specified in hours

2013-02-01 Thread John K. Luebs
From: "John K. Luebs" 

* lisp/org.el (org-get-wdays): Handle matching a lead time specified in
  hours, which is matched by the current regexp but will erroneously
  return nil.

TINYCHANGE
---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 310972b..e9353f6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16227,7 +16227,8 @@ If SECONDS is non-nil, return the difference in 
seconds."
 (floor (* (string-to-number (match-string 1 ts))
  (cdr (assoc (match-string 2 ts)
  '(("d" . 1)("w" . 7)
-   ("m" . 30.4) ("y" . 365.25)))
+   ("m" . 30.4) ("y" . 365.25)
+   ("h" . 0.041667)))
;; go for the default.
(t org-deadline-warning-days)))
 
-- 
1.8.1.2




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

2013-02-01 Thread Achim Gratz
Achim Gratz writes:
> Sebastien Vauban writes:
>> Though, I'm not sure to understand why that solves the issue... except if the
>> emacs-el package gets updated more often that Emacs, then?
>
> The original implementation of find-func looked explicitly for org.el,

Sorry, what I meant was: the original compatibility macro for
find-library-name (since that function is not available in all versions
of Emacs).  It has since been replaced with an implementation that uses
a function that is available in all versions of Emacs and uses the same
logic as load-library to find "org" so it will find org.elc, org.el.gz
etc.pp.

> which wasn't ever working with either compressed or not-installed source
> files.


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

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] patch for ob-sql.el: improve MySQL header formatting, and add db spec header vars

2013-02-01 Thread Gary Oberbrunner
Here's a better version of this patch, which also adds support for
:colnames, which I needed.  And it adds some doc about what header args are
used.

 * add a header-row delimiter to the tables returned from mysql
 * adds new sql-specific header args for the database connection, and
implements them for mysql
 * adds support for :colnames (mysql only)
 * (minor) adds an edebug spec to org-babel-result-cond to allow edebugging
through it



On Fri, Feb 1, 2013 at 10:18 AM, Gary Oberbrunner wrote:

> Let me know if this would be better as a pull request.  This patch does
> three things:
>
>  * add a header-row delimiter to the tables returned from mysql
>  * adds new sql-specific header args for the database connection, and
> implements them for mysql
>  * (minor) adds an edebug spec to org-babel-result-cond to allow
> edebugging through it
>
> --
> Gary
>



-- 
Gary


org-mode-sql-2.patch
Description: Binary data


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

2013-02-01 Thread Achim Gratz
Sebastien Vauban writes:
> Though, I'm not sure to understand why that solves the issue... except if the
> emacs-el package gets updated more often that Emacs, then?

The original implementation of find-func looked explicitly for org.el,
which wasn't ever working with either compressed or not-installed source
files.


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] bbdb or bbdb3 or org-contacts

2013-02-01 Thread Daimrod
joa...@verona.se writes:

> Daimrod  writes:
>
>> Bastien  writes:
>>
>>> Hi Dieter,
>>>
>>> Dieter Wilhelm  writes:
>>>
 What do you advise, what is already usable and what is the way
 ahead, still bbdb or bbdb3 or already org-contacts?
>>>
>>> BBDB is great.  org-contacts.el is too slow when you have many
>>> contacts, and it is not really maintained anymore.
>>
>> I've started to use org-contacts.el. I haven't (yet) problem with its
>> speed but I've improved the completion mecanism which prevented me to
>> use it. When I'll finish to document/comment it, I'll post it here.
>
> I would be very interested in having a look.

See the attached patch files. I still need to need to take into account
what could be after the cursor
  vv ATM I only use this
From: John [cursor]D
  ^^ But I would like to use this

But it mostly works.

> I migrated from bbdb to org-contacts, but it turned out to be too slow,
> so now I mostly isearch for the contact I want.
>
> Recently I've bee thinking of trying a strategy where bbdb could act as
> a cache for org-contacts, but I havent tried it yet. It shouldnt be too
> hard I think. org-contacts can generate a list of all contacts, that you
> then iterate and generate the bbdb database from. It might be a useful
> addition in any case.

I was thinking to add a cache mecanism directly to `org-contacts.el'. It
would load the content of the contacts files the first time into the
appropriate structure and then reread the files only when they changed.

Moreover, `org-contacts.el' doesn't use the new parser from
`org-element.el' ATM, and using it might improve the performance too.


PS: Sorry for the double patch files but the `org-reverse-string' part
hasn't been merged yet and I use it.

From d075570c544d89d27eb7eb53fcc46dbb627aa480 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= 
Date: Sat, 26 Jan 2013 22:27:51 +0100
Subject: [PATCH 1/2] Unify `org-id-reverse-string' and
 `org-babel-reverse-string' into `org-reverse-string'

* lisp/org.el (org-reverse-string): Add `org-reverse-string' to
  reverse a string.
* lisp/org-id.el(org-id-new, org-id-decode): Replace
  `org-id-reverse-string' by `org-reverse-string'.
* lisp/ob-core.el(org-babel-trim): Replace `org-babel-reverse-string'
  by `org-reverse-string' and declare it.

TINYCHANGE
---
 lisp/ob-core.el |9 +++--
 lisp/org-id.el  |7 ++-
 lisp/org.el |4 
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index bdf8c54..27f665a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -91,6 +91,7 @@
 (declare-function org-escape-code-in-region "org-src" (beg end))
 (declare-function org-unescape-code-in-string "org-src" (s))
 (declare-function org-table-to-lisp "org-table" (&optional txt))
+(declare-function org-reverse-string "org" (string))
 
 (defgroup org-babel nil
   "Code block evaluation and management in `org-mode' documents."
@@ -2512,10 +2513,6 @@ If the table is trivial, then return it as a scalar."
(match-string 1 cell))
   cell) t))
 
-(defun org-babel-reverse-string (string)
-  "Return the reverse of STRING."
-  (apply 'string (reverse (string-to-list string
-
 (defun org-babel-chomp (string &optional regexp)
   "Strip trailing spaces and carriage returns from STRING.
 Default regexp used is \"[ \f\t\n\r\v]\" but can be
@@ -2530,8 +2527,8 @@ overwritten by specifying a regexp as a second argument."
   "Strip leading and trailing spaces and carriage returns from STRING.
 Like `org-babel-chomp' only it runs on both the front and back
 of the string."
-  (org-babel-chomp (org-babel-reverse-string
-(org-babel-chomp (org-babel-reverse-string string) regexp))
+  (org-babel-chomp (org-reverse-string
+(org-babel-chomp (org-reverse-string string) regexp))
regexp))
 
 (defvar org-babel-org-babel-call-process-region-original nil)
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 39ca170..a68adcf 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -343,7 +343,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
   (unless (org-uuidgen-p unique)
 	(setq unique (org-id-uuid
  ((eq org-id-method 'org)
-  (let* ((etime (org-id-reverse-string (org-id-time-to-b36)))
+  (let* ((etime (org-reverse-string (org-id-time-to-b36)))
 	 (postfix (if org-id-include-domain
 			  (progn
 			(require 'message)
@@ -376,9 +376,6 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
 	(substring rnd 18 20)
 	(substring rnd 20 32
 
-(defun org-id-reverse-string (s)
-  (mapconcat 'char-to-string (nreverse (string-to-list s)) ""))
-
 (defun org-id-int-to-b36-one-digit (i)
   "Turn an integer between 0 and 61 into a single character 0..9, A..Z, a..z."
   (cond
@@ -432,7 +429,7 @@ and time is the usual three-integer representation of time."
 (if (= 2 (length parts))
 	(setq prefix

Re: [O] Off for the next four days

2013-02-01 Thread Christopher Schmidt
Bastien  writes:
> I've released Org 7.9.3e, a minor fixes release, which makes current
> agenda optimizations available to The Rest of The World.

Thank you so much for your hard work.

Would it be possible to set an announce-only mailing list up?

Christopher



Re: [O] orgstruct-mode with custom headline prefix

2013-02-01 Thread Carsten Dominik
Hi Christopher,

I have trouble applying it, can you please send the patch as an attachments 
instead of inline, and make sure it is agains the current master?  Thanks.

- Carsten

On 31 jan. 2013, at 21:06, Christopher Schmidt  
wrote:

> Bastien  writes:
>> PS: To make things clear: I'm confident the patch is good, but I will
>> put it higher on my patch review process if I know the agenda does not
>> slow down :)
> 
> Here is the patch.  Now one just needs
> 
>;; Local Variables:
>;; eval: (orgstruct-mode 1)
>;; orgstruct-heading-prefix-regexp: ";;; "
>;; End:
> 
> It cannot get any easier than this.
> 
>2013-01-31  Christopher Schmidt  
> 
>* org.el (org-cycle-global-status, org-cycle-subtree-status): Set
>state property.
>(org-heading-components): Use org-heading-regexp in
>orgstruct-mode.
>(orgstruct-heading-prefix-regexp, orgstruct-setup-hook): New
>options.
>(orgstruct-initialized): New variable.
>(orgstruct-mode): Simplify implementation.
>(orgstruct-setup): Simplify implementation.  Translate keys to
>their most general equivalent.
>(orgstruct-make-binding): Generate index on the fly.  Discard
>alternative keys.  Bind variables according to
>orgstruct-heading-prefix-regexp.
>(org-get-local-variables): Honour state property.
>(org-run-like-in-org-mode): Do not override variables with
>non-default values.
>(org-forward-heading-same-level): Do not skip to headlines on
>another level.  Handle negative prefix argument correctly.
>(org-backward-heading-same-level): Use
>org-forward-heading-same-level.
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -6223,8 +6223,10 @@ and subscripts."
> 
> (defvar org-cycle-global-status nil)
> (make-variable-buffer-local 'org-cycle-global-status)
> +(put 'org-cycle-global-status 'org-state t)
> (defvar org-cycle-subtree-status nil)
> (make-variable-buffer-local 'org-cycle-subtree-status)
> +(put 'org-cycle-subtree-status 'org-state t)
> 
> (defvar org-inlinetask-min-level)
> 
> @@ -7403,13 +7405,24 @@ This is a list with the following elements:
> - the tags string, or nil."
>   (save-excursion
> (org-back-to-heading t)
> -(if (let (case-fold-search) (looking-at org-complex-heading-regexp))
> - (list (length (match-string 1))
> -   (org-reduced-level (length (match-string 1)))
> -   (org-match-string-no-properties 2)
> -   (and (match-end 3) (aref (match-string 3) 2))
> -   (org-match-string-no-properties 4)
> -   (org-match-string-no-properties 5)
> +(if (let (case-fold-search)
> +  (looking-at
> +   (if orgstruct-mode
> +   org-heading-regexp
> + org-complex-heading-regexp)))
> +(if orgstruct-mode
> +(list (length (match-string 1))
> +  (org-reduced-level (length (match-string 1)))
> +  nil
> +  nil
> +  (match-string 2)
> +  nil)
> +  (list (length (match-string 1))
> +(org-reduced-level (length (match-string 1)))
> +(org-match-string-no-properties 2)
> +(and (match-end 3) (aref (match-string 3) 2))
> +(org-match-string-no-properties 4)
> +(org-match-string-no-properties 5))
> 
> (defun org-get-entry ()
>   "Get the entry text, after heading, entire subtree."
> @@ -8482,12 +8495,19 @@ If WITH-CASE is non-nil, the sorting will be 
> case-sensitive."
> ;; command.  There might be problems if any of the keys is otherwise
> ;; used as a prefix key.
> 
> -;; Another challenge is that the key binding for TAB can be tab or \C-i,
> -;; likewise the binding for RET can be return or \C-m.  Orgtbl-mode
> -;; addresses this by checking explicitly for both bindings.
> +(defcustom orgstruct-heading-prefix-regexp ""
> +  "Regexp that matches the custom prefix of Org headlines in
> +orgstruct(++)-mode."
> +  :group 'org
> +  :type 'string)
> +;;;###autoload(put 'orgstruct-heading-prefix-regexp 'safe-local-variable 
> 'stringp)
> +
> +(defcustom orgstruct-setup-hook nil
> +  "Hook run after orgstruct-mode-map is filled."
> +  :group 'org
> +  :type 'hook)
> 
> -(defvar orgstruct-mode-map (make-sparse-keymap)
> -  "Keymap for the minor `orgstruct-mode'.")
> +(defvar orgstruct-initialized nil)
> 
> (defvar org-local-vars nil
>   "List of local variables, for use by `orgstruct-mode'.")
> @@ -8498,26 +8518,13 @@ If WITH-CASE is non-nil, the sorting will be 
> case-sensitive."
> This mode is for using Org-mode structure commands in other
> modes.  The following keys behave as if Org-mode were active, if
> the cursor is on a headline, or on a plain list item (both as
> -defined by Org-mode).
> -
> -M-upMove entry/item up
> -M-down   M

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

2013-02-01 Thread Sebastien Vauban
Hi Achim,

Achim Gratz wrote:
> Sebastien Vauban writes:
>> Wait, wait, wait...
>>
>> When reading the backtrace even more carefully, this 3rd observation is not
>> what's said by the error message: "../contrib" is not (I guess Achim is 
>> right)
>> the problem here, but the fact that `find-library-name' fails to find "org".
>>
>> So, the problem comes down to the fact that the following...
>>
>> #+begin_src emacs-lisp
>>   (require 'find-func)
>>   (find-library-name "org")
>> #+end_src
>>
>> ... does fail with the latest Cygwin [1]:
>
> I remember... that bug has since been fixed in Org.  As a workaround,
> install the emacs-el package which contains the source files to prevent
> this from happening with that particular version of Emacs/Org on Cygwin.

Exactly what you said... Perfectly seen!

Though, I'm not sure to understand why that solves the issue... except if the
emacs-el package gets updated more often that Emacs, then?

 Start of forwarded message 
From: Ken Brown 
Newsgroups: gmane.os.cygwin
Subject: Re: Org mode package too old in Cygwin Emacs
Date: Fri, 01 Feb 2013 09:02:56 -0500

On 2/1/2013 4:23 AM, Sebastien Vauban wrote:

> I'm forwarding here a request of Bastien Guerry, maintainer of Org mode, after
> looking at a problem I have when running Cygwin Emacs:
>
>  Start of forwarded message 
> From: Bastien 
> Newsgroups: gmane.emacs.orgmode
> Subject: Re: Contrib missing from (Cygwin) Emacs
> Date: Sat, 26 Jan 2013 11:20:00 +0100
>
> Hi Sébastien,
>
> Sebastien Vauban writes:
>> Debugger entered--Lisp error: (error "Can't find library org")
>>signal(error ("Can't find library org"))
>>error("Can't find library %s" "org")
>>find-library-name("org")
>
> Please report the problem to Cygwin people. They can either upgrade to a more
> recent version of Emacs, or try to sort out the problem with
> (find-library-name "org"). I cannot do anything from here, `find-library-name'
> is not in latest Org.

Cygwin's emacs is the latest upstream release.  The problem is that the 
current Org distributed with emacs requires the presence of elisp source 
files, which are not installed by default on Cygwin.  Cygwin users of 
the current Org have to install the emacs-el package to get the elisp 
source files.

Ken
 End of forwarded message 

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-02-01 Thread Sebastien Vauban
Bernt,

> Bernt Hansen wrote:
>> Martin Beck  writes:
>>
>>> Hi Bernt,
>>> thanks for your help - so if you can not make it work, I assume that it's 
>>> not
>>> possible yet?
>>
>> I didn't spend a lot of time on this so I wouldn't give up just yet.
>> The thing I couldn't get to work was automatically starting column view
>> in my block agenda.  I can still manually do that with C-c C-x C-c
>
> What about this?
>
>  (add-to-list 'org-agenda-custom-commands
>   '("H"
> tags-todo "+home"
> ((org-agenda-view-columns-initially t

Sorry. It does work as standalone agenda view, but I now guess you meant not
in a block view... Too quick!

Best regards,
  Seb

-- 
Sebastien Vauban




[O] link abbreviations and the /smb: method

2013-02-01 Thread Dieter Wilhelm, H.
Hi list,

for me the link abbreviation facility for local file names and http
protocol addresses is working like a charm, but I don't get it to run
with TRAMP's /smb method.  What are your experiences, is it not yet
implemented?

Example:

#+LINK: Path /smb:user%domain@server:/path/file

The link

[[Path]]

is not working, but I can access the file with C-c C-o over the
complete /smb specification...

-- 
Best wishes

H. Dieter Wilhelm
Darmstadt
Germany



Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-02-01 Thread Sebastien Vauban
Hi Bernt,

Bernt Hansen wrote:
> Martin Beck  writes:
>
>> Hi Bernt,
>> thanks for your help - so if you can not make it work, I assume that it's not
>> possible yet?
>
> I didn't spend a lot of time on this so I wouldn't give up just yet.
> The thing I couldn't get to work was automatically starting column view
> in my block agenda.  I can still manually do that with C-c C-x C-c

What about this?

--8<---cut here---start->8---
 (add-to-list 'org-agenda-custom-commands
  '("H"
tags-todo "+home"
((org-agenda-view-columns-initially t
--8<---cut here---end--->8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Some advice on how to use babel to generate cisco configs

2013-02-01 Thread Thomas S. Dye
"Bart Bunting"  writes:

> Thomas,
>
> Thanks!  That is pretty much what I was struggling with.

Good news.  I'm happy it's starting to work for you.
>
> Thanks for putting it together for me.  
>
> The only other question I have is, is there a way to prevent the results
> from appending each time?

See the manual, 14.8.2.2 :results.  You probably want :results replace.

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



[O] patch for ob-sql.el: improve MySQL header formatting, and add db spec header vars

2013-02-01 Thread Gary Oberbrunner
Let me know if this would be better as a pull request.  This patch does
three things:

 * add a header-row delimiter to the tables returned from mysql
 * adds new sql-specific header args for the database connection, and
implements them for mysql
 * (minor) adds an edebug spec to org-babel-result-cond to allow edebugging
through it

-- 
Gary


org-mode-sql.patch
Description: Binary data


[O] Bug in org-src.el?

2013-02-01 Thread Thorsten Jolitz

Hi List, 

when I export a (bit complicated) PicoLisp source block with ':results
html', I get an error:

,
| error: "Invalid search bound (wrong side of point)"
`

The error happens in org-src.el in the function:

,---
| (defun org-escape-code-in-region (beg end)
|   "Escape lines between BEG and END.
`---

because beg and end are interchanged, i.e. the function is called with 

,--
| (org-escape-code-in-region 2921 2908)
`--

when 

,
| +results:
| +BEGIN_HTML # char 2908 at beginning-of-line
| +END_HTML   # char 2921 at beginning-of-line
`

Here is the backtrace:

,
| Debugger entered--Lisp error: (error "Invalid search bound (wrong side
|   of point)") re-search-forward("^[ ]*,?\\(\\*\\|#\\+\\)" # t) (while (re-search-forward "^[
|   ]*,?\\(\\*\\|#\\+\\)" end t) (replace-match ",\\1" nil nil nil 1))
|   (save-excursion (goto-char beg) (while (re-search-forward "^[
|   ]*,?\\(\\*\\|#\\+\\)" end t) (replace-match ",\\1" nil nil nil 1)))
|   org-escape-code-in-region(2921 #)
| 
|   #[(start finish &optional no-escape) "b\210
|\305Pc\210\nb\210\305Pc\210\f\204\306`\"\210b\210\307 b\210\310
|\211\207" [end finish beg start no-escape "\n"
|org-escape-code-in-region point-at-eol point-marker]
|3]("#+BEGIN_HTML" "#+END_HTML")
| 
|   org-babel-insert-result(nil ("html" "output" "replace") ("picolisp" "
|   ... [omitted] ))
| 
|   org-babel-execute-src-block-maybe()
|   org-babel-execute-maybe()
|   org-babel-execute-safely-maybe()
|   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
|   org-ctrl-c-ctrl-c(nil)
|   call-interactively(org-ctrl-c-ctrl-c nil nil)
`


and the system-info:

,---
| Org-mode version 7.9.3e (7.9.3e-897-g787a07 @
| /home/tj/gitclone/org-mode/lisp/)
| 
| GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.4) of
| 2013-01-20 on eric
`---


-- 
cheers,
Thorsten





Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-02-01 Thread Martin Beck
Bernt Hansen  norang.ca> writes:

> > I tried to create a block agenda with several blocks based 
> > on the (agenda )command, but then I also have the time 
> > grid several times..
> 
> >
> You should be able to turn the grid off.


Hi Bernt,
thanks a lot for your answers (also the other one:
http://article.gmane.org/gmane.emacs.orgmode/65520).

If it is possible to use more than one "agenda" block in the block agenda 
and turn off the time grid for all but the first, this should do perfectly what
I need. 
The only problem is, that I don't get it to work, because I'm messing up
the code blocks. :-(

I'd need 
* Block 1 with time grid and deadlines (current and late) 
* Block 2 with Prio A (scheduled today or before today), 
sorted by scheduled date - newest first 
* Block 3 with Prio B (scheduled today or before today, 
sorted by scheduled date - newest first)

If you have a suggestion how to solve that, this would help me very much.

Kind regards

Martin





Re: [O] Bug: Extra spaces in babel #+call arguments [7.9.3d (release_7.9.3d-823-gd06fa4 @ /usr/share/emacs/24.2/site-lisp/org/)

2013-02-01 Thread Rick Lupton
Thomas S. Dye  tsdye.com> writes:
> Rick Lupton  gmail.com> writes:
> 
> > As a separate question, is it possible to get ":results file" as the
> > default from the original block so it doesn't have to be repeated in each
> > #+CALL ?
> 
> This should work:
> 
> * Appropriate Heading Level
>   :PROPERTIES:
>   :RESULTS:  file
>   :END:
> 

Yes, that works fine thanks.

For the other question, it's easy to work around -- as below -- though it'd be
nice not to have to.

#+name: nbimg
#+begin_src sh :var nb="" :var tag="" :results output file
# get rid of spurious trailing spaces
fn=$(echo $nb | sed 's/^ *//g')
nbimage -o auto_images "$fn.ipynb" "$tag"
#+end_src

Thanks,
Rick




Re: [O] Problems with org-caldav (wrong-type-argument stringp 47)

2013-02-01 Thread Torsten Wagner
Hi Bastien,

hmmm I tried but it didn't work. Maybe because the package version of
url-dav was compiled.
I will try again as soon as a update breaks my "solution" ;)

Best

Torsten


On 30 January 2013 11:32, Bastien  wrote:

> Hi Torsten,
>
> Torsten Wagner  writes:
>
> > I couldn't find a way to tell emacs to use the local version
> > instead.
>
> What about a simple (load "../url-dav.el") ?
>
> --
>  Bastien
>


Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-02-01 Thread Bernt Hansen
Martin Beck  writes:

> Hi Bernt,
> thanks for your help - so if you can not make it work, I assume that it's not
> possible yet?

I didn't spend a lot of time on this so I wouldn't give up just yet.
The thing I couldn't get to work was automatically starting column view
in my block agenda.  I can still manually do that with C-c C-x C-c

> I tried your code - it does what it promises.. however, you're right,
> it's not
> yet what I need:
> I'd need Priority A and B in one view (table),
> then sorted
> * Prio A first
> * Prio B second
> lines sorted by date descending (newest first) .. would that be possible?

I think that should be possible.

>
> If I understand the problem right, I can get the deadline/scheduled 
> information
> in the agenda only with the "agenda" commmand, not with tags-todo or anything
> else? This is a pity.

In column view you can see the data in any agenda view.  Dates are
normally only displayed in the "agenda" view which includes the
time grid.  This would only show past due and past scheduled items and
deadlines within deadline warning period.

> So theoretically, I'd have to use this agenda command and then tweak the 
> sorting
> function to arrange items by Prio first and then by date?
> (That's what I tried already, based on your setup, but I was not able to make 
> it
> work yet..)
>

Is column view in the agenda acceptable? I don't know of another way to
display the deadline and schedule information you want.

I can take another look at this over the weekend id you like.

Regards,
Bernt



Re: [O] (no subject) How to sort agenda by timestamps (scheduled/deadline)?

2013-02-01 Thread Bernt Hansen
Martin Beck  writes:

> Bernt Hansen  norang.ca> writes:
>
>> > But unfortunately, it does only display category, TODO-keyword 
>> > and subject, but
>> > NO information about Deadline or Scheduled date.
>> >
>
> I tried to create a block agenda with several blocks based 
> on the (agenda )command, but then I also have the time grid several 
> times..


>
You should be able to turn the grid off.

Bernt




Re: [O] Problem reading Geoconcept GXT

2013-02-01 Thread Myles English

daniel.gne...@vevey.ch writes:

> Hi,
>
> I have a problem trying to read a GXT file with OGR and the following 
> command : 
>
> ogr2ogr -f "ESRI Shapefile" eu_collecteur.shp Villeneuve_test.gxt 
> ASSAINISSEMENT.Collecteur

org ? ogr ?

>
> I get this error : 
>
> ERROR 1: 'Subclass' expected.
> Geoconcept export syntax error at line 8.
>
> FAILURE:
> Unable to open datasource `Villeneuve_test.gxt' with the following 
> drivers.
>   -> ESRI Shapefile
>   -> MapInfo File
> ...
>
> The subclass seems to be correctly defined in GXT : 
> 
> //$FIELDS Class=ASSAINISSEMENT; Subclass=Collecteur; Kind=2; 
> Fields=Private#Identifier   Private#Class   Private#Subclass 
> Private#NamePrivate#NbFieldsID  Nom commune Numéro 
> commune RemarqueID  [0] Nom commune [0] Numéro commune [0] 
> Remarque [0]GestionnaireRéférence dossier   Réseau  Tracé   No 
> objet   Contenu Année de pose/construction  Dernier constat Etat 
> Reférence plan  Image / schéma 1Image / schéma 2Dernier 
> entretien   Mode d'acquisition  Date d'acquisition  Nom du 
> propriétaireValeur économique de remplacement   No tournée de 
> contrôleFréquence des contrôles (mois)  Priorité d'intervention 
> Année de remplacement projetée  Date de création fiche  Auteur fiche Date 
> de mise à jour  Auteur de mise à jour   Date d'estimation   Nom du 
> gestionnaireValeur résiduelle comptable Valeur résiduelle 
> technique   No PGEE Détermination planimétrique Prix unitaire 
> Profil du collecteurMatériauCode matériau   Etat 
> d'exploitation  Altitude amont (m)  Altitude aval (m)   Pente 
> réelle (%)  Diamètre/hauteurLongueur horizontaleCode du 
> profil  CaractéristiquesNom collecteur  Matériau chemisage  No 
> bande vidéo Débit nominal (Qnom) (l/s)  No du sous bassin versant 
> Temps de retour considéré T1 pour le débit maximal  Débit maximal 
> (Qmax) pour T1 (l/s)Charge hydraulique pour T1 (%)  Débit min. par 
> temps sec (l/s) No tournée de curageFréquence de curage Quantité 
> ECP permanentes Quantité ECP saisonnières   Travaux futurs  Contenu 
> futur   Age Temps de retour considéré T5 pour le débit maximal Débit 
> maximal (Qmax) pour T5 (l/s)Charge hydraulique pour T5 (%)  Temps de 
> retour considéré T10 pour le débit maximal  Débit maximal (Qmax) pour 
> T10 (l/s)   Charge hydraulique pour T10 (%) Temps de retour considéré 
> T4 pour le débit maximalDébit maximal (Qmax) pour T4 (l/s) Charge 
> hydraulique pour T4 (%) Capacité pour T1Capacité pour T5 Capacité 
> pour T10Capacité pour T4Durée de vie calc.  Largeur 
> Dimensions  Charge Hydraulique T1 calc. Charge Hydraulique T2 
> calc.   Charge Hydraulique T3 calc. Charge Hydraulique T4 calc. No 
> objet amont No objet aval   Durée de vieEtat d'exploitation futur 
> Diamètre futur  Inspection TV   FonctionGenre de raccordement Lit 
> de pose enrobageMatériau SIA 405Année dernier curage 
> Méthode d'entretien Pente admise (%)Temps de retour considéré 
> T2 pour le débit maximalTemps de retour considéré T3 pour le débit 
> maximal Capacité pour T3Degré d'urgence Sml Private#X 
> Private#Y   Private#XP  Private#YP  Private#Graphics
> 
>
> Any suggestion ?

Try gdal-...@lists.osgeo.org ?

Myles



Re: [O] Some advice on how to use babel to generate cisco configs

2013-02-01 Thread Bart Bunting
Thomas,

Thanks!  That is pretty much what I was struggling with.

Thanks for putting it together for me.  

The only other question I have is, is there a way to prevent the results
from appending each time?


Cheers

Bart


"Thomas S. Dye"  writes:

> Aloha Bart,
> "Bart Bunting"  writes:
>
>> Good morning,
>>
>> I have been trying to figure out without much luck how to use babel to
>> generate some cisco configs.
>>
>>
>> What I would like to achieve is to have a table containing a few values,
>> e.g. ip address vlan number etc.
>>
>> Then have a cisco config in the org file with markers where the
>> substitutions are to be inserted.
>> Run through the table and create a node in the org file one for each row
>> of the table.
>>
>> The end result should be a set of cisco configs with the substitutions
>> made.  I was hoping to also use shell to call pwgen to generate a
>> random password to insert.
>>   
>> Hope that ramble made some sort of sence.
>
> I don't know a Cisco config from a fig newton, but here is my sense of
> what you wrote, in case it is helpful.
>
> #+name: cisco-table
> | 1 | one   | two  |
> | 2 | three | four |
> | 3 | five  | six  |
>
> #+header: :results output raw
> #+header: :var x=cisco-table
> #+begin_src python
>   for y in x:
>   s = "* Cisco %s \nTwiddle %s, poke %s \n\n" % tuple(y)
>   print s,
> #+end_src
>
> #+results:
> * Cisco 1 
> Twiddle one, poke two 
>
> * Cisco 2 
> Twiddle three, poke four 
>
> * Cisco 3 
> Twiddle five, poke six 
>
> -- 
> Thomas S. Dye
> http://www.tsdye.com
Bart
-- 


Kind regards

Bart



Re: [O] Dropbox integration suddenly stopped working with Mobile-Org

2013-02-01 Thread Adrian Tritschler
> "Benjamin" == Benjamin Alexander  writes:

Benjamin> Hello all!  I've been a happy (!) user of Mobile-Org for some
Benjamin> time now, on the iPhone, and a few months ago I switched to
Benjamin> Dropbox integration.  Things have gone fine until today when I
Benjamin> synced for the first time in a week or so.  The Dropbox
Benjamin> password that was saved, and had worked fine (and still works
Benjamin> from the web interface) simply gives an error message from
Benjamin> within the "Settings" page of Mobile-Org.

Benjamin> Dropbox Error Bad username and password or network error.

The same thing has just happened to me.  I've been using org-mode for
years, org-mobile on my iPhone for a couple of years (I suspect) and on
an Android tablet for about a year.  I went away on holiday a week ago
and had no net access, when I came back I tried to synch. the iPhone app
and I get the same error.

Dropbox integration from other iPhone apps still works fine, as does
browsing via safari.

Benjamin> The strange thing is, the Dropbox app works fine.  So it isn't
Benjamin> a network problem (at least, not a simple case of being
Benjamin> offline). And I've tried retyping the password, with and
Benjamin> without a terminating  as the known issue from the
Benjamin> Mobile-Org web page suggests.  The files are still on Dropbox
Benjamin> and I can still push and pull (though there is nothing new to
Benjamin> pull) from within emacs.

Benjamin> I'm really stumped.  I don't even know where to look on the
Benjamin> iPhone for log messages.  I've even tried using my old phone
Benjamin> (which was configured to use my now discontinued webdav
Benjamin> server) using dropbox and I get the same error.

Benjamin> My current phone is running iOS 6.0.1 (10A523). I have not
Benjamin> installed the new iOS update yet.  I am considering doing that
Benjamin> to see if it helps, but I know I can't roll it back.

Happens on my phone running iOS 6.0.1 and 6.1 (updated some time this
afternoon)

Benjamin> I've also considered deleting mobile-org and reinstalling, but
Benjamin> I'm worried that mobile-org isn't in the App store anymore so
Benjamin> I may lose all functionality!

Benjamin> Does anyone have any suggestions?  I would really appreciate
Benjamin> it.

Benjamin> Best Wishes, Ben

  Adrian
-- 
Adrian Tritschler  mailto:a...@ajft.org
Latitude 38°S, Longitude 145°E, Altitude 50m,  Shoe size 44




[O] Problem reading Geoconcept GXT

2013-02-01 Thread Daniel . Gnerre
Hi,

I have a problem trying to read a GXT file with OGR and the following 
command : 

ogr2ogr -f "ESRI Shapefile" eu_collecteur.shp Villeneuve_test.gxt 
ASSAINISSEMENT.Collecteur

I get this error : 

ERROR 1: 'Subclass' expected.
Geoconcept export syntax error at line 8.

FAILURE:
Unable to open datasource `Villeneuve_test.gxt' with the following 
drivers.
  -> ESRI Shapefile
  -> MapInfo File
...

The subclass seems to be correctly defined in GXT : 

//$FIELDS Class=ASSAINISSEMENT; Subclass=Collecteur; Kind=2; 
Fields=Private#Identifier   Private#Class   Private#Subclass 
Private#NamePrivate#NbFieldsID  Nom commune Numéro 
commune RemarqueID  [0] Nom commune [0] Numéro commune [0] 
Remarque [0]GestionnaireRéférence dossier   Réseau  Tracé   No 
objet   Contenu Année de pose/construction  Dernier constat Etat 
Reférence plan  Image / schéma 1Image / schéma 2Dernier 
entretien   Mode d'acquisition  Date d'acquisition  Nom du 
propriétaireValeur économique de remplacement   No tournée de 
contrôleFréquence des contrôles (mois)  Priorité d'intervention 
Année de remplacement projetée  Date de création fiche  Auteur fiche Date 
de mise à jour  Auteur de mise à jour   Date d'estimation   Nom du 
gestionnaireValeur résiduelle comptable Valeur résiduelle 
technique   No PGEE Détermination planimétrique Prix unitaire 
Profil du collecteurMatériauCode matériau   Etat 
d'exploitation  Altitude amont (m)  Altitude aval (m)   Pente 
réelle (%)  Diamètre/hauteurLongueur horizontaleCode du 
profil  CaractéristiquesNom collecteur  Matériau chemisage  No 
bande vidéo Débit nominal (Qnom) (l/s)  No du sous bassin versant 
Temps de retour considéré T1 pour le débit maximal  Débit maximal 
(Qmax) pour T1 (l/s)Charge hydraulique pour T1 (%)  Débit min. par 
temps sec (l/s) No tournée de curageFréquence de curage Quantité 
ECP permanentes Quantité ECP saisonnières   Travaux futurs  Contenu 
futur   Age Temps de retour considéré T5 pour le débit maximal Débit 
maximal (Qmax) pour T5 (l/s)Charge hydraulique pour T5 (%)  Temps de 
retour considéré T10 pour le débit maximal  Débit maximal (Qmax) pour 
T10 (l/s)   Charge hydraulique pour T10 (%) Temps de retour considéré 
T4 pour le débit maximalDébit maximal (Qmax) pour T4 (l/s) Charge 
hydraulique pour T4 (%) Capacité pour T1Capacité pour T5 Capacité 
pour T10Capacité pour T4Durée de vie calc.  Largeur 
Dimensions  Charge Hydraulique T1 calc. Charge Hydraulique T2 
calc.   Charge Hydraulique T3 calc. Charge Hydraulique T4 calc. No 
objet amont No objet aval   Durée de vieEtat d'exploitation futur 
Diamètre futur  Inspection TV   FonctionGenre de raccordement Lit 
de pose enrobageMatériau SIA 405Année dernier curage 
Méthode d'entretien Pente admise (%)Temps de retour considéré 
T2 pour le débit maximalTemps de retour considéré T3 pour le débit 
maximal Capacité pour T3Degré d'urgence Sml Private#X 
Private#Y   Private#XP  Private#YP  Private#Graphics


Any suggestion ?

Thanks a lot !

Daniel 



Re: [O] bbdb or bbdb3 or org-contacts

2013-02-01 Thread joakim
Daimrod  writes:

> Bastien  writes:
>
>> Hi Dieter,
>>
>> Dieter Wilhelm  writes:
>>
>>> What do you advise, what is already usable and what is the way
>>> ahead, still bbdb or bbdb3 or already org-contacts?
>>
>> BBDB is great.  org-contacts.el is too slow when you have many
>> contacts, and it is not really maintained anymore.
>
> I've started to use org-contacts.el. I haven't (yet) problem with its
> speed but I've improved the completion mecanism which prevented me to
> use it. When I'll finish to document/comment it, I'll post it here.

I would be very interested in having a look.
I migrated from bbdb to org-contacts, but it turned out to be too slow,
so now I mostly isearch for the contact I want.

Recently I've bee thinking of trying a strategy where bbdb could act as
a cache for org-contacts, but I havent tried it yet. It shouldnt be too
hard I think. org-contacts can generate a list of all contacts, that you
then iterate and generate the bbdb database from. It might be a useful
addition in any case.

>> Best,

-- 
Joakim Verona




[O] org-export-as-html-and-open problem

2013-02-01 Thread zhenjiang xu
when I type the keys `C-c C-e b', the html is generated but it is opened in
emacs instead of an internet browser. Does anyone know why?

I am using builtin org-mode in Emacs 24.2 (7.8.11) and set google-chrome as
default browser.

Thanks,
Zhenjiang


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

2013-02-01 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
> Sebastien Vauban writes:
>
>> So, the problem comes down to the fact that the following...
>>
>> #+begin_src emacs-lisp
>>   (require 'find-func)
>>   (find-library-name "org")
>> #+end_src
>>
>> ... does fail with the latest Cygwin [1]:
>>
>> Debugger entered--Lisp error: (error "Can't find library org")
>>   signal(error ("Can't find library org"))
>>   error("Can't find library %s" "org")
>>   find-library-name("org")
>
> Please report the problem to Cygwin people. They can either upgrade to a
> more recent version of Emacs, or try to sort out the problem with
> (find-library-name "org"). I cannot do anything from here,
> `find-library-name' is not in latest Org.

DONE (forwarded onto Gmane's "os.cygwin" mailing list).

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Seeking advice for conditional code

2013-02-01 Thread Sebastien Vauban
Hi François,

François Pinard wrote:
> "Sebastien Vauban"
>
>> For curiosity, why aren't you considering tangling?
>
> Quick half of a reply, I'll revise the rest of your message later.
>
> That would be far too much of a change for the habits of the team, or at
> least, this is how I perceive the equilibrium between developers.

OK, you're not alone on that. This explains that.

All I now write (be it SQL, Bash, AWK scripts or ...) is d'office LP'ed, but I
have the chance to be alone on that. Convincing others may prove to be (too)
difficult.

> Moreover, some of us are not even Emacs users.

That's not a real show-stopper per se, as you could tangle code with markers
(via the "comments" parameter), so that the source code could be directly
edited by anyone, and later untangled (that is, written back in your "full
document").

> When writing a program, the feeling still has to be that we write a
> program, rather than a document describing the program, and from which
> the program could be extracted.  Python is rather descriptive as a
> language, and while comments are useful, they might be less needed than
> in other languages.  This is debatable, of course :-).
>
> The documentation is meant for users, and it was strongly suggested that
> we try to keep the documentation within the program as much as possible,
> as a way to ease keeping the documentation and the program in good
> sync.  Some of us really enjoy Org mode, and this is how came the idea
> of this compromise of writing Python doc-strings using Org.

"My" answer:

#+begin_quote
Let us change our traditional attitude to the construction of programs:
Instead of imagining that our main task is to instruct a computer what to
do, let us concentrate rather on explaining to human beings what we want a
computer to do.

The practitioner of literate programming can be regarded as an essayist,
whose main concern is with exposition and excellence of style. Such an
author, with thesaurus in hand, chooses the names of variables carefully
and explains what each variable means. He or she strives for a program
that is comprehensible because its concepts have been introduced in an
order that is best for human understanding, using a mixture of formal and
informal methods that reinforce each other.

--- Donald Knuth
#+end_quote

One important aspect here, is that, with LP, you can present your program in
an order which makes sense for the "story". It can be tangled in a totally
different order.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] copy file from link into agenda

2013-02-01 Thread Subhan Tindall
Sorry, that , while cool, is not what I am looking for.
Following the instructions you game will show
org-agenda-entry-text-maxlines (default 5) lines
of the entry itself in the note file:
So, if this is then entry in the date tree in the Daily-work-log.org file:
 LOG <2013-01-31 Thu> /home/stindall/.emacs
Lots of time helping tom w/test plan for xtn_invgen_BE.pl
some lines
some more lines

Running the agenda command initially shows this:
Daily-work-log.org: LOG/home/stindall/.emacs

Hitting E expands it to:
Daily-work-log.org: LOG/home/stindall/.emacs
Lots of time helping tom w/test plan for xtn_invgen_BE.pl
some lines
some more lines

What I'm looking for is a way to load the contents of
/home/stindall/.emacs into the agenda,
ideally producing something similar to this:
LOG   /home/stindall/.emacs


LOG   


my elisp-fu is not strong, so I'm hoping that a workable approximation
of what I need already exists.

Subhan



On Wed, Jan 30, 2013 at 2:38 AM, Bastien  wrote:
> Hi Subhan,
>
> Subhan Tindall  writes:
>
>> Hi, I am trying to set up a class notes system using Org (based on my
>> Nexus 7 w/BT Keyboard, but that's another story)
>> I mostly have things they way I would like (I think), with each day's
>> class notes as an org file, and a capture template to insert an entry
>> into a date tree with some information + a link to the file name.
>> This is all working great.
>> What I would like is an agenda view that will pull the date tree
>> entries matching a certain tag (IE class name) *AND* the linked file,
>> and combine them into an agenda file
>> For example,
>> * 2013
>> ** 2013-01 January
>> *** 2013-01-21 Monday
>>  NOTE [2013-01-21 Mon 1410] :class1:
>> 
>> *** 2013-01-28 Monday
>>  NOTE  [2013-01-28 Mon 14:51]:class1:
>> 
>>  NOTE  [2013-01-28 Mon 14:51]:class2:
>> 
>> *** 2013-01-29 Tuesday
>>  NOTE  [2013-01-29 Mon 14:51]:class1:
>> 
>
> You can do this manually -- in your date-tree file:
>
> M-x org-agenda RET < a
>
> will produce the agenda view for this file.
>
> Then in this first agenda view, / TAB :class1: will
> filter out entries that don't have the :class1: tag.
>
> Then `E' will show the first lines of each entries,
> displaying the .c files.
>
> Of course, you can also build a custom agenda view
> which does all this -- see the manual and the tutorials
> on http://orgmode.org/worg/.
>
> HTH,
>
> --
>  Bastien



-- 
Subhan Michael Tindall | Software Developer
| s...@rentrakmail.com
RENTRAK | www.rentrak.com | NASDAQ: RENT