Re: [O] after-todo-statistics hook for checkboxes

2014-10-18 Thread Nicolas Goaziou
James Harkins jamshar...@qq.com writes:

 So let me update my issue report/feature request:

 -- If there is a hook to do something after updating todo statistics,
 then it would make sense to have a hook for updating checkbox
 statistics as well. That hook should be called with the same arguments
 (n-done n-not-done) so that the user could use one function for both,
 if desired.

 I can do this pretty easily and update the documentation. I don't have
 FSF papers signed, but I'm willing to get that ball rolling as well.

 But before spending any time on that, I want to ask if this is okay.
 I understand the objection against pressing
 org-after-todo-statistics-hook into service for checkboxes. If there's
 an objection against simply *having* a hook for checkboxes, I'm afraid
 I don't understand that.

I have no objection to this.

Note that this hook can be tricky to use because checkboxes are local to
the list. So adding a global effect to it (e.g., switching TODO state)
will sometimes fail. In the following example

  * Headline
  - [X] list1:item 1
  - [ ] list1:item 2

  Paragraph

  - [ ] list2:item 1
  - [ ] list2:item 2

checking list1:item 2 will trigger the hook with (2 2) as arguments,
which may be surprising. I suggest to add a word of warning in the
documentation.

Thanks for working on it.


Regards,

-- 
Nicolas Goaziou



Re: [O] etc/ORG-NEWS not updated for one year

2014-10-18 Thread Bastien
Glenn Morris r...@gnu.org writes:

 etc/ORG-NEWS in emacs-24 has not been updated for ~ one year.

 If you are going to update it, please do so before thie Friday.

There was nothing to update finally, we're good to go.

-- 
 Bastien



Re: [O] stuck project definition bug?

2014-10-18 Thread Nicolas Goaziou
Hello,

Alex Scherbanov a...@egotv.ru writes:

 I’ve written a simple definition of a stuck project:
   (setq org-stuck-projects '(PROJECT (NEXT) nil nil))

 This means that everything with a tag :PROJECT: without NEXT subtask is a 
 stuck project.

 I’d like this stuck project to be shown in the stuck project list:

 * TODO my stuck project :PROJECT:
 ** TODO subtask

 But it is not shown there.

I cannot reproduce it on latest Org, i.e., both tasks appear in the
stuck projects list.


Regards,

-- 
Nicolas Goaziou



Re: [O] Getting org-mobile-sync to work.

2014-10-18 Thread Paul Rankin
Sharon Kimble boudic...@skimble.plus.com writes:

 I'm trying to get mobileorg set up and working

You may not have seen this:
http://mph.puddingbowl.org/2010/02/org-mode-in-your-pocket-is-a-gnu-shaped-devil/

-- 
Paul W. Rankin
http://www.paulwrankin.com




Re: [O] How to change a link?

2014-10-18 Thread Thorsten Jolitz
Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 On 2014-10-17, at 00:19, Thorsten Jolitz wrote:

 However, here is a org-dp solution, use 't' instead of 'prepend to
 replace the links, and whatever you want instead of file+emacs as
 replacement. Of course one could easily re-search and replace [[file:
 in this simple case, but this uses the parser and allows doing more
 complex stuff in a clean way too:

 ,
 | #+BEGIN_SRC emacs-lisp :results none
 |   (require 'org-dp)
 |   (org-dp-map
 |'(org-dp-rewire
 |  'paragraph 
 |  (lambda (cont elem)
 |(let* ((link (car cont))
 |   (raw-val (org-element-property :raw-link link))
 |   (new-val (mapconcat 'identity
 |   (cons file+emacs
 | (cdr
 |  (split-string
 |   raw-val : t)))
 |   :)))
 |  (org-element-put-property link :raw-link new-val)))
 |  'prepend)
 |org-link-re-with-space t)
 | #+END_SRC
 `

Hi Marcin,

 one thing I don't quite understand yet: why is the first argument to
 org-dp-rewire `'paragraph'?  My intuition says it should rather be
 'link, though this doesn't seem to work.  How come that you say
 'paragraph, but the lambda in the second parameter gets the link data in
 `cont'?  (This might be a stupid question, but I really want to grok
 this.)

I was surprised too! But links are objects, and with point at a link
org-element-at-point return a paragraph with the link as content. So
to get the contents of a link, you take the contents of the contents
of a paragraph, but that a special case, because mostly you will work
directly with elements.

The 'paragraph' is the target element type. In this case I could have
written 
 
,
| '(org-dp-rewire nil ...)
`

instead, since then parsed and rewired element types are the same. See
examples below of how to convert a link into a src-block or a keyword
(e.g.).

For more in depth info, have a look at:

,[ C-h f org-dp-rewire RET ]
| org-dp-rewire is a Lisp function in `org-dp.el'.
| 
| (org-dp-rewire ELEM-TYPE optional CONTENTS REPLACE AFFILIATED ELEMENT
| rest ARGS)
| 
| Rewire element-at-point or ELEMENT (if given). [...]
`

Example:

When you start with the file link below and eval the
following src-blocks in order, you get:

#+BEGIN_SRC picolisp
  (println Link label: min.org)
  (println Link type: file)
#+END_SRC

#+LABEL: min.org

[[file:junk/org/minimal.org][min.org]]

#+BEGIN_SRC emacs-lisp :results none
  (require 'org-dp)
  (org-dp-map
   '(org-dp-rewire 'src-block  nil 'prepend nil nil
   :language picolisp
   :value (lambda (_old_ elem)
(format
 (concat
  (println \Link label: %s\)\n
  (println \Link type: %s\))
 (org-dp-contents
  (car (org-dp-contents elem nil t))
  t t)
 (org-element-property
  :type (car
 (org-dp-contents elem nil t))
   org-link-re-with-space t)
#+END_SRC

#+BEGIN_SRC emacs-lisp :results none
  (require 'org-dp)
  (org-dp-map
   '(org-dp-rewire 'keyword nil 'prepend nil nil
   :key LABEL
   :value (lambda (_old_ elem)
(org-dp-contents
 (car (org-dp-contents elem nil t))
 t t)))
   org-link-re-with-space t)
#+END_SRC

This should give you a better idea of what the org-dp-rewire function
arguments stand for. In generel, org-dp functions have extensive
docstrings, so C-h f 'org-dp-xyz' is you friend.

For org-dp, the (few) properties that are interpreted are most
relevant, not so much the (many) properties that are parsed. See
variable `org-dp-elem-props' for an overview. In general, when
programming with org-dp, I often look into org-element.el, especially
at the interpreters. 

 Second question: do I get it correctly that `org-element-put-property'
 returns the new version of the element (link, in this case), with
 everything as it was but the :raw-link property changed?

,[ C-h f org-element-put-property RET ]
| org-element-put-property is a compiled Lisp function in
| `org-element.el'. [...]
| Return modified element.
`

Yes!

-- 
cheers,
Thorsten




Re: [O] How to change a link?

2014-10-18 Thread Thorsten Jolitz
Nick Dokos ndo...@gmail.com writes:

 Marcin Borkowski mb...@wmi.amu.edu.pl writes:

 On 2014-10-17, at 00:19, Thorsten Jolitz wrote:

 OK, so what is the canonical way of doing this?  I don't want to use
 org-dp, since it is another dependency.

 It is a problem to add dependencies to libraries the user must install
 himself, and at the same time its a pity that there is so much
 duplication instead of reuse ...

 Very true.  I'm torn inside;).

 However, here is a org-dp solution, use 't' instead of 'prepend to
 replace the links, and whatever you want instead of file+emacs as
 replacement. Of course one could easily re-search and replace [[file:
 in this simple case, but this uses the parser and allows doing more
 complex stuff in a clean way too:

 I'll study it, thanks!


 Why not move org-dp into contrib? It's still a dependency but it's
 easier to satisfy if it's in contrib. Or, if it's deemed useful enough,
 even moved into core (perhaps after some cleanup)?

I should really make it a MELPA package, and org-dp.el seems ready,
while org-dp-lib.el still contains some experimental stuff.  But its
still v0.9, I would really prefer if some people (besides me) actually
(clone the github repo and) use it before I make it v1.0 and a package,
to avoid unpleasant surprises.

-- 
cheers,
Thorsten




[O] \input causes conflict with LaTeX equation preview

2014-10-18 Thread Ken Mankoff
I have

#+LATEX_HEADER: \input{preamble}

in an Org file. When I try to preview equations, it does not work
because \input{preamble} is exported to the equation preview preamble,
but no file preamble.tex is exported. The preamble.tex file is not
needed just to preview an equation.

Can anyone suggest a work-around?

Thanks,

  -k.


Re: [O] stuck project definition bug?

2014-10-18 Thread Alex Scherbanov

  (setq org-stuck-projects '(PROJECT (NEXT) nil nil))
 This means that everything with a tag :PROJECT: without NEXT subtask is a 
 stuck project.
 
 * TODO my stuck project :PROJECT:
 ** TODO subtask
 
 But it is not shown there.
 
 I cannot reproduce it on latest Org, i.e., both tasks appear in the
 stuck projects list.


Hi, Nicolas.
I’sorry, I forgot to mention I’m on the maint branch.
I ran emacs -q and executed only lines that are needed for reproducing this 
problem.
And this definition of stuck projects worked indeed.

I’m trying to find what could break it for me.
Any ideas? Thanks.

   Alex Scherbanov




[O] Small bug? Strange behaviour of

2014-10-18 Thread Igor Sosa Mayor
Hi,

I have the following template for capture 

--8---cut here---start-8---
(tp TODO privado entry (file+headline ~/Documents/org/privat.org 
General)
 * TODO %?\n SCHEDULED: %t )
--8---cut here---end---8---

It works perfectly, except from a small strange behaviour. If I try to
change the included date for schedule using C-c C-s, the cursor in the
appearing calendar is always situated on the day BEFORE today, instead
of on the present date. 

It is maybe a small bug? Or is this intended so (and in this case,
why?)? 

Many thanks in advance!

-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::




[O] Exzessive newlines in org-element item interpreter?

2014-10-18 Thread Thorsten Jolitz

Hi List, 

evaluating this
 
#+BEGIN_SRC emacs-lisp
(org-element-interpret-data
 '(item (:bullet 1 :tag hello :checkbox trans :counter 2)
 (section nil world)))
#+END_SRC

#+results:
: 1. [@2] hello :: 
:world

the content is always placed on a newline, which looks strange in my
eyes. Is that intended?

PS
and checkbox is ignored, no matter if I give 'on, 'off and 'trans as
symbols or strings.

-- 
cheers,
Thorsten




[O] Scheduler propose dates?

2014-10-18 Thread Chris Drane
My work flow for org mode requires that I schedule when I will due a task
when I capture it. Many of my tasks don't actually have deadlines, but if I
don't give them a date I end up not following through. Therefore the date I
pick is somewhat arbitrary. Instead, I try to smooth my tasks out across
the week to make sure that I don't have too many on any particular day.

I was thinking that it might be nice if Org could propose a date when I
capture a task by looking at how many tasks I have scheduled over the
course of the next few days. Has anyone ever tried to do this before?

Thanks,

Chris


Re: [O] Text above first headline is being exported, despite :export: tag being used.

2014-10-18 Thread Brady Trainor
Charles Berry ccbe...@ucsd.edu writes:

 Brady Trainor algebrat at uw.edu writes:

 But I have trees tagged for export, while text above first headline is
 being exported. Can anyone confirm? 

 It works for me. Can you provide an ECM[1]?


I have in a file simply:

--8---cut here---start-8---
Text above first headline. 

* first headline for export  :export:
--8---cut here---end---8---

I start Emacs with =emacs -q=, and apply =M-x package-initialize=. 

With =M-x version RET= and =M-x org-version RET=, I find

,
| GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of
| 2014-03-07 on lamiak, modified by Debian
| 
| Org-mode version 8.2.10 (8.2.10-elpa @
| /home/iam/.emacs.d/elpa/org-20141013/)
`

With =C-c C-e l l=, the associated .tex file includes

,
| \begin{document}
| 
| \maketitle
| \tableofcontents
| 
| Text above first headline. 
| 
| \section{first headline for export}
| \label{sec-1}
| % Emacs 24.3.1 (Org mode 8.2.10)
| \end{document}
`

or for completeness, the entire contents are

--8---cut here---start-8---
% Created 2014-10-18 Sat 15:11
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\author{iam}
\date{\today}
\title{ecm}
\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs 24.3.1 (Org mode 8.2.10)}}
\begin{document}

\maketitle
\tableofcontents

Text above first headline. 

\section{first headline for export}
\label{sec-1}
% Emacs 24.3.1 (Org mode 8.2.10)
\end{document}
--8---cut here---end---8---


--
Brady




[O] Append a second agenda view then refresh; this kills first agenda view.

2014-10-18 Thread Brady Trainor

If I append (A) a second agenda-view to a first, then refresh for
clocking (g), the first agenda-view vanishes and I am left with the
second. 

Is there any way to keep both agenda-views upon refresh? For now I will
simply adjust my custom-commands, but my reaction was that this should
be natural. But then maybe a pain to code. 

--
Brady




Re: [O] Text above first headline is being exported, despite :export: tag being used.

2014-10-18 Thread Charles C. Berry

On Sat, 18 Oct 2014, Brady Trainor wrote:


Charles Berry ccbe...@ucsd.edu writes:


Brady Trainor algebrat at uw.edu writes:


But I have trees tagged for export, while text above first headline is
being exported. Can anyone confirm?


It works for me. Can you provide an ECM[1]?



I have in a file simply:

--8---cut here---start-8---
Text above first headline.

* first headline for export  :export:
--8---cut here---end---8---

I start Emacs with =emacs -q=, and apply =M-x package-initialize=.

With =M-x version RET= and =M-x org-version RET=, I find

,
| GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of
| 2014-03-07 on lamiak, modified by Debian
|
| Org-mode version 8.2.10 (8.2.10-elpa @
| /home/iam/.emacs.d/elpa/org-20141013/)
`

With =C-c C-e l l=, the associated .tex file includes

,
| \begin{document}
|
| \maketitle
| \tableofcontents
|
| Text above first headline.
|
| \section{first headline for export}
| \label{sec-1}
| % Emacs 24.3.1 (Org mode 8.2.10)
| \end{document}
`

or for completeness, the entire contents are



[snip]

I confirm that the ECM *fails* in maint.

But it *succeeds* in master.

HTH,

Chuck




[O] New key binding C-Tab -- how to not use it

2014-10-18 Thread Justin Gordon
I just updated emacs org-mode and when visiting org files, this binding
takes effect:

C-TAB (org-force-cycle-archived)
Cycle a tree even if it is tagged with ARCHIVE.

What's the best way to disable this binding?

I use C-Tab for moving between windows.

Thanks.