Re: [O] Bug: Displaying timeline for .org-file and then switching to including inactive timestamps will not include old and future inactive timestamps [8.3.1 (8.3.1-16-gf6aa53-elpa @ /Users/cube/.emac

2015-08-24 Thread Jakub Szypulka
Hello Nicolas,

thank you for the quick reply.

In that case, using agenda view, how can I display all timestamps in a buffer 
when the oldest and newest are a long time apart?
Must I define a custom agenda view first? (e.g. to encompass a large time frame 
and hide empty days)

Regards
Jakub

 --- Original message ---
 Nicolas Goaziou m...@nicolasgoaziou.fr wrote on Monday, 24 August 2015 at 
 00:16:

 Hello,

 Jakub Szypulka ja...@szypulka.de writes:

 Background: Open an org-file with only inactive timestamps. Execute
 C-c a L to show the timeline for it. The timeline will be empty,
 and only show the heading for today's date. This is correct. Now press
 v [ in order to include inactive timestamps in the timeline.

 ---

 Expected result: the timeline will include all inactive timestamps,
 including past and future ones.

 ---

 Actual result: the timeline will only include inactive timestamps for today,
 but not past or future ones.

 It seems correct. According to manual:

   ‘v [  or short  [ (org-agenda-manipulate-query-add)’
Include inactive timestamps into the current view.

 Current view here is today.

 Furthermore, it will not allow the user to execute any
 date-changing shortcuts such as b or f.

 There are many advertised limitations to Timeline feature. Actually,
 Timeline feature is moribund[fn:1][fn:2]. Use Agenda view instead.

 Regards,


 [fn:1] http://thread.gmane.org/gmane.emacs.orgmode/39368/focus=40038

 [fn:2] http://permalink.gmane.org/gmane.emacs.orgmode/60518




Re: [O] org-notify: can't define an org-notify-add

2015-08-24 Thread Peter Münster
On Fri, May 22 2015, alain.coch...@unistra.fr wrote:

 Am I doing something trivially wrong?  Any idea how I could debug
 this?  (I have no relevant message in the *Messages* buffer.)

 Many thanks in advance.

Hi,

It seems, that the Org Mode developers have not yet applied this patch:
http://article.gmane.org/gmane.emacs.orgmode/73647

As workaround, you can apply it on your local file.
I'll send the patch again.

-- 
   Peter




[O] export subtree as org file

2015-08-24 Thread Xebar Saram
Hi

i was wondering if anyone knows how to export a subtree as a simple org
file. i know i can copy paste into a new file but it seems quick to just
export a subtree to a new org file :)

best

z


Re: [O] HTML export / list issues

2015-08-24 Thread Jarmo Hurri
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 ==
   1. level 1 first
  a) level 2 first; I was hoping this would be alphabetized in html
 like it is in org, but it is still enumerated
  b) the next item has some code in it; it has been evaluated with
 C-c C-c to obtain the result
  c) 
  #+BEGIN_SRC elisp :exports results
   (print (list org-plain-list-ordered-item-terminator
org-list-allow-alphabetical
(+ 1 2)))
  #+END_SRC

  #+RESULTS:
  | t | t | 3 |

  d) and due to the way the results of the evaluation are inserted,
 the code interrupts enumeration in the exported list, and it
 even breaks the high-level list in the org mode itself
 ==

 I realize this is because you are indenting with TABs. I overlooked it
 in your first report. The issue is now fixed. Thank you.

Your fix corrected both this example and the more complicated one I am
working on at the moment. Thank you very much.

Jarmo




[O] [PATCH] Allow inserting diary entries last in date tree

2015-08-24 Thread Nikolai Weibull
* org-agenda.el (org-agenda-insert-diary-strategy): Add new value
  'date-tree-last.
  (org-agenda-insert-diary-make-new-entry): Handle
  `org-agenda-insert-diary-strategy' set to 'date-tree-last.

To allow for diary entries to be entered in time order in the date tree,
add a new value to `org-agenda-insert-diary-strategy' that allows for
this.  The code for handling this value, 'date-tree-last, is a bit
tricky, as we need to keep track of whether the date-tree already had
one or more entries for the given date.
---
 lisp/org-agenda.el | 26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5fd1cd4..d97b3a9 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9417,11 +9417,13 @@ buffer, display it in another window.
   Where in `org-agenda-diary-file' should new entries be added?
 Valid values:
 
-date-treein the date tree, as child of the date
-top-levelas top-level entries at the end of the file.
+date-tree in the date tree, as first child of the date
+date-tree-lastin the date tree, as last child of the date
+top-level as top-level entries at the end of the file.
   :group 'org-agenda
   :type '(choice
- (const :tag in a date tree date-tree)
+ (const :tag first in a date tree date-tree)
+ (const :tag last in a date tree date-tree-last)
  (const :tag as top level at end of file top-level)))
 
 (defcustom org-agenda-insert-diary-extract-time nil
@@ -9525,14 +9527,20 @@ a timestamp can be added there.
   (when org-adapt-indentation (org-indent-to-column 2)))
 
 (defun org-agenda-insert-diary-make-new-entry (text)
-  Make a new entry with TEXT as the first child of the current subtree.
+  Make a new entry with TEXT as a child of the current subtree.
 Position the point in the heading's first body line so that
 a timestamp can be added there.
-  (outline-next-heading)
-  (org-back-over-empty-lines)
-  (unless (looking-at [ \t]*$) (save-excursion (insert \n)))
-  (org-insert-heading nil t)
-  (org-do-demote)
+  (cond
+   ((eq org-agenda-insert-diary-strategy 'date-tree-last)
+(end-of-line)
+(org-insert-heading '(4) t)
+(org-do-demote))
+   (t
+(outline-next-heading)
+(org-back-over-empty-lines)
+(unless (looking-at [ \t]*$) (save-excursion (insert \n)))
+(org-insert-heading nil t)
+(org-do-demote)))
   (let ((col (current-column)))
 (insert text)
 (org-end-of-meta-data)
-- 
2.5.0




Re: [O] Org to LaTeX export of tables

2015-08-24 Thread Marcin Borkowski

On 2015-08-24, at 01:36, Vikas Rawal vikasli...@agrarianresearch.org wrote:

 Please see the sample org table below, and the way it is exported in LaTeX.

 I do not want \begin{center} and \end{center}. Having those results in some 
 extra space between the table and the notes.

Shouldn't it use \centering instead?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] export options and exporting subtrees

2015-08-24 Thread Eric Abrahamsen
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 I'm not sure why I've never noticed this issue before, but...

 Is it intentional that, when exporting a subtree, EXPORT_OPTIONS lines
 at the top of the file (or EXPORT_OPTIONS properties on parent
 headlines) are ignored? I have `org-use-property-inheritance' set to t.

 I'm not wrong that that's what happens, am I? I found this a bit
 surprising, but I guess I could understand why it might happen. Is it
 intentional?

 I don't see any reason to hard-code inheritance rules for EXPORT_
 these properties. This is now fixed. Thank you.

Thanks! This seems much more intuitive to me.

E




[O] Babel support for Stan

2015-08-24 Thread Kyle Meyer
Hi all,

I'd like to put ob-stan.el (attached) in the contrib directory.  It adds
support for the Stan [1] programming language.  I wrote it a while back,
but a recent post on the Stan ML [2] made me think that others may find
it useful (although I'd guess that the intersection of Stan and Org
users is quite small).  It's short because the only output that really
makes sense is to dump the contents to a file (and maybe compile it),
which is then used by a downstream interface [3].

Please let me know if you have any comments about the implementation or
if you don't think contrib directory is a good place for it.

Thanks.

[1] http://mc-stan.org/
[2] https://groups.google.com/d/msg/stan-users/m4r8iUNiLug/Gexo8qCIBgAJ
[3] http://mc-stan.org/interfaces/

--
Kyle



ob-stan.el
Description: application/emacs-lisp

* With RStan

#+name: normal-stan
#+begin_src stan :file model.stan
  data {
intlower=1 N;
vector[N] x;
  }

  parameters {
real mu;
reallower=0 std;
  }

  model {
x ~ normal(mu, std);
  }
#+end_src

#+RESULTS: normal-stan
[[file:model.stan]]

#+begin_src R :session *R* :var model=normal-stan :results silent
  library(rstan)

  N - 50
  x - rnorm(N, 20, 3)

  fit - stan(file=model, data=list(N=N, x=x))
#+end_src

* With CmdStan

#+begin_src elisp :results silent
  (setq org-babel-stan-cmdstan-directory ~/src/cmdstan/)
#+end_src

#+name: normal-compile
#+begin_src stan :file normal
  data {
intlower=1 N;
vector[N] x;
  }

  parameters {
real mu;
reallower=0 std;
  }

  model {
x ~ normal(mu, std);
  }
#+end_src

#+RESULTS: normal-compile
[[file:normal]]

#+begin_src R :session *R* :results silent
  stan_rdump(c('N', 'x'), 'normal.data.R')
#+end_src

#+begin_src sh :results output drawer
  ./normal sample data file=normal.data.R
#+end_src

#+RESULTS:
:RESULTS:
 method = sample (Default)
   sample
 num_samples = 1000 (Default)
 num_warmup = 1000 (Default)
 save_warmup = 0 (Default)
 thin = 1 (Default)
 adapt
   engaged = 1 (Default)
   gamma = 0.050003 (Default)
   delta = 0.80004 (Default)
   kappa = 0.75 (Default)
   t0 = 10 (Default)
   init_buffer = 75 (Default)
   term_buffer = 50 (Default)
   window = 25 (Default)
 algorithm = hmc (Default)
   hmc
 engine = nuts (Default)
   nuts
 max_depth = 10 (Default)
 metric = diag_e (Default)
 stepsize = 1 (Default)
 stepsize_jitter = 0 (Default)
 id = 0 (Default)
 data
   file = normal.data.R
 init = 2 (Default)
 random
   seed = 1573443700
 output
   file = output.csv (Default)
   diagnostic_file =  (Default)
   refresh = 100 (Default)


Gradient evaluation took 4e-06 seconds
1000 transitions using 10 leapfrog steps per transition would take 0.04 seconds.
Adjust your expectations accordingly!


Iteration:1 / 2000 [  0%]  (Warmup)

Informational Message: The current Metropolis proposal is about to be rejected 
because of the following issue:
stan::prob::normal_log: Scale parameter is 0, but must be  0!
If this warning occurs sporadically, such as for highly constrained variable 
types like covariance matrices, then the sampler is fine,
but if this warning occurs often then your model may be either severely 
ill-conditioned or misspecified.
Iteration:  100 / 2000 [  5%]  (Warmup)
Iteration:  200 / 2000 [ 10%]  (Warmup)
Iteration:  300 / 2000 [ 15%]  (Warmup)
Iteration:  400 / 2000 [ 20%]  (Warmup)
Iteration:  500 / 2000 [ 25%]  (Warmup)
Iteration:  600 / 2000 [ 30%]  (Warmup)
Iteration:  700 / 2000 [ 35%]  (Warmup)
Iteration:  800 / 2000 [ 40%]  (Warmup)
Iteration:  900 / 2000 [ 45%]  (Warmup)
Iteration: 1000 / 2000 [ 50%]  (Warmup)
Iteration: 1001 / 2000 [ 50%]  (Sampling)
Iteration: 1100 / 2000 [ 55%]  (Sampling)
Iteration: 1200 / 2000 [ 60%]  (Sampling)
Iteration: 1300 / 2000 [ 65%]  (Sampling)
Iteration: 1400 / 2000 [ 70%]  (Sampling)
Iteration: 1500 / 2000 [ 75%]  (Sampling)
Iteration: 1600 / 2000 [ 80%]  (Sampling)
Iteration: 1700 / 2000 [ 85%]  (Sampling)
Iteration: 1800 / 2000 [ 90%]  (Sampling)
Iteration: 1900 / 2000 [ 95%]  (Sampling)
Iteration: 2000 / 2000 [100%]  (Sampling)

#  Elapsed Time: 0.013356 seconds (Warm-up)
#0.024708 seconds (Sampling)
#0.038064 seconds (Total)

:END:


Re: [O] Org to LaTeX export of tables

2015-08-24 Thread Michael Strey
On Mo, 2015-08-24 at 01:36, Vikas Rawal wrote:

[...]

 I do not want \begin{center} and \end{center}. Having those results in
 some extra space between the table and the notes.

 How can I get rid of it?

(setq org-latex-tables-centered nil)


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




Re: [O] Collaborative Team Project Management with Orgmode?

2015-08-24 Thread Eric Abrahamsen
Peter Salazar cycleofs...@gmail.com writes:

 So what would it take to make Gnorb work with org-contacts and mu4e? I
 know Gnorb works with Gnus, but in my opinion, Gnorb's ability to
 automatically catch and identify incoming emails isn't as useful as
 its other features. 

 In other words, if using Gnorb with mu4e required the user to manually
 flag an incoming email through a function like add-message-to-gnorb,
 Gnorb would still retain 99% of its usefulness. The most useful
 functionality, as John Kitchin noted, would be to capture information
 from a mu4e email reply, and process it and incorporate it back into
 an org-mode file.

Let's see... the org-contacts vs BBDB issue isn't a big deal, since
Gnorb doesn't actually do all that much with contacts right now. I'd be
happy to add tweaks to it to make it more org-contacts friendly.

Email tracking is a bigger issue. Gnorb uses the Gnus registry to track
correspondences between messages and headlines, and obviously none of
that would work with mu4e.

Earlier versions did tracking by storing message ids as a property on a
headline. I suppose I could go back to doing that in a mu4e-specific
library.

To me, the most useful thing about message tracking isn't the
identification and hinting of incoming emails. The two most useful
things (I think) are:

1. Taking a message and saying this message should trigger a state
   change on that Org heading there
2. Seeing all messages associated with a heading in their own virtual
   mailbox

Number one shouldn't be too difficult to implement for mu4e, as it would
mostly rely on Org's own mu4e support. Number two would be nearly
impossible, or at least impractical given my lack of familiarity with
mu4e.

Another thing I find hugely useful is automatically transferring files
attached to incoming messages to Org headings (via org-attach).
Presumably mu4e has a way of getting at the attachments on a message, so
in theory this wouldn't be that hard, either.

Anyway, those are some thoughts on the issue. If you all had some
particular feature where you'd like mu4e support, let me know and I can
take a stab at it.

Eric

 On Sun, Aug 23, 2015 at 12:39 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:


 John Kitchin jkitc...@andrew.cmu.edu writes:

  unless those services have some kind of API, and you have the
 desire to
  implement it in emacs, you might be out of luck.
 
  I am trying to figure out a way to do collaborative work via
 email,
  where I am the project coordinator. The idea is to use my
 email.el code
  to send headlines to people I need information or action from,
 and then
  to have them reply to the email. Then, I would have some easy
 way to get
  information out of the reply back to the heading (e.g. TODO
 state
  change, info etc...). Probably I would embed some org-id link in
 the email,
  and train the users not to delete it. This is only a
 half-baked idea
  so far.
 
  It would integrate org-contacts, mu4e, and org-mode in my setup.

 Sounds exactly like Gnorb! Except org-contacts instead of BBDB,
 and mu4e
 instead of Gnus :(

  depending in your role in the project, you might get something
 like that
  to work too.
 
  Tory S. Anderson writes:
 
  I've relied on Orgmode heavily for over half a decade, and I'm
  loathe to leave it. But what solutions have been found out
 there
  for using it collaboratively (where others are not using
 emacs),
  rather than just for personal task management (where it
 excels)?
  It has some integration with Trello, I know; some of my
 co-workers
  are advocating BaseCamp (...) and PivotalTracker.
 PivotalTracker
  looks pretty good, but I would rather find a way to leverage
  orgmode in a way that facilitates collaboration. What has
 worked
  for you?
 
  --
  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] emphasis code changed in 8.3?

2015-08-24 Thread Samuel Wales
/before 8.3,/ i thought this worked:

(setcar (nthcdr 2 org-emphasis-regexp-components)
(alpha-remove-all '(?\ ?,)
  (third org-emphasis-regexp-components)))

user error?



Re: [O] Org to LaTeX export of tables

2015-08-24 Thread Vikas Rawal

 On 24-Aug-2015, at 5:06 am, Vikas Rawal vikasli...@agrarianresearch.org 
 wrote:
 
 Please see the sample org table below, and the way it is exported in LaTeX.
 
 I do not want \begin{center} and \end{center}. Having those results in some 
 extra space between the table and the notes.
 

Sorry, clearly explained in the manual. :center does it.

Vikas




[O] Weird Asymptote mode behaviour in org

2015-08-24 Thread Jarmo Hurri

Greetings.

When editing Asymptote code in org, a comma sometimes appears out of
nowhere into the Asymptote code. The org code below explains how to
reproduce this. (I am using the version of org pulled this morning.)

Jarmo

* description
  Move cursor into the code below. Press ~C-c '~ to edit the code in
  Asymptote mode. Do not change anything in the code, just press ~C-c
  '~ to return to org. You will notice that a comma has been inserted
  into the code.
* test case
  #+BEGIN_SRC asymptote
real s = 50
  * 21.1;
  #+END_SRC




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

2015-08-24 Thread Meir Goldenberg
Why not just have a command to exit the sparse tree mode?

On Mon, Aug 24, 2015 at 1:30 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Meir Goldenberg mgolde...@gmail.com writes:

  I am running on 8.3.1 and am getting the same behavior. In fact, when I
 run
  on the simple example from my original message, the heading marked FUTURE
  does not get hidden to start with.

 Top level headlines are never hidden.

 Admittedly, this defeats the purpose of a sparse tree if all the
 information you need to filter out is located in such constructs.
 However, hiding them would make a view from which it would be difficult
 to recover from.

 Regards,



[O] document depreciation of timeline? (was: Re: Bug: Displaying timeline for .org-file and then switching to including inactive timestamps will not include old and future inactive timestamps [8.3.1 (

2015-08-24 Thread Gregor Zattler
Hi Nicolas,
* Nicolas Goaziou m...@nicolasgoaziou.fr [24. Aug. 2015]:
 There are many advertised limitations to Timeline feature. Actually,
 Timeline feature is moribund[fn:1][fn:2]. Use Agenda view instead.

[... 4 Zeilen gelöscht ...]
 [fn:1] http://thread.gmane.org/gmane.emacs.orgmode/39368/focus=40038
 
 [fn:2] http://permalink.gmane.org/gmane.emacs.orgmode/60518

There are only two commits which mention the timeline in their
summry lines in the newer git history since 2008-01-31.

Shouldn't the feature then be officially depreciated and
mentioned as stale in the manual?  The manual mentions the
timeline in most cases together with the agenda.  And there is a
small chapter dedicated to the timeline.

If depreciation of the timeline is OK I would patch the manual
accordingly. 


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



[O] Emacs crashes after upade of org (maybe unrelated)

2015-08-24 Thread Rainer M Krug
My emacs crashed today several times already on me - never happened
before. And if I say crash, I mean crash: emacs gone.

Below the info I get from the OS (OS X, Yosemite).

It always happened when editing a code block in org.

,
| GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0, Carbon Version 157 AppKit 
1348.17) of 2015-07-20 on Rainers-MacBook-Pro.local
| Org-mode version 8.3.1 (release_8.3.1-166-g5bfdfc @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)
`

Any suggestions on how I can debug this? Traceback from emacs?

Thanks,

Rainer


,
| Process:   Emacs [45776]
| Path:  
/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.9/Emacs.app/Contents/MacOS/Emacs
| Identifier:org.gnu.Emacs
| Version:   24.5 (1.1)
| Code Type: X86-64 (Native)
| Parent Process:??? [1]
| Responsible:   Emacs [45776]
| User ID:   501
| 
| Date/Time: 2015-08-24 12:57:25.666 +0200
| OS Version:Mac OS X 10.10.5 (14F27)
| Report Version:11
| Anonymous UUID:9CCBACF6-B42B-0DCE-94E2-6BD9C09609E5
| 
| Sleep/Wake UUID:   9E550E67-B83D-46C4-820D-00E46234AF90
| 
| Time Awake Since Boot: 31000 seconds
| Time Since Wake:   15000 seconds
| 
| Crashed Thread:0  Dispatch queue: com.apple.main-thread
| 
| Exception Type:EXC_BAD_ACCESS (SIGSEGV)
| Exception Codes:   KERN_INVALID_ADDRESS at 0x00a0
| 
| VM Regions Near 0xa0:
| -- 
| __TEXT 0001-0001001fe000 [ 2040K] r-x/rwx 
SM=COW  
/usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.9/Emacs.app/Contents/MacOS/Emacs
| 
| Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
| 0   libsystem_kernel.dylib0x7fff95a27c82 __kill + 10
| 1   org.gnu.Emacs 0x0001000c3455 handle_fatal_signal 
+ 14
| 2   org.gnu.Emacs 0x0001000c28f3 
deliver_fatal_thread_signal + 114
| 3   libsystem_platform.dylib  0x7fff8b3b1f1a _sigtramp + 26
| 4   ???   0x000100f19200 0 + 4310798848
| 5   org.gnu.Emacs 0x000100040859 fill_glyph_string + 
233
| 6   org.gnu.Emacs 0x000100036a2e draw_glyphs + 1039
| 7   org.gnu.Emacs 0x0001000365b5 x_write_glyphs + 166
| 8   org.gnu.Emacs 0x0001f8ce update_window_line + 
624
| 9   org.gnu.Emacs 0x0001a893 update_window + 497
| 10  org.gnu.Emacs 0x0001bda5 update_window_tree + 
119
| 11  org.gnu.Emacs 0x0001a53f update_frame + 239
| 12  org.gnu.Emacs 0x0001000286ed redisplay_internal + 
5212
| 13  org.gnu.Emacs 0x00010002a1d8 
redisplay_preserve_echo_area + 32
| 14  org.gnu.Emacs 0x0001d5fb Fredisplay + 159
| 15  org.gnu.Emacs 0x000100117d55 Ffuncall + 991
| 16  org.gnu.Emacs 0x00010014a8ae exec_byte_code + 2147
| 17  org.gnu.Emacs 0x000100117bc9 Ffuncall + 595
| 18  org.gnu.Emacs 0x00010014a8ae exec_byte_code + 2147
| 19  org.gnu.Emacs 0x0001001187da funcall_lambda + 750
| 20  org.gnu.Emacs 0x000100117bc9 Ffuncall + 595
| 21  org.gnu.Emacs 0x00010014a8ae exec_byte_code + 2147
| 22  org.gnu.Emacs 0x000100114c0b eval_sub + 1688
| 23  org.gnu.Emacs 0x00010011646f 
internal_lisp_condition_case + 543
| 24  org.gnu.Emacs 0x00010014b6d9 exec_byte_code + 5774
| 25  org.gnu.Emacs 0x0001001187da funcall_lambda + 750
| 26  org.gnu.Emacs 0x000100117bc9 Ffuncall + 595
| 27  org.gnu.Emacs 0x0001001181eb call0 + 26
| 28  org.gnu.Emacs 0x0001001166a6 
internal_condition_case + 251
| 29  org.gnu.Emacs 0x0001000ada15 
safe_run_hook_funcall + 83
| 30  org.gnu.Emacs 0x00010011808b run_hook_with_args + 
353
| 31  org.gnu.Emacs 0x0001000aacc7 safe_run_hooks + 76
| 32  org.gnu.Emacs 0x0001000ab1f3 
__command_loop_1_block_invoke + 1299
| 33  org.gnu.Emacs 0x0001001958a6 mac_autorelease_loop 
+ 46
| 34  org.gnu.Emacs 0x0001000aac3c command_loop_1 + 556
| 35  org.gnu.Emacs 0x0001001166a6 
internal_condition_case + 251
| 36  org.gnu.Emacs 0x0001001958a6 mac_autorelease_loop 
+ 46
| 37  org.gnu.Emacs 0x0001000ba524 command_loop_2 + 16
| 38  org.gnu.Emacs 0x0001001160c1 internal_catch + 243
| 39  org.gnu.Emacs 0x0001000aa1ea recursive_edit_1 + 
206
| 40  

Re: [O] export subtree as org file

2015-08-24 Thread Nick Dokos
Xebar Saram zelt...@gmail.com writes:

 Hi

 i was wondering if anyone knows how to export a subtree as a simple org file. 
 i know i can copy paste
 into a new file but it seems quick to just export a subtree to a new org file 
 :)


Can you use the org backend of the exporter?

C-c C-e C-s O o

perhaps?

Nick






[O] SOLVED: Emacs crashes after upade of org (maybe unrelated)

2015-08-24 Thread Rainer M Krug
I re-installed emacs-mac with homebrew from source and it works now.

Cheers,

Rainer

Rainer M Krug rai...@krugs.de writes:

 My emacs crashed today several times already on me - never happened
 before. And if I say crash, I mean crash: emacs gone.

 Below the info I get from the OS (OS X, Yosemite).

 It always happened when editing a code block in org.

 ,
 | GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0, Carbon Version 157
 AppKit 1348.17) of 2015-07-20 on Rainers-MacBook-Pro.local
 | Org-mode version 8.3.1 (release_8.3.1-166-g5bfdfc @ 
 /Users/rainerkrug/.emacs.d/org-mode/lisp/)
 `

 Any suggestions on how I can debug this? Traceback from emacs?

 Thanks,

 Rainer


 ,
 | Process:   Emacs [45776]
 | Path:  
 /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.9/Emacs.app/Contents/MacOS/Emacs
 | Identifier:org.gnu.Emacs
 | Version:   24.5 (1.1)
 | Code Type: X86-64 (Native)
 | Parent Process:??? [1]
 | Responsible:   Emacs [45776]
 | User ID:   501
 | 
 | Date/Time: 2015-08-24 12:57:25.666 +0200
 | OS Version:Mac OS X 10.10.5 (14F27)
 | Report Version:11
 | Anonymous UUID:9CCBACF6-B42B-0DCE-94E2-6BD9C09609E5
 | 
 | Sleep/Wake UUID:   9E550E67-B83D-46C4-820D-00E46234AF90
 | 
 | Time Awake Since Boot: 31000 seconds
 | Time Since Wake:   15000 seconds
 | 
 | Crashed Thread:0  Dispatch queue: com.apple.main-thread
 | 
 | Exception Type:EXC_BAD_ACCESS (SIGSEGV)
 | Exception Codes:   KERN_INVALID_ADDRESS at 0x00a0
 | 
 | VM Regions Near 0xa0:
 | -- 
 | __TEXT 0001-0001001fe000 [ 2040K] r-x/rwx SM=COW
 /usr/local/Cellar/emacs-mac/emacs-24.5-z-mac-5.9/Emacs.app/Contents/MacOS/Emacs
 | 
 | Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
 | 0   libsystem_kernel.dylib  0x7fff95a27c82 __kill + 10
 | 1   org.gnu.Emacs   0x0001000c3455 handle_fatal_signal 
 + 14
 | 2   org.gnu.Emacs   0x0001000c28f3 
 deliver_fatal_thread_signal + 114
 | 3   libsystem_platform.dylib0x7fff8b3b1f1a _sigtramp + 26
 | 4   ??? 0x000100f19200 0 + 4310798848
 | 5   org.gnu.Emacs   0x000100040859 fill_glyph_string + 
 233
 | 6   org.gnu.Emacs   0x000100036a2e draw_glyphs + 1039
 | 7   org.gnu.Emacs   0x0001000365b5 x_write_glyphs + 166
 | 8   org.gnu.Emacs   0x0001f8ce update_window_line + 
 624
 | 9   org.gnu.Emacs   0x0001a893 update_window + 497
 | 10  org.gnu.Emacs   0x0001bda5 update_window_tree + 
 119
 | 11  org.gnu.Emacs   0x0001a53f update_frame + 239
 | 12  org.gnu.Emacs   0x0001000286ed redisplay_internal + 
 5212
 | 13  org.gnu.Emacs   0x00010002a1d8 
 redisplay_preserve_echo_area + 32
 | 14  org.gnu.Emacs   0x0001d5fb Fredisplay + 159
 | 15  org.gnu.Emacs   0x000100117d55 Ffuncall + 991
 | 16  org.gnu.Emacs   0x00010014a8ae exec_byte_code + 2147
 | 17  org.gnu.Emacs   0x000100117bc9 Ffuncall + 595
 | 18  org.gnu.Emacs   0x00010014a8ae exec_byte_code + 2147
 | 19  org.gnu.Emacs   0x0001001187da funcall_lambda + 750
 | 20  org.gnu.Emacs   0x000100117bc9 Ffuncall + 595
 | 21  org.gnu.Emacs   0x00010014a8ae exec_byte_code + 2147
 | 22  org.gnu.Emacs   0x000100114c0b eval_sub + 1688
 | 23  org.gnu.Emacs   0x00010011646f 
 internal_lisp_condition_case + 543
 | 24  org.gnu.Emacs   0x00010014b6d9 exec_byte_code + 5774
 | 25  org.gnu.Emacs   0x0001001187da funcall_lambda + 750
 | 26  org.gnu.Emacs   0x000100117bc9 Ffuncall + 595
 | 27  org.gnu.Emacs   0x0001001181eb call0 + 26
 | 28  org.gnu.Emacs   0x0001001166a6 
 internal_condition_case + 251
 | 29  org.gnu.Emacs   0x0001000ada15 
 safe_run_hook_funcall + 83
 | 30  org.gnu.Emacs   0x00010011808b run_hook_with_args + 
 353
 | 31  org.gnu.Emacs   0x0001000aacc7 safe_run_hooks + 76
 | 32  org.gnu.Emacs   0x0001000ab1f3 
 __command_loop_1_block_invoke + 1299
 | 33  org.gnu.Emacs   0x0001001958a6 mac_autorelease_loop 
 + 46
 | 34  org.gnu.Emacs   0x0001000aac3c command_loop_1 + 556
 | 35  org.gnu.Emacs   0x0001001166a6 
 internal_condition_case + 251
 | 36  org.gnu.Emacs   0x0001001958a6 mac_autorelease_loop 
 + 46
 | 37  org.gnu.Emacs   0x0001000ba524 command_loop_2 + 16
 | 38  org.gnu.Emacs   0x0001001160c1 

[O] [PATCH] org-notify: Fix compatibility with latest org-element (uppercase properties)

2015-08-24 Thread Peter Münster
* contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
  org-element are all uppercase now.
* (org-notify-maybe-too-late): Fix typo in docstring (thanks to davemq,
  https://github.com/p-m/org-notify/issues/3).
---
 contrib/lisp/org-notify.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el
index da2c96f..8bcca9f 100644
--- a/contrib/lisp/org-notify.el
+++ b/contrib/lisp/org-notify.el
@@ -120,7 +120,7 @@ simple timestamp string.
   Create one todo item.
   (macrolet ((get (k) `(plist-get list ,k))
  (pr (k v) `(setq result (plist-put result ,k ,v
-(let* ((list (nth 1 heading))  (notify (or (get :notify) default))
+(let* ((list (nth 1 heading))  (notify (or (get :NOTIFY) default))
(deadline (org-notify-convert-deadline (get :deadline)))
   (heading (get :raw-value))
result)
@@ -148,7 +148,7 @@ simple timestamp string.
  'headline 'org-notify-make-todo)
 
 (defun org-notify-maybe-too-late (diff period heading)
-  Print waring message, when notified significantly later than defined by
+  Print warning message, when notified significantly later than defined by
 PERIOD.
   (if ( (/ diff period) 1.5)
   (message Warning: notification for \%s\ behind schedule! heading))
-- 
2.1.4

   Peter




[O] headings in odt export

2015-08-24 Thread Eric Abrahamsen
I'm seeing what seems to be a bug:

If I export a simple document to ODT with the following settings:

#+EXPORT_OPTIONS: H:3 num:t

The headings are given a proper heading style.

However if I export with:

#+EXPORT_OPTIONS: H:3 num:nil

The headings appear in Default Style (the body text is in Text
Body). In short: setting `org-export-with-section-numbers' to a non-nil
value is necessary to get the headings styled with a heading value --
otherwise they're default style.

The contents.xml file in the two different versions differs only like
this:

text:style-name=Heading_20_1_unnumbered

vs

text:style-name=Heading_20_1

That seems correct. I've attached a diff between the two different
versions of the styles.xml file.

I don't know much about ODT format, and don't know what's going on. I
traced `org-odt-headline', and it appeared to be behaving normally.

I'm using git Org, and the current Libreoffice version (on Arch linux)
is 4.4.5-2.

Any hints appreciated!

Eric


35c35
text:outline-level-style text:level=1 style:num-suffix=.  style:num-format=1
---
text:outline-level-style text:level=1 style:num-format=
40c40
text:outline-level-style text:level=2 style:num-suffix=.  style:num-format=1 text:display-levels=2
---
text:outline-level-style text:level=2 style:num-format=
45c45
text:outline-level-style text:level=3 style:num-suffix=.  style:num-format=1 text:display-levels=3
---
text:outline-level-style text:level=3 style:num-format=
50c50
text:outline-level-style text:level=4 style:num-suffix=.  style:num-format=1 text:display-levels=4
---
text:outline-level-style text:level=4 style:num-format=
55c55
text:outline-level-style text:level=5 style:num-suffix=.  style:num-format=1 text:display-levels=5
---
text:outline-level-style text:level=5 style:num-format=
60c60
text:outline-level-style text:level=6 style:num-suffix=.  style:num-format=1 text:display-levels=6
---
text:outline-level-style text:level=6 style:num-format=
65c65
text:outline-level-style text:level=7 style:num-suffix=.  style:num-format=1 text:display-levels=7
---
text:outline-level-style text:level=7 style:num-format=
70c70
text:outline-level-style text:level=8 style:num-suffix=.  style:num-format=1 text:display-levels=8
---
text:outline-level-style text:level=8 style:num-format=
75c75
text:outline-level-style text:level=9 style:num-suffix=.  style:num-format=1 text:display-levels=9
---
text:outline-level-style text:level=9 style:num-format=
80c80
text:outline-level-style text:level=10 style:num-suffix=.  style:num-format=1 text:display-levels=10
---
text:outline-level-style text:level=10 style:num-format=


Re: [O] Weird Asymptote mode behaviour in org

2015-08-24 Thread Nicolas Richard
Hello,

Jarmo Hurri jarmo.hu...@iki.fi writes:
 * description
   Move cursor into the code below. Press ~C-c '~ to edit the code in
   Asymptote mode. Do not change anything in the code, just press ~C-c
   '~ to return to org. You will notice that a comma has been inserted
   into the code.
 * test case

   #+BEGIN_SRC asymptote
 real s = 50
   * 21.1;
   #+END_SRC

The comma is meant to escape the star (*), see footnote in (info (org)
Literal examples). I'm not sure the comma is required (because your *
isn't at the start of the line), but is shouldn't hurt (i.e. you can C-c
', you can C-c C-c, etc.)

-- 
Nicolas Richard



Re: [O] Babel support for Stan

2015-08-24 Thread Kyle Meyer
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 I think core is fine for new languages, but you need to update file
 headers accordingly.

Will do.

 A few comments follow.

Thanks for your comments.  Updated.

 You don't use `org-babel-stan-cmdstan-directory' to store FILE, i.e.,
 FILE is saved in current directory, or any directory provided in its
 path, which doesn't necessarily match
 `org-babel-stan-cmdstan-directory'. Yet, make is called on
 `org-babel-stan-cmdstan-directory'.

 Is it intentional?

Yes.  The Makefile in the CmdStan directory can be used to compile any
*.stan file (regardless of whether it is in the CmdStan source
directory) into a model executable that's in the same directory as the
original *.stan file.

I'll wait a bit to see if any more comments come in and then install the
updated version in master, if that is OK with you.

Thanks.

--
Kyle



Re: [O] Babel support for Stan

2015-08-24 Thread Kyle Meyer
Hi Tom,

Thomas S. Dye t...@tsdye.com writes:

[...]
 If it does go there, please consider stubbing out some documentation
 using the template here:

 http://orgmode.org/w/?p=worg.git;a=blob;f=org-contrib/babel/languages/ob-doc-template.org;hb=HEAD

Thanks for the pointer.

--
Kyle



Re: [O] Notifications-notify for org-mode scheduled items?

2015-08-24 Thread Peter Münster
On Mon, Mar 02 2015, Leo Ufimtsev wrote:

 I would like to receive desktop notifications (1* e.g below) for scheduled 
 items. 
 E.g if I schedule like this:

 * Make Coffee 
   SCHEDULED: 2015-03-02 Mon 01:30

 Then I would like a desktop notification to pup up at 1:30 telling me to make 
 coffee.

 I saw the org-notify package, but besides this post:
 http://permalink.gmane.org/gmane.emacs.orgmode/59339
 I didn't see any documentation on it, making it somewhat tricky to configure. 

Hi,

Please find here a minimal working example:

Configuration:
--8---cut here---start-8---
(add-to-list 'load-path .../org-mode/contrib/lisp)
(require 'org-notify)
(setq org-agenda-files '(/tmp/test-agenda.org))
(org-notify-start)
--8---cut here---end---8---

File /tmp/test-agenda.org:
--8---cut here---start-8---
* TODO Make Coffee 
  DEADLINE: 2015-08-24 Mon 17:30
--8---cut here---end---8---

-- 
   Peter




Re: [O] export subtree as org file

2015-08-24 Thread Paul Rudin
Xebar Saram zelt...@gmail.com writes:

 Hi

 i was wondering if anyone knows how to export a subtree as a simple org file.
 i know i can copy paste into a new file but it seems quick to just export a
 subtree to a new org file :)



Narrow to subtree (C-x n s) then export to org (C-c C-e o o).






Re: [O] Weird Asymptote mode behaviour in org

2015-08-24 Thread Nicolas Goaziou
Hello,

Jarmo Hurri jarmo.hu...@iki.fi writes:

 When editing Asymptote code in org, a comma sometimes appears out of
 nowhere into the Asymptote code. The org code below explains how to
 reproduce this. (I am using the version of org pulled this morning.)

 Jarmo

 * description
   Move cursor into the code below. Press ~C-c '~ to edit the code in
   Asymptote mode. Do not change anything in the code, just press ~C-c
   '~ to return to org. You will notice that a comma has been inserted
   into the code.
 * test case

   #+BEGIN_SRC asymptote
 real s = 50
   * 21.1;
   #+END_SRC

See (info (org) Literal examples), in particular fourth footnote.


Regards,

-- 
Nicolas Goaziou



[O] [PATCH] Fix agenda follow mode to work with included diary

2015-08-24 Thread Matt Lundin
Follow mode does not work with diary entries in the agenda. It calls
org-agenda-goto, which expects to be in an Org Mode buffer but does not
test to make sure that it is in an org buffer. As a result, it errors
out midway through and leaves the cursor stranded in the diary buffer.
This patch should fix the issue.

From: Matt Lundin m...@imapmail.org
To: Org Mode emacs-orgmode@gnu.org
Subject: [PATCH] Fix agenda follow mode to work with included diary
Date: Mon, 24 Aug 2015 10:20:35 -0500
Gcc: nnml:list.orgmode

* lisp/org-agenda.el (org-agenda-goto): Fix org-agenda-goto to work with
  non-org buffers. Otherwise org-agenda-follow-mode does not work
  correctly with included diary entries (e.g., it errors out while the
  cursor is still in the diary buffer).
---
 lisp/org-agenda.el | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5fd1cd4..0698ddf 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8391,13 +8391,13 @@ When called with a prefix argument, include all archive files as well.
   (org-show-context 'agenda)
   (save-excursion
 	(and (outline-next-heading)
-	 (org-flag-heading nil	; show the next heading
-(when (outline-invisible-p)
-  (show-entry))			; display invisible text
-(recenter (/ (window-height) 2))
-(org-back-to-heading t)
-(if (re-search-forward org-complex-heading-regexp nil t)
-	(goto-char (match-beginning 4)))
+	 (org-flag-heading nil)))	; show the next heading
+  (when (outline-invisible-p)
+	(show-entry))			; display invisible text
+  (recenter (/ (window-height) 2))
+  (org-back-to-heading t)
+  (if (re-search-forward org-complex-heading-regexp nil t)
+	  (goto-char (match-beginning 4
 (run-hooks 'org-agenda-after-show-hook)
 (and highlight (org-highlight (point-at-bol) (point-at-eol)
 
-- 
2.5.0



Re: [O] Babel support for Stan

2015-08-24 Thread Nicolas Goaziou
Hello,

Kyle Meyer k...@kyleam.com writes:

 I'd like to put ob-stan.el (attached) in the contrib directory.  It adds
 support for the Stan [1] programming language.  I wrote it a while back,
 but a recent post on the Stan ML [2] made me think that others may find
 it useful (although I'd guess that the intersection of Stan and Org
 users is quite small).  It's short because the only output that really
 makes sense is to dump the contents to a file (and maybe compile it),
 which is then used by a downstream interface [3].

Thank you.

 Please let me know if you have any comments about the implementation or
 if you don't think contrib directory is a good place for it.

I think core is fine for new languages, but you need to update file
headers accordingly.

A few comments follow.
 (defun org-babel-execute:stan (body params)
   Execute a block of Stan code with org-babel.
 A :file header argument must be given.  If
 `org-babel-stan-cmdstan-directory' is non-nil and the file name
 does not have a \.stan\ extension, compile the block to file.
 Otherwise, write the Stan code to the file.

BODY and PARAMS references are missing from docstring.

   (let ((file (expand-file-name
  (or (cdr (assoc :file params))

Nitpick: `assoc' - `:assq'.

  (user-error Set :file argument to execute Stan blocks)
 (if (or (not org-babel-stan-cmdstan-directory)
   (org-string-match-p \\.stan\\' file))
   (with-temp-file file (insert body))
   (with-temp-file (concat file .stan) (insert body))
   (let ((default-directory org-babel-stan-cmdstan-directory))
   (call-process-shell-command (concat make  file

You don't use `org-babel-stan-cmdstan-directory' to store FILE, i.e.,
FILE is saved in current directory, or any directory provided in its
path, which doesn't necessarily match
`org-babel-stan-cmdstan-directory'. Yet, make is called on
`org-babel-stan-cmdstan-directory'.

Is it intentional?

 nil)) ;; Signal that output has been written to file.

Nitpick: one semi-colon only for end of line comments.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Displaying timeline for .org-file and then switching to including inactive timestamps will not include old and future inactive timestamps [8.3.1 (8.3.1-16-gf6aa53-elpa @ /Users/cube/.emac

2015-08-24 Thread Nicolas Goaziou
Jakub Szypulka ja...@szypulka.de writes:

 In that case, using agenda view, how can I display all timestamps in a buffer 
 when the oldest and newest are a long time apart?
 Must I define a custom agenda view first? (e.g. to encompass a large
 time frame and hide empty days)

I think so. You can try setting `org-agenda-span' to a large number.

Regards,



[O] [PATCH] Fix agenda follow mode to work with included diary

2015-08-24 Thread Matt Lundin

* lisp/org-agenda.el (org-agenda-goto): Fix org-agenda-goto to work with
  non-org buffers. Otherwise org-agenda-follow-mode does not work
  correctly with included diary entries (e.g., it errors out while the
  cursor is still in the diary buffer).
---
 lisp/org-agenda.el | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 5fd1cd4..0698ddf 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8391,13 +8391,13 @@ When called with a prefix argument, include all archive 
files as well.
   (org-show-context 'agenda)
   (save-excursion
(and (outline-next-heading)
-(org-flag-heading nil  ; show the next heading
-(when (outline-invisible-p)
-  (show-entry)); display invisible text
-(recenter (/ (window-height) 2))
-(org-back-to-heading t)
-(if (re-search-forward org-complex-heading-regexp nil t)
-   (goto-char (match-beginning 4)))
+(org-flag-heading nil)))   ; show the next heading
+  (when (outline-invisible-p)
+   (show-entry))   ; display invisible text
+  (recenter (/ (window-height) 2))
+  (org-back-to-heading t)
+  (if (re-search-forward org-complex-heading-regexp nil t)
+ (goto-char (match-beginning 4
 (run-hooks 'org-agenda-after-show-hook)
 (and highlight (org-highlight (point-at-bol) (point-at-eol)
 
-- 
2.5.0




Re: [O] Babel support for Stan

2015-08-24 Thread Thomas S . Dye
Aloha Kyle,

Kyle Meyer k...@kyleam.com writes:

 Hi all,

 I'd like to put ob-stan.el (attached) in the contrib directory.  It adds
 support for the Stan [1] programming language.  I wrote it a while back,
 but a recent post on the Stan ML [2] made me think that others may find
 it useful (although I'd guess that the intersection of Stan and Org
 users is quite small).  It's short because the only output that really
 makes sense is to dump the contents to a file (and maybe compile it),
 which is then used by a downstream interface [3].

 Please let me know if you have any comments about the implementation or
 if you don't think contrib directory is a good place for it.

 Thanks.

This looks neat to me.  I don't decide these things, but IMHO it would
be great to have it in contrib.  If it does go there, please consider
stubbing out some documentation using the template here:

http://orgmode.org/w/?p=worg.git;a=blob;f=org-contrib/babel/languages/ob-doc-template.org;hb=HEAD

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



[O] how can I use plain-text URLs in org-mime?

2015-08-24 Thread Peter Salazar
Hi Eric and others,

I'm using org-mime-htmlize to send email, but I'm having trouble with
plain-text links (i.e. not org-mode formatted links with square brackets,
but URLs by themselves) and with image links (again, not org-mode format).

Say I have an org-mode file with this subtree:

,
|
|  * foo
|  http://google.com
|
|  http://i.imgur.com/kJn0xNs.jpg
|
`

These work as desired when I org-export to HTML. The URL gets converted to
a clickable a href anchor, and the image gets displayed as an img src
image.

How do I get this same behavior in org-mime? When I try to email this same
content using message-mode and org-mime-htmlize, I get this:

Lisp error: (args-out-of-range 0 0)
get-text-property(0 face)
org-activate-plain-links

The full debug: https://gist.github.com/c06c92fb223dacb694c1

Thanks!


Re: [O] org-crypt: Secure encrypted message against inadvertent change

2015-08-24 Thread AW
Am Sonntag, 23. August 2015, 19:54:51 schrieb John Kitchin:
 I am not sure if you put the comment on this post:
 http://kitchingroup.cheme.cmu.edu/blog/2014/09/13/Make-some-org-sections-rea
 d-only/
 
 but it is possible to setup a hook that makes headings read-only. You
 could do that for headings tagged crypt, for example.

Dear John,

thank you. I simply changed read_only to crypt in the functions you 
developed. This functions prevent a change of encrypted text, which I think is 
really an improvment.

===

(defun org-mark-readonly ()
  (interactive)
  (org-map-entries
   (lambda ()
 (let* ((element (org-element-at-point))
(begin (org-element-property :begin element))
(end (org-element-property :end element)))
   (add-text-properties begin (- end 1) '(read-only t
   crypt)
 (message Made readonly!))


(defun org-remove-readonly ()
  (interactive)
  (org-map-entries
   (lambda ()
 (let* ((element (org-element-at-point))
(begin (org-element-property :begin element))
(end (org-element-property :end element))
(inhibit-read-only t))
 (remove-text-properties begin (- end 1) '(read-only t
 crypt))

(add-hook 'org-mode-hook 'org-mark-readonly)


===

Thus before I can use org-decrypt-entry I have to put the cursor under the 
headline with the tag :crypt: and call org-remove-readonly.

I  S U G G E S T  to  put this into org-crypt and change the commands org-
decrypt-entry and org-encrypt-entry: Encrypted text shall be read-only, and 
org-decrypt-entry removes this.

Sorry, I'm a user without knowledge of Lisp, unfortunately I can't do that 
myself. But it would be a valuable improvement of org-crypt.

Regards,

Alexander

 
 AW writes:
  I'm using org-crypt. All text below a heading with the tag :crypt: becomes
  encrypted with saving the file and looks like this:
  
  -BEGIN PGP MESSAGE-
  Version: GnuPG v2
  
  hQEOAxn9DjwjX2oYEAQAgLl/58dss1VVgmRb1rGIaNV2I5P+smcDjhWa5/arTMPE
  9wjxHUpU/HSflCwnV5609H3J9ZSVubCpaUbV3Da0jnDUJuljFbSqapRym1PW0hFn
  ApfLwze3HTj+A3eODf+p3kbDjFnII9Rfn7lWQ/6OmMrisQbvbsWzS3K/crgqu+cD
  /j6m3nDURonKGStv5h7sgaSRuLGzqXvHXEnS+d1ad1ZomgTD4abZNvDYt9Y039FE
  xYwRphWSBs+vtQ34resZewCa4s7h5SES5j839vQPWI4VyA4uRrfzYATHnHtoxfwA
  RQWzUTeS16FFBxnjqqTXGXqH9go25Ovnl1Np9c2H7veH0lQB/hpwGbUJRnYCx5Nd
  UlZ/U+aKQJl3aD+ulgOxJhTQNb9ToXxMpwS3FitsZHVh8OaRBLdgjRVFstWw3NhT
  RTQ3Og0+ts34iKW+u+2ock/LqiDYFx4=
  =+xma
  -END PGP MESSAGE-
  
  I really hope this example will not irritate your email software.
  
  My notebook has one of those large touchpads and once in a while I hit it
  and go on with typing, but the cursor shifted to text somewhere else and
  I'm adding letters to a completely different paragraph, before I notice
  and correct it.
  
  Well, this evening I added some letters inadvertently inside a PGP
  message,
  because the touchpad shifted to cursor to an encrypted paragraph. If I
  saved the file, the encrypted paragraph would have become un-decryptable
  (I tested this: decrypting no longer is possible).
  
  Unfortunately I won't always realise what happened, e.g. if I don't watch
  while dictating into a speech recognition (Dragon Nat. Speak.).
  
  And the encrypted parts are not needed often. So the destroyed PGP message
  might make it into my backups and if I try to encrypt it a year later...
  
  Why isn't the text between
  
  -BEGIN PGP MESSAGE-
  
  and
  
  -END PGP MESSAGE-
  
  read-only as a default ?
  
  Really, an inadvertent change can destroy valuable information and it i
 
 --
 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] 8.3 export slower

2015-08-24 Thread Samuel Wales
i didn't benchmark, but export of a 900 word subtree seems to take 15s
in 8.3 (1-2s before 8.3):

- command-execute   14966  95%
 - call-interactively   14966  95%
  - org-export-dispatch 14633  93%
   - #lambda 0x3a8ec5b2d3fa3ab8   14600  93%
- org-ascii-export-to-ascii 14600  93%
 - org-export-to-file   14600  93%
  - org-export-as   14600  93%
   - org-export-get-environment  6493  41%
- org-id-find6441  41%
 - org-id-update-id-locations6236  39%
  - org-get-agenda-file-buffer   6020  38%
   - find-file-noselect  6016  38%
- find-file-noselect-1   6012  38%
 - after-find-file   5960  38%
  - normal-mode  5956  37%
   - funcall 5956  37%
- #compiled 0x229789   5956  37%
 - set-auto-mode 5956  37%
  - set-auto-mode-0  3788  24%
   - org-mode3788  24%
- org-set-startup-visibility 3660  23%
 - org-cycle-hide-drawers3168  20%
  + org-element-at-point 2004  12%
  + org-flag-drawer   356   2%
 + org-overview   272   1%
   org-set-visibility-according-to-property
 20   0%
 + org-cycle-hide-archived-subtrees  8   0%
+ org-set-regexps-and-options  32   0%
+ run-mode-hooks   28   0%
+ org-refresh-effort-properties 24   0%
  org-update-radio-target-regexp 24   0%
+ org-macro-initialize-templates 20   0%
  + funcall  2164  13%
  + set-auto-mode-1 4   0%
  + run-hooks   4   0%
 + funcall 52   0%
+ create-file-buffer4   0%
   + org-find-base-buffer-visiting  4   0%
  + org-agenda-files   52   0%
  + file-truename   4   0%
org-release-buffers 4   0%
 + org-id-find-id-in-file 201   1%
+ org-export--get-inbuffer-options 12   0%
+ org-element-context  12   0%
   - run-hook-with-args  5332  34%
- mymy-org-export-par-in-inline-fn   5332  34%
 - org-footnote-normalize5328  33%
  - org-footnote-get-definition  3816  24%
   - byte-code   3816  24%
- org-element-context  28   0%
 + byte-code   28   0%
  + org-footnote-delete-definitions   976   6%
  + org-fill-paragraph312   1%
  + org-footnote-get-next-reference   168   1%
  + jit-lock-after-change  16   0%
mapconcat   4   0%
   + org-export--merge-external-footnote-definitions   1703  10%
   + org-export--delete-comments  860   5%
 org-update-radio-target-regexp60   0%
   + org-set-regexps-and-options   48   0%
   + org-export-execute-babel-code 28   0%
   + org-macro-initialize-templates20   0%
   + org-export-data   16   0%
   + org-element-parse-buffer  12   0%
   + org-export-copy-buffer 8   0%

Re: [O] [PATCH] org-notify: Fix compatibility with latest org-element (uppercase properties)

2015-08-24 Thread Nicolas Goaziou
Hello,

Peter Münster pmli...@free.fr writes:

 * contrib/lisp/org-notify.el (org-notify-make-todo): Properties from
   org-element are all uppercase now.
 * (org-notify-maybe-too-late): Fix typo in docstring (thanks to davemq,
   https://github.com/p-m/org-notify/issues/3).

Applied. Thank you.

Out of curiosity, as org-notify.el's author, don't you have write access
into repository? If that's the case, you don't need to wait for review.


Regards,

-- 
Nicolas Goaziou



Re: [O] headings in odt export

2015-08-24 Thread Rasmus
Hi,

Eric Abrahamsen e...@ericabrahamsen.net writes:

 Any hints appreciated!

My guess is that you are using the wrong style files.  I.e. before they
were updated to included the unnumbered headings.  Try to set the relevant
variables explicitly:

(with-eval-after-load 'ox-odt  
  (let ((schema-dir /usr/share/emacs/etc/org/schema/)
(style-dir /usr/share/emacs/etc/org/styles))
(when (file-exists-p schema-dir)
  (setq org-odt-schema-dir-list (list schema-dir)))
(when (file-exists-p style-dir)
  (setq org-odt-styles-dir style-dir

makepkg/the AUR package does not handle this fact very well.

Rasmus

-- 
And when I’m finished thinking, I have to die a lot




Re: [O] [PATCH] Fix agenda follow mode to work with included diary

2015-08-24 Thread Nicolas Goaziou
Hello,

Matt Lundin m...@imapmail.org writes:

 Follow mode does not work with diary entries in the agenda. It calls
 org-agenda-goto, which expects to be in an Org Mode buffer but does not
 test to make sure that it is in an org buffer. As a result, it errors
 out midway through and leaves the cursor stranded in the diary buffer.
 This patch should fix the issue.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] document depreciation of timeline?

2015-08-24 Thread Nicolas Goaziou
Hello,

Gregor Zattler telegr...@gmx.net writes:

 There are only two commits which mention the timeline in their
 summry lines in the newer git history since 2008-01-31.

 Shouldn't the feature then be officially depreciated and
 mentioned as stale in the manual?  The manual mentions the
 timeline in most cases together with the agenda.  And there is a
 small chapter dedicated to the timeline.

 If depreciation of the timeline is OK I would patch the manual
 accordingly.

I'm all for it. I think we shouldn't even document deprecated features
in the manual, otherwise, they just never go away.

In any case, Bastien will have the last word on the matter.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Allow inserting diary entries last in date tree

2015-08-24 Thread Nicolas Goaziou
Nikolai Weibull n...@disu.se writes:

 * org-agenda.el (org-agenda-insert-diary-strategy): Add new value
   'date-tree-last.
   (org-agenda-insert-diary-make-new-entry): Handle
   `org-agenda-insert-diary-strategy' set to 'date-tree-last.

 To allow for diary entries to be entered in time order in the date tree,
 add a new value to `org-agenda-insert-diary-strategy' that allows for
 this.  The code for handling this value, 'date-tree-last, is a bit
 tricky, as we need to keep track of whether the date-tree already had
 one or more entries for the given date.

Applied. Thank you.

Regards,



Re: [O] [PATCH] Allow inserting diary entries last in date tree

2015-08-24 Thread Nicolas Goaziou
Completing myself,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Nikolai Weibull n...@disu.se writes:

 * org-agenda.el (org-agenda-insert-diary-strategy): Add new value
   'date-tree-last.
   (org-agenda-insert-diary-make-new-entry): Handle
   `org-agenda-insert-diary-strategy' set to 'date-tree-last.

 To allow for diary entries to be entered in time order in the date tree,
 add a new value to `org-agenda-insert-diary-strategy' that allows for
 this.  The code for handling this value, 'date-tree-last, is a bit
 tricky, as we need to keep track of whether the date-tree already had
 one or more entries for the given date.

 Applied. Thank you.

BTW, would you mind providing an entry about it ORG-NEWS?

Thank you.



Re: [O] 8.3 export slower

2015-08-24 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 i didn't benchmark, but export of a 900 word subtree seems to take 15s
 in 8.3 (1-2s before 8.3):

Could you use `elp-instrument-package' with an uncompiled Org and report
results?

 i do not know why it is searching 20 files for org id's, as there are
 no id links.

If you do not have any [[id:...]] links, it should certainly not use
`org-id' at all. Do you have an ECM?

 the thing i am doing different from emacs -Q is this, which
 nicolas suggested, but seems no longer to work in 8.3:

   (add-hook 'org-export-before-parsing-hook
 'mymy-org-export-par-in-inline-fn)
   (defun mymy-org-export-par-in-inline-fn (backend)
 Accept multiple inline footnote paragraphs.
 (unless (org-export-derived-backend-p backend 'latex)
   (org-footnote-normalize)
   ;; =alpha i guess it sticks \par in there for you
   (while (re-search-forward par\\s-* nil t)
 (replace-match \n\n

What doesn't work?


Regards,

-- 
Nicolas Goaziou



Re: [O] Org to LaTeX export of tables

2015-08-24 Thread Rasmus
Marcin Borkowski mb...@mbork.pl writes:

 On 2015-08-24, at 01:36, Vikas Rawal vikasli...@agrarianresearch.org wrote:

 Please see the sample org table below, and the way it is exported in LaTeX.

 I do not want \begin{center} and \end{center}. Having those results
 in some extra space between the table and the notes.

 Shouldn't it use \centering instead?

It does when it's a proper table.  This is a tabular inside some
special block that org knows nothing about.

Rasmus

-- 
Summon the Mothership!




Re: [O] [PATCH] org-notify: Fix compatibility with latest org-element (uppercase properties)

2015-08-24 Thread Peter Münster
On Mon, Aug 24 2015, Nicolas Goaziou wrote:

 Out of curiosity, as org-notify.el's author, don't you have write access
 into repository?

I guess no, but I've never tried...

-- 
   Peter




Re: [O] headings in odt export

2015-08-24 Thread Eric Abrahamsen
Rasmus ras...@gmx.us writes:

 Hi,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Any hints appreciated!

 My guess is that you are using the wrong style files.  I.e. before they
 were updated to included the unnumbered headings.  Try to set the relevant
 variables explicitly:

That was it! Thanks a lot. Those vars did point at existing directories
on my system (that appear to contain the right files), but I tried
switching them to point at the /etc directory inside my git checkout of
Org, and now everything works again.

I don't know what happened to mess this behavior up, but Libreoffice has
started acting very strange in general on Arch...

Thanks again,
Eric




[O] emacs org mode for scholars questions

2015-08-24 Thread Erik Hetzner
Hi all,

I am going to be giving a talk on how Emacs can help support scholars,
especially those who are using plain text and doing reproducible
research, at “Emacsconf 2015” in San Francisco this Saturday (the
29th).

I have done some work on managing references using Emacs  pandoc, but
what I’d like to focus on in this talk is why Emacs is a great tool
for scholarly writers (both scientists and humanists) and what Emacs
developers should be concentrating on to make it an even better tool
for the scholarly community.

I’m wondering if you any of you might have any suggestions about what
you would like to see Emacs do better to support the scholarly writing
community.

Thanks for any help you can provide!

best, Erik Hetzner
--
Sent from my free software system http://fsf.org/.



[O] [PATCH] Add news about org-agenda-insert-diary-strategy

2015-08-24 Thread Nikolai Weibull
---
 etc/ORG-NEWS | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index f1d85c1..dc0d8b1 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -12,6 +12,9 @@ Please send Org bug reports to emacs-orgmode@gnu.org.
 ** New features
 *** Org linter
 ~org-lint~ can check syntax and report common issues in Org documents.
+*** New option ~date-tree-last~ for ~org-agenda-insert-diary-strategy~
+When ~org-agenda-insert-diary-strategy~ is set to ~date-tree-last~, diary
+entries are added to last in the date tree.
 ** New functions
 ~org-show-children~ is a faster implementation of
 ~outline-show-children~.
-- 
2.5.0