Re: [O] Beamer environment properties highlighting and shortcut

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 05:40:55PM -0500, John Hendy wrote:
 
 It states that =C-c C-b= will prompt for beamer specific headlines;
 this does not appear to work with the new ox-beamer export engine. I
 see the command is =org-beamer-select-environment=. Did this get
 mapped to something else now?

This requires you to enable the `org-beamer-mode'.

 [...]

 I noted that B_col creates some sort of special fontification (see
 attached screenshot), but does not create columns. =beamer_col= *does*
 work, but is not syntax highlighted as special in any way.

Probably a left over from the old days.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] 8.3 hangs

2015-08-07 Thread Samuel Wales
thanks, suvayu, how do i use this org element minor mode?

i get hangs quite frequently, for example when sorting in the outline buffer.



Re: [O] Beamer environment properties highlighting and shortcut

2015-08-07 Thread John Hendy
On Fri, Aug 7, 2015 at 6:56 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote:
 On Fri, Aug 07, 2015 at 05:40:55PM -0500, John Hendy wrote:

 It states that =C-c C-b= will prompt for beamer specific headlines;
 this does not appear to work with the new ox-beamer export engine. I
 see the command is =org-beamer-select-environment=. Did this get
 mapped to something else now?

 This requires you to enable the `org-beamer-mode'.

Dangit. I have :

#+startup: beamer

But I just started writing the presentation and never did C-c C-c on
my file header options. Doing so adds the =Bm= text to my mode n
Emacs. Thanks for that.


  [...]

 I noted that B_col creates some sort of special fontification (see
 attached screenshot), but does not create columns. =beamer_col= *does*
 work, but is not syntax highlighted as special in any way.

 Probably a left over from the old days.


Got it.


John

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] fontenc makes pdf non-searchable

2015-08-07 Thread Martin Leduc
Hi Bastien,  thanks a lot for your response but I finally solved the issue by 
installing the package cm-super.
Cheers,
Martin

 From: b...@gnu.org
 To: mart...@hotmail.com
 CC: emacs-orgmode@gnu.org
 Subject: Re: fontenc makes pdf non-searchable
 Date: Wed, 5 Aug 2015 02:00:52 +0200
 
 Hi Martin,
 
 Martin Leduc mart...@hotmail.com writes:
 
  However, when opening the experted pdf (with evince or okular) and
  searching for a word, the output from the search function is a list
  of words with apparently incorrect character encoding.
 
  I get the same result when compiling directly the exported tex file.
  However, if I remove the line:
 
  \usepackage[T1]{fontenc}
 
  the compiled pdf becomes correctly interpreted by the search
  function. According to the documentation of the org-article latex
  class, There is no facility to disable loading fontenc.
 
  What should I do to make the pdf searchable with the org exporter ?
 
 I would try to remove the relevant entry from
 `org-latex-default-packages-alist'.  Did you try this?
 
 -- 
  Bastien
  

[O] wrong type argument listp... org-element-set-contents

2015-08-07 Thread Peter Salazar
I'm getting a strange error whenever I try to export an org file,
and I'm not sure how to track down the cause. It seemed to start when I
upgraded to org 8.3.1, but it's hard to tell because this is the first
time I've exported anything in a week or so.

The error says:
(wrong-type-argument listp #(Test document 0 13 (:parent (#1
  org-element-set-contents(#(Test document 0 13 (:parent (#0

I was able to figure out that the error only occurs when I have an org file
with document data, e.g. a line like:

#+TITLE: Test document

When I remove that line as well as #+AUTHOR etc, then it exports fine. With
that line it, it won't export to HTML, LaTeX, or text.

Any suggestions on how to figure out what part of my configuration is
causing the problem? Here's the complete Backtrace:
https://gist.github.com/fe45c4d42d52f0ce0e42

Thanks!


Re: [O] [OFF TOPIC] almost giving up on emacs email..looking for advice?

2015-08-07 Thread Peter Salazar
I also just installed notmuch, in addition to mu4e, and so far I quite like
notmuch. The interface so far is a little more intuitive (with mu4e, for
instance, I kept getting tripped up hitting r to reply to a message and
finding that it's bound to something else).

I did get offlineimap working, but I decided to switch to mbsync, which is
also working quite well. Let me know if you need pointers on setting it up.

On the topic of Emacs email, does anyone know how to set
message-citation-line-function so that replying doesn't quote/cite the
original message at all?


On Thu, Aug 6, 2015 at 7:51 PM, Ramon Diaz-Uriarte rdia...@gmail.com
wrote:

 You have received several great answers already, but my 2 cents here.

 I've used mu4e with offlineimap[1] for about three years now, and I am
 reasonably happy with it. I particularly like the search capabilities
 (which I now often complement with helm-mu). Setting it up was not
 particularly hard (and how to configure for gmail was just a matter of
 following the documentation), and I do not recall experiencing any of the
 issues you mention (I had a few others, but they have disappeared over
 versions).


 Before that, I used wanderlust with offlineimap, and I also liked it a lot
 (I think I got this to work from emacs-fu, the blog of mu4e's
 author). Initial configuration wasn't really harder than mu4e (I think I
 quickly found how to configure gmail by googling around). In fact, if you
 are used to the gmail way of doing things, wanderlust might be more
 familiar; for example, placing the same email in several folders, or
 however you want to call them, or being shown the folder structure with
 options to collapse/expand easily. Now, I actually prefer mu4e's approach
 most of the time and don't care much about the folder structure (I search
 and find; no need to try to recall where I filed a message).


 Actually, to me, overall, wanderlust just seemed easier to use[2], and many
 of the defaults made a lot more sense to me (i.e., with wanderlust I had to
 google around less to find how to do what I wanted and I added less code to
 my .emacs). That said, I haven't made any serious change to my mu4e
 configuration in over two years, I think, so it is well amortized.

 I switched to mu4e because I was using wanderlust but searching for/within
 emails with mu so I figured I might just do the full switch; as well,
 development and activity around mu4e seemed, well, much more active.



 In terms of checking email with gmail from other devices (tablet, phone): I
 very rarely do so, but when I've needed to I've never had an issue while
 using wanderlust + offlineimap or mu4e + offlineimap. Things work the way I
 expect (changes in gmail if checked from my tablet show up in my computer
 and viceversa). Of course, checking email from multiple computers has no
 problems whatsoever.


 Finally, even if setting email with emacs was not a half hour thing, I am
 really glad I did so [3].


 Best,


 R.



 [1] Offlineimap is slow, and has other issues. I searched for alternatives
 two or three years ago, and did not find anything convincing (e.g., see
 this resignated summary http://blog.ezyang.com/2012/08/offlineimap-sucks/
 from a few years ago). After Titus' answer, I might give mbsync a try,
 since now encrypted passwords are supported, etc.



 [2] This is, of course, just my experience (or my incompetence). For
 example, with mu4e I had to search around to find how to get a reasonable
 way to add the date of the original message to the reply or forward but it
 worked just fine for me with wanderlust. I still struggle with address
 completion and blacklist in mu4e whereas address completion in wanderlust
 with BBDB always did exactly what I wanted. Or when I started using mu4e I
 missed a lot from wanderlust the C-c C-j that allows you to choose account
 to send from. In all fairness this is also available for mu4e
 (http://www.djcbsoftware.nl/code/mu/mu4e/Multiple-accounts.html) but
 requires you to add some extra code.


 [3] Why? I find the web interface of gmail slow to navigate, cumbersome,
 and bloated. I also used kmail which was, well, OK, but it was not the
 editor/environment I use for everything else (for a while, I used kmail but
 used emacsclient for email writing) and searching was not what it is with
 mu4e or helm-mu.



 On Thu, 06-08-2015, at 14:43, Xebar Saram zelt...@gmail.com wrote:
  Hi list
 
  I know this is a bit off topic but im desperately looking for some advice
  regarding email through emacs.
 
  i have tried a bunch of them over the last month (gnus, mu4e, wanderlust,
  rmail,mew and maybe other i forget).
  I had various levels of success with each one to setup (it was never
 easy)
  but i ended up sorta settling on mu4e. the problem is that mu4e never
  managed to work properly for me (headers were not updating when new mail
  arrived, reply was broken etc) so i had to give up
 
  What i want is basically pretty simple. an easy to setup 

Re: [O] Change in ox export for #+DATE keywords

2015-08-07 Thread Peter Salazar
As I mentioned, I'm getting that same error, not just with #+DATE but also
with #+TITLE, #+AUTHOR, etc. Any one of these is sufficient to break export
for me.

On Fri, Aug 7, 2015 at 3:59 PM, Alex Bennée alex.ben...@linaro.org wrote:

 Hi,

 I've been using org-mode as a source for my presentations but exporting
 broke today following an ELPA update. It seems the line:

 #+DATE: KVM Forum 2015

 Is no longer acceptable. I think this changed as of:

 ae9db17482a183e5613428c3abf1c691f86b4ac0

 I'm not quite sure what the new parse is expecting. If I change it to
 a datestamp I see breakage on other lines like the title:

 apply: Wrong type argument: listp, #(My presentation title 0 26 (:parent
 (#0)))

 So what form am I meant to be using for these options and why the change?

 --
 Alex Bennée




Re: [O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Xebar Saram
Hi Ista

i did do a byte compiling but that didnt help. i got this message when i
did byte compile

Compiling no file at Sat Aug  8 07:06:30 2015
Leaving directory `/home/zeltak/.emacs.d/elpa/ace-isearch-20150807.1803'
Compiling file /home/zeltak/.emacs.d/elpa/org-20150805/ob-R.el at Sat Aug
 8 07:06:55 2015
Entering directory `/home/zeltak/.emacs.d/elpa/org-20150805/'
ob-R.el:72:11:Warning: reference to free variable
`org-babel-safe-header-args'

In end of data:
ob-R.el:470:1:Warning: the following functions are not known to be defined:
org-babel-header-args-safe-fn, org-babel-graphical-output-file

best

Z


On Fri, Aug 7, 2015 at 10:01 PM, Ista Zahn istaz...@gmail.com wrote:

 We discussed this already in another thread[0]. The upshot was run
 M-x byte-compile-file on ob-R.el.

 Best,
 Ista
 [0] https://www.mail-archive.com/emacs-orgmode@gnu.org/msg98762.html

 On Fri, Aug 7, 2015 at 12:47 PM, Xebar Saram zelt...@gmail.com wrote:
 
  Thx for the response Bastien
 
  i removed (require 'org-install) from my init.el file (correct?) and
  restarted emacs but get the same error
 
  Invalid function: org-babel-header-args-safe-fn
 
  i also tried now to downgrade to previous version from 3/8/15 and the
 error
  is gone so its 100% reproducible with the 5/8/15 elpa version
 
  thx again
 
  Z
 
 
 
  On Fri, Aug 7, 2015 at 6:33 PM, Bastien b...@gnu.org wrote:
 
  Hi Xebar,
 
  try removing (require 'org-install), it is not needed since long.
 
  --
   Bastien
 
 



[O] templating with Org?

2015-08-07 Thread Eric Abrahamsen
Exporting org files and subtrees is awfully flexible, given all the
possible customizations, but for a long while I've occasionally felt the
need to come at the export process from the other direction: instead
of customizing the export appearance of a series of headings, instead
starting with a common block of export text, and interpolating values
from the headings into that text -- ie, templating.

I've felt this need off and on for a couple of years, most recently when
organizing a small literary festival. I really need to keep all the
information about the events in a single place, otherwise I know that
information will go stale right away. But I need the information in a
series of such wildly-varying formats that I can't imagine setting up
(and switching between) export filters in a way that wouldn't make me
cry. Not to mention that the different export use-cases all have their
own per-heading boilerplate text, and there's no way I'm going to repeat
all that different boilerplate under each heading.

Obviously there's many ways this could be done. I could somehow hijack
the export process -- in many cases it would be nice too make use of the
skeleton document structures that export provides.

Or maybe dynamic blocks? I've never used them before. Or maybe just a
plain old `org-map-entries', which reads the template text from an
external file and then steals some of the macro expansion functions to
fill out the values.

Has anyone wanted to do this before? Has anyone actually done it? Any
thoughts or suggestions would be much appreciated!

Yours,
Eric




Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Eric S Fraga
On Friday,  7 Aug 2015 at 06:24, Suvayu Ali wrote:

[...]

 This is very nice, thank you!  I think this will do it for me.  I have a
 small question, is there a better way to add a % after the first image
 in the above case other than adding a snippet?

   #+begin_figure
   #+attr_latex: :width 0.45\linewidth
   [[file:myfig2.pdf]]@@l:%@@
   [[file:myfig3.pdf]]
   #+end_figure

If you want the % simply to have LaTeX ignore the line end, you could
put the figures on the same line, such as

#+begin_figure
#+attr_latex: :width 0.45\linewidth
[[file:myfig2.pdf]][[file:myfig3.pdf]]
#+end_figure

(untested)
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7



Re: [O] show number of sub headers in top level header (alternative to statistics cookie?)

2015-08-07 Thread John Kitchin
nothing automatic that I know of.

Xebar Saram writes:

 Hi

 I was wondering if there was an option in org to show number of sub headers
 in top level header. i know there is statistics cookies but that's not
 automatic?

 best

 Z

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



Re: [O] eval source blocks in a subtree when opening file

2015-08-07 Thread Tamas Papp
On Tue, Aug 04 2015, Charles C. Berry ccbe...@ucsd.edu wrote:

 On Tue, 4 Aug 2015, Tamas Papp wrote:

 I would like to do the following: whenever I open the file in Emacs, I would 
 like to eval all the source blocks under the heading Setup.

 I have found org-babel-execute-subtree, but I cannot figure out how to call 
 it on the subtree Setup from a local eval.

 Name the first block in the subtree start setup (say).

 Then

 # Local Variables:
 # eval: (org-babel-goto-named-src-block start setup)
 # eval: (org-babel-execute-subtree)
 # End:

Thanks! I found that I can also assign an ID to the section, and then
use

# eval: (progn (org-id-goto ...some-id...) (org-babel-execute-subtree))

It looks like I need the progn for it to work reliably (don't know why).

I am wondering if it would be possible to break a line in Local
Variables, but

# eval: (progn (org-id-goto ...some-id...) \
#  (org-babel-execute-subtree))

didn't work.

Best,

Tamas



[O] ox-latex doesn't export with `\newminted`.

2015-08-07 Thread Zack Piper
Apparently ox-latex doesn't add `\newminted` to languages that I wish
to use.

This is required to use:

\begin{common-lispcode}
(format t test)
\end{common-lispcode}

That being the `${LANG}code` environment, which Org-mode uses for my
entire document.

https://github.com/gpoore/minted/issues/83

The author responded with:

╭
│ Environments ${LANG}code are not created by default. You can create
│ whichever ones you need using the \newminted command. In this case,
│ \newminted{python}{}. Note the trailing, empty {}. If you wanted to
│ specify default options for the new environment, that's where you
│ would put them. Also, if you didn't want to call the new environment
│ pythoncode, you could give \newminted an optional argument. More
│ details are in the docs.
│ 
│ If Org-mode is exporting LaTeX using the ${LANG}code form, then it
│ should really be creating the corresponding environments automatically
│ by default. But I would think it would really be simpler for it to
│ export standard minted environments. I haven't used it, so I can't
│ make any suggestions about configuration.
╰

Thanks!

-- 
Zack Piper z...@apertron.net http://apertron.net



Re: [O] ox-latex doesn't export with `\newminted`.

2015-08-07 Thread Rasmus
Zack Piper z...@apertron.net writes:

 Apparently ox-latex doesn't add `\newminted` to languages that I wish
 to use.

 This is required to use:

 \begin{common-lispcode}
 (format t test)
 \end{common-lispcode}

 That being the `${LANG}code` environment, which Org-mode uses for my
 entire document.

What is the org code you use to produce this?

From a clean Emacs, I get

 #+BEGIN_SRC emacs-lisp
 x
 #+END_SRC

Translated to

 \begin{minted}[]{common-lisp}
 x
 \end{minted}

When (setq org-latex-listings 'minted).

Rasmus

-- 
It was you, Jezebel, it was you




Re: [O] ox-latex doesn't export with `\newminted`.

2015-08-07 Thread Nicolas Goaziou
Hello,

Zack Piper z...@apertron.net writes:

 Apparently ox-latex doesn't add `\newminted` to languages that I wish
 to use.

 This is required to use:

 \begin{common-lispcode}
 (format t test)
 \end{common-lispcode}

 That being the `${LANG}code` environment, which Org-mode uses for my
 entire document.

This is not very clear to me. Org doesn't generate LANGcode by default,
unless you configured `org-latex-custom-lang-environments'.

What Org document are you using? What LaTeX code do you want to generate
from it?


Regards,

-- 
Nicolas Goaziou



Re: [O] ox-latex doesn't export with `\newminted`.

2015-08-07 Thread Zack Piper
On Fri, Aug 07, 2015 at 03:22:32PM +0200, Rasmus wrote:
 Zack Piper z...@apertron.net writes:
 
  Apparently ox-latex doesn't add `\newminted` to languages that I wish
  to use.
 
  This is required to use:
 
  \begin{common-lispcode}
  (format t test)
  \end{common-lispcode}
 
  That being the `${LANG}code` environment, which Org-mode uses for my
  entire document.
 
 What is the org code you use to produce this?
 
 From a clean Emacs, I get
 
  #+BEGIN_SRC emacs-lisp
  x
  #+END_SRC
 

Same as that.

 Translated to
 
  \begin{minted}[]{common-lisp}
  x
  \end{minted}
 
 When (setq org-latex-listings 'minted).
 

I solved the problem I was using the wrong setting
(org-latex-custom-lang-environments) when i should be using
(org-latex-minted-langs).

Thanks! Sorry for the noise.

-- 
Zack Piper z...@apertron.net http://apertron.net



Re: [O] hook on link creation

2015-08-07 Thread John Kitchin
you could do something like this:
http://kitchingroup.cheme.cmu.edu/blog/2015/07/09/Acronym-minor-mode-for-Emacs/
or this

http://kitchingroup.cheme.cmu.edu/blog/2015/06/22/Clickable-org-contacts-in-text-files/

with tooltips. It isn't clear to me why you would want it to appear when
you type it. You could as well run a M-x command and enter it. It seems
more clear to me you would want emacs to recognize it later and give you
easy access to the information related to it.

see also my org-ref package, where we do this for citations:
http://kitchingroup.cheme.cmu.edu/blog/2015/03/16/Update-on-org-ref-it-is-now-all-emacs-lisp/


Maybe some of these videos would give you some other ideas:
https://www.youtube.com/watch?v=sjxS9m8QCoo functional chemical formulas
in emacs

https://www.youtube.com/watch?v=Ogavyl_QXiU clickable text

https://www.youtube.com/watch?v=8cEb6F9AEu0  (org-ref + helm)

https://www.youtube.com/watch?v=Zya8SfmCtFA (older version of org-ref)



Stephen J. Barr writes:

 Hi John,

 First, thanks for org-ref. I really appreciate it.

 My idea was that I could define a link type like person:john_doe and have a
 separate program listening on dbus and when it receives person:john_doe
 to display relevant information on my second screen.


 I suppose I could create a link and immediately use it, and it seems clear
 that I could define a function on link usage.




 Stephen J. Barr
 PhD Student, Operations Management
 Dept: Information Systems and Operations Management (ISOM)
 Michael G. Foster School of Business
 University of Washington
 Phone:  425 516 5012
 Email: stev...@uw.edu
 Twitter: @stevejb
 Website: http://steve.planetbarr.com


 On Thu, Aug 6, 2015 at 6:05 PM, John Kitchin jkitc...@andrew.cmu.edu
 wrote:

 What is the dbus thing supposed to do? Would it be ok if it happened more
 than once? Why is it important it happen on creation of the link? Any
 consequence of a typo? What should happen when you edit a link?

 I am not aware of a link creation hook. They are recognized through font
 lock by a regular expression.


 On Thursday, August 6, 2015, Stephen J. Barr stev...@uw.edu wrote:

 Greetings,

 I have been thinking about a project I would like to do to add some
 custom semantic markup to an org-mode. I think that links may be the best
 way to do this. Looking at this page:

 http://orgmode.org/manual/Adding-hyperlink-types.html

 I am wondering if there is a way to have a hook that gets called on link
 creation. E.g., if I type stevejb:my_word. I would like to immediately have
 stevejb:my_word sent on dbus or something like that.

 Is there existing infrastructure for this? Is this the right approach?

 Thanks,
 Stephen


 Stephen J. Barr
 PhD Student, Operations Management
 Dept: Information Systems and Operations Management (ISOM)
 Michael G. Foster School of Business
 University of Washington
 Phone:  425 516 5012
 Email: stev...@uw.edu
 Twitter: @stevejb
 Website: http://steve.planetbarr.com



 --
 John

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




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



Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-07 Thread Kaushal
@Fabrice Thanks for sharing your examples!

@Suvayu I tried removing #+DATE: line.. but with that I don't see the date
stamp in html exports. The advantage of {{{time(FORMAT)}}} is that I can
also control the formatting of the date-time stamp.


--
Kaushal Modi

On Fri, Aug 7, 2015 at 4:53 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

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

  A second patch is attached.

 Thank you.

  From cb30697627afacc8950ef85b839f47d48371f39b Mon Sep 17 00:00:00 2001
  From: tsdye t...@tsdye.com
  Date: Thu, 6 Aug 2015 12:08:34 -1000
  Subject: [PATCH 2/2] More date and time macro edits

 I think the commit message is confusing (more?). Also, I cannot apply
 the patch on maint branch. Could you rebase it on top of that branch?

 Regards,

 --
 Nicolas Goaziou




[O] Beamer environment properties highlighting and shortcut

2015-08-07 Thread John Hendy
Hello,


I'm making the first beamer presentation in a while in which I've used
columns, and had to refresh myself on the syntax. I originally
referred to the original (legacy) beamer docs here simply due to it
being the first hit on my google search:
- http://orgmode.org/worg/exporters/beamer/tutorial.html

It states that =C-c C-b= will prompt for beamer specific headlines;
this does not appear to work with the new ox-beamer export engine. I
see the command is =org-beamer-select-environment=. Did this get
mapped to something else now?

That alerted me to the fact that the doc was outdated, and I referred
to the new export engine page on Worg here:
- http://orgmode.org/worg/exporters/beamer/ox-beamer.html

The section on special environment states:

#+begin_quote
Environments can be put in a column by setting the BEAMER_col property
on a headline. It accepts decimal point numbers which is interpreted
as a fraction of the text width. If the beadline does not have an
enviroment the headline text is ignored and all the contents are put
inside the column environment.
#+end_quote

I noted that B_col creates some sort of special fontification (see
attached screenshot), but does not create columns. =beamer_col= *does*
work, but is not syntax highlighted as special in any way.

Is this intended, or just a by-product of older code lying around? I
don't really need the boxes around the syntax, but it was a little
confusing as I thought Oh, I guessed a property correctly! But I
hadn't...


Thanks!
John


Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-07 Thread Nicolas Goaziou
Hello,

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

 A second patch is attached.

Thank you.

 From cb30697627afacc8950ef85b839f47d48371f39b Mon Sep 17 00:00:00 2001
 From: tsdye t...@tsdye.com
 Date: Thu, 6 Aug 2015 12:08:34 -1000
 Subject: [PATCH 2/2] More date and time macro edits

I think the commit message is confusing (more?). Also, I cannot apply
the patch on maint branch. Could you rebase it on top of that branch?

Regards,

-- 
Nicolas Goaziou



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

2015-08-07 Thread Nicolas Goaziou
Samuel Wales samolog...@gmail.com writes:

 thank you for fixing.

 canonical is always what i want, except for occur-tree.

 i did profiler-start then went to org file a few times to average out
 the results.  did i use the correct profiler?

You did.

  command-execute   60148  99%
  - call-interactively   60148  99%
   - org-agenda-switch-to59299  98%
- org-show-context   59299  98%
 - org-show-set-visibility   59299  98%
  - show-children59170  97%
   - outline-end-of-subtree  35938  59%
  outline-next-heading9399  15%
  org-outline-level   4047   6%
   - outline-map-region  23168  38%
+ #compiled 0xfc19ab9558  15%
  outline-next-heading7399  12%
  + org-up-heading-safe117   0%
  + org-show-entry   4   0%
  + org-flag-heading 4   0%

`show-children' is the culprit.

Could you evaluate the following function and time it again?

  (defun show-children (optional level)
(save-excursion
  (org-back-to-heading t)
  (let* ((current-level (funcall outline-level))
 (level (if level (+ (prefix-numeric-value level) current-level)
  (save-excursion
(outline-next-heading)
(if (eobp) current-level (funcall outline-level))
(org-map-region
 (lambda ()
   (when (= (funcall outline-level) level)
 (outline-flag-region (if (bobp) (point) (1- (point)))
  (line-end-position)
  nil)))
 (point)
 (org-end-of-subtree t t)

Thank you.


Regards,



[O] show number of sub headers in top level header (alternative to statistics cookie?)

2015-08-07 Thread Xebar Saram
Hi

I was wondering if there was an option in org to show number of sub headers
in top level header. i know there is statistics cookies but that's not
automatic?

best

Z


Re: [O] comment trees in 8.3

2015-08-07 Thread Nicolas Goaziou
Samuel Wales samolog...@gmail.com writes:

 should (get-text-property (point-at-bol) :org-comment) be nil on a
 commented headline?

Yes, once `org-agenda-prepare-buffers' has been called.

Regards,



Re: [O] Org-mode 8.3.1 bugs report

2015-08-07 Thread Michael Strey
On Do, 2015-08-06, Lei Zhe wrote:

[...]

 2. When I call org-drill, some entries can not be shown. Only blank
 buffer shows up.

I'm having the same problem here since about 4 weeks.  It seems to occur
randomly without relation to the entries.

Pressing e for “edit”, moving point some lines up or down and M-x
org-drill-resume is my poor workaround to proceed the drill session.

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




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

2015-08-07 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 OK.  I added it to plain-text as well.  What is an example of a plain-text
 that would need beautification?

 To tell the truth, I don't know why we need beautification in the first
 place. Bastien introduced it, so he may be able to answer.

To this extend; me neither.  But Vladimir uses it to leave IRIs as IRIs
(I don't know what this means).

 Should we apply it to snippets as well?  In the spirit of beautification
 it would make sense, but it could also seem like a bad choice.

 I think it makes sense to apply it to snippets, indeed, but see above.

My initial reaction was to kill it as well.  But I might feel like this a
bit to often (I feel the same way about headline keywords like COMMENT).

Rasmus

-- 
9000!



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

2015-08-07 Thread Nicolas Goaziou
 OK.  I added it to plain-text as well.  What is an example of a plain-text
 that would need beautification?

To tell the truth, I don't know why we need beautification in the first
place. Bastien introduced it, so he may be able to answer.

 Should we apply it to snippets as well?  In the spirit of beautification
 it would make sense, but it could also seem like a bad choice.

I think it makes sense to apply it to snippets, indeed, but see above.

Regards,



[O] C-c * is undefined

2015-08-07 Thread Sebastien Vauban
Hello,

I've noticed (for a couple of weeks) that I now get C-c * is undefined
when trying to recalculate an Org table [1].

Has it somehow been removed?

Current configuration:
- GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL
- Org-mode version 8.3.1 (release_8.3.1-14-gac29de)

Best regards,
  Seb

[1] http://orgmode.org/manual/Updating-the-table.html

-- 
Sebastien Vauban




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

2015-08-07 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Rasmus ras...@gmx.us writes:

 Vladimir Alexiev vladimir.alex...@ontotext.com writes:

 I've set org-html-use-unicode-chars since I want ox-html to leave IRIs as 
 IRIs.
 But this has another undesired effect: it breaks URL references in code,
 since it doesn't escape the brackets.

 I think this should only apply to entities.  Any reason to do it on the
 whole output?  Nicolas?

 It was introduced in e8742b78e0a982a7fca0bf25b4f3551be58660ef. I'm not
 sure about the intent of this variable but I tend to think it is about
 beautification of the output. As a consequence, it isn't meant to apply
 to Org entities specifically.

 However, as you noticed, it is not subtle enough to apply
 `mm-url-decode-entities' on the full output. It needs to be applied
 piece-wise wherever that makes sense. `org-html-entity' is one case.
 Maybe `org-html-plain-text' for another one.

OK.  I added it to plain-text as well.  What is an example of a plain-text
that would need beautification?

Should we apply it to snippets as well?  In the spirit of beautification
it would make sense, but it could also seem like a bad choice.

Rasmus

-- 
Slowly unravels in a ball of yarn and the devil collects it




Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Rasmus
Suvayu Ali fatkasuvayu+li...@gmail.com writes:

 On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote:
 On Friday,  7 Aug 2015 at 06:24, Suvayu Ali wrote:
 

 [...]
 
  This is very nice, thank you!  I think this will do it for me.  I have a
  small question, is there a better way to add a % after the first image
  in the above case other than adding a snippet?
 
#+begin_figure
#+attr_latex: :width 0.45\linewidth
[[file:myfig2.pdf]]@@l:%@@
[[file:myfig3.pdf]]
#+end_figure
 
 If you want the % simply to have LaTeX ignore the line end, you could
 put the figures on the same line, such as
 
 #+begin_figure
 #+attr_latex: :width 0.45\linewidth
 [[file:myfig2.pdf]][[file:myfig3.pdf]]
 #+end_figure

 Cool, that works :).  Thanks a lot Eric.

I guess there would also be no loss from actually inserting a % after
\includegraphics[·]{·} in ox-latex.

-- 
The second rule of Fight Club is: You do not talk about Fight Club




Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-07 Thread Kaushal
Aha.. I am using a custom postamble for html:

(setq org-html-postamble t) ; default value = 'auto
(setq org-html-postamble-format
  `((en
 ,(concat Exported using 
  ;; %c is replaced with
`org-html-creator-string'
  ;; Emacs VERSION (Org mode VERSION)
  div style=\display: inline\
class=\creator\
  %c/div 
  by %e. — 
  div style=\display: inline\
class=\date\
  %d/div

So it looks like %d returns an empty string if #+DATE: is omitted
altogether; but if org-html-postamble is 'auto, today's date is entered if
#+DATE: is omitted.



--
Kaushal Modi

On Fri, Aug 7, 2015 at 10:20 AM, Suvayu Ali fatkasuvayu+li...@gmail.com
wrote:

 On Fri, Aug 07, 2015 at 10:01:42AM -0400, Kaushal wrote:
  @Fabrice Thanks for sharing your examples!
 
  @Suvayu I tried removing #+DATE: line.. but with that I don't see the
 date
  stamp in html exports. The advantage of {{{time(FORMAT)}}} is that I can
  also control the formatting of the date-time stamp.

 I just tested it, I get the following at the end of the exported html
 document:

 div id=postamble class=status
 p class=authorAuthor: Suvayu Ali/p
 p class=dateCreated: 2015-08-07 Fri 16:14/p
 p class=validationa href=http://validator.w3.org/check?uri=referer
 Validate/a/p

 I don't know any html, were you expecting something else?  About the
 format, take a look at org-time-stamp-custom-formats and
 org-time-stamp-formats; eventhough they are for timestamps in the
 document, maybe they honour the document creation timestamp.

 --
 Suvayu

 Open source is the future. It sets us free.




Re: [O] Showing Property in headline; generating table from properties; exporting table to CSV

2015-08-07 Thread Pip Cet
I hesitate to share this code (it's not very pretty right now), but I
have been working on two ideas that I think combine to solve problems
like this in a nicer (and lazier) fashion than the current approach:
headline properties and reverse inheritance.

Headline properties are simply about setting properties in the
headline: no properties drawer, potentially nicer syntax (I'm
currently using :property=value: to emphasize that properties behave
like tags, but I'm thinking of moving to [property: value] (I'm
worried about collisions with other org syntax, but since this would
be effective only at the end of a headline, I think the only collision
is with footnotes, and the solution to that is don't have a property
called FN)), and easier transition from tags to properties and back.
The problem, of course, is what happens when you try to set more than
one short property in a headline.

This is where the second idea comes in: reverse inheritance. *if* all
of a headline's children agree on what a property's value should be,
it's as though the property were specified in the master headline. In
particular, if there's only one child headline that sets a property,
it automatically migrates up a level:

* John Smith
** :email=johnsm...@example.com:

would migrate up the email property to apply to the top-level
headline, so columns view would look something like this:

ITEM | EMAIL |
* John Smith | johnsm...@example.com | 

(this example doesn't quite work yet in practice, with my current code).

If there are two conflicting values for a property, the property is
not set. This is so

* Students
** John Smith
*** email :email=johnsm...@example.com:
** Jane Miller
*** email :email=janemil...@example.org:

doesn't set an email property for the Students line (if there's just
one student, with just one email address, there's probably no harm in
having that property set for the Students line. Also, in that case,
you have an attendance problem.)

In combination, the syntax I currently have in mind would allow you to
set properties one at a time in sub-headlines of your data item:

* Chemicals
** water
*** [smiles: O]
According to Wikipedia.
*** [molarmass: 18.01528]
Also according to Wikipedia.
*** [safety: GRAS]
I think.

(Notice how that gives you a well-defined place to put comments and
footnotes, which I imagine is useful if you need to have citable
references for your properties. I think you can currently place such
comments in the PROPERTIES drawer, but then they probably won't be
exported.)

What if the master headline already sets the property? There are two
cases here: in case it's set to an ordinary value, the child headlines
are ignored. But if it's set to a special value signifying that a
compactor function is to be used, that function is called to produce
the property value for the headline based on the child nodes. In the
simplest case, that means the property is set to something like
mean(^) (again, that syntax is likely to change to something
prettier), and the result of

* calculate this for me :v=mean(^):
** 3 :v=3:
** 4 :v=4:
** 6 :v=6:

is as though you'd written

* calculate this for me :v=4.:
and so on

(It's possible to do something very much like this with the columns
property; I'm not claiming it's a new feature.)

Ordinary inheritance, reverse inheritance, and compaction can be combined:

#+COLUMNS: %ITEM %8GRADE %TAGS
* Document
** defaults
*** default to compacting with the arithmetic mean function :grade=mean(^):
*** student grades
 1999
* John Smith
** test paper 1 :grade=3:
** test paper 2 :grade=4:

will work, and with column mode produce the output attached as
students2.org.html. Note that 3.5 is John Smith's grade, the average
of all students' grades in 1999, and the average grade averaged over
all years. I've attached a more complete example as
students.org/students.org.html that demonstrates how the mean is
calculated.

I think people can imagine what the columns view would be with some of
the sub-headline levels hidden, but I'd like to point out both that it
does give you a really nice list of students with their grades and
that there's a potential problem with missing tests: there's no
default to a grade of 0 for them, so you have to be careful when
entering them to distinguish between a 0-graded missed test and a test
that's simply ignored for the average grade.

Currently the code for calculating the reverse inheritance is working,
but really slow (it doesn't cache calculations at all, so it's
probably something like O(n^3)); I don't have special code for
displaying the results yet, but columns mode followed by
org-htmlize-buffer produced the attached HTML files. At this point,
this is just to demonstrate the ideas; while I think the two ideas in
combination apply well to the student-grade problem set, I've actually
implemented them for use in a literate programming major mode.

I'd appreciate any comments (but I know the code isn't particularly
clean, fast, 

Re: [O] kill contents of a headline, but retain properties

2015-08-07 Thread Matt Price
On Fri, Aug 7, 2015 at 9:01 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Matt Price mopto...@gmail.com writes:

  I have a headline like this:
 
  * Gradebook
  :PROPERTIES:
  :CUSTOM_ID: gradebook
  :END:
 
  some content etc etc etc.
 
  I would like to be able to replace the contents of that headline
  automatically, but retain the properties.

   (org-link-search [[#gradebook]])

   (delete-region (org-end-of-meta-data)
  (progn (outline-next-heading) (point)))


Thanks for the wizardry, Nicolas.  Very helpful.

 You can also create contents with a dynamic block, which will replace
 contents at each update.

 can you just provide a skeletal example so I understand better wha that
means?  thanks so much!


 Regards,

 --
 Nicolas Goaziou



Re: [O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Bastien Guerry
Xebar Saram zelt...@gmail.com writes:

 just updated org today and now i get this error on startup:

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

 is this related to the new release?

Can you reproduce the problem with a minimal configuration and share
this minimal configuration?

-- 
 Bastien



Re: [O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Bastien
Hi Xebar,

try removing (require 'org-install), it is not needed since long.

-- 
 Bastien



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote:
 On Friday,  7 Aug 2015 at 06:24, Suvayu Ali wrote:
 
 [...]
 
  This is very nice, thank you!  I think this will do it for me.  I have a
  small question, is there a better way to add a % after the first image
  in the above case other than adding a snippet?
 
#+begin_figure
#+attr_latex: :width 0.45\linewidth
[[file:myfig2.pdf]]@@l:%@@
[[file:myfig3.pdf]]
#+end_figure
 
 If you want the % simply to have LaTeX ignore the line end, you could
 put the figures on the same line, such as
 
 #+begin_figure
 #+attr_latex: :width 0.45\linewidth
 [[file:myfig2.pdf]][[file:myfig3.pdf]]
 #+end_figure

Cool, that works :).  Thanks a lot Eric.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Xebar Saram
Hi Bastien

As requested here is a config just with only the base the orgmode section
(~ 10% of full config)
note- the original file is a org mode file which is converted to a .el file:
https://paste.xinu.at/Gr3KF/

i also use a simple init file  (my config is in orgmode format)

https://paste.xinu.at/mv5h29/

Please let me know if this is what you had in mind. would be glad to help
and debug this

best

z

On Fri, Aug 7, 2015 at 5:16 PM, Bastien Guerry b...@gnu.org wrote:

 Xebar Saram zelt...@gmail.com writes:

  just updated org today and now i get this error on startup:
 
  Invalid function: org-babel-header-args-safe-fn
 
  is this related to the new release?

 Can you reproduce the problem with a minimal configuration and share
 this minimal configuration?

 --
  Bastien



Re: [O] [PATCH] Re: What is the best way to set #+DATE to today's date?

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 10:01:42AM -0400, Kaushal wrote:
 @Fabrice Thanks for sharing your examples!
 
 @Suvayu I tried removing #+DATE: line.. but with that I don't see the date
 stamp in html exports. The advantage of {{{time(FORMAT)}}} is that I can
 also control the formatting of the date-time stamp.

I just tested it, I get the following at the end of the exported html
document:

div id=postamble class=status
p class=authorAuthor: Suvayu Ali/p
p class=dateCreated: 2015-08-07 Fri 16:14/p
p class=validationa 
href=http://validator.w3.org/check?uri=referer;Validate/a/p

I don't know any html, were you expecting something else?  About the
format, take a look at org-time-stamp-custom-formats and
org-time-stamp-formats; eventhough they are for timestamps in the
document, maybe they honour the document creation timestamp.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] kill contents of a headline, but retain properties

2015-08-07 Thread Rasmus
Matt Price mopto...@gmail.com writes:

 can you just provide a skeletal example so I understand better wha that
 means?  thanks so much!

There's an example in the manual.  Here's another example:

In org:

#+begin: thanks :pretext We have received valuable comments from
#+end:

The function:

(defun org-dblock-write:thanks (params)
  Reads THANKS file in same folder and format.
PARAMS can hold :filename, :keyword, and :prefix
  (when (file-exists-p (or (plist-get params :filename) THANKS))
(insert (or (plist-get params :keyword) #+thanks: )
(plist-get params :prefix)  
(replace-regexp-in-string
 .*?\\(,\\)[^,]*\\' , and
 (mapconcat
  'identity
  (remove-if
   (lambda (str) (string-match-p ^\\s-*$ str))
   (split-string
(with-temp-buffer (save-excursion
(insert-file-contents THANKS))
  (flush-lines  ^\\s-*$ (point-min) 
(point-max))
  (buffer-string)) \\s-*\n+\\s-*))
  , )
 nil nil 1)
.)))


You might want to add (org-dblock-update t) to some export hook.

Rasmus

-- 
This space is left intentionally blank




Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Eric S Fraga
On Friday,  7 Aug 2015 at 16:23, Rasmus wrote:

[...]

 I guess there would also be no loss from actually inserting a % after
 \includegraphics[·]{·} in ox-latex.

Except that then the suggestion I just made would not work and would in
fact be quite confusing as the second figure would be lost in the
export?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-1315-ga3b2b7



Re: [O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Xebar Saram
Thx for the response Bastien

i removed (require 'org-install) from my init.el file (correct?) and
restarted emacs but get the same error

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

i also tried now to downgrade to previous version from 3/8/15 and the error
is gone so its 100% reproducible with the 5/8/15 elpa version

thx again

Z



On Fri, Aug 7, 2015 at 6:33 PM, Bastien b...@gnu.org wrote:

 Hi Xebar,

 try removing (require 'org-install), it is not needed since long.

 --
  Bastien



Re: [O] eval source blocks in a subtree when opening file

2015-08-07 Thread Cook, Malcolm
  On Tue, 4 Aug 2015, Tamas Papp wrote:
  
   I would like to do the following: whenever I open the file in Emacs,
   I would like to eval all the source blocks under the heading Setup.
  
   I have found org-babel-execute-subtree, but I cannot figure out how
   to call it on the subtree Setup from a local eval.
  
   Name the first block in the subtree start setup (say).
  
   Then
  
   # Local Variables:
   # eval: (org-babel-goto-named-src-block start setup) # eval:
   (org-babel-execute-subtree) # End:
  
  Thanks! I found that I can also assign an ID to the section, and then use
  
  # eval: (progn (org-id-goto ...some-id...) (org-babel-execute-subtree))
  
  It looks like I need the progn for it to work reliably (don't know why).
  
  I am wondering if it would be possible to break a line in Local Variables, 
  but
  
  # eval: (progn (org-id-goto ...some-id...) \
  #  (org-babel-execute-subtree))
  
  didn't work.
  
[Cook, Malcolm] 

Ditch the line continuation character.  This works in my hands with emacs 
24.4.1 to set foo to bar:

# Local Variables:
# eval: (setq foo
#   bar)
# End:



  Best,
  
  Tamas




Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 05:19:18PM +0100, Eric S Fraga wrote:
 On Friday,  7 Aug 2015 at 16:23, Rasmus wrote:
 
 [...]
 
  I guess there would also be no loss from actually inserting a % after
  \includegraphics[·]{·} in ox-latex.
 
 Except that then the suggestion I just made would not work and would in
 fact be quite confusing as the second figure would be lost in the
 export?

True, I guess the question is which is more natural.

  file:foo.pdf
  file:bar.pdf

or,

  [[file:foo.pdf]] [[file:bar.pdf]]

One thing I can think of, the second option can be confusing in the Org
buffer when you do not want the space in between.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] Exporting multiple images in a float (LaTeX)

2015-08-07 Thread Suvayu Ali
On Fri, Aug 07, 2015 at 04:23:48PM +0200, Rasmus wrote:
 Suvayu Ali fatkasuvayu+li...@gmail.com writes:
  On Fri, Aug 07, 2015 at 02:28:58PM +0100, Eric S Fraga wrote:
  On Friday,  7 Aug 2015 at 06:24, Suvayu Ali wrote:
  
   This is very nice, thank you!  I think this will do it for me.  I have a
   small question, is there a better way to add a % after the first image
   in the above case other than adding a snippet?
  
 #+begin_figure
 #+attr_latex: :width 0.45\linewidth
 [[file:myfig2.pdf]]@@l:%@@
 [[file:myfig3.pdf]]
 #+end_figure
  
  If you want the % simply to have LaTeX ignore the line end, you could
  put the figures on the same line, such as
  
  #+begin_figure
  #+attr_latex: :width 0.45\linewidth
  [[file:myfig2.pdf]][[file:myfig3.pdf]]
  #+end_figure
 
  Cool, that works :).  Thanks a lot Eric.
 
 I guess there would also be no loss from actually inserting a % after
 \includegraphics[·]{·} in ox-latex.

I would agree with that :).

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Ista Zahn
We discussed this already in another thread[0]. The upshot was run
M-x byte-compile-file on ob-R.el.

Best,
Ista
[0] https://www.mail-archive.com/emacs-orgmode@gnu.org/msg98762.html

On Fri, Aug 7, 2015 at 12:47 PM, Xebar Saram zelt...@gmail.com wrote:

 Thx for the response Bastien

 i removed (require 'org-install) from my init.el file (correct?) and
 restarted emacs but get the same error

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

 i also tried now to downgrade to previous version from 3/8/15 and the error
 is gone so its 100% reproducible with the 5/8/15 elpa version

 thx again

 Z



 On Fri, Aug 7, 2015 at 6:33 PM, Bastien b...@gnu.org wrote:

 Hi Xebar,

 try removing (require 'org-install), it is not needed since long.

 --
  Bastien





Re: [O] comment trees in 8.3

2015-08-07 Thread Samuel Wales
On 8/7/15, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Samuel Wales samolog...@gmail.com writes:
 should (get-text-property (point-at-bol) :org-comment) be nil on a
 commented headline?

 Yes, once `org-agenda-prepare-buffers' has been called.

ok, then i don't understand the code.  (i thought that was how it
determined whether it was a commented headline to skip.)  (it's nil
but commented headers show.)



Re: [O] comment trees in 8.3

2015-08-07 Thread Samuel Wales
On 8/7/15, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Samuel Wales samolog...@gmail.com writes:
 should (get-text-property (point-at-bol) :org-comment) be nil on a
 commented headline?

 Yes, once `org-agenda-prepare-buffers' has been called.

then i didn't understand the code.  (i thought that was how it
determined whether it was a commented headline to skip.)  (it's nil
but commented headers show.)



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

2015-08-07 Thread Samuel Wales
thank you.

i compiled it and tried it.  it seems improved, to maybe 2.5s.

- command-execute   17977  99%
 - call-interactively   17977  99%
  - org-agenda-switch-to16144  88%
   - org-show-context   16142  88%
- org-show-set-visibility   16142  88%
 - show-children16042  88%
  - org-map-region  15617  86%
   - #compiled 0x1220ff9   6905  38%
  org-outline-level  1780   9%
- outline-flag-region  12   0%
   remove-overlays  4   0%
 outline-next-heading4381  24%
org-end-of-subtree401   2%
   org-up-heading-safe 72   0%
 - org-show-entry  16   0%
  + byte-code  16   0%
 + org-flag-heading 4   0%
 org-mark-ring-push 2   0%
  - #compiled 0xc259e3 1189   6%
   - org-agenda  1189   6%
- byte-code  1189   6%
 - org-let   1189   6%
  - eval 1189   6%
   - let 1189   6%
- org-agenda-list1189   6%
 - byte-code 1185   6%
  - org-agenda-prepare625   3%
   - org-agenda-prepare-buffers   618   3%
- byte-code   618   3%
 + org-refresh-category-properties262   1%
 + org-refresh-stats-properties   184   1%
 + org-set-regexps-and-options 40   0%
 + org-refresh-effort-properties   36   0%
   org-refresh-properties  32   0%
  + byte-code 440   2%
  + org-agenda-finalize-entries   104   0%
  + org-agenda-finalize 8   0%
  - org-agenda-next-line  287   1%
   - org-agenda-do-context-action 273   1%
- org-display-outline-path273   1%
 + org-get-outline-path   241   1%
 + org-unlogged-message24   0%
 + org-format-outline-path  8   0%
   + call-interactively13   0%
  + ido-hacks-execute-extended-command189   1%


On 8/7/15, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Samuel Wales samolog...@gmail.com writes:

 thank you for fixing.

 canonical is always what i want, except for occur-tree.

 i did profiler-start then went to org file a few times to average out
 the results.  did i use the correct profiler?

 You did.

  command-execute   60148  99%
  - call-interactively   60148
 99%
   - org-agenda-switch-to59299
 98%
- org-show-context   59299
 98%
 - org-show-set-visibility   59299
 98%
  - show-children59170
 97%
   - outline-end-of-subtree  35938
 59%
  outline-next-heading9399
 15%
  org-outline-level   4047
 6%
   - outline-map-region  23168
 38%
+ #compiled 0xfc19ab9558
 15%
  outline-next-heading7399
 12%
  + org-up-heading-safe117
 0%
  + org-show-entry   4
 0%
  + org-flag-heading 4
 0%

 `show-children' is the culprit.

 Could you evaluate the following function and time it again?

   

[O] Change in ox export for #+DATE keywords

2015-08-07 Thread Alex Bennée
Hi,

I've been using org-mode as a source for my presentations but exporting
broke today following an ELPA update. It seems the line:

#+DATE: KVM Forum 2015

Is no longer acceptable. I think this changed as of:

ae9db17482a183e5613428c3abf1c691f86b4ac0

I'm not quite sure what the new parse is expecting. If I change it to
a datestamp I see breakage on other lines like the title:

apply: Wrong type argument: listp, #(My presentation title 0 26 (:parent 
(#0)))

So what form am I meant to be using for these options and why the change?

-- 
Alex Bennée



Re: [O] C-c * is undefined

2015-08-07 Thread Nicolas Goaziou


Hello,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 I've noticed (for a couple of weeks) that I now get C-c * is undefined
 when trying to recalculate an Org table [1].

 Has it somehow been removed?

I don't think so, and I cannot reproduce it with a quick test. Do you
have an ECM?

Regards,

-- 
Nicolas Goaziou




[O] kill contents of a headline, but retain properties

2015-08-07 Thread Matt Price
Hi,

I have a headline like this:

* Gradebook
:PROPERTIES:
:CUSTOM_ID: gradebook
:END:

some content etc etc etc.

I would like to be able to replace the contents of that headline
automatically, but retain the properties.  Howeve,r if for some reason the
properites drawer is there I don't want to accidentally search to the NEXT
headline and replace ITS content! -- so I don't want to just
re-search-forward :END:.  I tried this:

(org-open-link-from-string [[#gradebook]])
(kill-region (org-element-property :contents-begin (org-element-at-point))
(org-element-property :contents-end (org-element-at-point)))

But contents-begin of course starts at the beginning of the property
drawer.  I thought org-element-contents might help me but it doesn't.

Any suggestions? Thank you!
matt


Re: [O] C-c * is undefined

2015-08-07 Thread Sebastien Vauban
Hello Nicolas,

 Sebastien Vauban writes:

 I've noticed (for a couple of weeks) that I now get C-c * is undefined
 when trying to recalculate an Org table [1].

 Has it somehow been removed?

 I don't think so, and I cannot reproduce it with a quick test. Do you
 have an ECM?

Blush... There was a `local-unset-key' of it (because of that same
binding used with Multiple Cursors) in some local package I use here.

Sorry for the noise.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] latest org from Elpa error: Invalid function: org-babel-header-args-safe-fn

2015-08-07 Thread Xebar Saram
Hi

just updated org today and now i get this error on startup:


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

is this related to the new release?

best

Z


Re: [O] kill contents of a headline, but retain properties

2015-08-07 Thread Nicolas Goaziou
Hello,

Matt Price mopto...@gmail.com writes:

 I have a headline like this:

 * Gradebook
 :PROPERTIES:
 :CUSTOM_ID: gradebook
 :END:

 some content etc etc etc.

 I would like to be able to replace the contents of that headline
 automatically, but retain the properties.

  (org-link-search [[#gradebook]])

  (delete-region (org-end-of-meta-data) 
 (progn (outline-next-heading) (point)))

You can also create contents with a dynamic block, which will replace
contents at each update.

Regards,

-- 
Nicolas Goaziou