[O] Bug: Properties break fontification [8.2.7c (8.2.7c-57-g37bf05-elpa @ /home/jeeger/.emacs.d/elpa/org-20140901/)]

2014-09-04 Thread Jan Seeger

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?
See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


Properties seem to break fontification. Test file:

--- SNIP --- 
* Todos
** TODO [#B] Test
   :PROPERTIES:
   :ID: b13c756d-48e4-40e1-bac1-19eb70ee23b4
   :END:
--- SNIP --- 
   
To reproduce: Save text above to .org file, and run org-mode.

Expected behavior: Fontification. In particular: TODO keyword and priority
should be highlighted in respective faces.

Actual behavior: TODO keywords and priority are not highlighted. If
properties are removed and org-mode is called again, fontification is
correct.

Emacs : GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) of
 2014-06-17 on bean
Package: Org-mode version 8.2.7c (8.2.7c-57-g37bf05-elpa @
/home/jeeger/.emacs.d/elpa/org-20140901/)

current state: ==
(setq org-export-backends '(md ascii html icalendar latex)
 org-hide-leading-stars t
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-special-ctrl-k t org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-agenda-start-on-weekday nil
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-publish-use-timestamps-flag nil org-log-done t
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-read-date-popup-calendar nil org-ascii-format-inlinetask-function
 'org-ascii-format-inlinetask-default org-export-date-timestamp-format
 nil org-agenda-restore-windows-after-quit t org-special-ctrl-a/e t
 org-agenda-todo-ignore-scheduled 'future
 org-agenda-skip-scheduled-if-done t org-return-follows-link t
 org-latex-format-headline-function
 'org-latex-format-headline-default-function org-default-notes-file
 "~/pim/plans/plans.org"
 org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold)
  ("DONE" :foreground "green" :weight bold)
  ("WAITING" :foreground "orange" :weight
   normal)
  ("DELEGATED" :foreground "blue" :weight
   bold)
  ("CANCELED" :foreground "midnight blue"
   :weight bold)
  )
 org-capture-templates '(("t" "Capture TODO" entry (file+headline ""
  "Todos") "* TODO [#A] %?\n %a")
 ("d" "Capture Date" entry (file+headline ""
  "Termine") "* %? %^T\n %a")
 ("i" "Capture Idea" entry
  (file+headline "tickler.org" "Ideen")
  "* %? ") )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-from-is-user-regexp nil
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-html-head-include-default-style nil org-export-copy-to-kill-ring
 'if-interactive
 org-mode-hook '(#[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-show-block-all append local]
   5]
 #[nil "\300\301\302\303\304$\207"
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5] org-babel-result-hide-spec
 org-babel-hide-all-hashes)
 org-refile-targets '(("plans.org" :maxlevel . 2))
 org-outline-path-complete-in-steps nil org-export-with-tags t
 org-ascii-format-drawer-function '(lambda (name contents width)
contents)
 org-replace-disputed-keys t org-yank-adjusted-subtrees t
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-refile-use-outline-path t org-directory "~/pim/plans/"
 org-cycle-hook '(org-cycle-hide-archived-subtrees
  org-cycle-hide-drawers org-cycle-hide-inline-tasks
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-mouse-1-follows-link 450 org-export-async-init-file
 "/home/jeeger/.emacs.d/org-init.el" org-export-with-drawers '(not
 "LOGBOOK")
 org-todo-keywords '((sequence "WAITING(w)" "TODO(t)" "|"
  "DELEGATED(e)" "DONE(d)" "CANCELED(c)")
 

Re: [O] TODO keyword highlighting for headings with properties broken

2014-09-04 Thread Will Monroe
Hello,

I encountered the same problem but I update org via elpa.  Has the fix been 
applied to org in elpa as well?

Will

Nicolas Goaziou writes:

> Hello,
>
> Erik Hetzner  writes:
>
>> Highlighting of TODO keywords for headings with properties in my org
>> files seems to have broken since I upgraded to org 20140901 (via org
>> mode ELPA). Rolling back to 20140825 fixes the problem. Here is a
>> sample file I tested after loading the new org-mode using emacs -Q:
>>
>> * TODO foo
>>   :PROPERTIES:
>>   :bar:  baz
>>   :END:
>>
>> If you remove the properties, the TODO highlights correctly.
>
> I think I fixed it yesterday. Please update if you can.
>
>
> Regards,

-- 
Sent with my mu4e



Re: [O] easy way to link to file in attachment directory?

2014-09-04 Thread Darlan Cavalcante Moreira
I have this
  #+LINK: attach elisp:(org-open-file (org-attach-expand "%s"))
in all of my org-mode files. In fact, I have this line, among others, in
an org-mode setup file which is included in all of my org-mode files
using "#+SETUPFILE:"

Then I can create a link to an attachment with
[[attach:filename_without_any_path.extension][description]]

Also, just after attaching a new file org will automatically store the
link so that you can use "C-c C-l" to include the link.

-- 
Darlan Cavalcante Moreira
darc...@gmail.com


mirko.vuko...@gmail.com writes:

> Hello,
>
> Is there a way to insert a link to a file in the attachment directory?
>
> Currently, I open the attachment directory in emacs and copy the full path.
> then in the document I create the link using org-insert-link (C-u C-c C-l).
>
> Thanks,
>
> Mirko



Re: [O] babel missing out of org-mode

2014-09-04 Thread Thorsten Jolitz
Steve Quezadas  writes:

> org-babel does not seem to load on my version of emacs (org-mode loads
> fine). Does org-babel come with emacs 23"? I tried looking up for
> org-babel in my marmelade repository but nothings coming up. If I have
> org mode already, how do I get org-babel?
>
> Info:
> distribution: debian 6.0 (squeeze)
> emacs version: 23.4.1

> org version: 6.33x

ouch ... thats kind of a living fossile. 
did babel already exist in that times? 

otherwise, its part of org-mode. you should really use org version 8 or
later ...

-- 
cheers,
Thorsten




Re: [O] TODO keyword highlighting for headings with properties broken

2014-09-04 Thread wtm
Erik,

Thank you!  I just tried this out and it worked perfectly.  This is a very
useful command.  With Emacs, it always seems like it's not whether I can do
something but how!

Will


On Thu, Sep 4, 2014 at 12:01 PM, Erik Hetzner  wrote:

> At Wed, 3 Sep 2014 21:30:11 -0500,
> wtm wrote:
> >
> > Trevor,
> >
> > Thanks so much for mentioning this. I considered using these to roll
> > back to 8/25 but I wasn't sure how much performance I would lose if
> > I used the .el files instead of the compiled .elc versions. Or
> > perhaps my assumption is incorrect? Is it ok to just byte-compile
> > all of the .el files manually? I'm still very new to org-mode so
> > please forgive my ignorance.
>
> Hi Will,
>
> You can install those packages using M-x package-install-file and you
> will get a byte-compiled version.
>
> best, Erik
>
> --
> Sent from my free software system .
>


Re: [O] Bug: Cannot set header-args :includes with multiple includes [8.2.7 (8.2.7-4-g880362-elpa @ /home/will/.emacs.d/elpa/org-20140616/)]

2014-09-04 Thread Thierry Banel
Le 26/08/2014 18:24, Will Everett a écrit :
>
>
> I believe the :includes header argument is incorrectly parsing lists
> of includes for c++. This snippet:
>
> #+BEGIN_SRC C++ :includes  
> using namespace std;
> printf("Hello ");
> cout << "world";
> #+END_SRC
>
> produces a compiler error:
>
> warning: extra tokens at end of #include directive
>  #include  
>
>

Here is a patch to fix the issue.

The :includes, :defines, :imports headers have been extended to accept
multiple items without parenthesis. All the following forms are now allowed:

:includes 
:includes  "strings.h" 
:includes '(  )
:includes (mapcar (lambda (x) (concat "")) '("abc" "def"
"ghi"))
(same for :imports)

:defines AA 22 BB 33
:defines "AA 22 BB 33"
:defines '("abc 123" "def 456")
:defines (mapcar (lambda (x) (concat x " " x "_def")) '("A" "BB" "CCC"))

This works either in the header as here:

#+BEGIN_SRC C++ :includes  "strings.h" 

#+END_SRC

or in a property drawer, like that:

  :PROPERTIES:
  :includes:  "strings.h" 
  :END:

Have fun
Thierry





>From 63ab1d364f0e425d8d02ce946021611a1a3b7ce6 Mon Sep 17 00:00:00 2001
From: Thierry Banel 
Date: Thu, 4 Sep 2014 19:30:54 +0200
Subject: [PATCH] Enable multiple files in :includes header

* ob-C.el
(org-babel-C-expand-C)
(org-babel-C-expand-D):
:includes, :defines, :imports now accept
several items separated by blanks without
enclosing them in parenthesis.

Thanks to Will Everett for reporting this.
---
 lisp/ob-C.el | 24 +++-
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/lisp/ob-C.el b/lisp/ob-C.el
index 076276e..c42ccea 100644
--- a/lisp/ob-C.el
+++ b/lisp/ob-C.el
@@ -186,13 +186,26 @@ it's header arguments."
   (let ((vars (mapcar #'cdr (org-babel-get-header params :var)))
 	(colnames (cdar (org-babel-get-header params :colname-names)))
 	(main-p (not (string= (cdr (assoc :main params)) "no")))
-	(includes (or (cdr (assoc :includes params))
-		  (org-babel-read (org-entry-get nil "includes" t
+	(includes (org-babel-read
+		   (or (cdr (assoc :includes params))
+		   (org-entry-get nil "includes" t))
+		   nil))
 	(defines (org-babel-read
 		  (or (cdr (assoc :defines params))
-		  (org-babel-read (org-entry-get nil "defines" t))
-(unless (listp includes) (setq includes (list includes)))
+		  (org-entry-get nil "defines" t))
+		  nil)))
+(when (stringp includes)
+  (setq includes (split-string includes)))
 (setq includes (append includes '("" "" "")))
+(when (stringp defines)
+  (let ((y nil)
+	(result (list t)))
+	(dolist (x (split-string defines))
+	  (if (null y)
+	  (setq y x)
+	(nconc result (list (concat y " " x)))
+	(setq y nil)))
+	(setq defines (cdr result
 (mapconcat 'identity
 	   (list
 		;; includes
@@ -225,7 +238,8 @@ it's header arguments."
 	(main-p (not (string= (cdr (assoc :main params)) "no")))
 	(imports (or (cdr (assoc :imports params))
 		 (org-babel-read (org-entry-get nil "imports" t)
-(unless (listp imports) (setq imports (list imports)))
+(when (stringp imports)
+  (setq imports (split-string imports)))
 (setq imports (append imports '("std.stdio" "std.conv")))
 (mapconcat 'identity
 	   (list
-- 
1.9.1



Re: [O] [BUG] Entries from Org code blocks appear in agenda

2014-09-04 Thread Nicolas Goaziou
Hello,

"Francesco Pizzolante"
 writes:

> I noticed that entries from Org code blocks are erroneously displayed in
> the agenda.
>
> Here's a very simple Org example in order to reproduce it
> (my-simple-test.org):
>
> * Test
>
> #+BEGIN_SRC org ,SCHEDULED: <2014-09-04 Thu 10:00> #+END_SRC

This is a known bug that would require to use the parser in
"org-agenda.el" for a proper fix.

Meanwhile, I wrote a workaround. Would you mind testing it (note: it
applies on maint, probably not on master without conflicts).


Regards,

-- 
Nicolas Goaziou
>From fad280debe2dd1cb59071f258153004f1dffd51e Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Thu, 4 Sep 2014 21:41:40 +0200
Subject: [PATCH] org-agenda: Prevent false positive SCHEDULED entries

---
 lisp/org-agenda.el | 292 ++---
 lisp/org.el|  82 +--
 2 files changed, 195 insertions(+), 179 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 4b6385b..3d6ecac 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6143,7 +6143,7 @@ an hour specification like [h]h:mm."
 		 org-scheduled-time-hour-regexp
 		   org-scheduled-time-regexp))
 	 (todayp (org-agenda-todayp date)) ; DATE bound by calendar
-	 (d1 (calendar-absolute-from-gregorian date))  ; DATE bound by calendar
+	 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
 	 mm
 	 (deadline-position-alist
 	  (mapcar (lambda (a) (and (setq mm (get-text-property
@@ -6156,153 +6156,153 @@ an hour specification like [h]h:mm."
 	 ddays)
 (goto-char (point-min))
 (while (re-search-forward regexp nil t)
-  (catch :skip
-	(org-agenda-skip)
-	(setq s (match-string 1)
-	  txt nil
-	  pos (1- (match-beginning 1))
-	  todo-state (save-match-data (org-get-todo-state))
-	  show-all (or (eq org-agenda-repeating-timestamp-show-all t)
-			   (member todo-state
-   org-agenda-repeating-timestamp-show-all))
-	  d2 (org-time-string-to-absolute
-		  s d1 'past show-all (current-buffer) pos)
-	  diff (- d2 d1)
-	  warntime (get-text-property (point) 'org-appt-warntime))
-	(setq pastschedp (and todayp (< diff 0)))
-	(setq did-habit-check-p nil)
-	(setq suppress-delay
-	  (let ((ds (and org-agenda-skip-scheduled-delay-if-deadline
-			 (let ((item (buffer-substring (point-at-bol) (point-at-eol
-			   (save-match-data
- (and (string-match
-   org-deadline-time-regexp item)
-  (match-string 1 item)))
-		(cond
-		 ((not ds) nil)
-		 ;; The current item has a deadline date (in ds), so
-		 ;; evaluate its delay time.
-		 ((integerp org-agenda-skip-scheduled-delay-if-deadline)
-		  ;; Use global delay time.
-		  (- org-agenda-skip-scheduled-delay-if-deadline))
-		 ((eq org-agenda-skip-scheduled-delay-if-deadline
-		  'post-deadline)
-		  ;; Set delay to no later than deadline.
-		  (min (- d2 (org-time-string-to-absolute
-			  ds d1 'past show-all (current-buffer) pos))
-		   org-scheduled-delay-days))
-		 (t 0
-	(setq ddays (if suppress-delay
-			(let ((org-scheduled-delay-days suppress-delay))
-			  (org-get-wdays s t t))
-		  (org-get-wdays s t)))
-	;; Use a delay of 0 when there is a repeater and the delay is
-	;; of the form --3d
-	(when (and (save-match-data (string-match "--[0-9]+[hdwmy]" s))
-		   (< (org-time-string-to-absolute s)
-		  (org-time-string-to-absolute
-		   s d2 'past nil (current-buffer) pos)))
-	  (setq ddays 0))
-	;; When to show a scheduled item in the calendar:
-	;; If it is on or past the date.
-	(when (or (and (> ddays 0) (= diff (- ddays)))
-		  (and (zerop ddays) (= diff 0))
-		  (and (< (+ diff ddays) 0)
-		   (< (abs diff) org-scheduled-past-days)
-		   (and todayp (not org-agenda-only-exact-dates)))
-		  ;; org-is-habit-p uses org-entry-get, which is expansive
-		  ;; so we go extra mile to only call it once
-		  (and todayp
-		   (boundp 'org-habit-show-all-today)
-		   org-habit-show-all-today
-		   (setq did-habit-check-p t)
-		   (setq habitp (and (functionp 'org-is-habit-p)
-	 (org-is-habit-p)
-	  (save-excursion
-	(setq donep (member todo-state org-done-keywords))
-	(if (and donep
-		 (or org-agenda-skip-scheduled-if-done
-			 (not (= diff 0))
-			 (and (functionp 'org-is-habit-p)
-			  (org-is-habit-p
-		(setq txt nil)
-	  (setq habitp (if did-habit-check-p habitp
+  (let ((s (save-match-data (org-entry-get (point) "SCHEDULED"
+	(when s
+	  (catch :skip
+	(org-agenda-skip)
+	(setq txt nil
+		  pos (1- (match-beginning 1))
+		  todo-state (save-match-data (org-get-todo-state))
+		  show-all (or (eq org-agenda-repeating-timestamp-show-all t)
+			   (member todo-state
+   org-agenda-repeating-timestamp-show-all))
+		  d2 (org-time-string-to-absolute
+		  s d1 'past show-all (current-buffer) pos)
+		  diff (- d2 d1)
+		  warntime (get-text-property (point) 'org-appt-warntime))
+	(setq p

[O] babel missing out of org-mode

2014-09-04 Thread Steve Quezadas
org-babel does not seem to load on my version of emacs (org-mode loads 
fine). Does org-babel come with emacs 23"? I tried looking up for 
org-babel in my marmelade repository but nothings coming up. If I have 
org mode already, how do I get org-babel?


Info:
distribution: debian 6.0 (squeeze)
emacs version: 23.4.1
org version: 6.33x

- Steve




Re: [O] TODO keyword highlighting for headings with properties broken

2014-09-04 Thread Erik Hetzner
Hi Nicholas,

At Wed, 03 Sep 2014 19:58:58 +0200,
Nicolas Goaziou wrote:
> 
> Hello,
> 
> Erik Hetzner  writes:
> 
> > Highlighting of TODO keywords for headings with properties in my org
> > files seems to have broken since I upgraded to org 20140901 (via org
> > mode ELPA). Rolling back to 20140825 fixes the problem. Here is a
> > sample file I tested after loading the new org-mode using emacs -Q:
> >
> > * TODO foo
> >   :PROPERTIES:
> >   :bar:  baz
> >   :END:
> >
> > If you remove the properties, the TODO highlights correctly.
> 
> I think I fixed it yesterday. Please update if you can.

Just for the record, this problem seems to have caused some stray
`nil`s to be inserted in my entries.

best, Erik

-- 
Sent from my free software system .



Re: [O] TODO keyword highlighting for headings with properties broken

2014-09-04 Thread Erik Hetzner
At Wed, 3 Sep 2014 21:30:11 -0500,
wtm wrote:
> 
> Trevor,
> 
> Thanks so much for mentioning this. I considered using these to roll
> back to 8/25 but I wasn't sure how much performance I would lose if
> I used the .el files instead of the compiled .elc versions. Or
> perhaps my assumption is incorrect? Is it ok to just byte-compile
> all of the .el files manually? I'm still very new to org-mode so
> please forgive my ignorance.

Hi Will,

You can install those packages using M-x package-install-file and you
will get a byte-compiled version.

best, Erik

-- 
Sent from my free software system .



Re: [O] Difference :header-args: and :header-args+:?

2014-09-04 Thread Aaron Ecay
Hi Rainer,

2014ko irailak 4an, Rainer M Krug-ek idatzi zuen:
> 
> Hi
> 
> I have a question concerning the property :header-args:. In addition
> to :header-args: there is also :header-args+:.
> 
> 
> 1) If I set some properties globally and in a subtree I want to *add* a
> *new* header argument - do I have to use the + or not?
> 
> 2) If I set some properties globally and in a subtree I want to *change*
> a *single* header argument which *was set globally* - do I have to use
> the + or not?

Are you aware that you can set individual header args as properties?
Something like (at the file level):

#+property: session *foo*

or (at the subtree level):

:PROPERTIES:
:session: *foo*
:END:

This will likely be easier than trying to do surgery on the header-args
property.

-- 
Aaron Ecay



Re: [O] [PATCH] org-passwords.el: Do not insert `org-passwords-generate-password-with-symbols`

2014-09-04 Thread Jorge A. Alfaro-Murillo
Jonathan Leech-Pepin writes: 

Patch attached and inlined (to ensure gmail does not mangle) 


* org-passwords.el 
(org-passwords-generate-password-with-symbols): Do not insert 
password, this matches how 
`org-passwords-generate-password-without-symbols` behaves. 


Thanks, I had forgotten to remove that from -with-symbols.

Best,

--
Jorge.




[O] easy way to link to file in attachment directory?

2014-09-04 Thread Mirko Vukovic
Hello,

Is there a way to insert a link to a file in the attachment directory?

Currently, I open the attachment directory in emacs and copy the full path.
then in the document I create the link using org-insert-link (C-u C-c C-l).

Thanks,

Mirko




[O] [PATCH] ob-sql.el: Add support for MS sqlcmd

2014-09-04 Thread Jonathan Leech-Pepin
Patch provided inline and as attachment to ensure gmail does not mangle it.

Regards,
Jonathan



ob-sql.el: Add support for sqlcmd

* lisp/ob-sql.el (org-babel-execute:sql): Add support for sqlcmd on
  Windows.  This is a replacement for osql.
---
 lisp/ob-sql.el |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 7b85df8..e96d55d 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -116,6 +116,12 @@ This function is called by
`org-babel-execute-src-block'."
  (or cmdline "")
  (org-babel-process-file-name in-file)
  (org-babel-process-file-name
out-file)))
+('mssqlcmd (format "sqlcmd %s -S %s -s \"\t\" -i %s -o %s"
+(or cmdline "")
+dbhost
+(org-babel-process-file-name in-file)
+(org-babel-process-file-name
+ out-file)))
 ('mysql (format "mysql %s %s %s < %s > %s"
 (dbstring-mysql dbhost dbuser dbpassword database)
 (if colnames-p "" "-N")
-- 
1.7.9


0001-ob-sql.el-Add-support-for-sqlcmd.patch
Description: Binary data


[O] [PATCH] org-passwords.el: Do not insert `org-passwords-generate-password-with-symbols`

2014-09-04 Thread Jonathan Leech-Pepin
Patch attached and inlined (to ensure gmail does not mangle)

Regards,
Jonathan



org-passwords.el: Fix `org-passwords-generate-password-with-symbols` to not
insert password

* org-passwords.el (org-passwords-generate-password-with-symbols): Do not
insert password,
this matches how `org-passwords-generate-password-without-symbols` behaves.
---
 contrib/lisp/org-passwords.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el
index 7ed8c80..9c3a916 100644
--- a/contrib/lisp/org-passwords.el
+++ b/contrib/lisp/org-passwords.el
@@ -221,12 +221,12 @@ uppercase letters.  Argument ARG include symbols."
   "Return a string consisting of PREVIOUS-STRING and
 NUMS-OF-CHARS random characters."
   (if (eq nums-of-chars 0) previous-string
-(insert (org-passwords-generate-password-with-symbols
+(org-passwords-generate-password-with-symbols
  (concat previous-string
  (char-to-string
   ;; symbols, letters, numbers are from 33 to 126
   (+ (random (- 127 33)) 33)))
- (1- nums-of-chars)
+ (1- nums-of-chars

 (defun org-passwords-generate-password-without-symbols (previous-string
nums-of-chars)
   "Return string consisting of PREVIOUS-STRING and NUMS-OF-CHARS
-- 
1.7.9


0001-org-passwords.el-Fix-org-passwords-generate-password.patch
Description: Binary data


[O] [BUG] Entries from Org code blocks appear in agenda

2014-09-04 Thread Francesco Pizzolante
Hi,

I noticed that entries from Org code blocks are erroneously displayed in
the agenda.

Here's a very simple Org example in order to reproduce it
(my-simple-test.org):

--8<---cut here---start->8---
* Test

#+BEGIN_SRC org
,SCHEDULED: <2014-09-04 Thu 10:00>
#+END_SRC
--8<---cut here---end--->8---

The minimal Emacs configuration used to reproduce the issue is
(my-simple-test.el):

--8<---cut here---start->8---
(setq org-agenda-files '("~/my-simple-test.org"))
--8<---cut here---end--->8---

And Emacs (my version is 24.3.1) is started with the following command:

--8<---cut here---start->8---
emacs -Q -l my-simple-test.el
--8<---cut here---end--->8---

If you run M-x org-agenda > a, you can see that the Test entry appears
in today's agenda, which is, of course, wrong (see issue here:
http://screencast.com/t/0bhud8qPxxj).

Regards,
 Francesco



[O] problems with displaying links

2014-09-04 Thread Dan Griswold
Hi all,

Somehow, org is no longer consistently showing links as descriptive links.
I can see no pattern to this: some are shown as descriptive, some as
literal.

org-descriptive-links: t
org-version: 8.2.7c (via ELPA)
emacs version: 24.3.1

Any thoughts?

Dan
Rochester, NY


Re: [O] graphics for html and latex / pdf export?

2014-09-04 Thread Rainer M Krug
Thorsten Jolitz  writes:

> Rainer M Krug  writes:
>
>> OK - ignore my comment concerning R - this is working. I am just trying
>> it out. HTML works perfectly. 
>>
>> I am just struggling with pdf. I have to set the org-latex-pdf-process
>> to "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
>> %f" and, due to security concerns, only want to set it via file local
>> variable. But I somehow don't manage it.
>>
>> ,
>> | # Local Variables:
>> | # org-latex-pdf-process: "pdflatex -shell-escape -interaction
>> | nonstopmode -output-directory %o %f"
>> | # End:
>> `
>>
>> Does not work ("No valid command to process pdf"). How can I set the
>> command as a file local variable?
>
> maybe as list like here:
>
> % reftex-ref-style-default-list: ("Fancyref")

Perfect - working.

Thanks a lot,

Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgp7ZFH3QL7tf.pgp
Description: PGP signature


Re: [O] graphics for html and latex / pdf export?

2014-09-04 Thread Thorsten Jolitz
Rainer M Krug  writes:

> OK - ignore my comment concerning R - this is working. I am just trying
> it out. HTML works perfectly. 
>
> I am just struggling with pdf. I have to set the org-latex-pdf-process
> to "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
> %f" and, due to security concerns, only want to set it via file local
> variable. But I somehow don't manage it.
>
> ,
> | # Local Variables:
> | # org-latex-pdf-process: "pdflatex -shell-escape -interaction
> | nonstopmode -output-directory %o %f"
> | # End:
> `
>
> Does not work ("No valid command to process pdf"). How can I set the
> command as a file local variable?

maybe as list like here:

% reftex-ref-style-default-list: ("Fancyref")

-- 
cheers,
Thorsten




Re: [O] graphics for html and latex / pdf export?

2014-09-04 Thread Rainer M Krug
OK - ignore my comment concerning R - this is working. I am just trying
it out. HTML works perfectly. 

I am just struggling with pdf. I have to set the org-latex-pdf-process
to "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f" and, due to security concerns, only want to set it via file local
variable. But I somehow don't manage it.

,
| # Local Variables:
| # org-latex-pdf-process: "pdflatex -shell-escape -interaction nonstopmode 
-output-directory %o %f"
| # End:
`

Does not work ("No valid command to process pdf"). How can I set the
command as a file local variable?

Rainer
 

Rainer M Krug  writes:

> Aaron Ecay  writes:
>
>> Hi Rainer,
>>
>> One option is to use svg graphics, which are supported in latex (via the
>> svg package from CTAN) and in HTML (on almost all modern browsers:
>> ).  The svg latex package supports
>> compiling with pdflatex out of the box and lualatex with a little
>> hackery; xelatex is not supported (you also need to install inkscape and
>> compile with a flag that allows latex code to execute shell commands).
>
> svg does not work easily, as I have to use the cairo package in R to use
> it, so I have to add this manually. Nevertheless, I could do this in a
> session in a block before.
>
>>
>> Otherwise, you might be looking for something like this worg page:
>> .
>
> That one works nicely when generating the graphs on export - but I
> would like to do no evaluations on export to have the org file as a
> "output" itself.
>
> Thanks a lot,
>
> Rainer
>
>>
>> And also search “by-backend” in the mailing list archives for other
>> relevant examples.
>>
>> Hope this is helpful,

-- 
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 :   +33 - (0)9 58 10 27 44

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

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


pgpdRf97uA5fJ.pgp
Description: PGP signature


Re: [O] graphics for html and latex / pdf export?

2014-09-04 Thread Rainer M Krug
Aaron Ecay  writes:

> Hi Rainer,
>
> One option is to use svg graphics, which are supported in latex (via the
> svg package from CTAN) and in HTML (on almost all modern browsers:
> ).  The svg latex package supports
> compiling with pdflatex out of the box and lualatex with a little
> hackery; xelatex is not supported (you also need to install inkscape and
> compile with a flag that allows latex code to execute shell commands).

svg does not work easily, as I have to use the cairo package in R to use
it, so I have to add this manually. Nevertheless, I could do this in a
session in a block before.

>
> Otherwise, you might be looking for something like this worg page:
> .

That one works nicely when generating the graphs on export - but I
would like to do no evaluations on export to have the org file as a
"output" itself.

Thanks a lot,

Rainer

>
> And also search “by-backend” in the mailing list archives for other
> relevant examples.
>
> Hope this is helpful,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgp9l59mEnDEu.pgp
Description: PGP signature


[O] Difference :header-args: and :header-args+:?

2014-09-04 Thread Rainer M Krug
Hi

I have a question concerning the property :header-args:. In addition
to :header-args: there is also :header-args+:.


1) If I set some properties globally and in a subtree I want to *add* a
*new* header argument - do I have to use the + or not?

2) If I set some properties globally and in a subtree I want to *change*
a *single* header argument which *was set globally* - do I have to use
the + or not?

I am asking, because the + version is not mentioned in the manual and I
have the feeling there are some inconsistencies, but I want to confirm
if I understand this correctly before reporting these.

Thanks,

Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpZGqI8rzKI1.pgp
Description: PGP signature


[O] Disabling figure numbers

2014-09-04 Thread Francesco Pizzolante
Hi,

Currently, with the latest Elpa version, when exporting Org buffers to
HTML generates figure numbers for images having a caption.

How can I disable this behavior in order to get images with captions but
without figure numbers?

Thanks a lot.

Regards,
 Francesco



[O] [BUG] [babel] Tangling from code block and header arguments

2014-09-04 Thread Rainer M Krug
When tangling from a code block, the header arguments from the code
block are used for the tangling, and not the header arguments defined
for other subtrees or code blocks, as is the case when tangling
interactively.

Below find an example provided by Charles.

Cheers,

Rainer

--8<---cut here---start->8---
#+PROPERTY: header-args :tangle no

* Problem:
Note that the :tangle header arg for the 'Descr' src block is correctly 
rendered from the DESCRIPTION subtree, but not from the 'new heading' 
subtree.

* DESCRIPTION File
:PROPERTIES:
:header-args: :tangle ./DESCRIPTION
:END:

#+NAME: Descr
#+begin_src RDescr
test
#+end_src

#+BEGIN_SRC emacs-lisp :results pp
   (save-excursion
 (org-babel-goto-named-src-block "Descr")
 (assoc :tangle (nth 2 (org-babel-get-src-block-info
#+END_SRC

#+RESULTS:
: (:tangle . "./DESCRIPTION")



* new heading

#+BEGIN_SRC emacs-lisp :results pp
   (save-excursion
 (org-babel-goto-named-src-block "Descr")
 (assoc :tangle (nth 2 (org-babel-get-src-block-info
#+END_SRC

#+RESULTS:
: (:tangle . "no")
--8<---cut here---end--->8---


"Charles C. Berry"  writes:

> On Wed, 3 Sep 2014, Rainer M Krug wrote:
>
>> Charles Berry  writes:
>>
>>> Rainer M Krug  krugs.de> writes:
>>>

 Hi

 I am calling (org-bable-tangle) in a code block in an org file and I
 would show the files resulting from the tangling in a nice format.

>
> [original question nd answer deleted]
>
>
>> Thanks - this looks promising.
>>
>> But I now have another problem: The result of tangling from a code block
>> is different then when calling interactively.
>>
>> Consider the following org file:
>>
>> --8<---cut here---start->8---
>> #+PROPERTY: header-args :tangle no
>>
>> * DESCRIPTION File
>> :PROPERTIES:
>> :header-args+: :tangle ./DESCRIPTION
>> :END:
>>
>> #+begin_src RDescr
>> test
>> #+end_src
>>
>> * And the tangling
>> #+BEGIN_SRC emacs-lisp :results value
>> (mapconcat (lambda (x) (file-relative-name x "..")) (org-babel-tangle) "\n")
>> #+END_SRC
>>
>> #+RESULTS:
>>
>> --8<---cut here---end--->8---
>>
>> When tangling interactively, the file DESCRIPTION is tangled properly.
>> But when I call (org-babel-tangle) from the code block, nothing is
>> tangled because in this case, the property =tangle= is equal to =no=
>> based on the file wide property setting in the beginning.
>>
>> Is this a bug or is it simply not possible to tangle from a code block?
>
> I think this is a bug.
>
> Here is an ECM to demo it.
>
> Note that the :tangle header arg for the 'Descr' src block is correctly 
> rendered from the DESCRIPTION subtree, but not from the 'new heading' 
> subtree.
>
>
>
> #+PROPERTY: header-args :tangle no
>
> * DESCRIPTION File
> :PROPERTIES:
> :header-args: :tangle ./DESCRIPTION
> :END:
>
> #+NAME: Descr
> #+begin_src RDescr
> test
> #+end_src
>
> #+BEGIN_SRC emacs-lisp :results pp
>(save-excursion
>  (org-babel-goto-named-src-block "Descr")
>  (assoc :tangle (nth 2 (org-babel-get-src-block-info
> #+END_SRC
>
> #+RESULTS:
> : (:tangle . "./DESCRIPTION")
>
>
>
> * new heading
>
> #+BEGIN_SRC emacs-lisp :results pp
>(save-excursion
>  (org-babel-goto-named-src-block "Descr")
>  (assoc :tangle (nth 2 (org-babel-get-src-block-info
> #+END_SRC
>
> #+RESULTS:
> : (:tangle . "no")
>
>
>
>
> HTH,
>
> Chuck
>
>

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpHI6QcBI9ka.pgp
Description: PGP signature


[O] Bug or config problem: Export to latex works, but not to html with R code

2014-09-04 Thread Rainer M Krug
I can export the simple org document below without problems to pdf, but
when I export it to html, I get the error

,
| org-babel-exp process R at line 10...
| executing R code block...
| Code block evaluation complete.
| ess-developer--get-package-name: Search failed: "package: \\(.*\\)"
`

I *do not* think that it is an ESS problem, as the export to latex and
other backends is working without problems. 

Could somebody confirm if this is a problem in my config or a bug?

Thanks,

Rainer

--8<---cut here---start->8---
#+TITLE: proptest
#+AUTHOR: Rainer M. Krug
#+EMAIL: rai...@krugs.de

#+PROPERTY: header-args :session *R_proptest*
#+PROPERTY: header-args+ :exports both

* And the graph

#+begin_src R :results output
cat(1, "\n")
#+end_src

* Versions
- Org-mode :: version 8.3beta (release_8.3beta-310-g38d0eb @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)
- ess-version :: 13.09-1 [svn: 5936 (2013-12-04)] (loaded from 
/Users/rainerkrug/.emacs.d/ess-13.09-1/)
- GNU Emacs :: 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0 AppKit 
1265.19) of 2014-04-03 on Rainers-MacBook-Pro-3.local
- OSX :: Mavericks
--8<---cut here---end--->8---


-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


pgpRDeLUfCy8J.pgp
Description: PGP signature


Re: [O] Unit conversions and symbolic mathematics with Babel

2014-09-04 Thread H. Dieter Wilhelm
die...@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

> Hello Org,
>
> for some engineering most often I need estimations with unit
> conversions, Emacs Calc is perfect for this.
>
> When it comes to reporting and documentation I'd like to do it with
> org-mode, of course.  For numerical stuff and visualisation purposes I'm
> using already R and TikZ. But for unit conversions and symbolic maths
> I'm in a bind when trying to do this with free programs.
>
> - R :: Do you have experience with a units packages under the R-project?
>   What I've seen so far is not so reassuring...
>
> - Maxima :: I think there is a nice and intuitive units package for
>   maxima.  But this would mean learning an additional tool and mentally
>   switching between both within one document.
>
> - Calc :: I'd prefer to do it with Calc but the Babel interface is
>   (yet?) restricted
>
>   For example, I can define functions and do some unit conversions:
>
> #+BEGIN_SRC emacs-lisp
> (defmath cvun(a b)
> (math-convert-units a b))
> #+END_SRC
>
> #+RESULTS:
> : calcFunc-cvun
>
> #+BEGIN_SRC calc :var L1 = "5 mm" 
> cvun( L1, m)
> #+END_SRC
>
> #+RESULTS:
> : 5e-3 m
>
>   But what is missing is to assign variables within a source block
>   
> #+BEGIN_SRC calc :var L1 = "5 mm" 
> L2 := cvun( L1, m)
> #+END_SRC
>   
>   Unfortunately this is not working.  Do you have an idea how to
>   implement this?



For your information: Jay Belanger found a workaround

#+BEGIN_SRC emacs-lisp
(defmath sett(a b) ; or any other name not identical to the applied lisp 
functions
  (set (nth 2 a) b))
#+END_SRC

#+RESULTS:
: calcFunc-sett

#+BEGIN_SRC calc :var L1 = 3
sett( L2, 3.14)
L2 - L1
#+END_SRC

#+RESULTS:
: 0.14

-- 
   Dieter   



> - Are you using (better) alternatives?
>
> Thanks for your insights
>
>Dieter

-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany




Re: [O] navi equivalent to 'g' speed command?

2014-09-04 Thread Alan Schmitt
On 2014-09-03 21:00, Thorsten Jolitz  writes:

>> Maybe I should look into doing this the navi way. Assume you want to
>> reach an entry with "foobar" in its title, but you don't know at what
>> level this entry is. How would you do it?
>
> As I wrote in my last mail, I think outshine-imenu (using idomenu, you
> have to install that package for ido-style completion) does exacly what
> you want - offer all file headers with smart completion, so you only
> need to type 'foo' or so to get the "foobar" headline. Typing RET then
> moves point to the headline.

I looked a little deeper into this, and I found that the code is
supposed to work even when idomenu is not installed. Unfortunately it
does not: the function 'imenu-choose-buffer-index' does not seem to
exist until imenu is launched once. Maybe a "require" is missing?

Things work well once I've launched imenu manually (the integration
with helm is even automatic). There is one small additional issue,
though: the entry targetted remain folded. Is there a way to
(automatically) unfold it?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature