Re: [O] header spacing

2017-08-30 Thread Nicolas Goaziou
Hello,

kevinbanjo  writes:

> when I do an alt-enter to create a heading below at the same level it puts
> one space before what I type for the heading name.
>
> When I want to demote that heading with alt-right it puts two which I then
> have to go back and delete.

I cannot reproduce it. Could you update Org, if possible, and try with
a minimal configuration?

Regards,

-- 
Nicolas Goaziou



[O] header spacing

2017-08-30 Thread kevinbanjo
when I do an alt-enter to create a heading below at the same level it puts
one space before what I type for the heading name.

When I want to demote that heading with alt-right it puts two which I then
have to go back and delete.

How do I stop the two spaces and only get one when demoting?

TIA,
-Kevin


Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-30 Thread Adonay Felipe Nogueira
The grffile package is already included, in:

[[help:org-latex-default-packages-alist]]

The text above is an Org hyperlink describing the
"org-latex-default-packages-alist" variable.

However, grffile, as it is included, doesn't have any options (this is
indicated with the empty quote-unquote next to the "grffile").

So, for now, in your LaTeX document, do:

#+LATEX_HEADER: grffilesetup{}

... and insert the options for grffile between "{" and "}". For example:

#+LATEX_HEADER: grffilesetup{filenameencoding = utf8, space}

I'm also not a programmer, but I did notice this odd behavior. :)



[O] keyboard scrolling with inline images

2017-08-30 Thread kevinbanjo
Hi, I have an orgfile with some inlined images.   They aren't really big.
I mean they are only about 1/2 or less the size of my emacs frame, but I
can't seem to scroll past them with the keyboard.  I start with the cursor
on the top of the file and I hit down arrow and it goes down to the image,
seems to get just past it then snaps right back up to the top of it.   If I
cursor right it makes it past it.   I'm using spacemacs if that helps.

My emacs version: GNU Emacs 25.2.2 (x86_64-unknown-linux-gnu, GTK+ Version
3.18.9) of 2017-08-07

my org version:  Org mode version 9.0.7 (9.0.7-elpaplus @
/home/kevin/.emacs.d/elpa/org-plus-contrib-20170515/)

TIA,

-Kevin


Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-30 Thread Eduardo Mercovich

Dear Felipe.

This somehow happens to be problematic to me too [...] However, 
hyperlinks (that is: those between "[[" and "]]") demand percent 
encoding/escaping. But, it seems that the Org-to-LaTeX exporter 
isn't translating the hyperlinks to something LaTeX understands 
(LaTeX expects literal characters, and "%" is the start of a 
comment).


Great finding, this seems like a possible culprit...

Also, as a final note, the default grffile inclusion in the 
Org-to-LaTeX (and to PDF also) doesn't include the necessary 
options to make LaTeX accept spaces and accents in file names. 
That's OK for compatibility reasons, and if you do want to force 
it to accept such special characters, use the grffilesetup LaTeX 
command with the proper grffile options.


I didn't knew about grffile, thanks. 
So, does this means that to support extended ascii chars we need 
to include this package? 

Personally, I like to go the safest route: remove special 
characters from file names whenever I don't need them. I 
generally replace spaces with underscores, and leave letters 
without accent. This also avoids having to deal with the broken 
percent decoding/unescaping when doing Org-to-LaTeX exports.


I also do that usually. I found this case because a special char 
(ñ) escaped me. ;)


However, given the widespread use of extended ascii chars in many 
languages around the world (and the excellent support that emacs 
in particular and the free/libre software movement in general are 
proud to have for them) it would be good to have something as this 
working without glitches. Also, it may be a showstopper for 
newbies since it may take quite a while to find what is happening. 
After all, if there is no problem with my OS, why would it be an 
issue with emacs?


Except programming that I don't know how to do, I would gladly do 
what it takes to help with this. :)


Thanks Nicolas and Felipe for your attention... :D

--
eduardo mercovich

Donde se cruzan tus talentos 
con las necesidades del mundo, 
ahí está tu vocación. 
(Anónimo)




[O] [PATCH] org-babel-execute-buffer "No surrounding element" error

2017-08-30 Thread Wei Tang
I was trying to use org-babel-execute-buffer to update all org-babel
code block results for a org document. It works fine when the code block
is visible, but when it's hidden, I got the "user-error: No surrounding
element" error and nothing was executed.

Adding `(outline-show-all)` fixed this issue for me. Does this look like
a good solution?

-- Wei
From 3b535fa389518b7d7c280952990bc56ddbe01206 Mon Sep 17 00:00:00 2001
From: Wei Tang 
Date: Thu, 31 Aug 2017 02:39:54 +0800
Subject: [PATCH] ob-core.el: Fix "No surrounding element" error

* ob-core.el (org-babel-execute-buffer): Show all outlines before
execution.

Without this, when outlines are hidden,
executing (org-babel-execute-buffer) gives "No surrounding element"
error.

TINYCHANGE
---
 lisp/ob-core.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index d25908d41..a69d4a66b 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1197,6 +1197,7 @@ the current buffer."
   (interactive "P")
   (org-babel-eval-wipe-error-buffer)
   (org-save-outline-visibility t
+(outline-show-all)
 (org-babel-map-executables nil
   (if (memq (org-element-type (org-element-context))
 		'(babel-call inline-babel-call))
-- 
2.14.1



signature.asc
Description: OpenPGP digital signature


Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-30 Thread Adonay Felipe Nogueira
This somehow happens to be problematic to me too, if for some reason the
inclusion of the file isn't made by Org mode itself.

For example, we know that "#+INCLUDE:" keywords at the start of the line
are Org mode specific includes, and you can place the file references in
the first argument with the literal characters (that is: no need to do
percent encoding/escaping).

However, hyperlinks (that is: those between "[[" and "]]") demand
percent encoding/escaping. But, it seems that the Org-to-LaTeX exporter
isn't translating the hyperlinks to something LaTeX understands (LaTeX
expects literal characters, and "%" is the start of a comment).

Also, as a final note, the default grffile inclusion in the Org-to-LaTeX
(and to PDF also) doesn't include the necessary options to make LaTeX
accept spaces and accents in file names. That's OK for compatibility
reasons, and if you do want to force it to accept such special
characters, use the grffilesetup LaTeX command with the proper grffile
options.

Personally, I like to go the safest route: remove special characters
from file names whenever I don't need them. I generally replace spaces
with underscores, and leave letters without accent. This also avoids
having to deal with the broken percent decoding/unescaping when doing
Org-to-LaTeX exports.


Hope this helps! :)

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, use o GNU Ring ou o Tox.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.



Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-30 Thread Eduardo Mercovich

Hello Nicolas.

Repeating the same experiment now results in: 
1. Org inserts the same string

(file:img/ProcesoDeDise%C3%B1oDeInteraccion.pdf)
2. But export is not blocked! :)



Great.


3. The linked file is not present on the exported pdf (may not 
be an

org issue, but about other latex to pdf component)...



Could you show the produced ".tex" counterpart?


Totally. Just in case, I made a specific org file to test this.

The relevant part of the source org says:
--8<---cut here---start->8---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas 
a nisl ut dui placerat mattis sit amet ut justo. Phasellus 
faucibus cursus aliquet. Sed blandit mattis gravida. Maecenas 
tincidunt purus blandit sapien congue, vel molestie lacus tempor. 
Donec ut magna auctor, cursus augue id, hendrerit neque. Donec 
viverra elit venenatis ullamcorper malesuada. Etiam at tellus 
maximus, aliquam neque ut, bibendum justo. Aliquam sem nisl, 
tempus vitae placerat at, bibendum a erat. Donec tincidunt auctor 
volutpat. 


[[file:img/ProcesoDeDise%C3%B1oDeInteraccion.pdf]]

Praesent iaculis nisi interdum justo placerat, eu gravida nibh 
posuere. Fusce scelerisque, nisi ut fermentum aliquet, lorem arcu 
finibus arcu, fringilla consectetur erat purus id magna. Etiam vel 
neque id risus volutpat lacinia. Nam non lorem lectus. Ut neque 
ex, sagittis sit amet porta vitae, commodo nec urna. Integer non 
ipsum at dolor eleifend hendrerit in a mi. Vivamus pellentesque 
interdum consectetur. 
--8<---cut here---end--->8---


The tex file (only the relevant part) says:

--8<---cut here---start->8---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas 
a nisl ut dui placerat mattis sit amet ut justo. Phasellus 
faucibus cursus aliquet. Sed blandit mattis gravida. Maecenas 
tincidunt purus blandit sapien congue, vel molestie lacus tempor. 
Donec ut magna auctor, cursus augue id, hendrerit neque. Donec 
viverra elit venenatis ullamcorper malesuada. Etiam at tellus 
maximus, aliquam neque ut, bibendum justo. Aliquam sem nisl, 
tempus vitae placerat at, bibendum a erat. Donec tincidunt auctor 
volutpat. 


\begin{center}
\includegraphics[width=.9\linewidth]{img/ProcesoDeDise%C3%B1oDeInteraccion.pdf}
\end{center}

Praesent iaculis nisi interdum justo placerat, eu gravida nibh 
posuere. Fusce scelerisque, nisi ut fermentum aliquet, lorem arcu 
finibus arcu, fringilla consectetur erat purus id magna. Etiam vel 
neque id risus volutpat lacinia. Nam non lorem lectus. Ut neque 
ex, sagittis sit amet porta vitae, commodo nec urna. Integer non 
ipsum at dolor eleifend hendrerit in a mi. Vivamus pellentesque 
interdum consectetur.  --8<---cut 
here---end--->8---


The 2nd paragraph, right after the "\end{center}", is centered, 
don't know why.


So, it gets exported to the tex file. But I don't know if that 
"translation" breaks something...


Running "pdflatex TestDeLinkConCaracteresExtendidos.tex" gives 
errors but produces the pdf just as from inside Orgmode.


Now, replacing the specific chars directly in the tex file 
"/ProcesoDeDise%C3%B1oDeInteraccion.pdf" by 
"/ProcesoDeDiseñoDeInteraccion.pdf" (as it is the filename) and 
running again pdflatex gives a not found error (Package pdftex.def 
Error: File `img/ProcesoDeDise�oDeInteraccion.pdf' not found) but 
makes the pdf with a rectangle in place of the pdf diagram. So 
definitively there is something with the filename 
encoding/translation here (sorry if those words are used without 
precision, I'm far outside my domain). 

How is it supposed to be referenced a file with extended chars in 
the filename? Is the issue then with the latex to pdf part, or do 
we have to write such filenames differently?


Thanks a lot for your help and attention to this issue... :)

--
eduardo mercovich

Donde se cruzan tus talentos 
con las necesidades del mundo, 
ahí está tu vocación. 
(Anónimo)




Re: [O] [ANN] Agenda speed up

2017-08-30 Thread Eric S Fraga
On Wednesday, 30 Aug 2017 at 17:00, Nicolas Goaziou wrote:
> I think I spotted the problem. I updated the branch. Could you try
> again?

Done.  Attached is the resulting file from elp; much much better!  I
haven't rerun the default agenda as my agenda files may have changed but
only by 1-3 new entries.

Question as an aside: how do I best get the updates with git?  If I
checkout the branch, it tells me that I am 1 commit ahead and the remote
is 7 commits ahead (for instance).  I find I have to delete the branch
and then reacquire.  I'm not a big git user (mercurial is my VCS of
choice).

> Also, are there missing entries (besides inactive timestamps)? If so,
> would they be related to inlinetasks?

I haven't seen any missing entries since that first time.  I do not tend
to use inlinetasks in my agenda files, only within project specific
files which are not searched by the default agenda views.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c


signature.asc
Description: PGP signature


Re: [O] grab html pages and copy them into a org buffer.

2017-08-30 Thread Uwe Brauer
>>> "Michael" == Michael Strey  writes:

   > Hi Uwe
   > On Di, 2017-08-29 at 16:53, Uwe Brauer wrote:
   >> I know about converters from html to org mode, for example pandoc, but I
   >> remember vaguely that there are possibilities to mark a html text in
   >> browser (firefox?) And copy it as org syntax into a buffer.
   >> 
   >> Does anybody know about this feature or program?

   > org-web-tools from Adam Porter
   > https://lists.gnu.org/archive/html/emacs-orgmode/2017-07/msg00392.html

Thanks precisely what I was looking for.




Re: [O] mimetype for orgmode files

2017-08-30 Thread Bastien Guerry
Hi John,

John Kitchin  writes:

> Let me know the url to that note when you update it so I can use it as a
> primary source for the github registration.

It is now on orgmode.org homepage: http://orgmode.org/index.html

Best,

-- 
 Bastien



Re: [O] LaTeX > PDF blocked by extender chars in filename

2017-08-30 Thread Nicolas Goaziou
Hello,

Eduardo Mercovich  writes:

> Repeating the same experiment now results in: 
>
> 1. Org inserts the same string
> (file:img/ProcesoDeDise%C3%B1oDeInteraccion.pdf)
>
> 2. But export is not blocked! :)

Great.

> 3. The linked file is not present on the exported pdf (may not be an
> org issue, but about other latex to pdf component)...

Could you show the produced ".tex" counterpart?

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] [ANN] Agenda speed up

2017-08-30 Thread Nicolas Goaziou
Eric S Fraga  writes:

> Default and speedup results attached with org from a minute or so
> ago.  Still quite a difference between the two and not in the desired
> direction :-(  Hope these results help!

Thank you.

I think I spotted the problem. I updated the branch. Could you try
again?

Also, are there missing entries (besides inactive timestamps)? If so,
would they be related to inlinetasks?

Regards,



Re: [O] Bug: org-agenda-span value not quoted via customize interface

2017-08-30 Thread Niall Dooley
Hi Sébastien,

That's my point. I'm reporting that if such a custom command is created
through the customise interface with a setting of "Number of days in
agenda: org-agenda-span" and a choice of "day" then the quote (') is not
included.

It appears as (org-agenda-span day) instead of (org-agenda-span 'day).

Niall
Niall


On 30 August 2017 at 14:55, Sébastien Le Maguer
 wrote:
> Hello
>
> I might say something stupid buy isn't it 'day (with a simple quote) ?
>
> Sent from Blue
> On 30 Aug 2017, at 14:45, Niall Dooley  wrote:
>>
>> Hi all,
>>
>> This is my first mail to this list so please tell me if I haven't
>> followed the expected conventions.
>>
>> I created the following org-agenda-custom-command via the customise
>> interface
>>
>>  '(org-agenda-custom-commands
>>(quote
>> (("A" "Priority #A tasks" agenda ""
>>   ((org-agenda-span day)
>>(org-agenda-overriding-header "Today's priority #A tasks: ")
>>(org-agenda-skip-function
>> (quote
>>  (org-agenda-skip-entry-if
>>   (quote notregexp)
>>   "\\=.*\\[#A\\]"
>>
>> I receive the following error:
>>
>> Symbol’s value as variable is void: day
>>
>> The default value of week seems to be quoted. Manually, quoting the
>> value day in the above snippet resolves the error. So it just seems like
>> choosing a value through the available choices in the customise
>> interface does not automatically quote the choice.
>>
>> Regards,
>>
>> Niall
>>
>> Emacs : GNU Emacs 25.2.1 (i686-w64-mingw32) of 2017-04-24
>> Package: Org mode version 9.0.9 (9.0.9-68-g492420-elpaplus @
>> d:/.emacs.d/elpa/org-plus-contrib-20170807/)
>>
>



[O] Change todo state when scheduled or a deadline is set

2017-08-30 Thread Narendra Joshi
Hi,

I would like to change the state of a task to TODO when it is scheduled
or a deadline is set for the task. I couldn't find any hook that is
called after scheduling. How can I do this? 

Best,
-- 
Narendra Joshi



Re: [O] Bug: org-agenda-span value not quoted via customize interface

2017-08-30 Thread Sébastien Le Maguer
Hello

I might say something stupid buy isn't it 'day (with a simple quote) ?

⁣Sent from Blue ​

On 30 Aug 2017, 14:45, at 14:45, Niall Dooley  wrote:
>Hi all,
>
>This is my first mail to this list so please tell me if I haven't
>followed the expected conventions.
>
>I created the following org-agenda-custom-command via the customise
>interface
>
> '(org-agenda-custom-commands
>   (quote
>(("A" "Priority #A tasks" agenda ""
>  ((org-agenda-span day)
>   (org-agenda-overriding-header "Today's priority #A tasks: ")
>   (org-agenda-skip-function
>(quote
> (org-agenda-skip-entry-if
>  (quote notregexp)
>  "\\=.*\\[#A\\]"
>
>I receive the following error:
>
>Symbol’s value as variable is void: day
>
>The default value of week seems to be quoted. Manually, quoting the
>value day in the above snippet resolves the error. So it just seems
>like
>choosing a value through the available choices in the customise
>interface does not automatically quote the choice.
>
>Regards,
>
>Niall
>
>Emacs : GNU Emacs 25.2.1 (i686-w64-mingw32) of 2017-04-24
>Package: Org mode version 9.0.9 (9.0.9-68-g492420-elpaplus @
>d:/.emacs.d/elpa/org-plus-contrib-20170807/)


[O] Bug: org-agenda-span value not quoted via customize interface

2017-08-30 Thread Niall Dooley
Hi all,

This is my first mail to this list so please tell me if I haven't
followed the expected conventions.

I created the following org-agenda-custom-command via the customise
interface

 '(org-agenda-custom-commands
   (quote
(("A" "Priority #A tasks" agenda ""
  ((org-agenda-span day)
   (org-agenda-overriding-header "Today's priority #A tasks: ")
   (org-agenda-skip-function
(quote
 (org-agenda-skip-entry-if
  (quote notregexp)
  "\\=.*\\[#A\\]"

I receive the following error:

Symbol’s value as variable is void: day

The default value of week seems to be quoted. Manually, quoting the
value day in the above snippet resolves the error. So it just seems like
choosing a value through the available choices in the customise
interface does not automatically quote the choice.

Regards,

Niall

Emacs : GNU Emacs 25.2.1 (i686-w64-mingw32) of 2017-04-24
Package: Org mode version 9.0.9 (9.0.9-68-g492420-elpaplus @
d:/.emacs.d/elpa/org-plus-contrib-20170807/)



Re: [O] help with beamer and org: pictures alignment and size

2017-08-30 Thread Eric S Fraga
On Wednesday, 30 Aug 2017 at 12:35, Luca Ferrari wrote:
> Hi all,
> I'm producing my first beamer presentation via org-mode, and so far so
> good. However I would like to have a slide to display a few pictures,
> one per row or even in a grid, so I tried the following:
>
> ** My slide
> #+ATTR_LATEX: width=0.1\textwidth

First of all, it depends on what version of org you are using.  Assuming
you are using a recent version, your syntax here is wrong; it should be:

  #+ATTR_LATEX: :width 0.1\textwidth
  
>- [[./images/debian.png]]
>- [[./images/redhat.png]]

Secondly, the attribute will only apply to the first image (I believe)
so you will need to repeat the attribute setting.  Actually, it may
apply only to the item and not the image.  You many need to do something
like this:

#+begin_src org
  -
,#+ATTR_LATEX: :width 0.1\textwidth :center nil
[[./images/debian.png]]
  - 
,#+ATTR_LATEX: :width 0.1\textwidth :center nil
[[./images/redhat.png]]

#+end_src

If you are using an older version of org, I highly recommend upgrading
especially if you intend to use beamer.

HTH,
eric


-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c


signature.asc
Description: PGP signature


[O] help with beamer and org: pictures alignment and size

2017-08-30 Thread Luca Ferrari
Hi all,
I'm producing my first beamer presentation via org-mode, and so far so
good. However I would like to have a slide to display a few pictures,
one per row or even in a grid, so I tried the following:

** My slide
#+ATTR_LATEX: width=0.1\textwidth
   - [[./images/debian.png]]
   - [[./images/redhat.png]]

The problem is that the images are displayed at the biggest size
available, going over the slide borders.
What am I missing to adapt the images?

Thanks,
Luca



Re: [O] [ANN] Agenda speed up

2017-08-30 Thread Eric S Fraga
Forgot to add: I re-enabled my 14 <%%()> lines for completeness.
-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c


signature.asc
Description: PGP signature


Re: [O] [ANN] Agenda speed up

2017-08-30 Thread Eric S Fraga
On Wednesday, 30 Aug 2017 at 11:00, Nicolas Goaziou wrote:
> or by trying in a fresh Emacs session. I didn't change the cache format
> so far, though.

All tests are with fresh emacs sessions: emacs, instrument package,
agenda, view month, next month, elp results, exit emacs.

Default and speedup results attached with org from a minute or so
ago.  Still quite a difference between the two and not in the desired
direction :-(  Hope these results help!

(back to first computer in case you were keeping track)

Thanks,
eric

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-715-g8b5b2c
org-agenda-list   3   
19.615536284  6.5385120946
org-agenda-redo   2   
18.338604917  9.1693024585
org-let   2   
16.744135962  8.372067981
org-agenda-get-day-entries768 
15.307202554  0.0199312533
org-agenda-get-scheduled  768 
9.8357005239  0.0128069017
org-agenda-later  1   
9.378686659   9.378686659
org-agenda-view-mode-dispatch 1   
9.167906739.16790673
org-agenda-month-view 1   
8.960431599   8.960431599
org-agenda-change-time-span   1   
8.960423986   8.960423986
org-agenda-prepare-buffers5   
5.656869958   1.1313739915
org-agenda-prepare3   
4.184791168   1.3949303893
org-at-planning-p 39168   
3.8068944489  9.719...e-05
org-agenda1   
3.056179293.05617929
org-back-to-heading   86854   
2.3679976289  2.726...e-05
org-agenda--timestamp-to-absolute 56598   
2.3283312469  4.113...e-05
org-indent-initialize-agent   9   
2.0770357720  0.2307817524
org-indent-initialize-buffer  9   
2.076821355   0.2307579283
org-agenda-skip   43642   
2.0651276480  4.731...e-05
org-time-string-to-absolute   56598   
2.0122050389  3.555...e-05
org-agenda-get-blocks 768 
1.9067488329  0.0024827458
org-agenda-get-deadlines  768 
1.8708426799  0.0024359930
org-get-agenda-file-buffer828 
1.8227216149  0.0022013546
org-end-of-subtree5014
1.7007795029  0.0003392061
org-mode  10  
1.650076729   0.1650076729
org-agenda-to-appt2   
1.592130069   0.7960650345
org-set-startup-visibility10  
1.4465168379  0.1446516837
org-get-todo-state38704   
1.4276157679  3.688...e-05
org-parse-time-string 66105   
1.3716788229  2.075...e-05
org-inlinetask-in-task-p  37306   
1.2408245400  3.326...e-05
org-agenda-get-timestamps 768 
1.206963151   0.0015715666
org-cycle-hide-drawers14  
1.111790466   0.0794136047
org-at-item-p 15272   
0.9609090140  6.291...e-05
org-in-commented-heading-p4670
0.9489873300  0.0002032092
org-element-at-point  2565
0.8369609749  0.0003263005
org-element--parse-to 2565
0.7870030489  0.0003068238
org-indent-set-line-properties16922   
0.6453445200  3.813...e-05
org-closest-date  19872   
0.6436876209  3.239...e-05
org-list-in-valid-context-p   2529
0.542946589   0.0002146882
org-in-block-p2529
0.5356518930  0.0002118038
org-indent-add-properties 9   
0.521490343   0.0579433714
org-heading-components4670
0.5198980630  0.0001113272
org-outline-level 12501   
0.4742613580  3.793...e-05
org-element--current-element  4245
0.4740368930  0.0001116694
org-before-first-heading-p

Re: [O] [ANN] Agenda speed up

2017-08-30 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

>> I updated the "wip-agenda-speedup" branch (rebasing needed). It should
>> now call `org-agenda-skip' less often. Could you try again using that?
>
> I am not sure what "rebasing needed" means

It means that "git pull" may not be sufficient, since I overwrite
history on this branch.

> and whether I need to do anything special.

At the very least, you need to make sure the cache is clean, with

  (clrhash org-agenda--data-cache)

or by trying in a fresh Emacs session. I didn't change the cache format
so far, though.

> Default version:
>
> | org-agenda-list   | 3 | 25.169072093 | 8.3896906976 |
> | org-agenda-redo   | 2 | 23.729199963 | 11.864599981 |
> | org-let   | 2 | 21.949337096 | 10.974668548 |
> | org-agenda-get-day-entries|   768 | 20.485554483 | 0.0266738990 |
> | org-agenda-get-scheduled  |   768 | 13.140805835 | 0.0171104242 |
> | org-agenda-later  | 1 | 12.218471156 | 12.218471156 |
> | org-agenda-view-mode-dispatch | 1 | 11.774425814 | 11.774425814 |
> | org-agenda-month-view | 1 | 11.511459292 | 11.511459292 |
> | org-agenda-change-time-span   | 1 | 11.511454414 | 11.511454414 |
> | org-agenda-prepare-buffers| 5 |  6.235086298 | 1.2470172596 |
> | org-at-planning-p | 38286 | 4.9494982779 | 0.0001292769 |
> | org-agenda-prepare| 3 | 4.6090207959 | 1.5363402653 |
> | org-agenda| 1 |  3.444506372 |  3.444506372 |
> | org-agenda-skip   | 42757 | 3.0357010199 | 7.099...e-05 |
> | org-agenda-get-deadlines  |   768 | 2.9264708689 | 0.0038105089 |
> | org-back-to-heading   | 85980 | 2.7460824440 | 3.193...e-05 |
> | org-agenda--timestamp-to-absolute | 57206 | 2.7053754779 | 4.729...e-05 |
> | org-get-todo-state| 37819 | 2.5136005120 | 6.646...e-05 |
> | org-time-string-to-absolute   | 57206 | 2.2163205409 | 3.874...e-05 |
> | org-agenda-get-blocks |   768 | 2.1708883639 | 0.0028266775 |
> | org-inlinetask-in-task-p  | 37309 | 2.0235439769 | 5.423...e-05 |
> | org-get-agenda-file-buffer|   828 | 1.9225380609 | 0.0023219058 |
> | org-agenda-to-appt| 2 |  1.776863076 |  0.888431538 |
>
> New wip-agenda-speedup version:
>
> | org-agenda-list   |  3 | 31.765126901 | 10.588375633 |
> | org-agenda-redo   |  2 | 30.228140779 | 15.114070389 |
> | org-let   |  2 | 27.439146923 | 13.719573461 |
> | org-agenda-day-entries|706 | 25.781168166 | 0.0365172353 |
> | org-agenda-later  |  1 | 15.415702875 | 15.415702875 |
> | org-agenda-view-mode-dispatch |  1 | 15.065425835 | 15.065425835 |
> | org-agenda-month-view |  1 | 14.817610403 | 14.817610403 |
> | org-agenda-change-time-span   |  1 | 14.817599293 | 14.817599293 |
> | org-get-todo-state| 150556 | 12.739302215 | 8.461...e-05 |
> | org-back-to-heading   | 162734 | 11.384205458 | 6.995...e-05 |
> | org-agenda-prepare-buffers|  5 |  6.309316915 | 1.2618633830 |
> | org-agenda|  1 | 4.5347066179 | 4.5347066179 |
> | org-agenda-prepare|  3 |  4.526386149 |  1.508795383 |
> | org-agenda--timestamp-to-absolute |  65195 | 3.6421088350 | 5.586...e-05 |
> | org-agenda-to-appt|  2 |   2.78557571 |  1.392787855 |
> | org-time-string-to-absolute   |  65195 | 2.7304234570 | 4.188...e-05 |
> | org-indent-initialize-agent   | 11 | 2.5848328029 | 0.2349848002 |
> | org-indent-initialize-buffer  | 11 |  2.584644208 | 0.2349676552 |
> | org-get-repeat| 113814 | 2.2632576760 | 1.988...e-05 |
> | org-agenda--all-filtered-data |  3 |  1.997229961 | 0.6657433203 |
> | org-get-agenda-file-buffer|862 | 1.9403902009 | 0.0022510327 |
> | org-end-of-subtree|   4920 | 1.7806221550 | 0.0003619150 |
> | org-mode  | 10 |  1.736419648 | 0.1736419648 |
> | org-agenda--file-data | 60 | 1.5899973689 | 0.0264999561 |

Still no luck. At least, it is obvious where the hanging fruits are.

Unfortunately, I'm not sure where those numbers of `org-get-todo-state'
and `org-back-to-heading' come from. For example, there are as many
`org-get-todo-state' calls from "org-agenda.el" in both "master" and
"wip-agenda-speedup" branches.

Information is missing in your report. For example, I don't know how
many times `org-agenda-skip' was called in the "wip-agenda-speedup"
version.

Could you try again with a fresh "wip-agenda-speedup" branch (I fixed
"<%%...>" timestamps) and post a full ELP report?

Thank you!


Regards,

-- 
Nicolas Goaziou0x80A93738