[O] bug#32068: 26.1; problem with org-agenda and categories

2018-07-05 Thread Eli Zaretskii
> From: rrandr...@gmail.com
> Date: Fri, 06 Jul 2018 00:46:14 +
> 
> 
> When evaluating the snippet below:
> --8<---cut here---start->8---
> (eval-after-load "org"
>   '(progn
>  overwrite some settings
>  (setq org-startup-folded nil ;unfolded
>org-agenda-show-all-dates t
>org-confirm-elisp-link-function nil ;; 4 the scratch call
>org-agenda-include-diary t
>org-agenda-include-all-todo t
>)
>  (when (file-directory-p "~/docs/org/deft/")
>(setq org-agenda-files (directory-files "~/docs/org/deft/" t 
> ".*agendatest\.org$"))
>)
>  (define-key org-mode-map (kbd "M-a") nil)
>  ))
> 
> (require 'org)
> 
> (funcall 'org-agenda-list)
> --8<---cut here---end--->8---
> 
> I am getting (which is not fine):

Did you report this to the Org developers?  If so, and if they said
this is a core Emacs bug, could you please point us to the relevant
discussions with Org developers?

Thanks.





Re: [O] Bug: duplicated output in inline code block exports

2018-07-05 Thread Berry, Charles



> On Jul 5, 2018, at 10:46 AM, William Denton  wrote:
> 
> Here's a very simple R command in an inline code block:
> 
> # -
> What is 1 + 1?  src_R{1+1} {{{results(=2=)}}}
> # -
> 
> Exporting this to PDF we get:
> 
> # -
> What is 1 + 1? 2 2

Or exporting to to latex 

What is 1 + 1?  \texttt{2} \texttt{2}

The results macro gets initialized by `org-macro-initialize-templates' which is 
run run before babel, the macro returns `=2=', and babel does not remove this 
when it adds the result again.

A work-around is to put this null macro:

# 
#+macro: results
# 

in your buffer to strip out the existing inline results.

I do not get why this wasn't detected before - the pre-babel call to 
{{{results( )}}} has been in the code since last year.

Also, shouldn't the docstring  for `org-macro-initialize-templates' mention 
that "n", "author", "email", "keyword", "results", and "title" get set?

Chuck






[O] Bug: duplicated output in inline code block exports

2018-07-05 Thread William Denton

Here's a very simple R command in an inline code block:

# -
What is 1 + 1?  src_R{1+1} {{{results(=2=)}}}
# -

Exporting this to PDF we get:

# -
What is 1 + 1? 2 2
# -

For some reason the "2" is duplicated.

Same thing with Ruby.  I had a look at recent commits (I recompiled from current 
source) but couldn't see where this might have started.


Bill
--
William Denton :: Toronto, Canada   ---   Listening to Art: 
https://listeningtoart.org/
https://www.miskatonic.org/ ---   GHG.EARTH: http://ghg.earth/
Caveat lector.  ---   STAPLR: http://staplr.org/



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Eric S Fraga
On Thursday,  5 Jul 2018 at 14:07, alain.coch...@unistra.fr wrote:
> Eric S Fraga writes on Thu  5 Jul 2018 11:46:
>
>  > Well, it's a deterministic set of steps so you could record a macro
>  > to do the selection and kill?  Then all you have to do is move and
>  > yank?
>
> Would still be long...

You save the keyboard macro as a key binding and it would be no longer
than what you were asking for?  Maybe one key stroke longer.

>  > What was not clear in your OP was what happens to the first
>  > subheading?  Should it be promoted or does it suddenly become a
>  > child of another main heading?
>
> In my mind, everything except the headline and its associated text
> would stay unchanged, though your questions make me realize that a
> reasonable option would be that the whole subtree be promoted (but
> probably not just the 1st subheading).

But, as others have noted, this is a change of (semantic) structure and
not well defined which is arguably why there's no automatic way of doing
what you want.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Neil Jerram
alain.coch...@unistra.fr writes:

> Neil Jerram writes on Thu  5 Jul 2018 11:46:
>
>  > > What I would like to do is to be able to move a headline with
>  > > everything up to (but not including) its first subheading.
>  > >
>  > > Does anyone know how to do that?  
>  > >
>  > > I am also interested in knowing if there are specific (deep?)
>  > > reasons why this seemingly basic operation, which I see as the
>  > > analogous of org-do-promote/demote and perform very often with
>  > > standard (but tedious) emacs editing commands, is not already
>  > > implemented.
>
>  > My view/guess: because the subheadings are an integral part of the
>  > content of the containing item.
>  > 
>  > Wouldn't you agree?  It seems to me like a fairly fundamental
>  > aspect of the Org model.
>
> Yes, but couldn't you raise the same argument about
> org-promote/demote?

Fair point.

>  > That said, perhaps your use case is one where you've realized that
>  > subheadings don't actually belong to the containing item?  In that
>  > case, what could make more sense is to promote (or kill and yank
>  > elsewhere) all of the wrongly placed subheadings.  You could
>  > promote an individual subheading with M-S-left, or kill and yank it
>  > with C-c C-x C-w and C-c C-x C-y, but I don't know if there's an
>  > easy way to repeat that over all subheadings.
>  > 
>  > Another possible approach: what about demoting just the containing
>  > heading with M-left and then killing/yanking that elsewhere?
>
> My use case is after I have not too carefully written down many ideas.
> Then I start thinking and try to order them in a better way.  All what
> you suggest is very sensible but much longer than the command I am
> looking for.

FWIW, I just experimented.  This seems to work:

  M-right M-right M-right M-right M-right C-c C-x C-w

  move to new destination

  C-c C-x C-y

and is pretty fast.

> Thanks much for you time.
> a.

No problem, it's an interesting question.

Neil



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Alain . Cochard
Eric S Fraga writes on Thu  5 Jul 2018 11:46:

 > Well, it's a deterministic set of steps so you could record a macro
 > to do the selection and kill?  Then all you have to do is move and
 > yank?

Would still be long...

 > What was not clear in your OP was what happens to the first
 > subheading?  Should it be promoted or does it suddenly become a
 > child of another main heading?

In my mind, everything except the headline and its associated text
would stay unchanged, though your questions make me realize that a
reasonable option would be that the whole subtree be promoted (but
probably not just the 1st subheading).

Regards

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Alain . Cochard
Neil Jerram writes on Thu  5 Jul 2018 11:46:

 > > What I would like to do is to be able to move a headline with
 > > everything up to (but not including) its first subheading.
 > >
 > > Does anyone know how to do that?  
 > >
 > > I am also interested in knowing if there are specific (deep?)
 > > reasons why this seemingly basic operation, which I see as the
 > > analogous of org-do-promote/demote and perform very often with
 > > standard (but tedious) emacs editing commands, is not already
 > > implemented.

 > My view/guess: because the subheadings are an integral part of the
 > content of the containing item.
 > 
 > Wouldn't you agree?  It seems to me like a fairly fundamental
 > aspect of the Org model.

Yes, but couldn't you raise the same argument about
org-promote/demote?

 > That said, perhaps your use case is one where you've realized that
 > subheadings don't actually belong to the containing item?  In that
 > case, what could make more sense is to promote (or kill and yank
 > elsewhere) all of the wrongly placed subheadings.  You could
 > promote an individual subheading with M-S-left, or kill and yank it
 > with C-c C-x C-w and C-c C-x C-y, but I don't know if there's an
 > easy way to repeat that over all subheadings.
 > 
 > Another possible approach: what about demoting just the containing
 > heading with M-left and then killing/yanking that elsewhere?

My use case is after I have not too carefully written down many ideas.
Then I start thinking and try to order them in a better way.  All what
you suggest is very sensible but much longer than the command I am
looking for.

Thanks much for you time.
a.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Nicolas Goaziou
Hello,

alain.coch...@unistra.fr writes:

> I am also interested in knowing if there are specific (deep?) reasons
> why this seemingly basic operation, which I see as the analogous of
> org-do-promote/demote and perform very often with standard (but
> tedious) emacs editing commands, is not already implemented.

Yes, this is not a "basic" operation: it breaks the structure of the
document. Org helps you maintain it and organize it, this would be going
the opposite way.

There are ways to do this, and you can even automate them with
a keyboard macro or a function.

> [fn:1] I am surprised I can't find it in the manual -- I find it
> extremely useful.

Documentation patches are always welcome. The hardest part would be to
find an appropriate location for this. Maybe Miscellaneous.

Regards,

-- 
Nicolas Goaziou



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Neil Jerram
alain.coch...@unistra.fr writes:

> Hello.  
>
> I am aware of org-move-subtree-up/down, which moves the entire
> subtree. 
>
> I am also aware of org-shiftmetaup/down which moves the line[fn:1] (also
> works for a headline).
>
> What I would like to do is to be able to move a headline with
> everything up to (but not including) its first subheading.
>
> Does anyone know how to do that?  
>
> I am also interested in knowing if there are specific (deep?) reasons
> why this seemingly basic operation, which I see as the analogous of
> org-do-promote/demote and perform very often with standard (but
> tedious) emacs editing commands, is not already implemented.

My view/guess: because the subheadings are an integral part of the
content of the containing item.

Wouldn't you agree?  It seems to me like a fairly fundamental aspect of
the Org model.

That said, perhaps your use case is one where you've realized that
subheadings don't actually belong to the containing item?  In that case,
what could make more sense is to promote (or kill and yank elsewhere)
all of the wrongly placed subheadings.  You could promote an individual
subheading with M-S-left, or kill and yank it with C-c C-x C-w and C-c
C-x C-y, but I don't know if there's an easy way to repeat that over all
subheadings.

Another possible approach: what about demoting just the containing
heading with M-left and then killing/yanking that elsewhere?

Regards,
   Neil



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Eric S Fraga
On Thursday,  5 Jul 2018 at 12:38, alain.coch...@unistra.fr wrote:
> Eric S Fraga writes on Thu  5 Jul 2018 10:44:
>
>  > Or, remembering that this *is* in fact a text editor, select
>  > heading and content, kill it, go where you want it placed, and yank
>  > it...?
>
> This is what I do so far... and qualify as tedious :-)

Well, it's a deterministic set of steps so you could record a macro to
do the selection and kill?  Then all you have to do is move and yank?

What was not clear in your OP was what happens to the first subheading?
Should it be promoted or does it suddenly become a child of another main
heading?

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4



Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Alain . Cochard
Eric S Fraga writes on Thu  5 Jul 2018 10:44:

 > Or, remembering that this *is* in fact a text editor, select
 > heading and content, kill it, go where you want it placed, and yank
 > it...?

This is what I do so far... and qualify as tedious :-)

Thanks anyway.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



[O] compatability of Tag Hierarchy and org-tags-exclude-from-inheritance?

2018-07-05 Thread steen
I would like to set org-tags-exclude-from-inheritance to the top level of a
tag hierarchy, and have the exclusion apply to all the members of that
group. Is this a reasonable thing to expect, or are the two mechanisms not
integrated in such a way that I should continue trying to fix this?

Thanks,
-- Steen


Re: [O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Eric S Fraga
On Thursday,  5 Jul 2018 at 11:40, alain.coch...@unistra.fr wrote:
> Hello.  
>
> I am aware of org-move-subtree-up/down, which moves the entire
> subtree. 
>
> I am also aware of org-shiftmetaup/down which moves the line[fn:1] (also
> works for a headline).
>
> What I would like to do is to be able to move a headline with
> everything up to (but not including) its first subheading.

Promote the first subheading, move the original heading, and then demote
that first subheading?

Or, remembering that this *is* in fact a text editor, select heading and
content, kill it, go where you want it placed, and yank it...?

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-783-g97fac4



[O] How to move up/down a headline but not the subtree?

2018-07-05 Thread Alain . Cochard


Hello.  

I am aware of org-move-subtree-up/down, which moves the entire
subtree. 

I am also aware of org-shiftmetaup/down which moves the line[fn:1] (also
works for a headline).

What I would like to do is to be able to move a headline with
everything up to (but not including) its first subheading.

Does anyone know how to do that?  

I am also interested in knowing if there are specific (deep?) reasons
why this seemingly basic operation, which I see as the analogous of
org-do-promote/demote and perform very often with standard (but
tedious) emacs editing commands, is not already implemented.

Thanks,
Regards

PS: I know that worg is not org, but I take the opportunity to mention
that the Org-mode reference card seems to me to be outdated in this
respect (orgmode.org/worg/orgcard.html):

M-S-UP/DOWN  move subtree/list item up/down

[fn:1] I am surprised I can't find it in the manual -- I find it
extremely useful.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25