Re: [O] org-element approach to modify or add ID to every headline

2015-08-09 Thread Nicolas Goaziou
Hello,

Grant Rettke  writes:

> Goal:
>
> 1) Visit every headline
> 2) If there is an ID property
>1) Then replace it's value with a UUID
> 3) If there is not an ID property
>1) Add an ID property and give it a UUID.
>
> `org-uuid' [provides] the functionality to add the ID with a UUID.
>
> [This post] explains how to do it:
>
> ┌
> │ (require 'org-id)
> │(save-excursion
> │   (goto-char (point-max))
> │   (while (outline-previous-heading)
> │ (org-id-get-create)))
> └
>
> What is the best way to do it with `org-element'?

Using `org-element' here would be sub-optimal. Headlines are context
insensitive, i.e., you don't need a parser to find one. 

Anyway, the following should do:

  (dolist (p (nreverse
  (org-element-map (org-element-parse-buffer 'headline) 'headline
(lambda (headline) (org-element-property :begin headline)
(goto-char p)
(org-id-get-create))


Regards,

-- 
Nicolas Goaziou



Re: [O] 8.3.1 and org-latex-with-hyperref

2015-08-09 Thread Suvayu Ali
On Sat, Aug 08, 2015 at 03:04:52PM -0400, Scott Randby wrote:
> On 08/08/2015 02:50 PM, Rasmus wrote:
> >Scott Randby  writes:
> >
> >>Sorry for the noise, I figured out how to prevent the automatic
> >>insertion of \hypersetup{...} by deleting the settings for
> >>org-latex-hyperref-template
> >
> >I'm curious to know what you are missing in org-latex-hyperref-template?
> >What do you need in order to use the provided method?
> 
> Nothing is missing. I had difficulties with the default \hypersetup{...}
> with an old version of org, and my habit became to use my own
> \hypersetup{...} instead. Since I now have a huge number of documents with
> my own setup, it isn't worth it to go and change all of them.

If I understand hyperref correctly, I think it is okay to have multiple
\hypersetup{...} commands, and the last one has precedence.  So in the
future, you could simply put yours after the one generated by Org.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] How to visit every source block and modify it's NAME property with org-element?

2015-08-09 Thread Nicolas Goaziou
Hello,

Grant Rettke  writes:

> Goal:
>
> 1) Visit every source block
> 2) If there is a NAME property
>1) Then replace it's value with a UUID
> 3) If there is not an NAME property
>1) Add an NAME property and give it a UUID.
>
> `org-uuid' [provides] the functionality to create a UUID. It seems like
> this could be re-used for this NAME property. Would that be a good idea?
> The code would be nearly the same (choose a UUID program, get a value,
> insert it).
>
> What is the best way to do it with `org-element'?

Probably something like this (untested)

  (let ((case-fold-search t))
(while (re-search-forward "^[ \t]*#+BEGIN_SRC" nil t)
  (let ((element (org-element-at-point)))
(when (eq (org-element-type element) 'src-block)
  (if (not (org-element-property :name element))
  (let ((i (org-get-indentation)))
(beginning-of-line)
(save-excursion (insert "#+NAME: whatever\n"))
(indent-to i)
(forward-line 2))
(re-search-backward "^[ \t]*#\\+NAME: +\\(.*\\)" nil t)
(replace-match "whatever" ni nil nil 1))

> This is very similar to a post I just made about headlines and the ID
> property but they are different enough to post separately.

Unlike to the previous post, using `org-element' is mandatory in order
to avoid false positive when matching a source block.


Regards,

-- 
Nicolas Goaziou



[O] A bug with expanding headlines of the sparse tree?

2015-08-09 Thread Meir Goldenberg
I am using org-mode 8.2.10. Suppose we have this:

* TODO Task1 [0/1]
SCHEDULED: <2015-08-09 Sun>
- [ ] Buy bread
* FUTURE Task2

Now, if we do C-/ T and give TODO for the keyword, then we correctly get:

* TODO Task1 [0/1]...

However, if we press Tab on this line, then the whole content, including
next headline (the one marked FUTURE) shows up, which seems to be wrong.

I tried to add this into my config:

;; Control sparse tree
(setq org-show-following-headline nil)
(setq org-show-siblings nil)
(setq org-show-entry-blow nil)

This did not fix the problem.


[O] Bug: weird interplay between enforce dependencies, stuck projects and previous subtree [8.2.10 (8.2.10-23-g1ec416-elpa @ /home/devesh/.emacs.d/elpa/org-20141208/)]

2015-08-09 Thread devesh

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.

When org-enforce-todo-dependencies is t, stuck projects definition is
simply '("+project" ("NEXT") nil ""), and org mode file looks like :

* A :project:
  :PROPERTIES:
  :ORDERED:  t
  :END:
** TODO B
* C  :project:
** TODO D

Both A and C appear as stuck projects, which is expected behaviour.

But if A itself becomes TODO, like below:

* TODO A :project:
  :PROPERTIES:
  :ORDERED:  t
  :END:
** TODO B
* C  :project:
** TODO D

Not only A vanishes from stuck projects, but C also vanishes. No stuck
projects are shown for the above file.

One subtree should not affect the next, even if first is ordered and 
org-enforce-todo-dependencies is t.



Emacs  : GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.8.8)
 of 2014-06-10 on worker1.bsys.centos.org
Package: Org-mode version 8.2.10 (8.2.10-23-g1ec416-elpa @ 
/home/devesh/.emacs.d/elpa/org-20141208/)

current state:
==
(setq
 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-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 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-agenda-dim-blocked-tasks 'invisible
 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-stuck-projects '("+project" ("NEXT") nil "")
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-enforce-todo-dependencies t
 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-tags-exclude-from-inheritance '("project")
 org-todo-keywords '((sequence "TODO(t!)" "WAITING(w!)" "NEXT(n!)" 
"INPROGRESS(i!)" "DONE(d!)"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-agenda-files '("~/org/test.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



[O] Evil-mode text objects

2015-08-09 Thread Spencer Boucher
Evil mode text objects behave very badly in org-mode (specifically paragraphs). 
Is this a know problem? Is there a fix?




[O] org book

2015-08-09 Thread nascii boy
Hello occasion to learn English, I want to translate the Book of org-mode
to Spanish,
using translate and some common sense, reason to do
easier, I wonder if available the book format org-mode


[O] Emacs sees the directory with the new org-mode version, but loads the old version

2015-08-09 Thread Meir Goldenberg
The version of org-mode that came with my version of Emacs (24.5.2) is
8.2.10. I have installed version 8.3.1 from ELPA and added this to my init
file:

(add-to-list 'load-path "~/.emacs.d/org-20150803")
(require 'org)

When I check the version of org in Emacs, it says:

Org-mode version 8.2.10 (release_8.2.10 @
/home/meir/.emacs.d/elpa/org-20150803/)

That is, it reports the old version and the new directory... (the built-in
version is located in /usr/local/share/emacs/24.5/lisp/org)

Here is the relevant portion of my init file (there is nothing before this
portion):

(require 'cl)

;; Org-mode that was shipped with Emacs
(setq load-path (remove-if (lambda (x) (string-match-p "org$" x))
load-path))
;; ELPA
(setq load-path (remove-if (lambda (x) (string-match-p "org-20" x))
load-path))

(add-to-list 'load-path "~/.emacs.d/org-20150803")

(require 'package)
(add-to-list 'package-archives
 '("melpa" . "http://melpa.milkbox.net/packages/";) t)
(package-initialize)

(require 'org)

How do I get Emacs to load the new version of org-mode?


[O] Babel error on init with 8.3.1

2015-08-09 Thread Ryan Schuetzler
On startup with the latest 8.3 release I now get an error:

  Invalid function: org-babel-header-args-safe-fn

I updated org through the package manager in Emacs, and I'm using it on
Windows 10. Below is my full org configuration, but I've found that when I
comment out the following section of my init, I don't receive any errors:

(add-hook 'org-babel-after-execute-hook 'bh/display-inline-images 'append)

(setq org-babel-results-keyword "results")

(defun bh/display-inline-images ()
  (condition-case nil
  (org-display-inline-images)
(error nil)))

(org-babel-do-load-languages
 (quote org-babel-load-languages)
 (quote ((emacs-lisp . t)
(latex . t)
(R . t)
(dot . t)
(python . t)
(org . t

(setq org-confirm-babel-evaluate nil)

FULL Config:

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-07-11 on KAEL
Package: Org-mode version 8.3.1 (8.3.1-elpa @
c:/Users/Ryan/dotfiles/.emacs.d/elpa/org-20150805/)

current state:
==
(setq
 org-export-backends '(ascii html icalendar latex md odt)
 org-agenda-tags-todo-honor-ignore-options t
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-babel-results-keyword "results"
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-agenda-exporter-settings '((ps-number-of-columns 1) (ps-landscape-mode
t) (htmlize-output-type (quote cc)))
 org-agenda-custom-commands '(("N" "Notes" tags "NOTE"
  ((org-agenda-overriding-header "Notes") (org-tags-match-list-sublevels
t)))
 ("h" "Habits" tags-todo "STYLE=\"habit\""
  ((org-agenda-overriding-header "Habits")
(org-agenda-sorting-strategy (quote (todo-state-down effort-up
category-keep
  )
 (" " "Agenda"
  ((agenda "" nil)
(tags "REFILE"
((org-agenda-overriding-header "Tasks to Refile")
 (org-tags-match-list-sublevels nil))
)
(tags-todo "-CANCELLED/!"
((org-agenda-overriding-header "Stuck Projects")
 (org-agenda-skip-function (quote bh/skip-non-stuck-projects))
 (org-agenda-sorting-strategy (quote (category-keep
)
(tags-todo "-HOLD-CANCELLED/!"
((org-agenda-overriding-header "Projects")
 (org-agenda-skip-function (quote bh/skip-non-projects))
 (org-tags-match-list-sublevels (quote indented))
 (org-agenda-sorting-strategy (quote (category-keep
)
(tags-todo "-CANCELLED/!NEXT"
((org-agenda-overriding-header
  (concat "Project Next Tasks"
(if bh/hide-scheduled-and-waiting-next-tasks ""
" (including WAITING and SCHEDULED tasks)")
)
  )
 (org-agenda-skip-function (quote
bh/skip-projects-and-habits-and-single-tasks))
 (org-tags-match-list-sublevels t)
 (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-todo-ignore-with-date bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-sorting-strategy (quote (todo-state-down effort-up
category-keep
)
(tags-todo "-REFILE-CANCELLED-WAITING-HOLD/!"
((org-agenda-overriding-header
  (concat "Standalone Tasks"
(if bh/hide-scheduled-and-waiting-next-tasks ""
" (including WAITING and SCHEDULED tasks)")
)
  )
 (org-agenda-skip-function (quote bh/skip-project-tasks))
 (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-todo-ignore-with-date bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-sorting-strategy (quote (category-keep
)
(tags-todo "-REFILE-CANCELLED-WAITING-HOLD/!"
((org-agenda-overriding-header
  (concat "Project Subtasks"
(if bh/hide-scheduled-and-waiting-next-tasks ""
" (including WAITING and SCHEDULED tasks)")
)
  )
 (org-agenda-skip-function (quote bh/skip-non-project-tasks))
 (org-agenda-todo-ignore-scheduled bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-todo-ignore-deadlines bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-todo-ignore-with-date bh/hide-scheduled-and-waiting-next-tasks)
 (org-agenda-sorting-strategy (quote (category-keep
)
(tags-todo "-CANCELLED+WAITING|HOLD/!"
((org-agenda-overriding-header "Waiting and Postponed Tasks")
 (org-agenda-skip-function (quote bh/skip-stuck-projects))
 (org-tags-match-list-sublevels nil) (org-agenda-todo-ignore-scheduled t)
 (org-agenda-todo-ignore-deadlines t))
)
(tags "-REFILE/"
((org-agenda-overriding-header "Tasks to Archive")
 (org-agenda-skip-function (quote bh/skip-non-archivable-tasks))
 (org-tags-match-list-sublevels nil))
)
)
  nil)
 )
 org-return-follows-link t
 org-default-notes-file "~/Dropbox/org/inbox.org"
 org-todo-keyword-faces '(("TODO" :foreground "tomato" :weight bold)
 ("NEXT" :foreground "deep sky blue" :weight bold)
 ("DONE" :foreground "medium spring green" :weight bold)
 ("WAITING" :foreground "orange" :weight bold) ("HOLD" :foreground
"magenta" :weight bold)
 ("CANCELLED" :foreground "m

[O] How to tangle org file with option comments yes in batch mode

2015-08-09 Thread Leandro Henrique Oliveira Fernandes
Hi,

I am trying to tangle a file in batch mode using the script bellow:

emacs.exe  -Q --batch --no-init-file -l init.el --visit file.org -f
org-babel-tangle --kill

== init.el ===

(require 'org)
(require 'org-exp)
(require 'ob)
(require 'ob-tangle)
(require 'ob-R)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   (latex . t)
   (sh . t)
   (plantuml . t)
   (emacs-lisp . t)
   ))

;; For windows
(setq org-babel-R-command
"\"C:/Users/XX/Documents/R/R3.2.0/bin/i386/Rterm.exe --ess --slave
--no-save\"")

== end file ==

And

== file.org ==

-*- mode: org; mode: auto-fill; fill-column: 76 -*-

# Babel settings
#+PROPERTY: session *R*
#+PROPERTY: comments yes
#+PROPERTY: results output
#+PROPERTY: exports none


* Simple babel block

#+name: setup_block
#+begin_src R :tangle Rcode/setup_block.R :exports none :session

  proj.dir <- getwd()
  cat("Proj dir: ", proj.dir,"\n")

#+end_src

== end file ==

When I set #+PROPERTY: comments no, I am able to tangle the file file.org.
However when I set  #+PROPERTY: comments yes I have got this message:


c:/Program\ Files\ \(x86\)/GNU\ Emacs\ 24.3/bin/emacs.exe -Q --batch
--no-init-file -l init.el --visit file.org -f org-babel-tangle --kill
OVERVIEW
Loading vc-svn...
(No changes need to be saved)
No comment syntax is defined.  Use:
<<

If I just press enter I end up with the error code:

<<
No comment syntax defined
make: *** [tangle] Error 127


The file I want to tangle is a large file with a lot of org-babel blocks. I
understand that the comment is not defined, but I don't know how to set it.

I am running emacs on windows:
GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
Org-mode version 8.3.1

Anyone can help me with that?

Thanks,


Re: [O] org book

2015-08-09 Thread Rasmus
nascii boy  writes:

> Hello occasion to learn English, I want to translate the Book of org-mode
> to Spanish,
> using translate and some common sense, reason to do
> easier, I wonder if available the book format org-mode

Sounds great!  In the git folder, check doc/org.texi.

Also here:

 http://orgmode.org/cgit.cgi/org-mode.git/tree/doc/org.texi

Rasmus

-- 
Governments should be afraid of their people




Re: [O] org book

2015-08-09 Thread Bastien Guerry
Hi,

I suggest you start with the Org Compact Guide, which is smaller than
the complete Org manual :

http://orgmode.org/cgit.cgi/org-mode.git/plain/doc/orgguide.texi

Also, if you start translating, I strongly recommend putting the
translated manual on a public repository where people can contribute,
and advertizing this as soon as possible.  It is very frustrating to
work on something and discover other people have been working on the
same thing by lack of information.

Good luck and keep us informed!  Other spanish readers on this list
can help with various aspects of the project.

Best,

-- 
 Bastien



Re: [O] 8.3.1 and org-latex-with-hyperref

2015-08-09 Thread Scott Randby

On 08/09/2015 03:54 AM, Suvayu Ali wrote:

On Sat, Aug 08, 2015 at 03:04:52PM -0400, Scott Randby wrote:

On 08/08/2015 02:50 PM, Rasmus wrote:

Scott Randby  writes:


Sorry for the noise, I figured out how to prevent the automatic
insertion of \hypersetup{...} by deleting the settings for
org-latex-hyperref-template


I'm curious to know what you are missing in org-latex-hyperref-template?
What do you need in order to use the provided method?


Nothing is missing. I had difficulties with the default \hypersetup{...}
with an old version of org, and my habit became to use my own
\hypersetup{...} instead. Since I now have a huge number of documents with
my own setup, it isn't worth it to go and change all of them.


If I understand hyperref correctly, I think it is okay to have multiple
\hypersetup{...} commands, and the last one has precedence.  So in the
future, you could simply put yours after the one generated by Org.


Unfortunately, the \hypersetup{...} generated by org is last one in the 
preamble when an org document is exported.


Scott



Hope this helps,





Re: [O] 8.3.1 and org-latex-with-hyperref

2015-08-09 Thread Suvayu Ali
On Sun, Aug 09, 2015 at 09:06:27AM -0400, Scott Randby wrote:
> On 08/09/2015 03:54 AM, Suvayu Ali wrote:
> >
> >If I understand hyperref correctly, I think it is okay to have multiple
> >\hypersetup{...} commands, and the last one has precedence.  So in the
> >future, you could simply put yours after the one generated by Org.
> 
> Unfortunately, the \hypersetup{...} generated by org is last one in the
> preamble when an org document is exported.

Indeed, you are right.

-- 
Suvayu

Open source is the future. It sets us free.



[O] Subject: Bug: org-time-stamp-inactive on the end of a CLOCK interval edits start time [8.3.1 (8.3.1-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)]

2015-08-09 Thread Christoph LANGE
Dear developers,

I frequently use org-time-stamp or org-time-stamp-inactive to adjust
intervals logged with CLOCK:.  Before upgrading to 8.3.1 I was able to
adjust the end of a CLOCK'ed interval of the format "CLOCK: start--end
=> difference" by calling org-time-stamp or org-time-stamp-inactive
while having the point placed on "end".  As of 8.3.1 it seems that the
function always offers to edit "start".

If this is not a bug, is there some other way to request "end" to be
edited?

Cheers,

Christoph

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-07-11 on KAEL
Package: Org-mode version 8.3.1 (8.3.1-elpaplus @
c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-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-time-clocksum-format '(:hours "%d" :require-hours t :minutes
":%02d" :require-minutes t)
 org-clock-history-length 20
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-clock-into-drawer 2
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id
 org-finalize-agenda-hook '(bh/org-agenda-to-appt)
 org-clock-idle-time 10
 org-agenda-sticky t
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default))
 org-pretty-entities t
 org-agenda-custom-commands '(("h" "Work todos" tags-todo
   "-personal-doat={.+}-dowith={.+}/!-TASK"
   ((org-agenda-todo-ignore-scheduled t)))
  ("H" "All work todos" tags-todo
"-personal/!-TASK-MAYBE"
   ((org-agenda-todo-ignore-scheduled nil)))
  ("A" "Work todos with doat or dowith"
tags-todo
   "-personal+doat={.+}|dowith={.+}/!-TASK"
   ((org-agenda-todo-ignore-scheduled nil)))
  ("j" "TODO dowith and TASK with"
   ((org-sec-with-view "TODO dowith")
(org-sec-where-view "TODO doat")
(org-sec-assigned-with-view "TASK with")
(org-sec-stuck-with-view "STUCK with"))
   )
  ("J" "Interactive TODO dowith and TASK with"
   ((org-sec-who-view "TODO dowith")))
  )
 org-return-follows-link t
 org-todo-keyword-faces '(("TODO" :foreground "DarkOrange1" :weight bold)
  ("MAYBE" :foreground "sea green")
  ("DONE" :foreground "light sea green")
  ("CANCELLED" :foreground "forest green")
("TASK" :foreground "blue"))
 org-agenda-include-diary t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 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-mode-hook '(org-mode-reftex-setup org-clock-load evil-org-mode
 #[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-eldoc-load)
 org-goto-auto-isearch nil
 org-stuck-projects '("+prj/-MAYBE-DONE" ("TODO" "TASK") nil)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-use-speed-commands t
 org-clock-persist 'history
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-tags-exclude-from-inheritance '("prj")
 org-agenda-start-with-log-mode t
 org-agenda-finalize-hook '(bh/org-agenda-to-appt)
 org-enforce-todo-checkbox-dependencies t
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info
org-jsinfo org-habit org-irc
   org-mew org-mhe org-rmail org-vm org-wl org-w3m)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-log-into-drawer t
 org-blocker-hook '(org-block-todo-from-checkboxes
org-block-todo-from-children-or-siblings-or-parent)
 org-completion-use-ido t
 org-babel-load-languages '((sh . t))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-clock-out-remove-zero-time-clocks t
 )

-- 
Dr. Christoph Lange, Enterprise Information Systems Departm

Re: [O] Babel error on init with 8.3.1

2015-08-09 Thread Kyle Meyer
Hello,

Ryan Schuetzler  wrote:
> On startup with the latest 8.3 release I now get an error:
>
>   Invalid function: org-babel-header-args-safe-fn

This seems to be related to a previous thread:

  http://thread.gmane.org/gmane.emacs.orgmode/99644

Although this isn't how the issue was solved on that thread, try

- C-u M-x org-reload
- uninstall Org using package-list-packages
- reinstall Org using package-list-packages

--
Kyle



[O] Subject: Bug: org-open-at-point no longer recognizes start and end timestamps of clock intervals [8.3.1 (8.3.1-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)]

2015-08-09 Thread Christoph LANGE
Dear developers,

I frequently use org-open-at-point on the start or end timestamps of
CLOCK: intervals to open the agenda of that time.

On a plain timestamp (e.g. [2015-08-09 Sun 11:11]) this still works, but
on the "start" or "end" timestamp of "CLOCK: start--end => difference"
it no longer works as of 8.3.1.

This problem occurs before org-open-at-point invokes
org-follow-timestamp-link.

Cheers,

Christoph

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-07-11 on KAEL
Package: Org-mode version 8.3.1 (8.3.1-elpaplus @
c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-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-time-clocksum-format '(:hours "%d" :require-hours t :minutes
":%02d" :require-minutes t)
 org-clock-history-length 20
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-clock-into-drawer 2
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id
 org-finalize-agenda-hook '(bh/org-agenda-to-appt)
 org-clock-idle-time 10
 org-agenda-sticky t
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default))
 org-pretty-entities t
 org-agenda-custom-commands '(("h" "Work todos" tags-todo
   "-personal-doat={.+}-dowith={.+}/!-TASK"
   ((org-agenda-todo-ignore-scheduled t)))
  ("H" "All work todos" tags-todo
"-personal/!-TASK-MAYBE"
   ((org-agenda-todo-ignore-scheduled nil)))
  ("A" "Work todos with doat or dowith"
tags-todo
   "-personal+doat={.+}|dowith={.+}/!-TASK"
   ((org-agenda-todo-ignore-scheduled nil)))
  ("j" "TODO dowith and TASK with"
   ((org-sec-with-view "TODO dowith")
(org-sec-where-view "TODO doat")
(org-sec-assigned-with-view "TASK with")
(org-sec-stuck-with-view "STUCK with"))
   )
  ("J" "Interactive TODO dowith and TASK with"
   ((org-sec-who-view "TODO dowith")))
  )
 org-return-follows-link t
 org-todo-keyword-faces '(("TODO" :foreground "DarkOrange1" :weight bold)
  ("MAYBE" :foreground "sea green")
  ("DONE" :foreground "light sea green")
  ("CANCELLED" :foreground "forest green")
("TASK" :foreground "blue"))
 org-agenda-include-diary t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 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-mode-hook '(org-mode-reftex-setup org-clock-load evil-org-mode
 #[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-eldoc-load)
 org-goto-auto-isearch nil
 org-stuck-projects '("+prj/-MAYBE-DONE" ("TODO" "TASK") nil)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-use-speed-commands t
 org-clock-persist 'history
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-enforce-todo-dependencies t
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-tags-exclude-from-inheritance '("prj")
 org-agenda-start-with-log-mode t
 org-agenda-finalize-hook '(bh/org-agenda-to-appt)
 org-enforce-todo-checkbox-dependencies t
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info
org-jsinfo org-habit org-irc
   org-mew org-mhe org-rmail org-vm org-wl org-w3m)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-log-into-drawer t
 org-blocker-hook '(org-block-todo-from-checkboxes
org-block-todo-from-children-or-siblings-or-parent)
 org-completion-use-ido t
 org-babel-load-languages '((sh . t))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-clock-out-remove-zero-time-clocks t
 )

-- 
Dr. Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.

[O] org-lint does not finish on some org-mode buffer

2015-08-09 Thread Gregor Zattler
Dear org-mode developers,

I run org-lint on one of my org-mode buffers -- 13015 lines with
~2000 CLOCK: lines -- and it did not finish within 1 1/2 hours.

Is this a bug?  I did another run for a few minutes and profiled
this on.  Profiler reports are attached.

This is on

GNU Emacs 25.0.50.7 (i686-pc-linux-gnu, GTK+ Version 3.14.5) of
2015-07-29 on boo

and

Org-mode version 8.3.1 (release_8.3.1-16-g2156ab @
/home/grfz/src/org-mode/lisp/)


Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-


cpu-profil-on-org-link.gz
Description: application/gzip


memory-profil-on-org-lint.gz
Description: application/gzip


[O] org-entry-get gets non-todo-kw

2015-08-09 Thread Samuel Wales
NEXT is a kw.

* next part

(org-entry-get (point) "TODO") -> "next"

strangely, this did not occur before 8.3.

if it isn't a user error, and i have counted correctly, then this is
the 9th possibly refactorable todo kw bug that i have reported over
the years.  :)



Re: [O] [bug] canonical context not work in 8.3

2015-08-09 Thread Samuel Wales
thank you.  this version is significantly faster.  qualitatively
improved.

it has a possibly minor bug.

evalled as source:

- command-execute8072  98%
 - call-interactively8072  98%
  - org-agenda-switch-to 7595  92%
   - org-show-context7595  92%
- org-show-set-visibility7595  92%
 - show-children 7039  86%
  - save-excursion   7015  85%
   - let*7015  85%
- while  4832  59%
 - outline-flag-region692   8%
remove-overlays12   0%
- save-excursion 2179  26%
   org-end-of-subtree2179  26%
- funcall   4   0%
   org-outline-level4   0%

however, if the next heading has fewer stars, it errors:

Debugger entered--Lisp error: (invalid-regexp "Invalid content of \\{\\}")
  re-search-forward("^\\*\\{27,13\\} +" 2473493 t)
  (while (re-search-forward re end t) (outline-flag-region
(line-end-position 0) (line-end-position) nil))
  (let* ((current-level (funcall outline-level)) (level (if level (+
(prefix-numeric-value level) current-level) (save-excursion
(outline-next-heading) (if (eobp) current-level (funcall
outline-level) (re (format "^\\*\\{%d,%d\\} +" current-level
level)) (end (save-excursion (org-end-of-subtree t t (while
(re-search-forward re end t) (outline-flag-region (line-end-position
0) (line-end-position) nil)))
  (save-excursion (org-back-to-heading t) (let* ((current-level
(funcall outline-level)) (level (if level (+ (prefix-numeric-value
level) current-level) (save-excursion (outline-next-heading) (if
(eobp) current-level (funcall outline-level) (re (format
"^\\*\\{%d,%d\\} +" current-level level)) (end (save-excursion
(org-end-of-subtree t t (while (re-search-forward re end t)
(outline-flag-region (line-end-position 0) (line-end-position) nil
  show-children()
  org-show-set-visibility(canonical)
  org-show-context(agenda)
  org-agenda-switch-to()
  call-interactively(org-agenda-switch-to nil nil)
  command-execute(org-agenda-switch-to)


   (defun show-children (&optional level)
(save-excursion
  (org-back-to-heading t)
  (let* ((current-level (funcall outline-level))
 (level (if level (+ (prefix-numeric-value level) current-level)
  (save-excursion
(outline-next-heading)
(if (eobp) current-level (funcall outline-level)
 (re (format "^\\*\\{%d,%d\\} +" current-level level))
 (end (save-excursion (org-end-of-subtree t t
(while (re-search-forward re end t)
  (outline-flag-region (line-end-position 0)
(line-end-position) nil)


On 8/8/15, Nicolas Goaziou  wrote:
> This one may improve the situation:



Re: [O] org-html-use-unicode-chars breaks source code blocks

2015-08-09 Thread Sebastien Vauban
Andreas Leha  writes:
> [ deleted: discussion on beatification ]
>
>> My initial reaction was to kill it as well.  But I might feel like this a
>> bit to often (I feel the same way about headline keywords like COMMENT).
>
> There has been repeated 'bashing' of the COMMENT keyword lately on this
> list.  Let me just raise a voice in defence.  I do not mind the syntax
> too much, but the functionality of commenting a whole subtree without
> loosing the outline functionality is really handy.  Especially also in
> distinction to the equally handy :noexport: tag.
>
> So, even if there is probably not a high risk for the COMMENT keyword to
> be dropped I just wanted to express my support for it.

+1

Both COMMENT and :noexport: are necessary, for achieving different tasks.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] BUG REPORT - problem with org.elc on clocking out

2015-08-09 Thread Sharon Kimble

I'm finding that when I clock out now I get the following error report - 

--8<---cut here---start->8---
Clock stopped at [2015-08-09 Sun 20:25] after 1:50
save-excursion: Wrong number of arguments: #[(pos) "rÂ!ƒÃ!‚pqˆŠŒ~ˆbˆÄ Å
!Æ>…=ÇÈ \"?…=ÇÉ \"ÇÊ\"bˆËÌxˆÌyˆ`|,‡" [pos drawer markerp marker-buffer 
org-element-at-point org-element-type (drawer property-drawer) 
org-element-property :contents-begin :begin ...] 4 
("/home/boudiccas/.emacs.d/elpa/org-plus-contrib-20150805/org.elc" . 462364)], 2
Saving file /home/boudiccas/.emacs.d/org/organiser.org...
--8<---cut here---end--->8---

Sorry about the long lines, but thats how it shows in my *message* buffer.

Thanks
Sharon
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.3


signature.asc
Description: PGP signature


Re: [O] BUG REPORT - problem with org.elc on clocking out

2015-08-09 Thread Kyle Meyer
Hello,

Sharon Kimble  wrote:
> I'm finding that when I clock out now I get the following error report

I cannot reproduce this with 'emacs -Q' and the following test.

Clocking in (C-c C-x C-i) and then out (C-c C-x C-o) on the following
heading

* h

results in

* h
  :LOGBOOK:
  CLOCK: [2015-08-09 Sun 16:23]--[2015-08-09 Sun 16:23] =>  0:00
  :END:

Do you still get the error after running 'C-u M-x org-reload'?

--
Kyle



Re: [O] org-entry-get gets non-todo-kw

2015-08-09 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> NEXT is a kw.
>
> * next part
>
> (org-entry-get (point) "TODO") -> "next"

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Subject: Bug: org-open-at-point no longer recognizes start and end timestamps of clock intervals [8.3.1 (8.3.1-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)]

2015-08-09 Thread Nicolas Goaziou
Hello,

Christoph LANGE  writes:

> I frequently use org-open-at-point on the start or end timestamps of
> CLOCK: intervals to open the agenda of that time.
>
> On a plain timestamp (e.g. [2015-08-09 Sun 11:11]) this still works, but
> on the "start" or "end" timestamp of "CLOCK: start--end => difference"
> it no longer works as of 8.3.1.
>
> This problem occurs before org-open-at-point invokes
> org-follow-timestamp-link.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-lint does not finish on some org-mode buffer

2015-08-09 Thread Nicolas Goaziou
Hello,

Gregor Zattler  writes:

> I run org-lint on one of my org-mode buffers -- 13015 lines with
> ~2000 CLOCK: lines -- and it did not finish within 1 1/2 hours.
>
> Is this a bug?  I did another run for a few minutes and profiled
> this on.  Profiler reports are attached.

It looks like an infloop when trying to parse a link. Could you send the
file, or even bisect the file in order to find problematic link?

Regards,

-- 
Nicolas Goaziou



Re: [O] Subject: Bug: org-time-stamp-inactive on the end of a CLOCK interval edits start time [8.3.1 (8.3.1-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)]

2015-08-09 Thread Nicolas Goaziou
Hello,

Christoph LANGE  writes:

> I frequently use org-time-stamp or org-time-stamp-inactive to adjust
> intervals logged with CLOCK:.  Before upgrading to 8.3.1 I was able to
> adjust the end of a CLOCK'ed interval of the format "CLOCK: start--end
> => difference" by calling org-time-stamp or org-time-stamp-inactive
> while having the point placed on "end".  As of 8.3.1 it seems that the
> function always offers to edit "start".

I cannot reproduce the problem. I can edit both with C-c !, depending on
the point.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-entry-get gets non-todo-kw

2015-08-09 Thread Samuel Wales
thank you.



Re: [O] org-lint does not finish on some org-mode buffer

2015-08-09 Thread Gregor Zattler
Hi Nicolas,
* Nicolas Goaziou  [10. Aug. 2015]:
> Gregor Zattler  writes:
>> I run org-lint on one of my org-mode buffers -- 13015 lines with
>> ~2000 CLOCK: lines -- and it did not finish within 1 1/2 hours.
>>
>> Is this a bug?  I did another run for a few minutes and profiled
>> this on.  Profiler reports are attached.
> 
> It looks like an infloop when trying to parse a link. Could you send the
> file, or even bisect the file in order to find problematic link?

You are right.  I bisected the file.  There is a ’>’ missing.  At
least with my configuration the attached file ’bad.org’ freezes
Emacs with latest org-mode (but it is in most cases possible to
do a C-G):

emacs-snapshot -Q -L ~/src/org-mode/lisp/  -nw bad.org

I consider this a bug.


File ’good.org’ with closing ’>’ does not cause this problems.

Thanks for your help.




Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-
#-*- mode: Org; indent-tabs-mode: nil; coding: utf-8-unix;  -*-

   E-Mail: 
   http://www.ABCDEF.de
   ABCDEF GmbH
#-*- mode: Org; indent-tabs-mode: nil; coding: utf-8-unix;  -*-

   E-Mail: 

Re: [O] comment trees in 8.3

2015-08-09 Thread Samuel Wales
can anybody else reproduce?

* x
*** TODO yes
DEADLINE: <2015-08-05 Wed>
 TODO COMMENT no
DEADLINE: <2015-08-05 Wed>

On 8/5/15, Samuel Wales  wrote:
> 24.4.1
>
> can repro with -Q and this old testcase code and restriction lock and
> org-agenda-list.
>
> ===
>
> ;;;
> ;;;alpha-org-testcase.el
> ;;;
> ;;;minimal testcase for org
> ;;;
> ;;;   dorg=your-org-dir delorgsrc=your-org-src-dir emacs -Q -l
> alpha-org-testcase.el
> ;;;
>
> ;;;
> ;;;for my use i do this:
> ;;;
> "
> mep=t emacs -Q -l $del/tests-and-publish/alpha-org-testcase.el \
>   --geometry +0+0 \
>   --geometry 60x30 \
>   $dorg/tests--org--xyzzy-big/comment.org
> "
> ;;;
>
> (require 'cl)
>
> ;;my org files use these
> (setq org-odd-levels-only t)
> ;; (setf org-export-initial-scope 'subtree)
>
> ;;fix abominations
> (blink-cursor-mode 0)
> (setf visible-bell 'top-bottom)
>
> ;;basics
> (defun alpha-add-path (p) (setq load-path (cons p load-path)))
> (alpha-add-path (concat (getenv "delorgsrc") "/lisp"))
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> (require 'org-install)
>
> (setq org-agenda-files (list (substitute-in-file-name
> "$dorg/todo-new--a.org")))
>
> ;;;
> ;;;stuff make things easier
> ;;;
>
> (setq org-completion-use-ido t)
> (setf org-outline-path-complete-in-steps nil)
>
> ;;;
> ;;;compatibility fixes
> ;;;
>
> ;; ;;fix compatibility bug in org [2011-05-25 Wed 08:59]
> ;; (when (= emacs-major-version 22)
> ;;   (defun activate-mark ()
> ;; "Activate the mark."
> ;; (when (mark t)
> ;;   (setq mark-active t)
> ;;   (unless transient-mark-mode
> ;; (setq transient-mark-mode 'lambda))
> ;;   (when (and select-active-regions
> ;;  (display-selections-p))
> ;; (x-set-selection 'PRIMARY (current-buffer))
>
> ;; ;;[2011-05-25 Wed 09:23] fix compatibility bug in Org.
> ;; ;;this is redefinition.  it is for 22 for export.
> ;; (defcustom select-active-regions nil
> ;;  "If non-nil, an active region automatically becomes the window
> selection."
> ;;  :type 'boolean
> ;;  :group 'killing
> ;;  :version "23.1")
>
> ;;;
> ;;;accessibility fixes
> ;;;
>
> (defun p ()
>   (interactive)
>   (message "fixing pop-up-windows")
>   ;;i have /pop-up-windows/ set to nil, which works for most of
>   ;;emacs.  for org, i do the following.  i need all of this just
>   ;;as i need the large font above for accessibility reasons.
>   ;;
>   ;;(setf (cdr (assoc* 'file org-link-frame-setup)) 'find-file)
>   (pushnew '(file . find-file) org-link-frame-setup :test #'equal)
>   ;;it might be nice to have a 'dedicated-buffer option
>   (setf org-indirect-buffer-display 'current-window)
>   ;;could make pop kill the buffer
> ;;;(setf org-display-internal-link-with-indirect-buffer t)
>   (setf org-src-window-setup 'current-window)
>   (add-hook 'org-capture-mode-hook 'delete-other-windows)
>   (defadvice org-agenda-set-tags (around fix-windows activate compile)
> "Restore windows."
> (save-window-excursion
>   ad-do-it))
>   (defadvice org-export (after fix-windows activate compile)
> "Delete other windows after every export."
> (delete-other-windows))
>
>   (setf pop-up-windows nil)
>
>   ;;for emacs i do this
>
>   (add-to-list 'same-window-regexps "\\*Customize.*") ;notwork?
>   (setf Man-notify-method 'pushy)
>   (add-to-list 'same-window-regexps "\\*Man .*") ;notwork
>   (add-to-list 'same-window-regexps "\\*.*\\*")
>   (add-to-list 'same-window-buffer-names "*Remember*")
>   (add-to-list 'same-window-buffer-names "*Help*")
>   (add-to-list 'same-window-buffer-names "*Apropos*")
>   (add-to-list 'same-window-buffer-names "*Summary*")
>   (add-to-list 'same-window-buffer-names "*Compile-Log*")
>   (add-to-list 'same-window-buffer-names "*Ibuffer*")
>   (add-to-list 'same-window-buffer-names " *Ibuffer*")
>   (message "done fixing pop-up-windows"))
> (when (getenv "mep")
>   ;;it is i
>   (defconst alpha-alpha-p t)
>   (require 'org)
>   (p)
>   ;;necessary for large fonts
>   (scroll-bar-mode -1))
>
> ;;;
> ;;;basic org features likely to affect many bug reports
> ;;;
>
> (setq org-todo-keywords
>   '((type  "NAKA(i)" "TODO(T)" "MAYBE(y)" "DOUBTFUL(l)"
>  "|"
>  "MOOT(m)")))
>
> (setq org-agenda-window-setup 'current-window)
>


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

Ramsay's disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] comment trees in 8.3

2015-08-09 Thread Samuel Wales
oops, the previous test case file was wrong, but the code for -Q
reproduction was correct.  here is a correct test case file:

* x
*** y
* TODO yes
DEADLINE: <2015-08-05 Wed>
* TODO COMMENT no
DEADLINE: <2015-08-05 Wed>
* asasasas
DEADLINE: <2015-08-05 Wed>
*** asdfasdfasdf
*** fdasdfasdfasdfasdf
*** asdfasdfasdfasdfasdfasdf

On 8/9/15, Samuel Wales  wrote:
> can anybody else reproduce?
>
> * x
> *** TODO yes
> DEADLINE: <2015-08-05 Wed>
>  TODO COMMENT no
> DEADLINE: <2015-08-05 Wed>
>
> On 8/5/15, Samuel Wales  wrote:
>> 24.4.1
>>
>> can repro with -Q and this old testcase code and restriction lock and
>> org-agenda-list.
>>
>> ===
>>
>> ;;;
>> ;;;alpha-org-testcase.el
>> ;;;
>> ;;;minimal testcase for org
>> ;;;
>> ;;;   dorg=your-org-dir delorgsrc=your-org-src-dir emacs -Q -l
>> alpha-org-testcase.el
>> ;;;
>>
>> ;;;
>> ;;;for my use i do this:
>> ;;;
>> "
>> mep=t emacs -Q -l $del/tests-and-publish/alpha-org-testcase.el \
>>   --geometry +0+0 \
>>   --geometry 60x30 \
>>   $dorg/tests--org--xyzzy-big/comment.org
>> "
>> ;;;
>>
>> (require 'cl)
>>
>> ;;my org files use these
>> (setq org-odd-levels-only t)
>> ;; (setf org-export-initial-scope 'subtree)
>>
>> ;;fix abominations
>> (blink-cursor-mode 0)
>> (setf visible-bell 'top-bottom)
>>
>> ;;basics
>> (defun alpha-add-path (p) (setq load-path (cons p load-path)))
>> (alpha-add-path (concat (getenv "delorgsrc") "/lisp"))
>> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
>> (require 'org-install)
>>
>> (setq org-agenda-files (list (substitute-in-file-name
>> "$dorg/todo-new--a.org")))
>>
>> ;;;
>> ;;;stuff make things easier
>> ;;;
>>
>> (setq org-completion-use-ido t)
>> (setf org-outline-path-complete-in-steps nil)
>>
>> ;;;
>> ;;;compatibility fixes
>> ;;;
>>
>> ;; ;;fix compatibility bug in org [2011-05-25 Wed 08:59]
>> ;; (when (= emacs-major-version 22)
>> ;;   (defun activate-mark ()
>> ;; "Activate the mark."
>> ;; (when (mark t)
>> ;;   (setq mark-active t)
>> ;;   (unless transient-mark-mode
>> ;; (setq transient-mark-mode 'lambda))
>> ;;   (when (and select-active-regions
>> ;;  (display-selections-p))
>> ;; (x-set-selection 'PRIMARY (current-buffer))
>>
>> ;; ;;[2011-05-25 Wed 09:23] fix compatibility bug in Org.
>> ;; ;;this is redefinition.  it is for 22 for export.
>> ;; (defcustom select-active-regions nil
>> ;;  "If non-nil, an active region automatically becomes the window
>> selection."
>> ;;  :type 'boolean
>> ;;  :group 'killing
>> ;;  :version "23.1")
>>
>> ;;;
>> ;;;accessibility fixes
>> ;;;
>>
>> (defun p ()
>>   (interactive)
>>   (message "fixing pop-up-windows")
>>   ;;i have /pop-up-windows/ set to nil, which works for most of
>>   ;;emacs.  for org, i do the following.  i need all of this just
>>   ;;as i need the large font above for accessibility reasons.
>>   ;;
>>   ;;(setf (cdr (assoc* 'file org-link-frame-setup)) 'find-file)
>>   (pushnew '(file . find-file) org-link-frame-setup :test #'equal)
>>   ;;it might be nice to have a 'dedicated-buffer option
>>   (setf org-indirect-buffer-display 'current-window)
>>   ;;could make pop kill the buffer
>> ;;;(setf org-display-internal-link-with-indirect-buffer t)
>>   (setf org-src-window-setup 'current-window)
>>   (add-hook 'org-capture-mode-hook 'delete-other-windows)
>>   (defadvice org-agenda-set-tags (around fix-windows activate compile)
>> "Restore windows."
>> (save-window-excursion
>>   ad-do-it))
>>   (defadvice org-export (after fix-windows activate compile)
>> "Delete other windows after every export."
>> (delete-other-windows))
>>
>>   (setf pop-up-windows nil)
>>
>>   ;;for emacs i do this
>>
>>   (add-to-list 'same-window-regexps "\\*Customize.*") ;notwork?
>>   (setf Man-notify-method 'pushy)
>>   (add-to-list 'same-window-regexps "\\*Man .*") ;notwork
>>   (add-to-list 'same-window-regexps "\\*.*\\*")
>>   (add-to-list 'same-window-buffer-names "*Remember*")
>>   (add-to-list 'same-window-buffer-names "*Help*")
>>   (add-to-list 'same-window-buffer-names "*Apropos*")
>>   (add-to-list 'same-window-buffer-names "*Summary*")
>>   (add-to-list 'same-window-buffer-names "*Compile-Log*")
>>   (add-to-list 'same-window-buffer-names "*Ibuffer*")
>>   (add-to-list 'same-window-buffer-names " *Ibuffer*")
>>   (message "done fixing pop-up-windows"))
>> (when (getenv "mep")
>>   ;;it is i
>>   (defconst alpha-alpha-p t)
>>   (require 'org)
>>   (p)
>>   ;;necessary for large fonts
>>   (scroll-bar-mode -1))
>>
>> ;;;
>> ;;;basic org features likely to affect many bug reports
>> ;;;
>>
>> (setq org-todo-keywords
>>   '((type  "NAKA(i)" "TODO(T)" "MAYBE(y)" "DOUBTFUL(l)"
>>  "|"
>>  "MOOT(m)")))
>>
>> (setq org-agenda-window-setup 'current-window)
>>
>
>
> --
> The Kafka Pandemic: http://thekafkapandemic.blogspot.com
>
> Ramsay's disease DOES progress.  MANY people have died from it.  And
> ANYBODY can get it.
>
> Denmark: free Karina Hansen 

Re: [O] comment trees in 8.3

2015-08-09 Thread Samuel Wales
ok, better testcase below.  please ignore last 2 messages.

complete with code, data, explanation, and steps to reproduce.

* commented subtrees show in agenda even if org-agenda-skip-comment-trees is t
to reproduce, load the code below, find this file, put
restriction lock on this subtree (< at bol above or c-c c-x
< here) and run m-x org-agenda-list.
*** what i get
Day-agenda (W32):
2015-08-09 Sun
  comment:Deadline:   no should not show
  comment:Deadline:   no should not show
  comment: 4 d. ago:  TODO yes this should show
  comment: 4 d. ago:  TODO COMMENT this one is possibly bad
syntax, so don't know if it should show
  comment: 4 d. ago:  COMMENT TODO no this should not show
  comment: 4 d. ago:  yes should show
  comment: 4 d. ago:  COMMENT no should not show
*** y
* TODO yes this should show
DEADLINE: <2015-08-05 Wed>
* TODO COMMENT this one is possibly bad syntax, so don't know if
it should show
DEADLINE: <2015-08-05 Wed>
*** bad syntax
* COMMENT TODO no this should not show
DEADLINE: <2015-08-05 Wed>
*** no should not show
DEADLINE: <2015-08-09 Sun>
* yes should show
DEADLINE: <2015-08-05 Wed>
* COMMENT no should not show
DEADLINE: <2015-08-05 Wed>
*** no should not show
DEADLINE: <2015-08-09 Sun>
*** code to reproduce with -Q
24.4.1

can repro with -Q and this old testcase code and restriction lock and
org-agenda-list.

===

;;;
;;;alpha-org-testcase.el
;;;
;;;minimal testcase for org
;;;
;;;   dorg=your-org-dir delorgsrc=your-org-src-dir emacs -Q -l
alpha-org-testcase.el
;;;

;;;
;;;for my use i do this:
;;;
"
mep=t emacs -Q -l $del/tests-and-publish/alpha-org-testcase.el \
  --geometry +0+0 \
  --geometry 60x30 \
  $dorg/tests--org--xyzzy-big/comment.org
"
;;;

(require 'cl)

;;my org files use these
(setq org-odd-levels-only t)
;; (setf org-export-initial-scope 'subtree)

;;fix abominations
(blink-cursor-mode 0)
(setf visible-bell 'top-bottom)

;;basics
(defun alpha-add-path (p) (setq load-path (cons p load-path)))
(alpha-add-path (concat (getenv "delorgsrc") "/lisp"))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(require 'org-install)

(setq org-agenda-files (list (substitute-in-file-name "$dorg/todo-new--a.org")))

;;;
;;;stuff make things easier
;;;

(setq org-completion-use-ido t)
(setf org-outline-path-complete-in-steps nil)

;;;
;;;compatibility fixes
;;;

;; ;;fix compatibility bug in org [2011-05-25 Wed 08:59]
;; (when (= emacs-major-version 22)
;;   (defun activate-mark ()
;; "Activate the mark."
;; (when (mark t)
;;   (setq mark-active t)
;;   (unless transient-mark-mode
;; (setq transient-mark-mode 'lambda))
;;   (when (and select-active-regions
;;  (display-selections-p))
;; (x-set-selection 'PRIMARY (current-buffer))

;; ;;[2011-05-25 Wed 09:23] fix compatibility bug in Org.
;; ;;this is redefinition.  it is for 22 for export.
;; (defcustom select-active-regions nil
;;  "If non-nil, an active region automatically becomes the window selection."
;;  :type 'boolean
;;  :group 'killing
;;  :version "23.1")

;;;
;;;accessibility fixes
;;;

(defun p ()
  (interactive)
  (message "fixing pop-up-windows")
  ;;i have /pop-up-windows/ set to nil, which works for most of
  ;;emacs.  for org, i do the following.  i need all of this just
  ;;as i need the large font above for accessibility reasons.
  ;;
  ;;(setf (cdr (assoc* 'file org-link-frame-setup)) 'find-file)
  (pushnew '(file . find-file) org-link-frame-setup :test #'equal)
  ;;it might be nice to have a 'dedicated-buffer option
  (setf org-indirect-buffer-display 'current-window)
  ;;could make pop kill the buffer
;;;(setf org-display-internal-link-with-indirect-buffer t)
  (setf org-src-window-setup 'current-window)
  (add-hook 'org-capture-mode-hook 'delete-other-windows)
  (defadvice org-agenda-set-tags (around fix-windows activate compile)
"Restore windows."
(save-window-excursion
  ad-do-it))
  (defadvice org-export (after fix-windows activate compile)
"Delete other windows after every export."
(delete-other-windows))

  (setf pop-up-windows nil)

  ;;for emacs i do this

  (add-to-list 'same-window-regexps "\\*Customize.*") ;notwork?
  (setf Man-notify-method 'pushy)
  (add-to-list 'same-window-regexps "\\*Man .*") ;notwork
  (add-to-list 'same-window-regexps "\\*.*\\*")
  (add-to-list 'same-window-buffer-names "*Remember*")
  (add-to-list 'same-window-buffer-names "*Help*")
  (add-to-list 'same-window-buffer-names "*Apropos*")
  (add-to-list 'same-window-buffer-names "*Summary*")
  (add-to-list 'same-window-buffer-names "*Compile-Log*")
  (add-to-list 'same-window-buffer-names "*Ibuffer*")
  (add-to-list 'same-window-buffer-names " *Ibuffer*")
  (message "done fixing pop-up-windows"))
(when (getenv "mep")
  ;;it is i
  (defconst alpha-alpha-p t)
  (require 'org)
  (p)
  ;;necessary for large fonts
  (scroll-bar-mode -1))

;;;
;;;basic org features likely to affect many bug reports

Re: [O] Subject: Bug: org-time-stamp-inactive on the end of a CLOCK interval edits start time [8.3.1 (8.3.1-elpaplus @ c:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150805/)]

2015-08-09 Thread Christoph LANGE
Nicolas Goaziou on 2015-08-10 00:30:
> Christoph LANGE  writes:
>> I frequently use org-time-stamp or org-time-stamp-inactive to adjust
>> intervals logged with CLOCK:.  Before upgrading to 8.3.1 I was able to
>> adjust the end of a CLOCK'ed interval of the format "CLOCK: start--end
>> => difference" by calling org-time-stamp or org-time-stamp-inactive
>> while having the point placed on "end".  As of 8.3.1 it seems that the
>> function always offers to edit "start".
> 
> I cannot reproduce the problem. I can edit both with C-c !, depending on
> the point.

Indeed that's what I get in the same *.org file when starting Emacs with
"-q".  So it must depend on my configuration.

I'm not sure how to investigate this – would you have an idea?

Many thanks in advance,

Christoph

-- 
Dr. Christoph Lange, Enterprise Information Systems Department
Applied Computer Science @ University of Bonn; Fraunhofer IAIS
http://langec.wordpress.com/about, Skype duke4701

→ Web Intelligence Summer School “Question Answering with the Web”
  Saint-Étienne, FR.  Apply by 4 July @ https://wiss.univ-st-etienne.fr/



Re: [O] org-element approach to modify or add ID to every headline

2015-08-09 Thread Grant Rettke
On Sun, Aug 9, 2015 at 2:44 AM, Nicolas Goaziou  wrote:
> Anyway, the following should do:

That works perfectly. Thank you.

Tempted to run it in a on-save hook just to ensure that the document
*always* has IDs. At least for tangle comments.



[O] How to execute calc commands in src blocks?

2015-08-09 Thread jenia.ivlev
Hello.

I want to use calc in org src-blocks. But it doesnt always work.
Here is an example that does work:

  #+BEGIN_SRC calc
  3
  2
  '+
  #+END_SRC

  #+RESULTS:
  6

Here is another example where it doesn't work:

  #+BEGIN_SRC calc
  [3 2]
  [2 10]
  '+
  #+END_SRC

This doesn't work at all. It tells me "Invalid data object encoutered".


Can someone please tell me how to make the second exaple work? 
And also, how do I assign a value to a variable maybe someone knows?

Thanks
Jenia








Re: [O] How to visit every source block and modify it's NAME property with org-element?

2015-08-09 Thread Grant Rettke
On Sun, Aug 9, 2015 at 3:12 AM, Nicolas Goaziou  wrote:
> Probably something like this (untested)
>
>   (let ((case-fold-search t))

That is a valuable example for us to learn from. Right off the bat I
wouldn't have
though to indent that way, but would have noticed quickly enough when I didn't
account for the case! There were 276 blocks corrected.

Here is the final version with a tweaked regex and removed and removal
of my original replacement desire.

Thank you Nicolas.

┌
│ (let ((case-fold-search t))
│   (while (re-search-forward "^\s*#[+]BEGIN_SRC" nil t)
│ (let ((element (org-element-at-point)))
│   (when (eq (org-element-type element) 'src-block)
│ (if (not (org-element-property :name element))
│ (let ((i (org-get-indentation)))
│   (beginning-of-line)
│   (save-excursion (insert "#+NAME: " (org-id-new) "\n"))
│   (indent-to i)
│   (forward-line 2)))
└

if you are unfamiliar with that indent-to bit, here is ax example of
what it handled correctly:

 #+NAME: FD94197F-0A18-480E-8DEA-F5943B860105
 #+BEGIN_SRC emacs-lisp
 (add-to-list 'load-path "~/src/org-mode/lisp")
 #+END_SRC

  #+NAME: F4D65E13-0E55-4443-A7A7-13DD64A13051
  #+BEGIN_SRC emacs-lisp
  (add-to-list 'load-path "~/src/org-mode/lisp")
  #+END_SRC

   #+NAME: 705F4F89-0431-42A3-A10D-1C528945CAC7
   #+BEGIN_SRC emacs-lisp
   (add-to-list 'load-path "~/src/org-mode/lisp")
   #+END_SRC

#+NAME: 233C2AFF-A257-4091-875C-945E3189AFEB
#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "~/src/org-mode/lisp")
#+END_SRC

 #+NAME: FC730EEE-A32B-449D-94EA-EBB750D89204
 #+BEGIN_SRC emacs-lisp
 (add-to-list 'load-path "~/src/org-mode/lisp")
 #+END_SRC

- Foo
  #+NAME: FD94197F-0A18-480E-8DEA-F5943B860105
  #+BEGIN_SRC emacs-lisp
  (add-to-list 'load-path "~/src/org-mode/lisp")
  #+END_SRC
  - Foo
#+NAME: FD94197F-0A18-480E-8DEA-F5943B860105
#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "~/src/org-mode/lisp")
#+END_SRC
- Foo
  #+NAME: FD94197F-0A18-480E-8DEA-F5943B860105
  #+BEGIN_SRC emacs-lisp
  (add-to-list 'load-path "~/src/org-mode/lisp")
  #+END_SRC
  - Foo
   #+NAME: FD94197F-0A18-480E-8DEA-F5943B860105
   #+BEGIN_SRC emacs-lisp
   (add-to-list 'load-path "~/src/org-mode/lisp")
   #+END_SRC



Re: [O] Emacs sees the directory with the new org-mode version, but loads the old version

2015-08-09 Thread Grant Rettke
Create a init file with only the contents and use that to start EMACS

(add-to-list 'load-path "~/.emacs.d/org-20150803")
(require 'org)

And check the `org-version'. It ought to be what you expect. Did you
get that from a ZIP? Did you follow the directions to generate the
autoloads and stuff?

Depending upon where and how you load 'org, another MELPA package
could be requiring org-mode transitively, before your load call. It is
very easy to have that happen.
Grant Rettke
--
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
“All creativity is an extended form of a joke.” --Kay
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Thu, Aug 6, 2015 at 7:53 AM, Meir Goldenberg  wrote:
> The version of org-mode that came with my version of Emacs (24.5.2) is
> 8.2.10. I have installed version 8.3.1 from ELPA and added this to my init
> file:
>
> (add-to-list 'load-path "~/.emacs.d/org-20150803")
> (require 'org)
>
> When I check the version of org in Emacs, it says:
>
> Org-mode version 8.2.10 (release_8.2.10 @
> /home/meir/.emacs.d/elpa/org-20150803/)
>
> That is, it reports the old version and the new directory... (the built-in
> version is located in /usr/local/share/emacs/24.5/lisp/org)
>
> Here is the relevant portion of my init file (there is nothing before this
> portion):
>
> (require 'cl)
>
> ;; Org-mode that was shipped with Emacs
> (setq load-path (remove-if (lambda (x) (string-match-p "org$" x))
> load-path))
> ;; ELPA
> (setq load-path (remove-if (lambda (x) (string-match-p "org-20" x))
> load-path))
>
> (add-to-list 'load-path "~/.emacs.d/org-20150803")
>
> (require 'package)
> (add-to-list 'package-archives
>  '("melpa" . "http://melpa.milkbox.net/packages/";) t)
> (package-initialize)
>
> (require 'org)
>
> How do I get Emacs to load the new version of org-mode?



[O] new error: byte-code: Capture abort: (void-function button-lock-set-button)

2015-08-09 Thread Xebar Saram
Hi all

again, i dont know if this is related to the new release but i cant use org
capture anymore

i get the following error

byte-code: Capture abort: (void-function button-lock-set-button)

sometime this even bring emacs crashing

any clue anyone?

z


Re: [O] new error: byte-code: Capture abort: (void-function button-lock-set-button)

2015-08-09 Thread Xebar Saram
Ok its not the new release its actually Johns great
'highlight-email-addresses' function that was giving that error

i disabled it and now everything is back to normal

best

Z

On Mon, Aug 10, 2015 at 8:19 AM, Xebar Saram  wrote:

> Hi all
>
> again, i dont know if this is related to the new release but i cant use
> org capture anymore
>
> i get the following error
>
> byte-code: Capture abort: (void-function button-lock-set-button)
>
> sometime this even bring emacs crashing
>
> any clue anyone?
>
> z
>
>


Re: [O] templating with Org?

2015-08-09 Thread Eric Abrahamsen
John Kitchin  writes:

> I don't have the impression you would need to hijack the export
> process. It seems like you would need to call a function that gets
> data from some source (e.g the org document) and then populates a
> template with that data, and once that is done, call a regular export
> function. There are a number of template solutions:
> http://www.emacswiki.org/emacs/CategoryTemplates. I am not sure these
> are too easy to adapt to what you describe.

That's an interesting idea: going from the base Org file to a massaged
Org buffer, and then exporting that. I'll try that out for a bit. Thanks
for that, and for the links!

> I played around with some ideas for this here:
>
> http://kitchingroup.cheme.cmu.edu/blog/2014/01/20/Alternatives-to-long-complex-format-statements-in-emacs-lisp/
>
> http://kitchingroup.cheme.cmu.edu/blog/2014/01/26/Another-alternative-to-string-templates/
>
>
> Something like these could be used to populate a template I think.
>
> John
>
> ---
> 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
>
> On Sat, Aug 8, 2015 at 12:48 AM, Eric Abrahamsen
>  wrote:
>
>
> Exporting org files and subtrees is awfully flexible, given all
> the
> possible customizations, but for a long while I've occasionally
> felt the
> need to come at the "export" process from the other direction:
> instead
> of customizing the export appearance of a series of headings,
> instead
> starting with a common block of export text, and interpolating
> values
> from the headings into that text -- ie, templating.
>
> I've felt this need off and on for a couple of years, most
> recently when
> organizing a small literary festival. I really need to keep all
> the
> information about the events in a single place, otherwise I know
> that
> information will go stale right away. But I need the information
> in a
> series of such wildly-varying formats that I can't imagine setting
> up
> (and switching between) export filters in a way that wouldn't make
> me
> cry. Not to mention that the different "export" use-cases all have
> their
> own per-heading boilerplate text, and there's no way I'm going to
> repeat
> all that different boilerplate under each heading.
>
> Obviously there's many ways this could be done. I could somehow
> hijack
> the export process -- in many cases it would be nice too make use
> of the
> skeleton document structures that export provides.
>
> Or maybe dynamic blocks? I've never used them before. Or maybe
> just a
> plain old `org-map-entries', which reads the template text from an
> external file and then steals some of the macro expansion
> functions to
> fill out the values.
>
> Has anyone wanted to do this before? Has anyone actually done it?
> Any
> thoughts or suggestions would be much appreciated!
>
> Yours,
> Eric




Re: [O] Emacs sees the directory with the new org-mode version, but loads the old version

2015-08-09 Thread Meir Goldenberg
Ah, I apologize for not posting an update. The problem has been solved:
http://stackoverflow.com/questions/31855904/emacs-sees-the-directory-with-the-new-org-mode-version-but-loads-the-old-versio
Thank you very much for the reply!

On Mon, Aug 10, 2015 at 4:40 AM, Grant Rettke 
wrote:

> Create a init file with only the contents and use that to start EMACS
>
> (add-to-list 'load-path "~/.emacs.d/org-20150803")
> (require 'org)
>
> And check the `org-version'. It ought to be what you expect. Did you
> get that from a ZIP? Did you follow the directions to generate the
> autoloads and stuff?
>
> Depending upon where and how you load 'org, another MELPA package
> could be requiring org-mode transitively, before your load call. It is
> very easy to have that happen.
> Grant Rettke
> --
> g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> “All creativity is an extended form of a joke.” --Kay
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>
> On Thu, Aug 6, 2015 at 7:53 AM, Meir Goldenberg 
> wrote:
> > The version of org-mode that came with my version of Emacs (24.5.2) is
> > 8.2.10. I have installed version 8.3.1 from ELPA and added this to my
> init
> > file:
> >
> > (add-to-list 'load-path "~/.emacs.d/org-20150803")
> > (require 'org)
> >
> > When I check the version of org in Emacs, it says:
> >
> > Org-mode version 8.2.10 (release_8.2.10 @
> > /home/meir/.emacs.d/elpa/org-20150803/)
> >
> > That is, it reports the old version and the new directory... (the
> built-in
> > version is located in /usr/local/share/emacs/24.5/lisp/org)
> >
> > Here is the relevant portion of my init file (there is nothing before
> this
> > portion):
> >
> > (require 'cl)
> >
> > ;; Org-mode that was shipped with Emacs
> > (setq load-path (remove-if (lambda (x) (string-match-p "org$" x))
> > load-path))
> > ;; ELPA
> > (setq load-path (remove-if (lambda (x) (string-match-p "org-20" x))
> > load-path))
> >
> > (add-to-list 'load-path "~/.emacs.d/org-20150803")
> >
> > (require 'package)
> > (add-to-list 'package-archives
> >  '("melpa" . "http://melpa.milkbox.net/packages/";) t)
> > (package-initialize)
> >
> > (require 'org)
> >
> > How do I get Emacs to load the new version of org-mode?
>