Re: [O] Bug: OpenDocument export failed: End of file during parsing [8.2.10 (release_8.2.10 @ /nix/store/2v8f4l0ikhjnqmbqn0lm9vshssm5apaq-emacs-24.5/share/emacs/24.5/lisp/org/)]

2016-02-08 Thread Damien Cassou
Nicolas Goaziou  writes:

> Could you send the backtrace (possibly with Org uncompiled)? I might
> help understanding the issue.

this is weird. I'm using a clean Emacs, on which I execute:

(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/;) t)
;; M-x package-install org-plus-contrib
(require 'ox-odt)

Then, I quit Emacs, I remove all .elc files, then I launch Emacs again and

- M-x toggle-debug-on-error
- open an empty org file, try to export to .odt, and get

OpenDocument export failed: Buffer is read-only: #

- now, if I add "#+ODT_STYLES_FILE:" to the file, I get a different
  message

OpenDocument export failed: End of file during parsing

Unfortunately, in both cases, no trace appears. I'm stuck.

If you want, I'm frequently on IRC channels, e.g., #emacs and I can be
contacted through many IM ways (see my website).

Best,

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Re: [O] Evaluating simple inline expressions in org-mode

2016-02-08 Thread Eric S Fraga
On Sunday,  7 Feb 2016 at 16:45, H. Dieter Wilhelm wrote:
 works as well.  I'm not sure how you define variables in calc however...
>>>
>
>>> You could write something like src_calc[:var x=3.41]{2*x} :-)
>>
>> Yes but can you save a variable for use in a later expression?
>
> Well, at the moment I don't know another way as defining the calc
> variables on the lisp level:
>
> #+BEGIN_SRC emacs-lisp
> (setq var-foo 9.81
>   var-x 3.14
>   var-bar ...)
> #+END_SRC
>
> Note: `var-' is a special prefix for the calc variables `foo', `x',

Thanks for this.  Very useful to know.  Using this, I've created a macro
which will be quite useful for me in preparing some lecture notes with
simple calculations for illustration:

#+begin_src org
  ,#+macro: calculate $2 \leftarrow src_calc[:exports code]{$1} = 
src_emacs-lisp{(setq var-$2 (string-to-number (calc-eval "evalv($1)")))}

  An example:

  {{{calculate(x+y,z)}}}
#+end_src

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa



Re: [O] want a custom project-aware agenda-todo-view

2016-02-08 Thread Eric S Fraga
On Monday,  8 Feb 2016 at 06:50, Stefan Huchler wrote:
> when I open agenda-view (list all todo entries) "t" I see all todo items
> and in the first column the filename.
>
> I would rather see the project the task belongs to,
> sorry if I am ask thats maybe very simpel and I just dont find the right
> varible/method to do so.

Look at categories, section 10.4.1 of the info manual.  It should do
exactly what you want although you will need to add category definitions
to each project.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa



[O] Bug: Regression in ox-texinfo export

2016-02-08 Thread Oleh Krehel

At the current git master, the org source:

#+BEGIN_TEXINFO
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below.  A copy of the license
is included in the section entitled ``GNU Free Documentation License.''

(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
modify this GNU manual.''
@end quotation
#+END_TEXINFO

results in the following .texi output:

@TEXINFO
@@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below.  A copy of the license
is included in the section entitled ``GNU Free Documentation License.''

(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
modify this GNU manual.''
@@end quotation
@end TEXINFO

This was done with `emacs -Q', no extra code except (require 'ox-texinfo).

Note that the above org source works fine with the built-in Org-mode:

@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below.  A copy of the license
is included in the section entitled ``GNU Free Documentation License.''

(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
modify this GNU manual.''
@end quotation

@c Emacs 25.0.50.4 (Org mode 8.2.10)

regards,
Oleh



Re: [O] column view uses non-existent org-whitespace face

2016-02-08 Thread Eric Abrahamsen
Michael Brand  writes:

> Hi Eric
>
> On Thu, Sep 25, 2014 at 6:09 PM, Michael Brand
>  wrote:
>
>> On Tue, Aug 5, 2014 at 4:53 AM, Eric Abrahamsen  
>> wrote:
>
>>> 2. The text for %ITEM has the face org-whitespace applied to the leading
>>> stars, which doesn't exist anymore. I assume the intended effect was
>>> that the stars take up space, emulating indentation, but not themselves
>>> be visible. I guess that would be done by replacing the org-whitespace
>>> face with whatever's being used as the column background color but I
>>> don't know enough about faces to make that work. I also tried switching
>>> 'org-whitespace to 'invisible, but that didn't do anything. This is in
>>> org-columns-cleanup-item.

> With recent changes made by Nicolas the solution became obvious to me,
> fixed in master. (I don't consider hidden stars useful in column view
> of agenda view as it is not a folded hierarchy and as the headings can
> origin from different settings for hidden stars, so I didn't repeat my
> change there.)

Wow, that was a longstanding issue -- thanks for finally resolving it!

Eric




[O] why does org-protocol randomly fail with "no server buffers remain to edit"?

2016-02-08 Thread Samuel Wales
why does org-protocol randomly fail with "no server buffers remain to edit"?

i have tried a bookmark, which is clunky, and org-capture extension.
i get this frequently.

iceweasel 38.6.0 debian jessie, emacs 24, org maint.



Re: [O] [PATCH] org-attach.el: Get attachments from git annex

2016-02-08 Thread Erik Hetzner
On Sun, 07 Feb 2016 12:48:20 -0800,
Achim Gratz  wrote:
> 
> Erik Hetzner writes:
> > Thank you for all your feedback on this code! I’m really happy with how it
> > turned out, and glad it is in master now.
> 
> Please fix the tests to not fail (preferrably not run) if git-annex is
> not installed.
> 
> Also, revert the patch to mk/targets.mk; $(RMR) already includes the
> '--force' flag, so it can remove write protected files just fine.  If
> it's write protecting directories then that would be stupid, but still
> no reason to chmod all files.

Hi Achim,

Sorry - I misunderstood how `org-test-for-executable' works. I’ll fix the issue.

As for the rm -rf, it does not work in the way you suggest, at least on ubuntu
GNU/Linux. Here is the result I get locally without the chmod:

make cleantest
make[1]: Entering directory '/home/egh/c/org-mode'
rm -fr /tmp/tmp-orgtest
rm: cannot remove 
‘/tmp/tmp-orgtest/org-annex-test18033fml/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447’:
 Permission denied
rm: cannot remove 
‘/tmp/tmp-orgtest/org-annex-test18033Scf/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447’:
 Permission denied
rm: cannot remove 
‘/tmp/tmp-orgtest/org-annex-test172167kl/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447’:
 Permission denied
rm: cannot remove 
‘/tmp/tmp-orgtest/org-annex-test17216uaf/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447’:
 Permission denied
mk/targets.mk:163: recipe for target 'cleantest' failed
make[1]: *** [cleantest] Error 1
make[1]: Leaving directory '/home/egh/c/org-mode'
mk/targets.mk:103: recipe for target 'test' failed
make: *** [test] Error 2

If you have a better suggestion to this issue I’d love to know! I’m not sure
what the best fix is here.

best, Erik



Re: [O] bug#22597: [25.0.90.1] org-table-import docu

2016-02-08 Thread Andreas Röhler



On 08.02.2016 21:51, Rasmus wrote:

Hi Andreas,

Thanks for your report.

Andreas Röhler  writes:


saying: The file is assumed to be tab-separated

While internally org-table-convert-region is used receiving optional
argument SEPARATOR:

\(4)  Use the comma as a field separator
\(16) Use a TAB as field separator

;;;

Thus docu should mention the comma as possible separator.

Isn't it covered by the following line?

regexp   When a regular expression, use it to match the separator


Which version you are checking against?
Here it org-table-import docu continues:


;;;

Such files can be produced by most
spreadsheet and database applications.  If no tabs (at least one per line)
are found, lines will be split on whitespace into fields.

;;;

The initial sentence is just wrong, as TAB is only one thing tried - 
there are a lot more.

See docu of org-table-convert-region for details.





[O] [PATCH] testing/lisp/test-org-attach-annex.el: New file

2016-02-08 Thread Erik Hetzner
* testing/lisp/test-org-attach-annex.el: Move all org-attach tests that
  use git-annex to this file, which can test for the presence of
  git-annex. Prevents tests failing on systems where git-annex is not
  installed.
---
 testing/lisp/test-org-attach-annex.el | 96 ++
 testing/lisp/test-org-attach.el   | 97 ---
 2 files changed, 96 insertions(+), 97 deletions(-)
 create mode 100644 testing/lisp/test-org-attach-annex.el
 delete mode 100644 testing/lisp/test-org-attach.el

diff --git a/testing/lisp/test-org-attach-annex.el 
b/testing/lisp/test-org-attach-annex.el
new file mode 100644
index 000..44b4ad0
--- /dev/null
+++ b/testing/lisp/test-org-attach-annex.el
@@ -0,0 +1,96 @@
+;;; test-org-annex-attach.el --- Tests for Org Attach with git-annex
+;;
+;; Copyright (c) 2016 Erik Hetzner
+;; Authors: Erik Hetzner
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Code:
+(org-test-for-executable "git-annex")
+(require 'org-attach)
+(require 'cl-lib)
+
+(defmacro test-org-attach-annex/with-annex ( body)
+  `(let ((tmpdir (make-temp-file "org-annex-test" t)))
+ (unwind-protect
+(let ((default-directory tmpdir)
+  (org-attach-directory tmpdir))
+  (shell-command "git init")
+  (shell-command "git annex init")
+  ,@body
+
+(ert-deftest test-org-attach/use-annex ()
+  (test-org-attach-annex/with-annex
+   (let ((org-attach-git-annex-cutoff 1))
+ (should (org-attach-use-annex)))
+
+   (let ((org-attach-git-annex-cutoff nil))
+ (should-not (org-attach-use-annex
+
+  ;; test with non annex directory
+  (let ((tmpdir (make-temp-file "org-annex-test" t)))
+ (unwind-protect
+(let ((default-directory tmpdir)
+  (org-attach-directory tmpdir))
+  (shell-command "git init")
+  (should-not (org-attach-use-annex)))
+   (delete-directory tmpdir 'recursive
+
+(ert-deftest test-org-attach/get-maybe ()
+  (test-org-attach-annex/with-annex
+   (let ((path (expand-file-name "test-file"))
+(annex-dup (make-temp-file "org-annex-test" t)))
+ (with-temp-buffer
+   (insert "hello world\n")
+   (write-file path))
+ (shell-command "git annex add test-file")
+ (shell-command "git annex sync")
+ ;; Set up remote & copy files there
+ (let ((annex-original default-directory)
+  (default-directory annex-dup))
+   (shell-command (format "git clone %s ." (shell-quote-argument 
annex-original)))
+   (shell-command "git annex init dup")
+   (shell-command (format "git remote add original %s" 
(shell-quote-argument annex-original)))
+   (shell-command "git annex get test-file")
+   (shell-command "git annex sync"))
+ (shell-command (format "git remote add dup %s" (shell-quote-argument 
annex-dup)))
+ (shell-command "git annex sync")
+ (shell-command "git annex drop --force test-file")
+ ;; test getting the file from the dup when we should ALWAYS get
+ (should (not (file-exists-p (file-symlink-p (expand-file-name 
"test-file")
+ (let ((org-attach-annex-auto-get t))
+   (org-attach-annex-get-maybe (expand-file-name "test-file"))
+   ;; check that the file has the right contents
+   (with-temp-buffer
+(insert-file-contents path)
+(should (string-equal "hello world\n" (buffer-string)
+ ;; test getting the file from the dup when we should NEVER get
+ (shell-command "git annex drop --force test-file")
+ (let ((org-attach-annex-auto-get nil))
+   (should-error (org-attach-annex-get-maybe (expand-file-name 
"test-file"
+ (let ((org-attach-annex-auto-get 'ask)
+  (called nil))
+   (flet ((y-or-n-p (prompt)
+  (setq called 'was-called)
+  t))
+(org-attach-annex-get-maybe (expand-file-name "test-file"))
+;; check that the file has the right contents
+(with-temp-buffer
+  (insert-file-contents path)
+  (should (string-equal "hello world\n" (buffer-string
+(should (eq called 'was-called)))
+
+;;; test-org-attach-annex.el ends here
diff --git a/testing/lisp/test-org-attach.el b/testing/lisp/test-org-attach.el
deleted file mode 100644
index 9772bd7..000
--- 

Re: [O] Bug: Regression in ox-texinfo export

2016-02-08 Thread Oleh Krehel
Kaushal Modi  writes:

> The syntax change was announced in Dec last year:
> https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html
>
> It is now
>
> #+BEGIN_EXPORT backend
> #+END_EXPORT

Thanks, Kaushal. I wasn't aware of the change.

I assume that #+TEXINFO: and #+HTML: one-line blocks remain unchanged?

Oleh



Re: [O] Strange problems when exporting asynchronously in beamer mode

2016-02-08 Thread Julien Cubizolles
Nicolas Goaziou  writes:


> You could try adding (require 'ox-beamer) above.

That did it. For some reason, it wasn't needed before.

Julien.



Re: [O] Bug: Regression in ox-texinfo export

2016-02-08 Thread Kaushal Modi
The syntax change was announced in Dec last year:
https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html

It is now

#+BEGIN_EXPORT backend
#+END_EXPORT

On Monday, February 8, 2016, Oleh Krehel  wrote:

>
> At the current git master, the org source:
>
> #+BEGIN_TEXINFO
> @quotation
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
> and with the Back-Cover Texts as in (a) below.  A copy of the license
> is included in the section entitled ``GNU Free Documentation License.''
>
> (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
> modify this GNU manual.''
> @end quotation
> #+END_TEXINFO
>
> results in the following .texi output:
>
> @TEXINFO
> @@quotation
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
> and with the Back-Cover Texts as in (a) below.  A copy of the license
> is included in the section entitled ``GNU Free Documentation License.''
>
> (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
> modify this GNU manual.''
> @@end quotation
> @end TEXINFO
>
> This was done with `emacs -Q', no extra code except (require 'ox-texinfo).
>
> Note that the above org source works fine with the built-in Org-mode:
>
> @quotation
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> any later version published by the Free Software Foundation; with no
> Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
> and with the Back-Cover Texts as in (a) below.  A copy of the license
> is included in the section entitled ``GNU Free Documentation License.''
>
> (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
> modify this GNU manual.''
> @end quotation
>
> @c Emacs 25.0.50.4 (Org mode 8.2.10)
>
> regards,
> Oleh
>
>

-- 

--
Kaushal Modi


Re: [O] column view uses non-existent org-whitespace face

2016-02-08 Thread Michael Brand
Hi Eric

On Thu, Sep 25, 2014 at 6:09 PM, Michael Brand
 wrote:

> On Tue, Aug 5, 2014 at 4:53 AM, Eric Abrahamsen  
> wrote:

>> 2. The text for %ITEM has the face org-whitespace applied to the leading
>> stars, which doesn't exist anymore. I assume the intended effect was
>> that the stars take up space, emulating indentation, but not themselves
>> be visible. I guess that would be done by replacing the org-whitespace
>> face with whatever's being used as the column background color but I
>> don't know enough about faces to make that work. I also tried switching
>> 'org-whitespace to 'invisible, but that didn't do anything. This is in
>> org-columns-cleanup-item.
>>
>> [...]
>> The second would be nice to resolve --
>> it's ugly!
>
> Same here. I just tried to hide the leading stars in column view by
> shifting the beginning of the overlay to the right in
> `org-columns-new-overlay' with
>
> (let ((ov (make-overlay
>(if org-hide-leading-stars (+ beg (org-current-level) -1) beg)
>end)))
>
> but this trial seems to have several issues and I don't know how to do
> it right.
>
> Michael

With recent changes made by Nicolas the solution became obvious to me,
fixed in master. (I don't consider hidden stars useful in column view
of agenda view as it is not a folded hierarchy and as the headings can
origin from different settings for hidden stars, so I didn't repeat my
change there.)

Michael



[O] bug#22597: [25.0.90.1] org-table-import docu

2016-02-08 Thread Rasmus
Hi Andreas,

Thanks for your report.

Andreas Röhler  writes:

> saying: The file is assumed to be tab-separated
>
> While internally org-table-convert-region is used receiving optional
> argument SEPARATOR:
>
> \(4)  Use the comma as a field separator
> \(16) Use a TAB as field separator
>
> ;;;
>
> Thus docu should mention the comma as possible separator.

Isn't it covered by the following line?

regexp   When a regular expression, use it to match the separator

Thanks,
Rasmus

-- 
⠠⠵






[O] Errors get suppressed by org-babel-execute-src-block

2016-02-08 Thread Gary Oberbrunner
org-babel-execute-src-block has a big unwind-protect that basically eats
all errors inside it. I don't think it used to do that. It makes it hard to
debug my sql code since I can't figure out where the actual problem is.

In my case, I'm probably returning no result from some query, and ob-sql is
mis-parsing that; but due to the unwind-protect it doesn't give me a stack
dump or anything useful, just a "Beginning of buffer" message in
*Messages*. And it makes setting debug-on-error not work too.

I'm considering replacing/augmenting that stanza with a condition-case.
What do folks here think? Is there a better way?

-- 
Gary


Re: [O] symbol's function definition is void: org-find-property

2016-02-08 Thread Thorsten Jolitz
童俊翔  writes:

> I want to use capture, the following is my configuration in .emacs
>
>
> ;;(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
> (global-set-key "\C-cl" 'org-store-link)
> (global-set-key "\C-cc" 'org-capture)
> (global-set-key "\C-ca" 'org-agenda)
> (global-set-key "\C-cb" 'org-iswitchb)
>
> ;;capture template
> (setq org-capture-templates
>   '(("t" "Todo" entry (file+headline "~/360Cloud/GTD/gtd.org" "Tasks")
>"* TODO %?\n %i\n %a")
>   ("j" "Journal" entry (file+datetree "~/360Cloud/GTD/journal.org")
>"* %?\nEntered on %U\n %i\n %a")))
>
> When I press C-cc, j,  it doesn’t work, and i promoted that: symbol's 
> function definition is void: org-find-property.
> What’s the problem?
> Thank you for your help!

What does 

,[ C-h f org-find-property RET ]
| org-find-property is a compiled Lisp function in `org.el'.
| [...]
`

say?

Your "M-x org-version"?
Do you have more than one Org-mode installed?

-- 
cheers,
Thorsten




[O] Capture while away from the computer via phone audio recording

2016-02-08 Thread Russell Adams
I use org-capture for *everything*. My primary Org files are all
exclusively appended to by org-capture, and the agenda is my primary
method of accessing their contents. Obviously these are separate from
my per-project Org files, but they allow me to capture the dynamic
events thrown at me each day.

I've been looking for a method to allow me to quickly capture items
while away from my computer. I'm not keen on any of the mobile
Org-mode solutions I've reviewed for one reason or another (offtopic).

I just found a solution that I'm impressed with and so I wanted to
share. On my Android phone I found an app called AudioReminder which
allows you to make short ad-hoc audio recordings, and then gives you
basic task management (ie: alerts, pending / complete) for each
one. No audio file management required.

By default a recording will remind you hourly until you mark it
completed. I'm still testing, but this can be customized and it can
use your location to determine when to remind you that you have items
pending (ie: only alert me when I'm at home).

This allows me to quickly dictate a short item to my phone while I am
away from my computer, and it will remind me later so the recording
isn't forgotten which was a common problem with any other audio
solution I've used. Once home I can transcribe items into my Org file
at my laptop.

The author has been very responsive, and is already adding a one touch
record widget at my request. I thought it only fair to share with the
list. Perhaps others will find it useful.

Thanks.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3