Re: [O] Command to open up any agenda file?

2014-09-01 Thread Eric Abrahamsen
Noah Slater  writes:

> Hello,
>
> I quite like C-c b (org-iswitchb) but it only works if the file is
> already open. What I really want is a command that lets me tab
> complete any agenda file at all. Does such a thing exist? I couldn't
> find it in the docs.

Check org-{switchb,iswitchb,ido-switchb}, there are a few different
functions that will do this.




[O] [PATCH] org-passwords.el: Improvements

2014-09-01 Thread Jorge A. Alfaro-Murillo

Some development in the password manager.

Best,

Jorge.

* contrib/lisp/org-passwords.el (org-passwords-default-password-size,
org-passwords-default-random-words-number): New variables.
(org-passwords-copy-username, org-passwords-copy-password): Use
org-entry-get to obtain the property value.
(org-passwords-open-url): New function.
(org-passwords): Can be called with universal argument.
(org-passwords-generate-password): Use default size given by
`org-passwords-default-password-size'.
(org-passwords-random-words): Use default number given by
`org-passwords-default-random-words-number'.
(org-passwords-concat-this-with-string): Fix bug.

The patch adds several functionality:

Open the URL property directly from the mode. URLs can be inherit.

Universal argument in org-passwords allows for longer browsing. Two
arguments is used for editing.

There is a default password size and random-words number for faster
password generating.

Fix bug in C-u M-x org-passwords-generate-password.

Commentary in file has more information.

---
contrib/lisp/org-passwords.el | 134 +++---
1 file changed, 88 insertions(+), 46 deletions(-)

diff --git a/contrib/lisp/org-passwords.el b/contrib/lisp/org-passwords.el
index 7ed8c80..b10a5f7 100644
--- a/contrib/lisp/org-passwords.el
+++ b/contrib/lisp/org-passwords.el
@@ -23,12 +23,14 @@
;;; Commentary:

;; This file contains the code for managing your passwords with
-;; Org-mode.
+;; Org-mode. It is part of org/contrib (see http://orgmode.org/). If
+;; you want to contribute with development, or have a problem, do it
+;; here: https://bitbucket.org/alfaromurillo/org-passwords.el

;; A basic setup needs to indicate a passwords file, and a dictionary
;; for the random words:

-;;   (require org-passwords)
+;;   (require 'org-passwords)
;;   (setq org-passwords-file "~/documents/passwords.gpg")
;;   (setq org-passwords-random-words-dictionary 
"/etc/dictionaries-common/words")

@@ -54,13 +56,12 @@
;;   `org-passwords-random-words-substitutions'.

;; It is also useful to set up keybindings for the functions
-;; `org-passwords-copy-username' and
-;; `org-passwords-copy-password' in the
-;; `org-passwords-mode', to easily make the passwords and usernames
-;; available to the facility for pasting text of the window system
-;; (clipboard on X and MS-Windows, pasteboard on Nextstep/Mac OS,
-;; etc.), without inserting them in the kill-ring. You can set for
-;; example:
+;; `org-passwords-copy-username', `org-passwords-copy-password' and
+;; `org-passwords-open-url' in the `org-passwords-mode', to easily
+;; make the passwords and usernames available to the facility for
+;; pasting text of the window system (clipboard on X and MS-Windows,
+;; pasteboard on Nextstep/Mac OS, etc.), without inserting them in the
+;; kill-ring. You can set for example:

;;   (eval-after-load "org-passwords"
;; '(progn
@@ -69,12 +70,15 @@
;;   'org-passwords-copy-username)
;;(define-key org-passwords-mode-map
;;   (kbd "C-c p")
-;;  'org-passwords-copy-password)))
+;;  'org-passwords-copy-password)
+;;  (kbd "C-c o")
+;;  'org-passwords-open-url)))

-;; Finally, to enter new passwords, you can use `org-capture' and a minimal 
template like:
+;; Finally, to enter new passwords, you can use `org-capture' and a
+;; minimal template like:

;;   ("p" "password" entry (file "~/documents/passwords.gpg")
-;;"* %^{Title}\n  %^{PASSWORD}p %^{USERNAME}p")
+;;"* %^{Title}\n  %^{URL}p %^{USERNAME}p %^{PASSWORD}p")

;; When asked for the password you can then call either
;; `org-passwords-generate-password' or `org-passwords-random-words'.
@@ -87,6 +91,7 @@

(require 'org)

+;;;###autoload
(define-derived-mode org-passwords-mode org-mode
  "org-passwords-mode"
  "Mode for storing passwords"
@@ -97,12 +102,17 @@
  :group 'org)

(defcustom org-passwords-password-property "PASSWORD"
-  "Name of the property for password entry password."
+  "Name of the property for password entry."
  :type 'string
  :group 'org-passwords)

(defcustom org-passwords-username-property "USERNAME"
-  "Name of the property for password entry user name."
+  "Name of the property for user name entry."
+  :type 'string
+  :group 'org-passwords)
+
+(defcustom org-passwords-url-property "URL"
+  "Name of the property for URL entry."
  :type 'string
  :group 'org-passwords)

@@ -117,6 +127,12 @@ string, a number followed by units."
  :type 'str
  :group 'org-passwords)

+(defcustom org-passwords-default-password-size "20"
+  "Default number of characters to use in
+org-passwords-generate-password. It has to be a string."
+  :type 'str
+  :group 'org-passwords)
+
(defcustom org-passwords-random-words-dictionary nil
  "Default file name for the file that contains a dictionary of
words for `org-passwords-random-words'. Each non-empty line in
@@ -124,6 +140,12 @@ the file is considered a word."
  :type 'file
  :group 'org-passwords)

+(defcustom org-passwords-default-random-words-num

Re: [O] Moving my init.el to Org

2014-09-01 Thread Thorsten Jolitz
Alan Schmitt  writes:

Hello Thorsten,

> I gave this a try, and here are some observations.
>
> On 2014-08-31 16:12, Thorsten Jolitz  writes:
>
>> on your src-blocks before conversion, as an alternative, like this
>>
>> ,
>> | (org-dp-toggle-headers &optional 'header)
>> `
>>
>> to avoid losing the src-block header-args during conversion. 
>
> I don't use headers in that file so I skipped that step.
>
>> 2. Call 'outorg-convert-org-to-outshine' just once, its only for the
>> initial conversion. Then you have an outshine file that you convert to
>> org occasionally with the usual 'outorg-edit-as-org'.
>
> As it's not interactive, I had to evaluate it. The only thing I then saw
> is the reply "nil". I searched for a created buffer and I found it, but

Yes, since this is most likely a seldom used function (every file is
converted just once) I did not bother to make it interactive. And IIRC
it returns nil and doesn't change window-config because it was written
with batch calls in mind. 

> the results are surprising. With this small input file:
>
> * test
> ** test2
> #+begin_src emacs-lisp
> (+ 2 2)
> #+end_src
>
> I got this output
>
> ;; * test
>
> ;; #+header: 
> ;; #+header: ** test2
> ;; #+begin_src emacs-lisp
> ;; (+ 2 2)
> ;; #+end_src


Thats a bug, it should be fixed now in branch tj-outorg (which should
actually be faster and better than master anyway and will hopefully be
merged in a few weeks or so).

Here is my org-mode test buffer:

#+BEGIN_ORG
* test
** test2
#+begin_src emacs-lisp
(+ 2 2)
#+end_src

#+begin_src picolisp :exports code
(+ 2 2)
#+end_src

#+begin_src emacs-lisp :results value :cache no
(+ 2 2)
#+end_src
#+END_ORG

and here the emacs-lisp-mode output buffer:

#+BEGIN_SRC emacs-lisp
;; * test
;; ** test2
(+ 2 2)

;; #+begin_src picolisp :exports code
;; (+ 2 2)
;; #+end_src

;; #+header: :cache no
;; #+header: :results value
(+ 2 2)
#+END_SRC
 
which looks ok so far. can you test it too?

PS

What about switches? AFAIK they don't work yet as #+header args, is
that correct? If so, is it planned to make them work as #+header args
in the future?

-- 
cheers,
Thorsten




Re: [O] A Babel block to #+INCLUDE all .org files of a directory

2014-09-01 Thread Andrea Rossetti
Andrea Rossetti  writes:
>   I wrote a Babel block to generate the #+INCLUDE statements
> for all Org files of a directory.
>
> https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-all-org-files

Hello Org users,

  just in case you try to visit the link of that script
for multiple #+INCLUDE files: I renamed it into

https://github.com/thesoftwarebin/the-emacs-software-bin/tree/master/include-many-files

because now the user can specify inclusion of files
with any extension (see example/main.org).

Kindest regards,

  Andrea



[O] Sort habits in agenda view

2014-09-01 Thread Noah Slater
Hello,

I have quite a few habits, spread across quite a few agenda files. But
they're shown in some sort of order in the agenda view which looks
like habits I am doing worse with are at the top.

I suppose that makes sense for some people. But what I'd really like
to be able to do is chunk the habits by category (in my case:
categories are derived from filenames).

How habits are then ordered *within the category chunk* is another
question. It would be nice to be able to select from "in the order
they appear in the file" and "smart sorting based on history of
habit".

Can someone help me with this?

Thanks,

-- 
Noah Slater
https://twitter.com/nslater



Re: [O] Command to open up any agenda file?

2014-09-01 Thread Kyle Meyer
Kyle Meyer  wrote:
[...]
> I don't know of any Org function that does this either (and, as
> suggested, I prefer projectile for this), but if you just want a single
> function, I think it could be as simple as this:
>
> #+begin_src elisp
>   (defun find-org-agenda-file (file)
> (interactive (list (org-completing-read "Agenda file: " 
> (org-agenda-files
> (find-file file))
> #+end_src

Oops, I'd actually change that to this (although the interactive
behavior is the same).

#+begin_src elisp
  (defun find-org-agenda-file ()
(interactive)
(find-file (org-completing-read "Agenda file: " (org-agenda-files
#+end_src



Re: [O] Command to open up any agenda file?

2014-09-01 Thread Kyle Meyer
Thorsten Jolitz  wrote:
> Noah Slater  writes:
>
> Hello,
>
>> I quite like C-c b (org-iswitchb) but it only works if the file is
>> already open. What I really want is a command that lets me tab
>> complete any agenda file at all. Does such a thing exist? I couldn't
>> find it in the docs.
>
> don't know if this exists in Org, but defining you agenda-files as a
> project you might be able to use projectile:

I don't know of any Org function that does this either (and, as
suggested, I prefer projectile for this), but if you just want a single
function, I think it could be as simple as this:

#+begin_src elisp
  (defun find-org-agenda-file (file)
(interactive (list (org-completing-read "Agenda file: " 
(org-agenda-files
(find-file file))
#+end_src



Re: [O] Moving my init.el to Org

2014-09-01 Thread Alan Schmitt
Hello Thorsten,

I gave this a try, and here are some observations.

On 2014-08-31 16:12, Thorsten Jolitz  writes:

> on your src-blocks before conversion, as an alternative, like this
>
> ,
> | (org-dp-toggle-headers &optional 'header)
> `
>
> to avoid losing the src-block header-args during conversion. 

I don't use headers in that file so I skipped that step.

> 2. Call 'outorg-convert-org-to-outshine' just once, its only for the
> initial conversion. Then you have an outshine file that you convert to
> org occasionally with the usual 'outorg-edit-as-org'.

As it's not interactive, I had to evaluate it. The only thing I then saw
is the reply "nil". I searched for a created buffer and I found it, but
the results are surprising. With this small input file:

* test
** test2
#+begin_src emacs-lisp
(+ 2 2)
#+end_src

I got this output

;; * test

;; #+header: 
;; #+header: ** test2
;; #+begin_src emacs-lisp
;; (+ 2 2)
;; #+end_src

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


[O] Symbol's value as variable is void: org-planning-line-re

2014-09-01 Thread Jeff Kowalczyk
Using org-mode a4a1d85 or 2df0785, I see multiple errors, including:

Using M-q to fill a paragraph, error on the line at point:

  user-error: An element cannot be parsed line 7149

  user-error: An element cannot be parsed line 7141

When using M-RET to insert a heading:

  byte-code: Symbol's value as variable is void: org-planning-line-re

When using C-c to update the duration of a clocked time line:

  byte-code: Symbol's value as variable is void: org-planning-line-re

I reverted to 288ffa, ran make clean && make, and the problems are
no longer present.

Thanks,
Jeff




Re: [O] Command to open up any agenda file?

2014-09-01 Thread Thorsten Jolitz
Noah Slater  writes:

Hello,

> I quite like C-c b (org-iswitchb) but it only works if the file is
> already open. What I really want is a command that lets me tab
> complete any agenda file at all. Does such a thing exist? I couldn't
> find it in the docs.

don't know if this exists in Org, but defining you agenda-files as a
project you might be able to use projectile:

,
| Projectile Commander Methods:
| 
| ?:Commander help buffer.
| A:Find ag on project.
| D:Open project root in dired.
| R:Regenerate the project's [e|g]tags.
| T:Find test file in project.
| a:Run ack on project.
| b:Switch to project buffer.
| d:Find directory in project.
| e:Find recently visited file in project.
| f:Find file in project.
| g:Run grep on project.
| j:Find tag in project.
| k:Kill all project buffers.
| o:Run multi-occur on project buffers.
| s:Switch project.
| v:Open project root in vc-dir or magit.
`

-- 
cheers,
Thorsten




[O] Getting lots of Emacs crashes

2014-09-01 Thread Noah Slater
Hello,

I'm getting a lot of Emacs crashes recently using Org. Is there any
way I can help to debug why this is happening?

Thanks,

-- 
Noah Slater
https://twitter.com/nslater



[O] [bug] insert diary entry from org agenda view inserts entry in wrong place

2014-09-01 Thread Eric S Fraga
Hello,

I am again seeing the same problem with inserting a diary entry from the
default agenda view that I ran into early last month: when the entry is
inserted into a date tree, the entry ends up *before* the headline for
the actual date:

,
| * 2014
| ** 2014-09 September
| *** 2014-09-01 Monday
|  A meeting I had earlier today
| <2014-09-01 Mon 11:00-12:00>
| * testing a new entry for tomorrow
| <2014-09-02 Tue 10:00>
| *** 2014-09-02 Tuesday
`

The above is the result of inserting "10am testing" for tomorrow.

I have tried tracking down where this problem has arisen in the git log
but reverting a couple of org-agenda entries did not help.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-305-g0e0bab



[O] Command to open up any agenda file?

2014-09-01 Thread Noah Slater
Hello,

I quite like C-c b (org-iswitchb) but it only works if the file is
already open. What I really want is a command that lets me tab
complete any agenda file at all. Does such a thing exist? I couldn't
find it in the docs.

Thanks!

-- 
Noah Slater
https://twitter.com/nslater



Re: [O] ox-freemind.el / org-freemind.el

2014-09-01 Thread Thorsten Jolitz
Felix Natter  writes:

> Thorsten Jolitz  writes:
>
>> Felix Natter  writes:
>>
>>> hi,
>>>
>>> I am working on org-freeplane.el, a fork of org-freemind.el [1].
>>>
>>> [1] FreeMind and Freeplane are mind mapping programs and can thus
>>> be used to organize tree-structured information like org-mode does.
>>> Freeplane is a FreeMind fork, org-freeplane.el was necessary because
>>> users want to use the features of Freeplane.
>>>
>>> Can someone please point me to the code for converting node text to
>>> HTML in org-mode?
>>
>> org-freemind is derived from ox-html:
>>
>> ,
>> | ;;; Define Back-End
>> | (org-export-define-derived-backend 'freemind 'html ...)
>> `
>>
>> so if org-freeplane derives from org-freemind, you have all the
>> html-exporting functionality at your fingertips already, if I'm not
>> mistaken. 
>
> hi Thorsten,
>
> thanks for the hint, seems my org-mode is hopelessly outdated (from
> emacs 24.3). 
> However, I cannot find any *-freemind.el in
> git://git.savannah.gnu.org/emacs.git, is that because it's non-free?
> (in git://orgmode.org/org-mode.git, it is included as
> contrib/lisp/ox-freemind.el, does the 'contrib' indicate non-free as
> well...?)

for me its in:

,
| /org-mode/contrib/lisp/ox-freemind.el
`

> Is ox-freemind.el derived (forked/copied) from org-freemind.el?
> Is anyone currently actively developing ox-freemind.el?

Does org-freemind.el exist at all? exporters a usually prefixed with
'ox-'. I have no idea about its state, did not even know about
freemind. 

> Also: In order to build on the latest org-mode, can I just put
> contrib/lisp and lisp/ from git://orgmode.org/org-mode.git master branch
> in my load-path?

There exists a dedicate Worg article about this topic, but I don't know
the URL.

-- 
cheers,
Thorsten




Re: [O] navi-search-and-switch fails

2014-09-01 Thread Thorsten Jolitz
Alan Schmitt  writes:

> On 2014-09-01 19:18, Thorsten Jolitz  writes:
>
>> Does outshine work with that buffer (without navi-mode)?
>
> I guess not … How can I test it?
>
>> Are the headlines fontified like Org headlines?
>
> No.
>
>> Can you cycle visibility?
>
> Using TAB does nothing.
>
>> Can you call 'M-x outorg-edit-as-org' on a subtree?
>
> No, I get a backtrace:
>
> Debugger entered--Lisp error: (error "before first heading")
>   signal(error ("before first heading"))
>   error("before first heading")
>   outline-back-to-heading(INVISIBLE-OK)
>   outorg-copy-and-convert()
>   outorg-edit-as-org(nil)
>   call-interactively(outorg-edit-as-org record nil)
>
>> What does C-h v outline-regexp return?
>
> outline-regexp is a variable defined in `outline.el'.
> Its value is ";;[;]\\{1,8\\} "
> Original value was "[*\f]+"
> Local in buffer untitled; global value is "[*\f]+"

Wrong regexp for the example file, these are old-school headers, the
example file has outshine (=org-style headers). So the
outshine-hook-function wasn't really called on that buffer (again) to
find out it has outshine headers. 

>> I suspect the problem is in your outshine installation. Does it work
>> otherwise for you?
>
> I don't use it otherwise, so I don't know. I tried 'M-x
> outorg-edit-as-org' on this message and it works.
>
>> What happens if you call M-x outline-minor-mode again in that example
>> buffer?
>
> It works! I have to call it twice (once to disable it, and once to
> enable it again), but then TAB and navi work as expected (no
> fontification, though).

Good!

This whole thing is related to loading libraries and calling hooks, and
its quite hard to tell whats going on there inside emacs sometimes. 

When I have all the hooks set in my init file, so that opening an elisp
file calls outline-minor-mode-hook, and loading outline-minor-mode calls
outshine-hook-function, then things just work. 

But putting an active fundamental-mode tmp-buffer with elisp code in
emacs-lisp-mode sometimes doesn't activate outshine right away, and I
have to call M-x emacs-lisp-mode again.

Calling M-x nuke-and-eval on an outshine buffer is not a good idea
either, probably because of the buffer-local-vars set.

And currently I'm working with latex/auctex again and added a few
(actually really nice) convenience functions to tj-outshine and tj-navi
branches to make outshine work with latex-mode too, and it works well,
only that latex-mode seems to re-fontify the buffer frequently so the
outshine fontification is lost and I have to call M-x latex-mode again
to make it reappear, whats a bit annoying ...

> So for some reason emacs-lisp-mode sets up outline-mode, but the later
> does not seem to load outshine automatically.

I think thats really an internal emacs thing, because 

,
| C-h v outline-minor-mode-hook
`

will probably show you this:

,
| outline-minor-mode-hook's value is (outshine-hook-function)
`

-- 
cheers,
Thorsten




Re: [O] navi-search-and-switch fails

2014-09-01 Thread Alan Schmitt
On 2014-09-01 19:18, Thorsten Jolitz  writes:

> Does outshine work with that buffer (without navi-mode)?

I guess not … How can I test it?

> Are the headlines fontified like Org headlines?

No.

> Can you cycle visibility?

Using TAB does nothing.

> Can you call 'M-x outorg-edit-as-org' on a subtree?

No, I get a backtrace:

Debugger entered--Lisp error: (error "before first heading")
  signal(error ("before first heading"))
  error("before first heading")
  outline-back-to-heading(INVISIBLE-OK)
  outorg-copy-and-convert()
  outorg-edit-as-org(nil)
  call-interactively(outorg-edit-as-org record nil)


> What does C-h v outline-regexp return?

outline-regexp is a variable defined in `outline.el'.
Its value is ";;[;]\\{1,8\\} "
Original value was "[*\f]+"
Local in buffer untitled; global value is "[*\f]+"

> I suspect the problem is in your outshine installation. Does it work
> otherwise for you?

I don't use it otherwise, so I don't know. I tried 'M-x
outorg-edit-as-org' on this message and it works.

> What happens if you call M-x outline-minor-mode again in that example
> buffer?

It works! I have to call it twice (once to disable it, and once to
enable it again), but then TAB and navi work as expected (no
fontification, though).

So for some reason emacs-lisp-mode sets up outline-mode, but the later
does not seem to load outshine automatically.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Triggering clock in/out from org state change and progress logging

2014-09-01 Thread Alexis Roda

Hi list,
after struggling a bit with edebug (too many things to learn) I have 
traced what the problem is. For the archives:


State-change logging is deferred until the command finishes and is 
implemented by the function 'org-add-log-setup' adding the function 
'org-add-log-note' to the hook 'post-command-hook'. The details of the 
note are stored in global variables 'org-log-note-xxx'.


That implementation prevents recursive calls to 'org-todo' (that's what 
my code does in order the pause the active task) from logging both the 
paused and the started log messages.


'org-add-log-note' will be called only once since the hook won't accept 
duplicated entries. Anyway, the innermost call to 'org-add-log-setup' 
will overwrite the variables 'org-log-note-xxx' with the details of the 
note being paused.


The outcome is that only the state change for the paused note is being 
logged.



Now that I know what the problem is I only have to figure a workaround. 
Any clue?




Regards




[O] ox-freemind.el / org-freemind.el (was: Re: Code to convert lists etc. to HTML for org-mode export filter?)

2014-09-01 Thread Felix Natter
Thorsten Jolitz  writes:

> Felix Natter  writes:
>
>> hi,
>>
>> I am working on org-freeplane.el, a fork of org-freemind.el [1].
>>
>> [1] FreeMind and Freeplane are mind mapping programs and can thus
>> be used to organize tree-structured information like org-mode does.
>> Freeplane is a FreeMind fork, org-freeplane.el was necessary because
>> users want to use the features of Freeplane.
>>
>> Can someone please point me to the code for converting node text to
>> HTML in org-mode?
>
> org-freemind is derived from ox-html:
>
> ,
> | ;;; Define Back-End
> | (org-export-define-derived-backend 'freemind 'html ...)
> `
>
> so if org-freeplane derives from org-freemind, you have all the
> html-exporting functionality at your fingertips already, if I'm not
> mistaken. 

hi Thorsten,

thanks for the hint, seems my org-mode is hopelessly outdated (from
emacs 24.3). 
However, I cannot find any *-freemind.el in
git://git.savannah.gnu.org/emacs.git, is that because it's non-free?
(in git://orgmode.org/org-mode.git, it is included as
contrib/lisp/ox-freemind.el, does the 'contrib' indicate non-free as
well...?)

Is ox-freemind.el derived (forked/copied) from org-freemind.el?
Is anyone currently actively developing ox-freemind.el?

Also: In order to build on the latest org-mode, can I just put
contrib/lisp and lisp/ from git://orgmode.org/org-mode.git master branch
in my load-path?

Thanks and Best Regards,
-- 
Felix Natter




Re: [O] navi-search-and-switch fails

2014-09-01 Thread Thorsten Jolitz
Alan Schmitt  writes:

>> 1. Can you try 'navi-search-and-switch' on an org-mode buffer, with ->
>> (eq major-mode 'org-mode), e.g.
>>
>> ,
>> | * ORG SCRATCH
>> | ** 2nd Level
>> | #+BEGIN_SRC emacs-lisp :cache no
>> |  (+ 2 2)
>> | #+END_SRC
>> `
>>
>> *Navi* buffer should pop-up, typing 2 should show both headlines.
>
> Yes, it works with an org file.

ok, so navi-mode works

>> 2. Is there anything special about the outshine file you used?
>
> It's an emacs-lisp file.
>
>> Is it structured with outshine headers? is it emacs-lisp-mode?
>> old-school or org-style headers?
>
> Here is a simple example that fails for me:
>
> ;; * ORG SCRATCH
> ;; ** 2nd Level
> (+ 2 2)

There is nothing special about this example, it should just work.

Does outshine work with that buffer (without navi-mode)? Are the
headlines fontified like Org headlines? Can you cycle visibility? Can
you call 'M-x outorg-edit-as-org' on a subtree?

What does C-h v outline-regexp return?

I suspect the problem is in your outshine installation. Does it work
otherwise for you?

What happens if you call M-x outline-minor-mode again in that example
buffer?

-- 
cheers,
Thorsten




Re: [O] [babel, R] Commands are not copied in the iESS buffer upon evaluation

2014-09-01 Thread Charles Berry
Sebastien Vauban  writes:

> 
> Hi Aaron,
> 
> Aaron Ecay wrote:
> > 2014ko abuztuak 29an, Sebastien Vauban-ek idatzi zuen:
> >
> >> Does it have something to do with `ess-eval-visibly' not being respected
> >> (whose default is `t')?
> >
> > Indeed, babel’s R support let-binds this variable to nil when evaluating
> > value-type results in a session.
> 
> OK. Can we put it to `t' by default [1] or, at least, have Org Babel
> respect our ESS setting?

If you Google `ess-eval-visibly slow' you will get a bunch of hits that
show why people prefer `nil' and why that is a good default. 

But it may be OK to allow a user to override.

HTH,

Chuck




Re: [O] navi-search-and-switch fails

2014-09-01 Thread Alan Schmitt
On 2014-08-31 17:44, Thorsten Jolitz  writes:

> Alan Schmitt  writes:
>
>> (Thorsten asked me to repost this from github.)
>>
>> When calling navi-search-and-switch interactively, I get the following
>> backtrace:
>
> But when 'navi-search-and-switch' would have a bug, one could not use
> navi-mode at all ... and I use it all the time.

Yes, I imagine the problem comes from an interaction with something
else, but the code below does not seem to deal with the case where there
is no occur buffer.

>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   navi-rename-buffer()
>>   navi-search-and-switch()
>>   call-interactively(navi-search-and-switch record nil)
>>   command-execute(navi-search-and-switch record)
>>
>> The problem seems to be with this code in navi-rename-buffer
>>
>> #+begin_src emacs-lisp
>> (with-current-buffer
>> (if (eq major-mode 'occur-mode) (current-buffer) (get-buffer "*Occur*"))
>> #+end_src
>>
>>
>> As there is no "*Occur*" buffer, and the current buffer is in
>> emacs-lisp-mode, =(if (eq major-mode 'occur-mode) (current-buffer)
>> (get-buffer "*Occur*"))= returns nil and with-current-buffer fails.

> 1. Can you try 'navi-search-and-switch' on an org-mode buffer, with ->
> (eq major-mode 'org-mode), e.g.
>
> ,
> | * ORG SCRATCH
> | ** 2nd Level
> | #+BEGIN_SRC emacs-lisp :cache no
> |  (+ 2 2)
> | #+END_SRC
> `
>
> *Navi* buffer should pop-up, typing 2 should show both headlines.

Yes, it works with an org file.

> 2. Is there anything special about the outshine file you used?

It's an emacs-lisp file.

> Is it structured with outshine headers? is it emacs-lisp-mode?
> old-school or org-style headers?

Here is a simple example that fails for me:

;; * ORG SCRATCH
;; ** 2nd Level
(+ 2 2)

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] R code block produces only partial output

2014-09-01 Thread Charles C. Berry

On Sun, 31 Aug 2014, Aaron Ecay wrote:


Hi Chuck,

Attached is a new version of the patch, including a few more tests.  I
have one question:

2014ko abuztuak 28an, Aaron Ecay-ek idatzi zuen:

but the patch here uses on.exit(file.create(...)) to ensure that that
file is created. One hiccup (not sure if it exists in master,too) is
that starting a remote session and then trying to run src blocks from
a buffer for a local file will hang (because a local temp file is used
for sentinel). So there is still stuff to do.


Hmm, OK.


Can you give a recipe to reproduce this?  Everything seems to work for
me using the following test code, although there is an unexplained ~10s
delay while babel sits in the ‘(while (not (file-exists-p file)) ...)’
loop at the end of ‘org-babel-comint-eval-invisibly-and-wait-for-file’.
,
| #+name: foo
| #+begin_src R :session *foo* :dir /ssh:aecay@foo:/home/aecay :results output
|   1+1
| #+end_src
|
| #+RESULTS: foo
| : [1] 2
`



Aaron,

I installed your patch.

Two cases:

1) I open a connection to a remote server by opening a directory there.


From *Messages*:


Tramp: Opening connection for berry@ using scpc...

Then start an R session, type 'library(evaluate)', then change to a local 
buffer with an R src block and C-c C-c, wait a long while then C-g, then 
change to the *R* buffer and quit the session. I get this in the *R* 
buffer:



,
| > > options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient', 
| show.error.locations=TRUE)

| > library(evaluate)
| >
| + + + + . + + + Error in file(file, ifelse(append, "a", "w")) (from #3) :
|   cannot open the connection
| In addition: Warning message:
| In file(file, ifelse(append, "a", "w")) :
|   cannot open file 
| '/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/babel-392ywI/R-392jUu': 
| No such file or directory

| > q()
| Save workspace image? [y/n/c]: n
| Warning message:
| In 
| file.create("/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/babel-392ywI/R-392jUu-sentinel") 
| :
|   cannot create file 
| '/var/folders/kb/2hchpbyj7lb6z76l0q73w_fhgn/T/babel-392ywI/R-392jUu-sentinel', 
| reason 'No such file or directory'
| 
| Process R finished at Mon Sep  1 08:31:19 2014

`

This worked OK with master.


2) If I modify your 'foo' block to use  :dir /ssh:berry@/

and C-c C-c, I get an error message 'Invalid function: 
with-parsed-tramp-file-name'

In the *Messages* buffer, I see:

,
| Tramp: Decoding region into remote file 
/ssh:be...@microb215.med.upenn.edu:/tmp/R-39288P...done
| org-babel-comint-eval-invisibly-and-wait-for-file: Invalid function: 
with-parsed-tramp-file-name
`

FWIW, the emacs on that remote system is 22.1.

I thought maybe tramp does some magic that I do not grok, tries to
use the remote emacs and fails. If so, note:

On the remote system

C-h f with-parsed TAB RET shows

,
| with-parsed-tramp-file-name is a Lisp macro in `tramp.el'.
| ...
`

so it *does* have that function.

???

HTH,

Chuck


Re: [O] Moving my init.el to Org

2014-09-01 Thread Oleh
> I know that I could use org-babel-load-file, or outshine.  What are
> other possibilities?  What are the caveats (and advantages) of both
> (other?) ways?

I'm using a one .el file per mode approach, with around 4000 lines
split into 40 files.

This approach simplifies things a lot: for instance I haven't touched
Javascript in ages, but all my customizations for it are sitting in
javascript.el without getting in the way of the stuff that I'm using
now. They aren't even loaded unless I open a js file.

The rest of my codes are published and I just use them via
MELPA.  I use my own package to navigate and maintain code
(https://github.com/abo-abo/lispy).  Here's a short screencast if you
haven't seen it before: https://vimeo.com/86894158.

regards,
Oleh



Re: [O] Table formula with @I

2014-09-01 Thread Andrea Rossetti
"Loris Bennett"  writes:
> In the following:
>
> |   |   |   |
> |   |   |   |
> |---+---+---|
> | 1 | 1 | 1 |
> #+TBLFM: @I$3=1
>
> I expected to get a '1' just in the third column.  Where am I going
> wrong?

(apologies in advance for suggesting just a workaround
instead of a rational explanation, hope it helps anyway)

It happened to me too some time ago, I used a slightly
different formula and it worked:

#+TBLFM: @I+1$3..@I+1$3=1

Does it work for you too? Kindest regards,

  Andrea



[O] Table formula with @I

2014-09-01 Thread Loris Bennett
Dear All,

In the following:

|   |   |   |
|   |   |   |
|---+---+---|
| 1 | 1 | 1 |
#+TBLFM: @I$3=1

I expected to get a '1' just in the third column.  Where am I going
wrong?

Cheers,

Loris

Org-mode version 8.2.7c (8.2.7c-44-g3fed03-elpaplus @ 
/home/loris/.emacs.d/elpa/org-plus-contrib-20140818/)
-- 
This signature is currently under construction.




Re: [O] Code to convert lists etc. to HTML for org-mode export filter?

2014-09-01 Thread Thorsten Jolitz
Felix Natter  writes:

> hi,
>
> I am working on org-freeplane.el, a fork of org-freemind.el [1].
>
> [1] FreeMind and Freeplane are mind mapping programs and can thus
> be used to organize tree-structured information like org-mode does.
> Freeplane is a FreeMind fork, org-freeplane.el was necessary because
> users want to use the features of Freeplane.
>
> Can someone please point me to the code for converting node text to
> HTML in org-mode?

org-freemind is derived from ox-html:

,
| ;;; Define Back-End
| (org-export-define-derived-backend 'freemind 'html ...)
`

so if org-freeplane derives from org-freemind, you have all the
html-exporting functionality at your fingertips already, if I'm not
mistaken. 

-- 
cheers,
Thorsten




[O] Code to convert lists etc. to HTML for org-mode export filter?

2014-09-01 Thread Felix Natter
hi,

I am working on org-freeplane.el, a fork of org-freemind.el [1].

[1] FreeMind and Freeplane are mind mapping programs and can thus
be used to organize tree-structured information like org-mode does.
Freeplane is a FreeMind fork, org-freeplane.el was necessary because
users want to use the features of Freeplane.

Can someone please point me to the code for converting node text to
HTML in org-mode?
The following code:

* item1
- one
- two
- three

should result in a mind map node with content:

item1

  one
  two
  three


(of course there are more complex examples, like nested lists etc.)

Is there common code for exporting to HTML (3.2 in my case)?
Shall I import org-html.el in org-freeplane.el and use code from that?
(I think that wouldn't be trivial because 'org-export-as-html' 
does a lot of stuff that I may not require/allow like running hooks...)

Thanks and Best Regards,
-- 
Felix Natter




Re: [O] [babel, R] Commands are not copied in the iESS buffer upon evaluation

2014-09-01 Thread Sebastien Vauban
Hi Aaron,

Aaron Ecay wrote:
> 2014ko abuztuak 29an, Sebastien Vauban-ek idatzi zuen:
>
>> Does it have something to do with `ess-eval-visibly' not being respected
>> (whose default is `t')?
>
> Indeed, babel’s R support let-binds this variable to nil when evaluating
> value-type results in a session.

OK. Can we put it to `t' by default [1] or, at least, have Org Babel
respect our ESS setting?

Best regards,
  Seb

[1] For me, that makes more sense, moreover when there are errors
happening. Currently, when we go and look in the session, we just
see a (sometimes cryptic) error message, but not after which command
it occurred.

-- 
Sebastien Vauban




Re: [O] [PATCH] Make use of the constant `org-clock-string' whenever possible

2014-09-01 Thread Marcin Borkowski
Dnia 2014-08-31, o godz. 21:56:19
Nicolas Goaziou  napisał(a):

> >> There are also bits of documentation here and there, on the ML, in
> >> the "ox.el" reference... I'm in the process of writing a small
> >> document collecting these bits.
> >
> > Wow, that would be cool!  I tried to look into the docstrings in
> > org-element.el, but found them a bit intimidating.  Especially that
> > I know very little about Org's internal data structures.
> 
> Done at
> 
>   http://orgmode.org/worg/dev/org-element-api.html

Great!  Sent to my Kindle.

> Regards,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University