[O] how to run org-repair-property-drawers after upgrade to 8.3?

2015-08-13 Thread Bingo
Hi,
   I have put the defun of org-repair-property-drawers in my .emacs file
copied from http://orgmode.org/Changes.html, and defined a keyboard
shortcut for it:

(global-set-key (kbd "C-c i") 'org-repair-property-drawers)

Now after restarting emacs when I go to an org buffer, and use the keyboard
shortcut, I get the error trace:

Debugger entered--Lisp error: (wrong-type-argument commandp
org-repair-property-drawers)
  call-interactively(org-repair-property-drawers nil nil)
  command-execute(org-repair-property-drawers)

thanks


Re: [O] OrgTbl mode not working

2015-08-13 Thread Nicolas Goaziou
Hello,

Benjamin Slade  writes:

> Since some recent update of either orgmode or AUCTeX, OrgTbl-mode is no
> longer working for me.  The OrgTbl menu appears, and allows me to insert
> tables, but it does not treat inserted tables as actual orgmode tables,
> but just as regular characters (i.e. I can't edit them as tables, or
> "compile" them into LaTeX tables with C-c C-c, etc.)

Would you have an ECM? I cannot reproduce the issue.

Regards,

-- 
Nicolas Goaziou



Re: [O] how to run org-repair-property-drawers after upgrade to 8.3?

2015-08-13 Thread Nicolas Goaziou
Hello,

Bingo  writes:

>I have put the defun of org-repair-property-drawers in my .emacs file
> copied from http://orgmode.org/Changes.html, and defined a keyboard
> shortcut for it:
>
> (global-set-key (kbd "C-c i") 'org-repair-property-drawers)
>
> Now after restarting emacs when I go to an org buffer, and use the keyboard
> shortcut, I get the error trace:
>
> Debugger entered--Lisp error: (wrong-type-argument commandp
> org-repair-property-drawers)
>   call-interactively(org-repair-property-drawers nil nil)
>   command-execute(org-repair-property-drawers)

You need to add (interactive) to the function's body, right after the
docstring.


Regards,

-- 
Nicolas Goaziou



Re: [O] OrgTbl mode not working

2015-08-13 Thread Benjamin Slade
Here is one:

>>>

\begin{comment}
#+ORGTBL: SEND summarytable orgtbl-to-latex :splice t :skip 0

|   |   |   |   |   |
|---+---+---+---+---|
|   |   |   |   |   |

\end{comment}

>>>

[running in AUCTeX mode]


regards,
~
Dr Benjamin Slade
pgp fingerprint: 21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19
~
{sent by mu4e on Emacs running under GNU/Linux}
(Choose Linux, Choose Freedom)


Nicolas Goaziou  writes:

> Hello,
>
> Benjamin Slade  writes:
>
>> Since some recent update of either orgmode or AUCTeX, OrgTbl-mode is no
>> longer working for me.  The OrgTbl menu appears, and allows me to insert
>> tables, but it does not treat inserted tables as actual orgmode tables,
>> but just as regular characters (i.e. I can't edit them as tables, or
>> "compile" them into LaTeX tables with C-c C-c, etc.)
>
> Would you have an ECM? I cannot reproduce the issue.
>
> Regards,

-- 



Re: [O] Stable releases

2015-08-13 Thread Eric S Fraga
On Wednesday, 12 Aug 2015 at 15:06, Scott Randby wrote:

[...]

> If there are no stable releases, then maybe the web site should not
> say: "Stable version 8.3.1 (Aug. 2015)." Perhaps "stable" should just
> be eliminated from that phrase. Certainly, the use of "stable"
> confused me.

I guess it's a matter of interpretation.  The word stable can mean
different things.  In this context, it is the opposite of labile and
specifically in comparison with the continually changing git version.

Stable does not unfortunately mean "bug-free" nor does it mean anything
with respect to the previous "stable" version.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1



Re: [O] todo autochange to done

2015-08-13 Thread scrawler
On Wed, Aug 12, 2015 at 11:39:24PM -0500, Matt Lundin wrote:

> Check the quote character before org-after-todo-statistics-hook and
> org-summary-todo: it should be ' not ’.

Ahha! I have the pdf version of the org manual and pasted from it. Thanks!

-- 
signature angry: "gr"
:-)



Re: [O] org-bbdb-birthday reminder

2015-08-13 Thread Matt Lundin
Julien Cubizolles  writes:

> Matt Lundin  writes:
>
>> For advanced reminders of birthdays and the like, you could use a
>> diary-sexp:
>>
>> %%(diary-remind '(org-anniversary 1996 8 20) -7) Someone turns %s
>
> I'll give it a try thanks, but you need one line per birthday you want
> to be reminded of. It would be much easier to have just a field in bbdb
> to select these contatcs.

You could use a "calendar" agenda to look for upcoming birthdays
generated by org-bbdb-anniversaries:

--8<---cut here---start->8---
(add-to-list 'org-agenda-custom-commands
 '("c" "Calendar" agenda ""
((org-agenda-span 'month) 
 (org-agenda-time-grid nil) ;;
 (org-agenda-entry-types '(:timestamp :sexp)
--8<---cut here---end--->8---

If (for speed's sake) you wanted to limit the calendar just to
birthdays, you could create an org file with a single headline:

--8<---cut here---start->8---
* Birthdays
%%(org-bbdb-anniversaries)
--8<---cut here---end--->8---

...and then add an org-agenda-files line that points just to that
minimal file to the custom command above.

Matt



Re: [O] named python session

2015-08-13 Thread Andreas Leha
Hi Ken,

Ken Mankoff  writes:
> Hi Andreas,
>
> On 2015-08-12 at 08:06, Andreas Leha  
> wrote:
>> How do I associate that with the python process in *mypy*?
>> I am asked to start python when I run python-shell-send-region.
>
>
> I have set up my system so that Org asks for a buffer name every time 
> =org-edit-special= is called. This may be helpful to you.
>
>   -k.
>  
>
> *** Custom Python Session Names
>
> https://github.com/jorgenschaefer/elpy/issues/383
>
> I want each python session to optionally have a unique name, so that I
> can run multiple sessions in multiple windows/buffers/directories and
> not have them interact/interfere.
>
> Here I've copied =elpy-shell-get-or-create-process= from =elpy.el= and
> modified it. I also have to modify =python-shell-get-process-name=.
> This all is fairly easy, except when executing from Org it gets more
> complicated, hence the special case if a function called from
> =org-ctrl-c-ctrl-c=. 
>
> #+BEGIN_SRC emacs-lisp :results none
>   (defun elpy-shell-get-or-create-process ()
> "Get or create an inferior Python process for current buffer and return 
> it.
> Customized by KDM to make dedicated sessions"
> (let* ((bufname (format "*%s*" (python-shell-get-process-name t)))
>(proc (get-buffer-process bufname)))
>   (if proc
>   proc
> (run-python (python-shell-parse-command) t nil) ;; DEDICATED!
> (get-buffer-process bufname
>
>   (defun python-shell-get-process-name (dedicated)
> (if (equal this-command 'org-ctrl-c-ctrl-c)
> (kdm/orig-py-sh-get-proc-name dedicated)
>   (kdm/my-py-sh-get-proc-name dedicated)))
>
>   (defun kdm/orig-py-sh-get-proc-name (dedicated)
> "Calculate the appropriate process name for inferior Python process.
>If DEDICATED is t returns a string with the form
>`python-shell-buffer-name'[variable `buffer-name']."
> (let ((process-name
>(if (and dedicated
> (buffer-name))
>(format "%s[%s]" python-shell-buffer-name (buffer-name))
>  (format "%s" python-shell-buffer-name
>   process-name))
>
>   (defun kdm/my-py-sh-get-proc-name (dedicated)
> (if (boundp 'py-buf-proc-name)
> (format "%s" py-buf-proc-name)
>   (setq-local py-buf-proc-name
>   (format "%s"
>   (completing-read "Python session name: "
>nil nil nil (buffer-name) nil 
> (buffer-name)))
>   )))
>
> #+END_SRC

Thanks a lot for setting me on the right track!  I am quite surprised
(coming from ess as my interface to R) that multiple named sessions
aren't supported out of the box for python.

I use your code now, which in my use-case works great.  Only slight
variation: I set the default python process-name to the session name
using these two functions:

#+BEGIN_SRC emacs-lisp :results none
(defun al-org-babel-get-session (&optional arg info)
  "Return the :session of the current source-code block.
Will return
- nil if :session is given but not named
- \"none\" if no :session argument is specified
- the session name otherwise"
  (interactive)
  (if (org-src-edit-buffer-p)
  (let ((beg org-src--beg-marker))
(with-current-buffer (org-src--source-buffer)
  (goto-char beg)
  (al-org-babel-get-session)))
(let* ((info (or info (org-babel-get-src-block-info)))
   (params (nth 2 info))
   (session (cdr (assoc :session params
  session)))

(defun kdm/my-py-sh-get-proc-name (dedicated)
  (let* ((sessionname (al-org-babel-get-session))
 (defaultname (or sessionname (if (equalp sessionname "none")
  (buffer-name)
sessionname
(if (boundp 'py-buf-proc-name)
(format "%s" py-buf-proc-name)
  (setq-local py-buf-proc-name
  (format "%s"
  (completing-read "Python session name: "
   nil nil nil defaultname nil 
defaultname))
#+END_SRC

Thanks again,
Andreas




Re: [O] todo autochange to done

2015-08-13 Thread scrawler
On Thu, Aug 13, 2015 at 08:05:06AM -0500, scraw...@gmail.com wrote:
> On Wed, Aug 12, 2015 at 11:39:24PM -0500, Matt Lundin wrote:
> 
> > Check the quote character before org-after-todo-statistics-hook and
> > org-summary-todo: it should be ' not ’.
> 
> Ahha! I have the pdf version of the org manual and pasted from it. Thanks!
> 

I spoke too soon. the version in my .emacs is ok, the one I posted here (from 
the pdf) isn't...
-- 
signature drinking: "glugluglug"
:-)



Re: [O] todo autochange to done

2015-08-13 Thread scrawler
On Thu, Aug 13, 2015 at 08:14:31AM -0500, scraw...@gmail.com wrote:
> 
> I spoke too soon. the version in my .emacs is ok, the one I posted here (from 
> the pdf) isn't...

Never mind. Sorry for the noise.

-- 
signature mischievous: "heh, heh, heh"
:-)



Re: [O] Stable releases

2015-08-13 Thread Scott Randby

On 08/13/2015 05:32 AM, Eric S Fraga wrote:

On Wednesday, 12 Aug 2015 at 15:06, Scott Randby wrote:

[...]


If there are no stable releases, then maybe the web site should not
say: "Stable version 8.3.1 (Aug. 2015)." Perhaps "stable" should just
be eliminated from that phrase. Certainly, the use of "stable"
confused me.


I guess it's a matter of interpretation.  The word stable can mean
different things.  In this context, it is the opposite of labile and
specifically in comparison with the continually changing git version.

Stable does not unfortunately mean "bug-free" nor does it mean anything
with respect to the previous "stable" version.


I never expect any version to be bug free.







[O] Bug: Clocking in fails when there is a dangling clock [8.3.1 (8.3.1-16-gf6aa53-elpaplus @ d:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150810/)]

2015-08-13 Thread Christoph LANGE

Dear Org-mode developers,

here is another regression in 8.3.1.

Steps to reproduce:

1. Assume a *.org file like this:

* Clock
  CLOCK: [2015-08-13 Thu 15:28]

2. With the point somewhere in this tree, run org-clock-in (C-c C-x C-i)

Expected behaviour: the dangling clock is recognised; Org-mode asks you
how you'd like to resolve it.

Actual behaviour:

Debugger entered--Lisp error: (wrong-type-argument stringp 2)
  regexp-quote(2)
  org-clock-jump-to-current-clock((#2840310 in default.org> 21964 39716))
  org-clock-resolve((#default.org> 21964 39716) #[(clock) "\301\302\303\304 
\304A!Z\305\"\"\207" [clock format "Dangling clock started %d mins ago" 
floor org-float-time 60] 6] (21964 39716))

  org-resolve-clocks()
  byte-code("" 
[org-clock-resolving-clocks-due-to-idleness org-clock-resolving-clocks 
org-clock-leftover-time leftover org--msg-extra target-pos 
org-clocking-p nil "" t org-resolve-clocks (64) org-clock-in (4) 
org-clock-select-task "Clock-in on task: " copy-marker error "Abort" 
(16) org-clock-mark-default-task org-back-to-heading marker-buffer 
marker-position 4 org-heading-components message "Clock continues in 
\"%s\"" throw abort org-clock-out org-at-heading-p point-at-bol 0 
org-base-buffer run-hooks org-clock-in-prepare-hook 
org-clock-history-push functionp looking-at match-string 2 org-todo "[ 
]*" "\\>" replace-regexp-in-string "\\[\\[.*?\\]\\[\\(.*?\\)\\]\\]" 
"\\1" match-string-no-properties "???" ...] 8)

  org-clock-in(nil)
  funcall-interactively(org-clock-in nil)
  call-interactively(org-clock-in nil nil)
  command-execute(org-clock-in)

Cheers,

Christoph

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-08-08 on KAEL
Package: Org-mode version 8.3.1 (8.3.1-16-gf6aa53-elpaplus @ 
d:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150810/)


current state:
==
(setq
 org-id-locations-file "~\\.emacs.d\\.org-id-locations"
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)

 org-clock-persist-file "~\\.emacs.d\\org-clock-save.el"
 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) 
("\\.x?html?\\'" . "firefox %s")

 ("\\.pdf\\'" . "okular %s"))
 org-pretty-entities t
 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-capture-templates '(("c" "Contacts" entry (file "...")
  "* %^{Name}%^{CUSTOM_ID}p\n  %?")
 ("w" "Log work task" entry (id 
"00fba618-a215-4d39-a8fd-88f1ffce1fdb")
  "* %^{Description}  %^g%?" :prepend t 
:clock-in t :clock-keep t)
 ("t" "TODO" entry (id 
"00fba618-a215-4d39-a8fd-88f1ffce1fdb")
  "* TODO %^{Description}\n  DEADLINE: 
%^{DEADLINE}t" :prepend t :clock-in t :clock-resume t)

 )
 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-finalize-hook '(bh/org-agenda-to-appt)
 org-enforce-todo-checkb

Re: [O] Bug: Clocking in fails when there is a dangling clock [8.3.1 (8.3.1-16-gf6aa53-elpaplus @ d:/Users/clange/.emacs.d/elpa/org-plus-contrib-20150810/)]

2015-08-13 Thread Rasmus
Hi,

Christoph LANGE  writes:

> Dear Org-mode developers,
>
> here is another regression in 8.3.1.
>
> Steps to reproduce:
>
> 1. Assume a *.org file like this:
>
> * Clock
>   CLOCK: [2015-08-13 Thu 15:28]
>
> 2. With the point somewhere in this tree, run org-clock-in (C-c C-x C-i)
>
> Expected behaviour: the dangling clock is recognised; Org-mode asks you
> how you'd like to resolve it.

I cannot reproduce this error with a recent git checkout with a clean
Emacs.  Do you see this from emacs -q?

Rasmus

-- 
The Kids call him Billy the Saint




Re: [O] How would you export one headline every time that you tangle the file?

2015-08-13 Thread John Kitchin
I also do something like this for scientific manuscripts, but I usually put it 
in a heading at the
end and tag the heading :noexport:. that gives me some more flexibility
to have multiple steps, some notes, etc...

e.g.

* build  :noexport:

#+BEGIN_SRC emacs-lisp :tangle no :exports none
(org-babel-tangle)
(require 'ox-gfm)
(org-export-to-file 'gfm "README.md" nil t)
#+END_SRC

Charles C. Berry writes:

> On Wed, 12 Aug 2015, Grant Rettke wrote:
>
>> Good afternoon,
>>
>> I've got an org file. It has a bunch of headlines. There is on
>> headline names README.
>>
>> I want to do something every time I tangle the file. I want to:
>>
>> - Go to that headline
>> - Select set the region to the contents of that headline (org-mark-subtree)
>> - Export the contents using the Github Flavored Markup to the file README.md.
>>
>
> If this is a one-off, I'd write a babel block like this and put it under
> the headline of that subtree:
>
> #+NAME: tangle-and-export-readme
> #+BEGIN_SRC emacs-lisp :tangle no :exports none
> (org-babel-tangle)
> (require 'ox-gfm)
> (org-export-to-file 'gfm "README.md" nil t)
> #+END_SRC
>
>
> Then when you want to tangle,
>
> C-c C-v g tangle-and-export-readme RET C-c C-c y
>
> will do it. (Assuming contrib is on the load path, of course.)
>
> You can use TAB completion with `C-c C-v g'.
>
> HTH,
>
> Chuck

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



[O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread Peter Davis

I'd like to store information in an org page that gets automatically encrypted 
when I save it, and decrypted when I open it. Is
there some built-in functionality or hooks for this?

Thank you,
-pd




Re: [O] outorg issue

2015-08-13 Thread John Kitchin
I can only confirm I have had the same issue for a while. For me it is
mostly when I press shift-tab. regular tab works fine for cycling.

The problem seems to arise from the point moving to the beginning of the
buffer when outline-back-to-heading is called, which raises that
error. I don't have time today to dig much further. I hope that helps
get a solution though! I miss outshine!


Andreas Leha writes:

> Hi all,
>
> For quite some time now, I have to disable outshine/outorg [1] as it
> does give me "Before first heading" (complete backtrace [2]) whenever I
> open an org file followed by more issues actually using org mode.
>
> I can even reproduce this with emacs -Q and a minimal configuration [3].
>
> My system is:
> : GNU Emacs 25.0.50.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 
> 10.9.5 (Build 13F1077))
> :  of 2015-06-17
> : Org-mode version 8.3beta (release_8.3beta-1264-g365c19)
>
>
> Can anyone reproduce this and/or has a fix?  Or am I missing anything
> obvious?
>
> Thanks in advance!
>
>
> Regards,
> Andreas
>
>
>
>
> [1] https://github.com/tj64/outshine
> https://github.com/tj64/outorg
>
>
> [2] complete backtrace when opening a random org file
>
> --8<---cut here---start->8---
> Debugger entered--Lisp error: (error "Before first heading")
>   signal(error ("Before first heading"))
>   error("Before first heading")
>   outline-back-to-heading()
>   outline-flag-subtree(t)
>   hide-subtree()
>   (save-excursion (goto-char (point-min)) (hide-subtree) (show-children 
> keep-levels) (condition-case err (while (outline-get-next-sibling) 
> (hide-subtree) (show-children keep-levels)) (error nil)))
>   hide-sublevels(1)
>   org-overview()
>   org-set-startup-visibility()
>   org-mode()
>   set-auto-mode-0(org-mode nil)
>   set-auto-mode()
>   normal-mode(t)
>   after-find-file(nil t)
>   find-file-noselect-1(# 
> "~/hipsci/cellomics/cellomics.org" nil nil "~/hipsci/cellomics/cellomics.org" 
> (25636441 16777218))
>   find-file-noselect("~/hipsci/cellomics/cellomics.org" nil nil t)
>   find-file("~/hipsci/cellomics/cellomics.org" t)
>   funcall-interactively(find-file "~/hipsci/cellomics/cellomics.org" t)
>   call-interactively(find-file nil nil)
>   command-execute(find-file)
> --8<---cut here---end--->8---
>
>
>
> [3] minimal startup file
>
> --8<---cut here---start->8---
> ;; outorg/outshine pre-requisite
> (defvar outline-minor-mode-prefix "\M-#")
>
> (add-to-list 'load-path (expand-file-name 
> "~/local/emacs/org-mode-install/lisp"))
> (add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . 
> org-mode))
>
> ;; outorg/outshine
> (add-to-list 'load-path "~/local/emacs/org-mode-in-comments/outorg/")
> (add-to-list 'load-path "~/local/emacs/org-mode-in-comments/outshine")
> (require 'outshine)
> (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
> (setq outshine-use-speed-commands t)
> --8<---cut here---end--->8---

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



[O] Fix for clocking in when org-clock-into-drawer is not a string

2015-08-13 Thread Tom Hinton
Hello,

I have encountered a fault in recent versions of org when clocking into a task 
with a dangling clock when
org-clock-into-drawer is an integer rather than a string. It appears the error 
was a presumption that
org-clock-into-drawer would be a string for the construction of a regex. 
Attached is a trivial single line patch
which seems to fix this for me. make test reports no additional test failures 
with the patch applied.

All the best,

Tom Hinton

>From 498b0ae295453e1ce5ef42d54cb8dfb9f930809e Mon Sep 17 00:00:00 2001
From: Tom Hinton 
Date: Wed, 12 Aug 2015 12:46:47 +0100
Subject: [PATCH] Fix clock in when org-clock-into-drawer is integer

* org-clock.el (org-clock-jump-to-current-clock):
  fixed a bug wherein org-clock-jump-to-current-clock did not work if org-clock-into-drawer
  was not either a string or nil.

This is a TINYCHANGE, although I am happy to assign copyright to the FSF.
---
 lisp/org-clock.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index e44da73..6de093f 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -950,7 +950,7 @@ If necessary, clock-out of the currently active clock."
   (when drawer
 	(org-with-wide-buffer
 	 (let ((drawer-re (format "^[ \t]*:%s:[ \t]*$"
-  (regexp-quote (or drawer "LOGBOOK"
+  (regexp-quote (if (stringp drawer) drawer "LOGBOOK"
 	   (beg (save-excursion (outline-back-to-heading t) (point
 	   (catch 'exit
 	 (while (re-search-backward drawer-re beg t)
-- 
2.1.4

-- 
http://www.cse.org.uk/about-us/staff#Tom-Hinton


Re: [O] outorg issue

2015-08-13 Thread Andreas Leha
Hi John,

Thanks for the confirmation!

Andreas


John Kitchin  writes:
> I can only confirm I have had the same issue for a while. For me it is
> mostly when I press shift-tab. regular tab works fine for cycling.
>
> The problem seems to arise from the point moving to the beginning of the
> buffer when outline-back-to-heading is called, which raises that
> error. I don't have time today to dig much further. I hope that helps
> get a solution though! I miss outshine!
>
>
> Andreas Leha writes:
>
>> Hi all,
>>
>> For quite some time now, I have to disable outshine/outorg [1] as it
>> does give me "Before first heading" (complete backtrace [2]) whenever I
>> open an org file followed by more issues actually using org mode.
>>
>> I can even reproduce this with emacs -Q and a minimal configuration [3].
>>
>> My system is:
>> : GNU Emacs 25.0.50.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 
>> 10.9.5 (Build 13F1077))
>> :  of 2015-06-17
>> : Org-mode version 8.3beta (release_8.3beta-1264-g365c19)
>>
>>
>> Can anyone reproduce this and/or has a fix?  Or am I missing anything
>> obvious?
>>
>> Thanks in advance!
>>
>>
>> Regards,
>> Andreas
>>
>>
>>
>>
>> [1] https://github.com/tj64/outshine
>> https://github.com/tj64/outorg
>>
>>
>> [2] complete backtrace when opening a random org file
>>
>> --8<---cut here---start->8---
>> Debugger entered--Lisp error: (error "Before first heading")
>>   signal(error ("Before first heading"))
>>   error("Before first heading")
>>   outline-back-to-heading()
>>   outline-flag-subtree(t)
>>   hide-subtree()
>>   (save-excursion (goto-char (point-min)) (hide-subtree) (show-children 
>> keep-levels) (condition-case err (while (outline-get-next-sibling) 
>> (hide-subtree) (show-children keep-levels)) (error nil)))
>>   hide-sublevels(1)
>>   org-overview()
>>   org-set-startup-visibility()
>>   org-mode()
>>   set-auto-mode-0(org-mode nil)
>>   set-auto-mode()
>>   normal-mode(t)
>>   after-find-file(nil t)
>>   find-file-noselect-1(# 
>> "~/hipsci/cellomics/cellomics.org" nil nil 
>> "~/hipsci/cellomics/cellomics.org" (25636441 16777218))
>>   find-file-noselect("~/hipsci/cellomics/cellomics.org" nil nil t)
>>   find-file("~/hipsci/cellomics/cellomics.org" t)
>>   funcall-interactively(find-file "~/hipsci/cellomics/cellomics.org" t)
>>   call-interactively(find-file nil nil)
>>   command-execute(find-file)
>> --8<---cut here---end--->8---
>>
>>
>>
>> [3] minimal startup file
>>
>> --8<---cut here---start->8---
>> ;; outorg/outshine pre-requisite
>> (defvar outline-minor-mode-prefix "\M-#")
>>
>> (add-to-list 'load-path (expand-file-name 
>> "~/local/emacs/org-mode-install/lisp"))
>> (add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . 
>> org-mode))
>>
>> ;; outorg/outshine
>> (add-to-list 'load-path "~/local/emacs/org-mode-in-comments/outorg/")
>> (add-to-list 'load-path "~/local/emacs/org-mode-in-comments/outshine")
>> (require 'outshine)
>> (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>> (setq outshine-use-speed-commands t)
>> --8<---cut here---end--->8---
>
> --
> 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




[O] Annoying positioning of point when writing footnotes

2015-08-13 Thread Gerald Wildgruber

Hi,

when doing a "C-c C-x f" in order to insert a footnote in an org mode
document, the point is strangely positioned on the HEADING under which
footnotes are stored and not, as one would expect, near the actual
footnote marker [fn:X] where the text of the footnote goes. this is very
annoying as there is absolutly nothing to do at the "Footnotes" heading,
and one has to manoeuvre manually to the actual footnote every time over
and over again.

Is this a bug or can it be changed?

Thanks

Gerald.



Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread John Kitchin
see org-crypt http://orgmode.org/worg/org-tutorials/encrypting-files.html

Here is the setup I have that worked when I tried it last ;)

;; encryption
(require 'epa-file)
(unless (memq epa-file-handler file-name-handler-alist)
  (epa-file-enable))

(require 'org-crypt)
(org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt")))
;; GPG key to use for encryption
;; Either the Key ID or set to nil to use symmetric encryption.
(setq org-crypt-key "some-key")



Peter Davis writes:

> I'd like to store information in an org page that gets automatically 
> encrypted when I save it, and decrypted when I open it. Is
> there some built-in functionality or hooks for this?
>
> Thank you,
> -pd

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



Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread Peter Davis

Thanks, John! I'll give it a try.

-pd

John Kitchin  writes:

> see org-crypt http://orgmode.org/worg/org-tutorials/encrypting-files.html
>
> Here is the setup I have that worked when I tried it last ;)
>
> ;; encryption
> (require 'epa-file)
> (unless (memq epa-file-handler file-name-handler-alist)
>   (epa-file-enable))
>
> (require 'org-crypt)
> (org-crypt-use-before-save-magic)
> (setq org-tags-exclude-from-inheritance (quote ("crypt")))
> ;; GPG key to use for encryption
> ;; Either the Key ID or set to nil to use symmetric encryption.
> (setq org-crypt-key "some-key")
>
>
>
> Peter Davis writes:
>
>> I'd like to store information in an org page that gets automatically 
>> encrypted when I save it, and decrypted when I open it. Is
>> there some built-in functionality or hooks for this?
>>
>> Thank you,
>> -pd
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu



Re: [O] named python session

2015-08-13 Thread Ken Mankoff
Hi Andreas,

Glad I could help, and THANK YOU for your improvement. I had started to try to 
use the session name, if present, but never figured it out. It was on my TODO 
list.

  -k.
  

On 2015-08-13 at 06:12, Andreas Leha  wrote:
> Hi Ken,
>
> Ken Mankoff  writes:
>> Hi Andreas,
>>
>> On 2015-08-12 at 08:06, Andreas Leha  
>> wrote:
>>> How do I associate that with the python process in *mypy*?
>>> I am asked to start python when I run python-shell-send-region.
>>
>>
>> I have set up my system so that Org asks for a buffer name every time 
>> =org-edit-special= is called. This may be helpful to you.
>>
>>   -k.
>>  
>>
>> *** Custom Python Session Names
>>
>> https://github.com/jorgenschaefer/elpy/issues/383
>>
>> I want each python session to optionally have a unique name, so that I
>> can run multiple sessions in multiple windows/buffers/directories and
>> not have them interact/interfere.
>>
>> Here I've copied =elpy-shell-get-or-create-process= from =elpy.el= and
>> modified it. I also have to modify =python-shell-get-process-name=.
>> This all is fairly easy, except when executing from Org it gets more
>> complicated, hence the special case if a function called from
>> =org-ctrl-c-ctrl-c=. 
>>
>> #+BEGIN_SRC emacs-lisp :results none
>>   (defun elpy-shell-get-or-create-process ()
>> "Get or create an inferior Python process for current buffer and return 
>> it.
>> Customized by KDM to make dedicated sessions"
>> (let* ((bufname (format "*%s*" (python-shell-get-process-name t)))
>>(proc (get-buffer-process bufname)))
>>   (if proc
>>   proc
>> (run-python (python-shell-parse-command) t nil) ;; DEDICATED!
>> (get-buffer-process bufname
>>
>>   (defun python-shell-get-process-name (dedicated)
>> (if (equal this-command 'org-ctrl-c-ctrl-c)
>> (kdm/orig-py-sh-get-proc-name dedicated)
>>   (kdm/my-py-sh-get-proc-name dedicated)))
>>
>>   (defun kdm/orig-py-sh-get-proc-name (dedicated)
>> "Calculate the appropriate process name for inferior Python process.
>>If DEDICATED is t returns a string with the form
>>`python-shell-buffer-name'[variable `buffer-name']."
>> (let ((process-name
>>(if (and dedicated
>> (buffer-name))
>>(format "%s[%s]" python-shell-buffer-name (buffer-name))
>>  (format "%s" python-shell-buffer-name
>>   process-name))
>>
>>   (defun kdm/my-py-sh-get-proc-name (dedicated)
>> (if (boundp 'py-buf-proc-name)
>> (format "%s" py-buf-proc-name)
>>   (setq-local py-buf-proc-name
>>   (format "%s"
>>   (completing-read "Python session name: "
>>nil nil nil (buffer-name) nil 
>> (buffer-name)))
>>   )))
>>
>> #+END_SRC
>
> Thanks a lot for setting me on the right track!  I am quite surprised
> (coming from ess as my interface to R) that multiple named sessions
> aren't supported out of the box for python.
>
> I use your code now, which in my use-case works great.  Only slight
> variation: I set the default python process-name to the session name
> using these two functions:
>
> #+BEGIN_SRC emacs-lisp :results none
> (defun al-org-babel-get-session (&optional arg info)
>   "Return the :session of the current source-code block.
> Will return
> - nil if :session is given but not named
> - \"none\" if no :session argument is specified
> - the session name otherwise"
>   (interactive)
>   (if (org-src-edit-buffer-p)
>   (let ((beg org-src--beg-marker))
>   (with-current-buffer (org-src--source-buffer)
> (goto-char beg)
> (al-org-babel-get-session)))
> (let* ((info (or info (org-babel-get-src-block-info)))
>(params (nth 2 info))
>(session (cdr (assoc :session params
>   session)))
>
> (defun kdm/my-py-sh-get-proc-name (dedicated)
>   (let* ((sessionname (al-org-babel-get-session))
>(defaultname (or sessionname (if (equalp sessionname "none")
> (buffer-name)
>   sessionname
> (if (boundp 'py-buf-proc-name)
>   (format "%s" py-buf-proc-name)
>   (setq-local py-buf-proc-name
> (format "%s"
> (completing-read "Python session name: "
>  nil nil nil defaultname nil 
> defaultname))
> #+END_SRC
>
> Thanks again,
> Andreas




Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread Michael Strey
On Do, 2015-08-13 at 16:28, Peter Davis wrote:
> I'd like to store information in an org page that gets automatically
> encrypted when I save it, and decrypted when I open it. Is there some
> built-in functionality or hooks for this?

Check org-crypt.el (http://orgmode.org/manual/org_002dcrypt_002eel.html)

-- 
Michael Strey
http://www.strey.biz * https://twitter.com/michaelstrey




Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread Eric S Fraga
On Thursday, 13 Aug 2015 at 10:28, Peter Davis wrote:
> I'd like to store information in an org page that gets automatically
> encrypted when I save it, and decrypted when I open it. Is
> there some built-in functionality or hooks for this?

An alternative to using org's own encryption facility, as others have
suggested, is to encrypt the file as a whole and let emacs worry about
it.

If you create an encrypted file (say using gnupg on the command line)
with the following first line:

# -*- mode: org; epa-file-encrypt-to: ("your key name/email"); version-control: 
nil; -*-

then opening the file will start it up in org mode and will encrypt on
saving.

I prefer this in some cases although I do also use org's capabilities
for some sections in a file.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1



Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread Peter Davis

Thanks! This might be the best solution, since it's really just one file I want 
to encrypt/decrypt.

-pd


Eric S Fraga  writes:

> On Thursday, 13 Aug 2015 at 10:28, Peter Davis wrote:
>> I'd like to store information in an org page that gets automatically
>> encrypted when I save it, and decrypted when I open it. Is
>> there some built-in functionality or hooks for this?
>
> An alternative to using org's own encryption facility, as others have
> suggested, is to encrypt the file as a whole and let emacs worry about
> it.
>
> If you create an encrypted file (say using gnupg on the command line)
> with the following first line:
>
> # -*- mode: org; epa-file-encrypt-to: ("your key name/email"); 
> version-control: nil; -*-
>
> then opening the file will start it up in org mode and will encrypt on
> saving.
>
> I prefer this in some cases although I do also use org's capabilities
> for some sections in a file.



Re: [O] [gnorb] completion for `gnorb-gnus-incoming-do-todo'

2015-08-13 Thread Thomas Holst
Hi Eric,

· Eric Abrahamsen  wrote:

>> thanks for the gnorb package! I started using it and I like it a lot!
>>
>> When I call `gnorb-gnus-incoming-do-todo' from gnus I'm prompted for a
>> headline. But completion is not working. Neither  nor M-j does
>> anything.
>>
>> How can I get completion working? Completion is working for org-refile.
>>
>> I have no settings customized. Only key bindings as suggested.
>>
>> Thank you for looking into this!
>
> Hi Thomas,
>
> Glad to hear you're liking Gnorb! Can you tell me a few things about
> your setup?
>
> 1. What versions of the packages are you using? Org and Gnorb?

I use most recent git versions:

Org-mode version 8.3.1 (release_8.3.1-56-g046110 @
/home/thommy/git-emacs/org-mode/lisp/)

gnorb: most recent git version

> 2. Are you using any special completion packages (ido, iswitchb,
> helm)?

I mostly use helm. But for refile I use following settings since I
found helm not really working here:

#+begin_src emacs_lisp
  ;; 
-
  ;; settings für org-refile
  ;; 
-
  (setq org-refile-use-outline-path 'file)
  (setq org-refile-targets
'((org-agenda-files :maxlevel . 3)
  (org-agenda-text-search-extra-files . (:maxlevel . 3))
  (nil :maxlevel . 5)))

  ; Allow refile to create parent tasks with confirmation
  (setq org-refile-allow-creating-parent-nodes (quote confirm))
#+end_src

> 3. Can you confirm that the prompt where you're seeing failure is
>"Trigger heading:"?

I see: "Trigger heading (default Reparaturen):"
>
> I assume that putting point after this sexp and running "C-x C-e" gets
> you a fully functional completion prompt, is that true?
>
> (org-refile-get-location "Trigger heading" nil t)

Yes with helm interface. But again completion is not functional.

Now when I press `g' at the begin of a headline I get:

"Refile subtree "Erträge" to (default Reperaturen):"

With regular (no helm) completion ( completes) working.

> Thanks for your help in tracking this down!

Again thank you for looking into this! I really apreciate your help and
gnorb package which makes my work a lot easier"

--
  Thomas



Re: [O] Automatically encrypt on save, decrypt on open?

2015-08-13 Thread Eric S Fraga
On Thursday, 13 Aug 2015 at 11:47, Peter Davis wrote:
> Thanks! This might be the best solution, since it's really just one
> file I want to encrypt/decrypt.

If you want to encrypt all the contents of a file, this is indeed the
best approach, I think.  If you only want to encrypt a small part, then
org's crypt features are better.  The latter, however, become clumsy to
use when the whole file is to be encrypted.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1



[O] [BUG] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Matt Lundin
Gerald Wildgruber  writes:

> when doing a "C-c C-x f" in order to insert a footnote in an org mode
> document, the point is strangely positioned on the HEADING under which
> footnotes are stored and not, as one would expect, near the actual
> footnote marker [fn:X] where the text of the footnote goes. this is very
> annoying as there is absolutly nothing to do at the "Footnotes" heading,
> and one has to manoeuvre manually to the actual footnote every time over
> and over again.

I can confirm this. The bug seems to lie in
org-footnote-goto-definition. I'll see if I can dig a little deeper.

Matt



Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Gerald Wildgruber

Matt, thanks! looking forward to any elucidation you can give on the
problem at hand!

Gerald.

On Do, Aug 13 2015, Matt Lundin  wrote:

> Gerald Wildgruber  writes:
>
>> when doing a "C-c C-x f" in order to insert a footnote in an org mode
>> document, the point is strangely positioned on the HEADING under which
>> footnotes are stored and not, as one would expect, near the actual
>> footnote marker [fn:X] where the text of the footnote goes. this is very
>> annoying as there is absolutly nothing to do at the "Footnotes" heading,
>> and one has to manoeuvre manually to the actual footnote every time over
>> and over again.
>
> I can confirm this. The bug seems to lie in
> org-footnote-goto-definition. I'll see if I can dig a little deeper.
>
> Matt



Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Kaushal
Thanks! I have this problem too; was going to report this.

On Thu, Aug 13, 2015 at 12:43 PM Gerald Wildgruber <
gerald.wildgru...@unibas.ch> wrote:

>
> Matt, thanks! looking forward to any elucidation you can give on the
> problem at hand!
>
> Gerald.
>
> On Do, Aug 13 2015, Matt Lundin  wrote:
>
> > Gerald Wildgruber  writes:
> >
> >> when doing a "C-c C-x f" in order to insert a footnote in an org mode
> >> document, the point is strangely positioned on the HEADING under which
> >> footnotes are stored and not, as one would expect, near the actual
> >> footnote marker [fn:X] where the text of the footnote goes. this is very
> >> annoying as there is absolutly nothing to do at the "Footnotes" heading,
> >> and one has to manoeuvre manually to the actual footnote every time over
> >> and over again.
> >
> > I can confirm this. The bug seems to lie in
> > org-footnote-goto-definition. I'll see if I can dig a little deeper.
> >
> > Matt
>
>


Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Matt Lundin
Gerald Wildgruber  writes:

> Matt, thanks! looking forward to any elucidation you can give on the
> problem at hand!

Could you tell me what the value of org-footnote-auto-adjust is on your
machine?

It seems on my end that the problem only occurs when
org-footnote-auto-adjust is set to t. The problem seems to be line 556
of org-footnote.el, which reorders the footnotes *after* the position of
the footnote definition has been saved. When I remove that line or set
org-footnote-auto-adjust to nil, the cursor is positioned correctly.

Matt
 



[O] re-search-forward hang in org-link-search

2015-08-13 Thread Matthew MacLean
So, I found a hang in org-link-search... (In what I think is an Emacs bug,
but posting this here certainly can't hurt.)

When you have a headline with a tag (For example "Mawile" with
":something:" as a tag), and another headline later in the buffer beginning
with the other headline's title within a word boundary (For example "Mawile
stuff", but not "Mawile's stuff"), if you try to create a link to the
second headline, Emacs hangs.

I've attached an Org file where, if you click the link, the buffer will
freeze.

I've narrowed down the problem to the "(re-search-forward re nil t)" form
of the "Regular text search" section of org-link-search in org.el.

The regular expression generated for me when I click that link is:

  ^\*+ \(?:\(BUG\|CANCELLED\|DONE\|FIXED\|KNOWNCAUSE\|REPORT\|TODO\)[
]+\)?\(?:\[#.\][ ]+\)?\(?:COMMENT[ ]+\)?\(?:[ ]+\|\(?:[
]*\[[0-9]*\(?:%\|/[0-9]*\)\][ ]*\)+\)*Mawile\(?:[ ]+\|\(?:[
]*\[[0-9]*\(?:%\|/[0-9]*\)\][ ]*\)+\)+stuff\(?:[ ]+\|\(?:[
]*\[[0-9]*\(?:%\|/[0-9]*\)\][ ]*\)+\)*\(?:[ ]+:[[:alnum:]_@#%%:]+:\)?[ ]*$

And indeed, in the buffer, if you have the point before the first headline
and M-x re-search-forward the above regex, Emacs hangs. (However, if you
have point after the headline, it finds the correct location fine.)

In the org-link-search function, point is set to (point-min) before
performing the re-search-forward, so the hang will occur regardless of
where the link or headline is, as long as the tagged headline comes first.

This happens with the latest Org mode code from the master branch on Emacs
24.5.1 (x86_64) on Linux Mint 17.2.

I think this is an Emacs bug with re-search-forward since that function is
a built-in C function and is hanging, though I figured I should give a
heads up here first. (To either verify my findings in case I missed
something and check it on other Emacs versions, or to find a defensive
workaround.)

This is just speculation, but I think it might be caused by how
re-search-forward is reacting to the tag of the first heading because it is
wrapped in ":" characters.


hang.org
Description: Binary data


[O] [PATCH] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Matt Lundin
Matt Lundin  writes:

> Gerald Wildgruber  writes:
>
>> Matt, thanks! looking forward to any elucidation you can give on the
>> problem at hand!
>
> Could you tell me what the value of org-footnote-auto-adjust is on your
> machine?
>
> It seems on my end that the problem only occurs when
> org-footnote-auto-adjust is set to t. The problem seems to be line 556
> of org-footnote.el, which reorders the footnotes *after* the position of
> the footnote definition has been saved. When I remove that line or set
> org-footnote-auto-adjust to nil, the cursor is positioned correctly.

This patch should fix the issue. Testing is welcome.

Matt

>From d52d6b331e92dddce5477c131858ded7e091599e Mon Sep 17 00:00:00 2001
From: Matt Lundin 
Date: Thu, 13 Aug 2015 13:14:34 -0500
Subject: [PATCH] Fix position of cursor when creating footnotes

* lisp/org-footnote.el (org-footnote-auto-label): Call
  org-footnote-auto-adjust-maybe after going to the footnote definition.
  Otherwise the correct position is lost.
---
 lisp/org-footnote.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el
index 7396609..1048219 100644
--- a/lisp/org-footnote.el
+++ b/lisp/org-footnote.el
@@ -553,12 +553,12 @@ or new, let the user edit the definition of the footnote."
 	  (t
 	   (insert "[" label "]")
 	   (let ((l (copy-marker (org-footnote-create-definition label
-	 (org-footnote-auto-adjust-maybe)
 	 (or (ignore-errors (org-footnote-goto-definition label l))
 		 ;; Since definition was created outside current
 		 ;; scope, edit it remotely.
 		 (progn (set-marker l nil)
-			(org-edit-footnote-reference
+			(org-edit-footnote-reference
+	   (org-footnote-auto-adjust-maybe)
 
 (defvar org-blank-before-new-entry) ; Silence byte-compiler.
 (defun org-footnote-create-definition (label)
-- 
2.5.0



Re: [O] re-search-forward hang in org-link-search

2015-08-13 Thread Matthew MacLean
On Thu, Aug 13, 2015 at 12:26 PM, Pip Cet  wrote:

> It's not an Emacs bug. Your regular expression whittles down to:
>
> (defvar hang-re "^\\*+ *Mawile\\(?:[ ]+\\)+stuff\\(?:[ ]+\\)*$")
>
> or even
>
> (defvar hang-re "\\(?:[ ]+\\)+s")
>
> That expression matches the string of spaces separating the first
> Mawhile headline from its tags in many many different ways, and is one
> of the type of regular expressions warned about in the (Emacs Lisp
> Reference) manual. We shouldn't be generating it, and it is a bug, but
> it is in Org, not Emacs.
>

Ah... Well, this is the reason I posted it here first.

In that case, the bug is present as late as
a97f2c1830910d7a239dcbb98e200a6e4038acaa.


Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Kaushal
@Matt Correct. I have set org-footnote-auto-adjust to t.

On Thu, Aug 13, 2015 at 2:16 PM Matt Lundin  wrote:

> Matt Lundin  writes:
>
> > Gerald Wildgruber  writes:
> >
> >> Matt, thanks! looking forward to any elucidation you can give on the
> >> problem at hand!
> >
> > Could you tell me what the value of org-footnote-auto-adjust is on your
> > machine?
> >
> > It seems on my end that the problem only occurs when
> > org-footnote-auto-adjust is set to t. The problem seems to be line 556
> > of org-footnote.el, which reorders the footnotes *after* the position of
> > the footnote definition has been saved. When I remove that line or set
> > org-footnote-auto-adjust to nil, the cursor is positioned correctly.
>
> This patch should fix the issue. Testing is welcome.
>
> Matt
>
>


Re: [O] re-search-forward hang in org-link-search

2015-08-13 Thread Pip Cet
Can you try this patch? That appears to fix the issue here, at least
for this one file, at the cost of yet another shy group added to the
regular expression.

diff --git a/lisp/org.el b/lisp/org.el
index a908d9e..7f46687 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11128,18 +11128,18 @@ of matched result, with is either
`dedicated' or `fuzzy'."
   "\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]"
   wspaceopt
   "\\)"))
-  (sep (concat "\\(?:" wspace "+\\|" cookie "+\\)"))
+  (sep (concat "\\(?:\\(?:" wspace "\\|" cookie "\\)+\\)"))
   (re (concat
org-outline-regexp-bol
"\\(?:" org-todo-regexp "[ \t]+\\)?"
"\\(?:\\[#.\\][ \t]+\\)?"
"\\(?:" org-comment-string "[ \t]+\\)?"
-   sep "*"
+   sep "?"
(let ((title (mapconcat #'regexp-quote
words
-   (concat sep "+"
+   sep)))
  (if starred (substring title 1) title))
-   sep "*"
+   sep "?"
(org-re "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?")
"[ \t]*$")))
  (goto-char (point-min))

(Sorry if this arrives in duplicate, I had neglected to configure
Gmail to default to reply-to-all behaviour).


On Thu, Aug 13, 2015 at 6:36 PM, Matthew MacLean  wrote:
>
> On Thu, Aug 13, 2015 at 12:26 PM, Pip Cet  wrote:
>>
>> It's not an Emacs bug. Your regular expression whittles down to:
>>
>> (defvar hang-re "^\\*+ *Mawile\\(?:[ ]+\\)+stuff\\(?:[ ]+\\)*$")
>>
>> or even
>>
>> (defvar hang-re "\\(?:[ ]+\\)+s")
>>
>> That expression matches the string of spaces separating the first
>> Mawhile headline from its tags in many many different ways, and is one
>> of the type of regular expressions warned about in the (Emacs Lisp
>> Reference) manual. We shouldn't be generating it, and it is a bug, but
>> it is in Org, not Emacs.
>
>
> Ah... Well, this is the reason I posted it here first.
>
> In that case, the bug is present as late as
> a97f2c1830910d7a239dcbb98e200a6e4038acaa.
diff --git a/lisp/org.el b/lisp/org.el
index a908d9e..7f46687 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11128,18 +11128,18 @@ of matched result, with is either `dedicated' or 
`fuzzy'."
  "\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]"
  wspaceopt
  "\\)"))
- (sep (concat "\\(?:" wspace "+\\|" cookie "+\\)"))
+ (sep (concat "\\(?:\\(?:" wspace "\\|" cookie "\\)+\\)"))
  (re (concat
   org-outline-regexp-bol
   "\\(?:" org-todo-regexp "[ \t]+\\)?"
   "\\(?:\\[#.\\][ \t]+\\)?"
   "\\(?:" org-comment-string "[ \t]+\\)?"
-  sep "*"
+  sep "?"
   (let ((title (mapconcat #'regexp-quote
   words
-  (concat sep "+"
+  sep)))
 (if starred (substring title 1) title))
-  sep "*"
+  sep "?"
   (org-re "\\(?:[ \t]+:[[:alnum:]_@#%%:]+:\\)?")
   "[ \t]*$")))
 (goto-char (point-min))


Re: [O] re-search-forward hang in org-link-search

2015-08-13 Thread Matthew MacLean
Yep! This patch works on the original file I noticed the behaviour.

On Thu, Aug 13, 2015 at 12:50 PM, Pip Cet  wrote:

> (Sorry if this arrives in duplicate, I had neglected to configure
> Gmail to default to reply-to-all behaviour).
>

I did that earlier as well, it's a curse!


Re: [O] OrgTbl mode not working

2015-08-13 Thread Nicolas Goaziou
Benjamin Slade  writes:

> Here is one:
>
> >>>
>
> \begin{comment}
> #+ORGTBL: SEND summarytable orgtbl-to-latex :splice t :skip 0
>
> |   |   |   |   |   |
> |---+---+---+---+---|
> |   |   |   |   |   |
>
> \end{comment}
>
> >>>
>
> [running in AUCTeX mode]

Fixed. Thank you.


Regards,



Re: [O] Fix for clocking in when org-clock-into-drawer is not a string

2015-08-13 Thread Nicolas Goaziou
Hello,

Tom Hinton  writes:

> From 498b0ae295453e1ce5ef42d54cb8dfb9f930809e Mon Sep 17 00:00:00 2001
> From: Tom Hinton 
> Date: Wed, 12 Aug 2015 12:46:47 +0100
> Subject: [PATCH] Fix clock in when org-clock-into-drawer is integer
>
> * org-clock.el (org-clock-jump-to-current-clock):
>   fixed a bug wherein org-clock-jump-to-current-clock did not work if 
> org-clock-into-drawer
>   was not either a string or nil.

Applied. Thank you.

> This is a TINYCHANGE, although I am happy to assign copyright to the
> FSF.

It will help for future patches. See
http://orgmode.org/worg/org-contribute.html if you need directions.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> This patch should fix the issue. Testing is welcome.

Thanks for the patch.

However, `org-footnote-auto-adjust-maybe' needs to be called before
`org-edit-reference'. Otherwise, the footnote number in the remote
buffer is incorrect.

The marker information is not reliable anymore after sorting footnotes,
so it should be dropped. I applied a patch along this line.


Regards,

-- 
Nicolas Goaziou



[O] Add version header to org.el

2015-08-13 Thread Rasmus
Hi,

Is there any issues with adding a version header to org.el in maint and
master?  Maybe 8.4 or 8.4-dev or 8.4-pre for master...

See:

http://permalink.gmane.org/gmane.emacs.devel/188780

Rasmus

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




Re: [O] Add version header to org.el

2015-08-13 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Is there any issues with adding a version header to org.el in maint and
> master?

I don't think so. It may require to update README_maintainer
accordingly.

> Maybe 8.4 or 8.4-dev or 8.4-pre for master...

IMO, "8.4" is fine.


Regards,

-- 
Nicolas Goaziou



Re: [O] re-search-forward hang in org-link-search

2015-08-13 Thread Nicolas Goaziou
Hello,

Pip Cet  writes:

> Can you try this patch? That appears to fix the issue here, at least
> for this one file, at the cost of yet another shy group added to the
> regular expression.

Thanks for the patch.

Would you mind providing a proper commit message and send it again using
"git format-patch"?


Regards,

-- 
Nicolas Goaziou



Re: [O] Pass options to \columns{} environment in beamer export

2015-08-13 Thread John Hendy
Sorry for the late reply -- took me a bit to get back to working on this so
I could try it. That definitely works!

I would not have guessed that from Worg, that's for sure. Thanks much for
chiming in.


John


On Sat, Aug 8, 2015 at 4:54 PM, Fabrice Popineau <
fabrice.popin...@supelec.fr> wrote:

> This should do it :
>
> * Hello
>
> ** columns
>:B_columns:
> :PROPERTIES:
> :BEAMER_env: columns
> :BEAMER_opt: [c]
> :END:
>
> *** Column 1
>   :BMCOL:
> :PROPERTIES:
> :BEAMER_col: 0.3
> :END:
>
> Colonne 1
>
> *** Column 2
>   :BMCOL:
> :PROPERTIES:
> :BEAMER_col: 0.7
> :END:
>
> Colonne 2
>
> Fabrice
>
>
> 2015-08-08 18:30 GMT+02:00 John Hendy :
>
>> I have an org beamer file with the following header since I generally
>> prefer top-alignment for frames:
>>
>> #+latex_class_options: [aspectratio=169,t,presentation,bigger,fleqn]
>>
>> I have some columns where I want vertically centered text, and am not
>> sure how to pass the option to \columns{} instead of an individual
>> \column{}.
>>
>> Worg says this(http://orgmode.org/worg/exporters/beamer/ox-beamer.html):
>>
>> "All contiguous environments are automatically wrapped in a columns
>> environment, although it can be forced at any point by setting the
>> BEAMER_env property to columns. This might be handy if you want to
>> pass special options."
>>
>> But where does that go? I have this:
>>
>> * Test
>>
>> ** Col1  :BMCOL:
>>:PROPERTIES:
>>:BEAMER_col: 0.5
>>:END:
>>
>> - blah
>> - blah
>> - blah
>>
>> ** Col2  :BMCOL:
>>:PROPERTIES:
>>:BEAMER_col: 0.5
>>:END:
>>
>> - blah
>> - blah
>> - blah
>>
>> I want this (note the [c] to override my document-wide [t] option):
>>
>> \begin{frame}[label={sec:orgheadline1}]{Test}
>> \begin{columns}[c]
>> \begin{column}{0.5\columnwidth}
>> \begin{itemize}
>> \item blah
>> \item blah
>> \item blah
>> \end{itemize}
>> \end{column}
>>
>> \begin{column}{0.5\columnwidth}
>> \begin{itemize}
>> \item blah
>> \item blah
>> \item blah
>> \end{itemize}
>> \end{column}
>> \end{columns}
>> \end{frame}
>> \end{document}
>>
>> But if I add =:beamer_env: columns= to both subheadlines, I get each
>> in it's own \begin/end{columns} environment, which is not what I want.
>> I just need a single columns env, with the [c] option passed, that
>> encompasses both individual column environments.
>>
>>
>> John
>>
>>
>
>
> --
> Fabrice Popineau
> -
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950
> Standard : +33 (0) 169851212
> --
>
>


Re: [O] [PATCH] Re: helm-mode-org-set-tags adding additional tags

2015-08-13 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> The following patch should fix the problem.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Add version header to org.el

2015-08-13 Thread Rasmus
Hi,

Nicolas Goaziou  writes:

> Rasmus  writes:
>
>> Is there any issues with adding a version header to org.el in maint and
>> master?
>
> I don't think so. It may require to update README_maintainer
> accordingly.

Done.

>> Maybe 8.4 or 8.4-dev or 8.4-pre for master...
>
> IMO, "8.4" is fine.

Since (version< "8.4-git" "8.4") => t, I think we can have the -git suffix
before the first release.  Of course, that raises the question of whether
it the version between, say, 8.3.1 and 8.3.2 should really be 8.3.2-git...
I don't feel strongly about this so feel free to change it.

I added a Package-Requires header as well, though I'm not sure if it's
entirely accurate.

Rasmus

-- 
Vote for proprietary math!




Re: [O] org-bbdb-birthday reminder

2015-08-13 Thread Nick Dokos
Here's a quick implementation of the method I described earlier
in the thread:

--8<---cut here---start->8---
;;; Return list of anniversaries for today and the next n (default: 7) days.
;;; This is meant to be used in an org file instead of org-bbdb-anniversaries:
;;;
;;; %%(my-anniversaries)
;;;
;;; or
;;; %%(my-anniversaries 3)
;;;
;;; to override the 7-day default.

(defun date-list (date &optional n)
  "Return a list of dates in (m d y) format from 'date' to n days hence."
  (if (not n) (setq n 7))
  (let ((abs (calendar-absolute-from-gregorian date))
(i 0)
ret)
(while (<= i n)
  (setq ret (cons (calendar-gregorian-from-absolute (+ abs i)) ret))
  (setq i (1+ i)))
(reverse ret)))

(defun annotate-link-with-date (d l)
  "Annotate text of each element of l with the anniversary date.
  The assumption is that the text is a bbdb link  of the form
  [[bbdb:name][Description]] and the annotation
  is added to the description."
  (let ((f (lambda (x)
 (string-match "]]" x)
 (replace-match (format " -- %d-%d-%d\\&" (caddr d) (car d) (cadr 
d)) nil nil x
(mapcar f l)))

(defun my-anniversaries (&optional n)
  "Return list of anniversaries for today and the next n days (default 7).
'date' is dynamically bound."
  (let ((dates (date-list date n))
(f (lambda (d) (let ((date d)) (annotate-link-with-date d 
(org-bbdb-anniversaries))
(delete nil (mapcan f dates

--8<---cut here---end--->8---

Lightly tested. Hope it helps

-- 
Nick






Re: [O] Add version header to org.el

2015-08-13 Thread Achim Gratz
Rasmus writes:
> Is there any issues with adding a version header to org.el in maint and
> master?  Maybe 8.4 or 8.4-dev or 8.4-pre for master...

Yes, we don't want to have to commit this nonsense when we have a proper
VCS.  Now, instead of simply tagging a release you're back to having to
remember that you have to jump through some burning hoops first in a
particular oder, then commit it and then maybe you can tag the release.

> See:
>
> http://permalink.gmane.org/gmane.emacs.devel/188780

Yes, nice one.  I can think of some "latent" problems with how Emacs
handles versions, too.  Now, back to the regularly scheduled program.


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

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




Re: [O] [BUG] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Gerald Wildgruber

On Do, Aug 13 2015, Matt Lundin  wrote:

> Gerald Wildgruber  writes:
>
>> Matt, thanks! looking forward to any elucidation you can give on the
>> problem at hand!
>
> Could you tell me what the value of org-footnote-auto-adjust is on your
> machine?

Indeed, I have set this variable to t!

> It seems on my end that the problem only occurs when
> org-footnote-auto-adjust is set to t. The problem seems to be line 556
> of org-footnote.el, which reorders the footnotes *after* the position of
> the footnote definition has been saved. When I remove that line or set
> org-footnote-auto-adjust to nil, the cursor is positioned correctly.
>
> Matt
>  



Re: [O] [PATCH] Re: Annoying positioning of point when writing footnotes

2015-08-13 Thread Gerald Wildgruber

Thanks Matt and Nicolas!

I still have org-footnote-auto-adjust set to "t" and the positioning of
point near the footnote marker works now with the sources I checked out
this morning!


One thing though: if I insert a new footnote in a region of text that
already has footnotes before and after, the auto adjust mechanism is
triggered by "C-c C-x f", but in this case point is set NOT near the NEW
footnote marker but always at the marker of the LAST footnote!

Can this be fixed as well?

Thanks

Gerald.

On Fr, Aug 14 2015, Nicolas Goaziou  wrote:

> Hello,
>
> Matt Lundin  writes:
>
>> This patch should fix the issue. Testing is welcome.
>
> Thanks for the patch.
>
> However, `org-footnote-auto-adjust-maybe' needs to be called before
> `org-edit-reference'. Otherwise, the footnote number in the remote
> buffer is incorrect.
>
> The marker information is not reliable anymore after sorting footnotes,
> so it should be dropped. I applied a patch along this line.
>
>
> Regards,

-- 
Dr.Gerald Wildgruber
eikones NFS Bildkritik
NCCR Iconic Criticism
Universität Basel
Rheinsprung 11
CH-4051 Basel
www.eikones.ch
T. +41 (0)61 267 18 02
F. +41 (0)61 267 18 11
-
Sent with mu4e