[O] Visiting an Entry with an ID

2016-02-09 Thread Alan Parker Lue
Trying to figure out how to switch buffers when visiting an entry given an
ID in Elisp. To elaborate:

http://stackoverflow.com/questions/35299171/org-mode-elisp-how-does-one-switch-the-buffer-when-using-an-id-to-visit-an-en

Does anyone have an answer for this?


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

2016-02-09 Thread Achim Gratz
Erik Hetzner writes:
> Sorry - I misunderstood how `org-test-for-executable' works. I’ll fix the 
> issue.

Thanks.

> 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:

For pete's sake, what are the permissions?  As I said, the only reason I
see that is happening is if the directory containing the files is mode
55x.  And that would either be spectactularly stupid or exceptionally
clever, although I tend toward the first interpretation.  In any case,
you'd need to make the directories writable to fix this, but not the
files.  There might be a config option that you could/should set to
avoid this bit of cleverness or nuisance by git-annex..


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Visiting an Entry with an ID

2016-02-09 Thread John Kitchin
I posted this answer on SO:

(defun open-id (id)
  (org-id-goto id)
  (message "%s" (current-buffer)))

It seems to do what you want.

Alan Parker Lue writes:

> Trying to figure out how to switch buffers when visiting an entry given an
> ID in Elisp. To elaborate:
>
> http://stackoverflow.com/questions/35299171/org-mode-elisp-how-does-one-switch-the-buffer-when-using-an-id-to-visit-an-en
>
> Does anyone have an answer for this?


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?

2016-02-09 Thread John Kitchin
I guess it is a required signature for the function (i.e. some other
function will call it with some argument), and _ indicates it is not
used in the body. If you were to give it the arg a name, then checkdoc
would complain about it not being in the docstring.

Thorsten Jolitz writes:

> Hi List,
> just out of curiosity, a few functions in org-element.el contain _ in
> their parameter list, but its not used in the body.
> What does it stand for?


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Visiting an Entry with an ID

2016-02-09 Thread Alan Parker Lue
That's perfect, thanks!

On Tuesday, February 9, 2016, John Kitchin  wrote:

> I posted this answer on SO:
>
> (defun open-id (id)
>   (org-id-goto id)
>   (message "%s" (current-buffer)))
>
> It seems to do what you want.
>
> Alan Parker Lue writes:
>
> > Trying to figure out how to switch buffers when visiting an entry given
> an
> > ID in Elisp. To elaborate:
> >
> >
> http://stackoverflow.com/questions/35299171/org-mode-elisp-how-does-one-switch-the-buffer-when-using-an-id-to-visit-an-en
> >
> > Does anyone have an answer for this?
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>


Re: [O] MobileOrg does not sync with local Android calendar

2016-02-09 Thread Ramon Diaz-Uriarte



On Sat, 06-02-2016, at 19:03, cschr  wrote:
> Thanks Ramon and Eric
>
> Are you using custom agenda views ?  Someone wrote on the web that this

Not that I am aware of. Where would I have done that (so I can check)?

> is required - is he right ?
>
> Chris
>
> -Original Message-
> From: emacs-orgmode-bounces+cschr=freenet...@gnu.org 
> [mailto:emacs-orgmode-bounces+cschr=freenet...@gnu.org] On Behalf Of Ramon 
> Diaz-Uriarte
> Sent: Sonntag, 31. Januar 2016 16:13
> To: Eric S Fraga
> Cc: emacs-orgmode@gnu.org; cschr
> Subject: Re: [O] MobileOrg does not sync with local Android calendar
>
>
>
>
> On Sun, 31-01-2016, at 13:36, Eric S Fraga  wrote:
>> On Sunday, 31 Jan 2016 at 08:42, cschr wrote:
>>> Hi
>>>
>>> I set up MobileOrg and it now shows the appointments from my emacs 
>>> diary and my orgmode agenda. But nothing shows in my local android 
>>> calendar, although I configured MobileOrg to sync with the android 
>>> calendar. Is this functionality known to work, at all, and are there
>>> any special preconditions ?   I tried with two different smartphones
>>> – a Sony Xperia Pro with Android 4.0.4, and a Mobistel Cygnus with 
>>> Android 4.4.2
>>>
>>
>> It syncs with my calendar on cyanogenmod latest nightly snapshot on a 
>> Nexus 4.  I've had no issues in this regard in a very long time.
>>
>
> It has also worked for me for a long time in several tablets/phones. Right 
> now it is working on two tablets (BQ edison 3 and Nexus 7) with stock android 
> 4.4 and a phone with stock android 5. It has worked in the past with Android 
> 4.1.
>
>
>
>
>> I think what I am using is roughly equivalent to android 5.1?  Not 
>> entirely sure however but definitely well past 4.x versions.  Whether 
>> this is relevant or not is unclear!


-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdia...@gmail.com
   ramon.d...@iib.uam.es

http://ligarto.org/rdiaz



[O] Sync org-contacts with google

2016-02-09 Thread Martin
Hi there,

I found google-contacts which can download my contacts from google and
save it as org-contact.  But ist there anything like org-caldav-sync
(where I really sync google calender very well) with the org-concats?

In my case I have Project specific contacts in different org files (one
per project, because there are big projects), and I want to send this
contacts from the org file to google (and update it if it changed here
or there).

Thanks for your ideas about that,
Martin

-- 
Lösungen statt Diagnosen



[O] [PATCH] ob-sql.el: fix typo preventing mysql table headers from being parsed

2016-02-09 Thread Gary Oberbrunner
* ob-sql.el (org-babel-execute:sql): fix typo (introduced in 8c2e232)
which prevented correct parsing of mysql table headers.
---
 lisp/ob-sql.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el
index 724f7c6..6488afe 100644
--- a/lisp/ob-sql.el
+++ b/lisp/ob-sql.el
@@ -181,7 +181,7 @@ SET COLSEP '|'
  (progn (insert-file-contents-literally out-file) (buffer-string)))
   (with-temp-buffer
  (cond
- ((memq (intern engine) '(dbi myslq postgresql))
+ ((memq (intern engine) '(dbi mysql postgresql))
   ;; Add header row delimiter after column-names header in first line
   (cond
(colnames-p
-- 
2.7.0


-- 
Gary


[O] problems with org and pabbrev

2016-02-09 Thread orgmode

Hi,

somehow pabbrev mode doesn't work anymore with org, since I use org from 
elpa.


after loading org, pabbrev is a minor mode, as indicated in the 
modeline.


However  runs the command org-cycle instead of 
pabbrev-expand-maybe.


So I wrote the following functions:

(defun org-cycle-or-pabbrev-expand ()
  "use org-cycle in headline, otherwise use pabbrev-expand-maybe"
  (interactive)
  (if (looking-at org-outline-regexp)
  (org-cycle)
(pabbrev-expand-maybe 'nil)))

(add-hook 'org-mode-hook
  '(lambda ()
(define-key org-mode-map [tab] 
'org-cycle-or-pabbrev-expand)

  ))

This gives an error:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p 
nil)

  =(nil 4)
  (cond ((= uarg 4) (if (> (length pabbrev-expansion-suggestions) 1) 
(pabbrev-suggestions-goto-buffer pabbrev-expansion-suggestions) 
(pabbrev-call-previous-tab-binding))) ((eq last-command (quote 
pabbrev-expand-maybe)) (if (and (> (length 
pabbrev-expansion-suggestions) 1) (> (length 
pabbrev-last-expansion-suggestions) 1)) (pabbrev-suggestions-goto-buffer 
pabbrev-last-expansion-suggestions) 
(pabbrev-call-previous-tab-binding))) (pabbrev-expansion (progn (setq 
pabbrev-last-expansion-suggestions pabbrev-expansion-suggestions) 
(pabbrev-expand))) (t (pabbrev-call-previous-tab-binding)))

  pabbrev-expand-maybe-full(nil)
  (if pabbrev-minimal-expansion-p (pabbrev-expand-maybe-minimal uarg) 
(pabbrev-expand-maybe-full uarg))

  pabbrev-expand-maybe(nil)
  (if (looking-at org-outline-regexp) (org-cycle) (pabbrev-expand-maybe 
(quote nil)))

  org-cycle-or-pabbrev-expand()
  call-interactively(org-cycle-or-pabbrev-expand nil nil)
  command-execute(org-cycle-or-pabbrev-expand)


I've no idea how to preceed further, any help appreciated.

Versions I use:
emacs version 24.1
pabbrev Version: 4.2.1




[O] Archiving?

2016-02-09 Thread Johann Spies
I cannot get archiving to work as expected.


Example:

With the cursor on

* DONE Werk aan die normalisering van skrywers
  CLOSED: [2015-10-13 Di 07:50]
  :PROPERTIES:
  :ID:   d48a7607-0a66-42a6-8819-b98be5f612aa
  :END:

and

#+ARCHIVE: %s_done::
in the file

Then I did C-c $

As a result, a buffer "werkorg.org_done  contains:

#-*- mode: org -*-


Archived entries from file /home/js/Dropbox/orgmode/werkorg.org


and

*Messages*

Copied: Subtree(s) with 232 characters
org-archive-subtree: Symbol's function definition is void: outline-show-all


And the original line in werkorg.org is unchanged and still present.

What am I doing wrong?

Regards
Johann


-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)


Re: [O] problems with org and pabbrev

2016-02-09 Thread Eric S Fraga
On Tuesday,  9 Feb 2016 at 15:43, orgmode wrote:
> Hi,
>
> somehow pabbrev mode doesn't work anymore with org, since I use org
> from elpa.
>
> after loading org, pabbrev is a minor mode, as indicated in the
> modeline.
>
> However  runs the command org-cycle instead of
> pabbrev-expand-maybe.

In my case,  seems to work although I do refer to it as [tab] in my
initialisation code:

#+begin_src emacs-lisp
  (require 'pabbrev)
  (setq pabbrev-idle-timer-verbose nil
pabbrev-read-only-error nil)
  (define-key pabbrev-mode-map [tab] 'pabbrev-expand-maybe)
  (add-hook 'text-mode-hook (lambda () (pabbrev-mode)))
#+end_src

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



Re: [O] MobileOrg does not sync with local Android calendar

2016-02-09 Thread Eric S Fraga
On Saturday,  6 Feb 2016 at 19:03, cschr wrote:
> Thanks Ramon and Eric
>
> Are you using custom agenda views ?  Someone wrote on the web that
> this is required - is he right ?

I am using some custom views but not sure if this is necessary for
calendar synchronisation.  It should be easy enough to test.  Create a
simple custom view, e.g.:

#+begin_src emacs-lisp
  (setq org-agenda-custom-commands
'(("l" "Location agenda view" agenda ""
   ((org-agenda-files '("~/s/notes/diary.org"))
(org-agenda-ndays 1)
(org-agenda-overriding-columns-format "%TIMESTAMP %60ITEM 
%20LOCATION")
(org-agenda-view-columns-initially t)
#+end_src

and then push to and pull from mobileorg as required.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.90.1, Org release_8.3.3-535-g7213aa



[O] #+BEGIN_LaTeX deprecated

2016-02-09 Thread Julien Cubizolles
The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of
#+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older org
files that I will need to export again. I can manually change the
blocks but I was wondering if some automatic conversion function has
been implemented.

Julien.




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-09 Thread Nicolas Goaziou
Hello,

Damien Cassou  writes:

> 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: #

I cannot reproduce it.

> - now, if I add "#+ODT_STYLES_FILE:" to the file, I get a different
>   message
>
> OpenDocument export failed: End of file during parsing

This one is now fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



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

2016-02-09 Thread Achim Gratz
Erik Hetzner writes:
> Here are the permissions:
>
> 0755 /tmp/tmp-orgtest/
> 0700 /tmp/tmp-orgtest/org-annex-test19785b6F/
> 0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/
> 0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/
> 0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/
> 0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/
> 0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/P2/
> 0555 
> /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/
> 0444
> /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447
>
> I presume this is to maintain the integrity of the file contents in the
> repository.

Oh my, they even think it's a feature.  :-(

https://git-annex.branchable.com/internals/lockdown/

Those shenanigans with symbolic links are a bit cumbersome.

> It would be possible to drop these files after the test (using git annex drop
> --force), but if something goes wrong there the rm -rf would not clean up the
> test directory properly. If you think that is a better solution I can do that.

Well, the best solution would be to have an option for git-annex to
switch off that lockdown thing.  Since that's not going to happen soon
or anytime, try something like:

$(RMR) $(testdir) || { $(CHMOD) -R u+w $(testdir); $(RMR) $(testdir) }

which of course requires the addition of

CHMOD = chmod

in mk/defaults.mk.

But it seems that direct mode (however deprecated it is) would allow us
to do exactly the thing we want, so maybe if the tests would put that
repo in direct mode we wouldn't even need to do that.  But that doesn't
seem to work in a v6 repo unless annex.thin is set to true.  What version
are you testing?


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




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

2016-02-09 Thread Erik Hetzner
Hi Achim,

On Tue, 09 Feb 2016 11:40:54 -0800,
Achim Gratz  wrote:
>
> Erik Hetzner writes:
> > Sorry - I misunderstood how `org-test-for-executable' works. I’ll fix the 
> > issue.
>
> Thanks.
>
> > 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:
>
> For pete's sake, what are the permissions?  As I said, the only reason I
> see that is happening is if the directory containing the files is mode
> 55x.  And that would either be spectactularly stupid or exceptionally
> clever, although I tend toward the first interpretation.  In any case,
> you'd need to make the directories writable to fix this, but not the
> files.  There might be a config option that you could/should set to
> avoid this bit of cleverness or nuisance by git-annex..

Here are the permissions:

0755 /tmp/tmp-orgtest/
0700 /tmp/tmp-orgtest/org-annex-test19785b6F/
0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/
0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/
0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/
0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/
0775 /tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/P2/
0555 
/tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/
0444 
/tmp/tmp-orgtest/org-annex-test19785b6F/.git/annex/objects/jm/P2/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447/SHA256E-s12--a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447

I presume this is to maintain the integrity of the file contents in the
repository.

It would be possible to drop these files after the test (using git annex drop
--force), but if something goes wrong there the rm -rf would not clean up the
test directory properly. If you think that is a better solution I can do that.

best, Erik



Re: [O] [PATCH] ob-sql.el: fix typo preventing mysql table headers from being parsed

2016-02-09 Thread Nicolas Goaziou
Hello,

Gary Oberbrunner  writes:

> * ob-sql.el (org-babel-execute:sql): fix typo (introduced in 8c2e232)
> which prevented correct parsing of mysql table headers.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] #+BEGIN_LaTeX deprecated

2016-02-09 Thread Myles English
Hello Julien,

Julien Cubizolles writes:

> The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of
> #+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older org
> files that I will need to export again. I can manually change the
> blocks but I was wondering if some automatic conversion function has
> been implemented.

I don't know if there is such a function but, for the problem you
describe, I would try something like this:

sed -i 's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' myfile.org

If there are lots of files maybe (UNTESTED):

grep -rl "BEGIN_LaTeX\|END_LaTeX" | \
 xargs -IXX \
   sed -i's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' XX

Myles



Re: [O] #+BEGIN_LaTeX deprecated

2016-02-09 Thread Kaushal Modi
Check out this announcement email about the syntax change:
https://lists.gnu.org/archive/html/emacs-orgmode/2015-12/msg00525.html

It has a snippet to convert the old syntax files to new syntax.

--
Kaushal Modi
On Feb 9, 2016 6:45 PM, "Myles English"  wrote:

> Hello Julien,
>
> Julien Cubizolles writes:
>
> > The #+BEGIN_LaTeX... #+END_LaTeX has been deprecated in favor of
> > #+BEGIN_EXPORT latex ... #+END_EXPORT. I have however a lot of older org
> > files that I will need to export again. I can manually change the
> > blocks but I was wondering if some automatic conversion function has
> > been implemented.
>
> I don't know if there is such a function but, for the problem you
> describe, I would try something like this:
>
> sed -i 's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' myfile.org
>
> If there are lots of files maybe (UNTESTED):
>
> grep -rl "BEGIN_LaTeX\|END_LaTeX" | \
>  xargs -IXX \
>sed -i's/#+\(BEGIN\|END\)_LaTeX/#+\1_EXPORT/' XX
>
> Myles
>
>


[O] What does the _ in `(defun org-element-section-parser (_) ...)' stands for?

2016-02-09 Thread Thorsten Jolitz

Hi List,
just out of curiosity, a few functions in org-element.el contain _ in
their parameter list, but its not used in the body. 
What does it stand for?

-- 
cheers,
Thorsten