Re: [O] Allow more export options to be controlled per-subtree

2017-09-29 Thread Amos Bird
#+OPTIONS: latex:t toc:nil H:3

Hi Kaushal,

I did, it only works if I export the subtree instead of the whole buffer.

Regards,

Kaushal Modi  writes:

> Hi Amos,
>
> Regarding your question in the other thread, did you try the below
> suggestion?
>
> On Thu, Sep 28, 2017, 3:19 PM Nicolas Goaziou 
> wrote:
>
>>
>> By the way, it is already possible to prevent emphasis in a subtree
>> export:
>>
>> * Subtree
>> :PROPERTIES:
>> :EXPORT_OPTIONS: *:nil
>> :END:
>>


--
Amos Bird
amosb...@gmail.com


Re: [O] Allow more export options to be controlled per-subtree

2017-09-29 Thread Kaushal Modi
Hi Amos,

Regarding your question in the other thread, did you try the below
suggestion?

On Thu, Sep 28, 2017, 3:19 PM Nicolas Goaziou 
wrote:

>
> By the way, it is already possible to prevent emphasis in a subtree
> export:
>
> * Subtree
> :PROPERTIES:
> :EXPORT_OPTIONS: *:nil
> :END:
>
-- 

Kaushal Modi


Re: [O] [ANN] Agenda speed up

2017-09-29 Thread Kyle Meyer
Nicolas Goaziou  writes:

> If there is no more feedback nor objection, I'll merge the branch in
> master before the end of the week.

One issue I noticed: The sorting of categories defined in
org-agenda-sorting-strategy is not honored.  The default category
sorting for the agenda is to order the categories as they appear in the
agenda files.

Take the following text as the agenda file.

--8<---cut here---start->8---

* y
:PROPERTIES:
:CATEGORY: y
:END:

** TODO a
SCHEDULED: <2017-09-29 Fri>

* x
:PROPERTIES:
:CATEGORY: x
:END:

** TODO b
SCHEDULED: <2017-09-29 Fri>
--8<---cut here---end--->8---

Running emacs -Q and "M-x org-agenda a" on master displays

Week-agenda (W39):
Monday 25 September 2017 W39
Tuesday26 September 2017
Wednesday  27 September 2017
Thursday   28 September 2017
Friday 29 September 2017
  y:  Scheduled:  TODO a
  x:  Scheduled:  TODO b
Saturday   30 September 2017
Sunday  1 October 2017

Running the same sequence on wip-agenda-speedup displays

Week-agenda (W39):
Monday 25 September 2017 W39
Tuesday26 September 2017
Wednesday  27 September 2017
Thursday   28 September 2017
Friday 29 September 2017
  x:  Scheduled:  TODO b
  y:  Scheduled:  TODO a
Saturday   30 September 2017
Sunday  1 October 2017

-- 
Kyle



Re: [O] Disable fontification when exporting tables

2017-09-29 Thread Amos Bird
#+OPTIONS: latex:t toc:nil H:3

Hi,

> - what are you trying to export?

an Org table like this:

#+BEGIN_EXAMPLE
| QueryID | SQL Text

  | Query Time (Seconds) | Query Time Hot 
(Seconds) |
|-+---+--+--|
| Q0  | SELECT cab_type, count(*) FROM trips_log GROUP BY cab_type; 

  |10.14 |  
  11.57 |
| Q1  | SELECT passenger_count, avg(total_amount) FROM trips_log GROUP BY 
passenger_count;
|12.00 |
 6.27 |
| Q2  | SELECT passenger_count, toYear(pickup_datetime) AS year, count(*) 
FROM trips_log GROUP BY passenger_count, year;  
|10.45 |
 7.23 |
| Q3  | SELECT passenger_count, toYear(pickup_datetime) AS year, 
round(trip_distance) AS distance, count(*) FROM trips_log GROUP BY 
passenger_count, year, distance ORDER BY year, count(*) DESC; |
13.03 |10.80 |
#+END_EXAMPLE

> - to what back-end?

ODT and HTML

> - what is the exact problem?

I'd like to export this table with *:nil ^:nil options while exporting other 
subtrees with *:t ^:t.

I tried surrounding the table with example block and src block but both look 
bad after exportation.

I added <10> to the SQL column but it doesn't help quoting the * and _ 
characters when exporting.

#+BEGIN_EXAMPLE
I also tried changing _ to \under{} and * to \asc{} but it doesn't look well in 
the Org buffer.

I did turn on org-toggle-pretty-entities but it changes the appearance of other 
subtrees which I don't want to.
#+END_EXAMPLE

regards,


Nicolas Goaziou  writes:

> Hello,
>
> Amos Bird  writes:
>
>> I've tried the example block but it doesn't export well.
>>
>> img-2017-09-29-100634.png
>
> You didn't specify you were trying to export an Org table in the first
> place. You need to give as much information as possible if you want to
> have useful answers.
>
> So, let's start again:
>
> - what are you trying to export?
> - to what back-end?
> - what is the exact problem?
>
> Regards,


--
Amos Bird
amosb...@gmail.com


Re: [O] Insert heading above current one

2017-09-29 Thread Luciano Passuello
Hi, thanks for the replies!

>> To add, I also think that the earlier behavior made sense, if the point is
>> at bolp, insert before, else insert after.
>
> I think the current behaviour makes more sense, if the command is called
> with an universal argument. Indeed, what would be the point of using an
> universal argument if you get the exact same behaviour as without it?

I also think the earlier behavior made more sense. The variable
org-insert-heading-respect-content (or the universal argument)
controls how a new headline is inserted BELOW the current header
(either add immediately after the current line or down below). I don't
see how this variable should alter the behavior of adding a heading
ABOVE the current header (ie. "respecting content" or not has no
effect here, above is always above).

> Out of curiosity is there any to set this variable to something else
> than nil? There are already comfortable keybindings to set this
> temporarily (C-RET and C-u M-RET). Why would one have M-RET to behave
> exactly as C-RET? And even if there was a good reason to do so, why not
> simply re-binding M-RET in that case?

You have a good point. Looking this way, the
org-insert-heading-respect-content variable is indeed of little use.
But since the variable does exist (even though perhaps it should be
deprecated?), it should behave correctly.
And I just don't see how the behavior of adding a header above the
current line should be impacted by it.

Thanks!
Luciano.



Re: [O] Trying to get chart from table working

2017-09-29 Thread Peter Davis

I'm sorry to belabor this, but I could use some help. I'd be willing to
pay a modest consulting fee, but I'm trying to solve a problem in a
timely way, as it would help me with healthcare decisions.

Basically, I want to plot a time series graph showing my PSA (prostate
specific antigen) over time. The PSA is measured at irregular intervals,
and has been for over 4 years (and hopefully will continue for many more
years.) That should be a simple enough graph. I've already got a
javascript d3 example that does this, but I'd like to embed it in a
document, and to be able to generate PDF.

Further, I want to be able to show different time intervals with tinted
bands spanning the full range of the graph, and having specific start
and end dates. These would represent various medical treatments I've
undergone. I have a rough example I've mocked up in Photoshop, but, of
course, I want to be able to add new data and re-generate the chart as
needed. I don't know if I can attach a PNG to an email on this list.

Unfortunately, I don't have enough emacs lisp knowledge, or org-mode
knowledge, or gnuplot knowledge to know how to make this all work. I
have not even be able to get the org-plot example to work. (I have been
using org for various types of documents for a number of years, and can
generally pick things up quickly, but I'm overwhelmed by this.)

I was thinking of having a table like:


...
| *Date* | *PSA* | *Treatment* |
| 2017-08-11 | 185 | |
| 2017-08-21 | | #ffdd99 |
| 2017-09-19 | 854 | #ffdd99 |
...


So some rows would contain a PSA measurement, some a background tint,
and some both. I've never seen a visualization like this, but I think it
would be very helpful to have a single timeline that shows periods of
various treatments and the PSA value. There are probably better ways to
specify the starting and ending dates of treatments, but this seemed
amenable to simple iterative processing.

I've considered possible tools for this, including d3, PostScript, etc.,
but I think Org would be best for maintainability, allowing me to add
notes, etc.

I know this is a tall order, but it's beyond my capabilities right now.
Any recommendations or suggestions greatly appreciated.

Thanks,
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] [ANN] Agenda speed up

2017-09-29 Thread Samuel Wales
have not beena ble to respons for health reasons.  i have rsposne
partly done.  i think result is slightly slower but seems tob e
correct if you count recent maint as correct.



Re: [O] [ANN] Agenda speed up

2017-09-29 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> I rewrote the part responsible for agenda generation in "org-agenda.el".
> Basically, I refactored some hot loops and introduced a cache mechanism
> for data extracted out of agenda files.
>
> I expect to see some interesting improvements when viewing the agenda
> with a span larger than one day, or when generating an agenda view
> without having touched most of the agenda files since last view.
>
> Some feedback about the new agenda speed would be nice.

If there is no more feedback nor objection, I'll merge the branch in
master before the end of the week.

Until then, the changes are still available in wip-agenda-speedup branch
for review.

Regards,



Re: [O] function for inserting a block

2017-09-29 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen  writes:

> On 09/10/17 14:44 PM, Nicolas Goaziou wrote:
>
> [...]
>
>> Some free key bindings:
>> - C-c C-x C-e
>> - C-c C-x C-g
>> - C-c C-x C-h
>> - C-c C-x C-k
>> - C-c C-x h
>> - C-c C-x j
>> - C-c C-x k
>> - C-c C-x l
>> - C-c C-x m
>> - C-c C-x n
>> - C-c C-x r
>> - C-c C-x s
>> - C-c C-x t
>> - C-c C-x u
>> - C-c C-x w
>> - C-c C-x x
>> - C-c C-x y
>> - C-c C-x z
>>
>> For the record, `C-c C-x C-f' is `org-emphasize', which is related.
>
> How about `C-c C-x C-t', for "template"?

C-c C-x C-t is `org-toggle-time-stamp-overlays'. I listed all free
keybindings following the scheme 

  C-c C-x C-

or

  C-c C-x 

C-c C-x t is free, tho.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Compiling org-clock.el fails due to undeclared utf-8 [9.1.1 (9.1.1-6-gd40deb-elpa)]

2017-09-29 Thread Nicolas Goaziou
Hello,

Enrico Scholz  writes:

> When install org, compilation fails with
>
> | org-clock.el:1958:1:Error: Invalid read syntax: "?"
>
>
> This seems to happen due to the non-ascii charecter in line 1974.
> Adding a
>
> ;; coding: utf-8
>
> local variable fixes it.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Insert heading above current one

2017-09-29 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> On Fri, Sep 29, 2017 at 10:41 AM Kaushal Modi 
> wrote:
>
>> Looks like this was an intended change:
>> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=2b03e945a19701194e510791a96006c5eee9edc6
>>
>> Related discussion:
>> http://lists.gnu.org/archive/html/emacs-orgmode/2016-10/msg00080.html
>>
>> PS: The commit message includes gmane.org links which are now dead. I
>> think we should reference lists.gnu.org links (like above) for longevity
>> of references.

This is already the case. Latest commit message include links to
lists.gnu.org.

> To add, I also think that the earlier behavior made sense, if the point is
> at bolp, insert before, else insert after.

I think the current behaviour makes more sense, if the command is called
with an universal argument. Indeed, what would be the point of using an
universal argument if you get the exact same behaviour as without it?

> But I never noticed this change as I
> leave org-insert-heading-respect-content at its default value of nil.

Out of curiosity is there any to set this variable to something else
than nil? There are already comfortable keybindings to set this
temporarily (C-RET and C-u M-RET). Why would one have M-RET to behave
exactly as C-RET? And even if there was a good reason to do so, why not
simply re-binding M-RET in that case?

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Disable fontification when exporting tables

2017-09-29 Thread Nicolas Goaziou
Hello,

Amos Bird  writes:

> I've tried the example block but it doesn't export well.
>
> img-2017-09-29-100634.png

You didn't specify you were trying to export an Org table in the first
place. You need to give as much information as possible if you want to
have useful answers.

So, let's start again:

- what are you trying to export?
- to what back-end?
- what is the exact problem?

Regards,

-- 
Nicolas Goaziou



[O] org-plot.el bugfix/patch

2017-09-29 Thread Joe Bloggs
The grid examples in org-plot.el don't work for me
because the org-plot sets datafile separator to "\t",
so gnuplot can't read the data file properly.
Leaving datafile separator at its default value
(whitespace) fixes the problem.


Regards,

Joe


-- 
 >From fafb16f2409a049861fbdd5be8ca95304da01359 Mon Sep 17 00:00:00 2001
From: Joe Bloggs 
Date: Thu, 28 Sep 2017 22:30:31 +0100
Subject: [PATCH] set datafile separator to default (whitespace) value

* lisp/org-plot.el (org-plot/gnuplot-script): Set datafile separator
  to default (whitespace) value instead of "\t" so that it works with
  grid example.

Using "\t" for datafile separator doesn't work with the grid example
in org-plot.org. Using the default whitespace value works.

TINYCHANGE
---
 lisp/org-plot.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index a8028324b..2818b88df 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -219,7 +219,7 @@ manner suitable for prepending to a user-specified script."
 (dolist (el sets) (funcall ats (format "set %s" el)))  ; set
 ;; Unless specified otherwise, values are TAB separated.
 (unless (string-match-p "^set datafile separator" script)
-  (funcall ats "set datafile separator \"\\t\""))
+  (funcall ats "set datafile separator"))
 (when x-labels			; x labels (xtics)
   (funcall ats
 	   (format "set xtics (%s)"
-- 
2.14.1



Re: [O] Trying to get chart from table working

2017-09-29 Thread Peter Davis

On Fri, Sep 29, 2017, at 11:42 AM, Peter Davis wrote:
> 
> On Fri, Sep 29, 2017, at 10:51 AM, Eric S Fraga wrote:
> > On Friday, 29 Sep 2017 at 10:16, Peter Davis wrote:
> > > I'm trying out the org-plot example, but when I enter C-M-g on a
> > > table, I get:
> > >
> > > Cannot open load file: No such file or directory, gnuplot
> > >
> > > I verified that gnuplot is installed, and that /usr/local/bin is in
> > > both the PATH and the exec-path for emacs. Is there something else I
> > > need to do?
> > 
> > It may refer to gnuplot.el (found in gnuplot-mode debian package for me)
> > as I think org uses this to execute gnuplot commands?
> > 
> 
> Thank you, Eric. I did install gnuplot-mode via the list-packages
> interface, but I can't find a gnuplot.el file on my system.
> 

Aha! Just installing gnuplot did something. Now I get

org-export-data-with-backend: Wrong type argument: arrayp, nil


-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Trying to get chart from table working

2017-09-29 Thread Peter Davis

On Fri, Sep 29, 2017, at 10:51 AM, Eric S Fraga wrote:
> On Friday, 29 Sep 2017 at 10:16, Peter Davis wrote:
> > I'm trying out the org-plot example, but when I enter C-M-g on a
> > table, I get:
> >
> > Cannot open load file: No such file or directory, gnuplot
> >
> > I verified that gnuplot is installed, and that /usr/local/bin is in
> > both the PATH and the exec-path for emacs. Is there something else I
> > need to do?
> 
> It may refer to gnuplot.el (found in gnuplot-mode debian package for me)
> as I think org uses this to execute gnuplot commands?
> 

Thank you, Eric. I did install gnuplot-mode via the list-packages
interface, but I can't find a gnuplot.el file on my system.

Thanks!
-pd

-- 
  Peter Davis
  www.techcurmudgeon.com



Re: [O] Trying to get chart from table working

2017-09-29 Thread Eric S Fraga
On Friday, 29 Sep 2017 at 10:16, Peter Davis wrote:
> I'm trying out the org-plot example, but when I enter C-M-g on a
> table, I get:
>
> Cannot open load file: No such file or directory, gnuplot
>
> I verified that gnuplot is installed, and that /usr/local/bin is in
> both the PATH and the exec-path for emacs. Is there something else I
> need to do?

It may refer to gnuplot.el (found in gnuplot-mode debian package for me)
as I think org uses this to execute gnuplot commands?

-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-87-g3c83f1


signature.asc
Description: PGP signature


Re: [O] Insert heading above current one

2017-09-29 Thread Kaushal Modi
On Fri, Sep 29, 2017 at 10:41 AM Kaushal Modi 
wrote:

> Looks like this was an intended change:
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=2b03e945a19701194e510791a96006c5eee9edc6
>
> Related discussion:
> http://lists.gnu.org/archive/html/emacs-orgmode/2016-10/msg00080.html
>
> PS: The commit message includes gmane.org links which are now dead. I
> think we should reference lists.gnu.org links (like above) for longevity
> of references.
>

To add, I also think that the earlier behavior made sense, if the point is
at bolp, insert before, else insert after.

But I never noticed this change as I
leave org-insert-heading-respect-content at its default value of nil.

So talking of consistency, it would be nice to get that "if bolp, insert
before" behavior regardless of the value
of org-insert-heading-respect-content.

@Nicolas?
-- 

Kaushal Modi


Re: [O] Insert heading above current one

2017-09-29 Thread Kaushal Modi
On Fri, Sep 29, 2017 at 10:14 AM Luciano Passuello 
wrote:

> Hello everybody, first message here.
>
> According to org-insert-heading documentation: "If point is at the
> beginning of a heading, insert a new heading or a new headline above
> the current one."
>
> I like this behavior very much, and in orgmode 8.x, calling
> org-insert-heading at the beginning of a line indeed creates a heading
> before the current one, even when org-insert-heading-respect-content
> is set.
>
> For orgmode 9.x, this only works when org-insert-heading-respect-content
> is nil.
> I find this annoying, because I like to have
> org-insert-heading-respect-content non-nil AND to be able to insert a
> heading before the current one.
>
> Is that by design or a bug? I couldn't find any mention to the new
> behavior in the Changes  page.
>

Looks like this was an intended change:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=2b03e945a19701194e510791a96006c5eee9edc6

Related discussion:
http://lists.gnu.org/archive/html/emacs-orgmode/2016-10/msg00080.html

PS: The commit message includes gmane.org links which are now dead. I think
we should reference lists.gnu.org links (like above) for longevity of
references.
-- 

Kaushal Modi


[O] Trying to get chart from table working

2017-09-29 Thread Peter Davis
I'm trying out the org-plot example, but when I enter C-M-g on a table, 
I get:



Cannot open load file: No such file or directory, gnuplot


I verified that gnuplot is installed, and that /usr/local/bin is in both 
the PATH and the exec-path for emacs. Is there something else I need to do?



Ultimately I'm trying to figure out how to plot a time series graph, and 
then to represent different time intervals with colored bands in the 
background.



Thanks,

-pd


--

Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




[O] Insert heading above current one

2017-09-29 Thread Luciano Passuello
Hello everybody, first message here.

According to org-insert-heading documentation: "If point is at the
beginning of a heading, insert a new heading or a new headline above
the current one."

I like this behavior very much, and in orgmode 8.x, calling
org-insert-heading at the beginning of a line indeed creates a heading
before the current one, even when org-insert-heading-respect-content
is set.

For orgmode 9.x, this only works when org-insert-heading-respect-content is nil.
I find this annoying, because I like to have
org-insert-heading-respect-content non-nil AND to be able to insert a
heading before the current one.

Is that by design or a bug? I couldn't find any mention to the new
behavior in the Changes  page.

Thanks!



Re: [O] How to generate clock report for hours worked each day?

2017-09-29 Thread Eric S Fraga
On Thursday, 28 Sep 2017 at 23:43, ConcreteVitamin wrote:
> It looks something like this: https://pastebin.com/bBFwPuwb

Ah, okay, you are using :scope agenda, not :scope file in this case.  I
have no answer to your query then.  Sorry.

-- 
: Eric S Fraga via Emacs 27.0.50, Org release_9.1.1-87-g3c83f1


signature.asc
Description: PGP signature


[O] Bug: Compiling org-clock.el fails due to undeclared utf-8 [9.1.1 (9.1.1-6-gd40deb-elpa)]

2017-09-29 Thread Enrico Scholz
When install org, compilation fails with

| org-clock.el:1958:1:Error: Invalid read syntax: "?"


This seems to happen due to the non-ascii charecter in line 1974.
Adding a

;; coding: utf-8

local variable fixes it.



Enrico


Emacs  : GNU Emacs 25.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.31)
 of 2017-09-22
Package: Org mode version 9.1.1 (9.1.1-6-gd40deb-elpa @ 
/home/ensc/.emacs.d/elpa/org-20170925/)



[O] ob-sclang.el error on Windows 10 64 bit

2017-09-29 Thread Xi Shen
Hi,

I have seeing this error many times when I update org-plus-contrib package
on Emacs for Windows.

ob-sclang.el:63:1:Error: Cannot open load file: No such file or
directory, sclang-interp

So far, nothing breaks, because I do not use anything related to
ob-sclang.el.

The error is caused by (require 'sclang-interp) which is referring to a
package I do not have on my system.


Thanks,
David