Re: [O] Bug: org-clone-subtree-with-time-shift not asking for time-shift

2017-01-17 Thread Nicolas Goaziou
Hello,

Karl Voit  writes:

> * Kyle Meyer  wrote:
>>
>> Thanks.  The additional check looks good, as it replaces an error with a
>> more appropriate user-error and gives an error message that is a bit
>> more specific.
>>
>> However, the re-positioning of the org-back-to-heading call seems
>> problematic because the call is now wrapped in a save-excursion, but the
>> downstream code expects point to be at the beginning of the heading.
>>
>> When I call org-clone-subtree-with-time-shift with point at the end of
>>
>> *** heading <2017-02-28 Wed>
>> I get the following error:
>> Debugger entered--Lisp error: (error "Before first headline at position 
>> 1 in buffer  *temp*")
> [...]
>> I think this is because beg isn't set to the beginning of the heading.
>>
>> But given Karl's recent email saying that the changes in maint fixed his
>> test cases, maybe I'm missing something ...
>
> I have to excuse myself: I tested not good enough: I only tested my
> cases for being asked for the time-shift and not finished executing
> the cases.
>
> You're right, I can confirm your issue. I get "Before first headline
> at position 1 in buffer  *temp*" as well.

Fixed (hopefully) this time.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Dates in Tables Should be Inactive

2017-01-17 Thread Nicolas Goaziou
Hello,

"Doherty, Daniel"  writes:

> I sometimes like to compute with dates in tables.  As it now stands,
> org inserts computed dates in tables as active timestamps.

This because Calc package itself returns dates as active time stamps.

> This makes no sense to me since, if its in a table, one probably wants to
> treat the date just as a piece of data, not something to show up
> in the agenda.

Agreed. In master, I pushed a change that transforms all computed dates
as inactive time stamps.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] search not found leaves you in target buffer

2017-01-17 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> On 1/4/17, Nicolas Goaziou  wrote:
>>> can org be made to stay at the link if the link is broken?
>>
>> It is not clear to me that would be the best possible behaviour.
>
> example is broken file links.
>
> perhaps following a link could set the org mark so that
> org-mark-ring-goto could return?

Good idea. I implemented that in master.


Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] No agenda column view summary shown if org-agenda-overriding-header is set

2017-01-17 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> I find that column view summaries do not display if
> org-agenda-overriding-header is set.
>
> Steps to replicate:
>
> emacs -Q -l ~/minimal.el
>
> Where minimal.el contains...
>
> (add-to-list 'load-path "~/org-mode/lisp/")
> (add-to-list 'load-path "~/org-mode/contrib/lisp/")
>
> (require 'org)
>
> (setq org-agenda-files '("~/test.org"))
>
> (setq org-columns-default-format
>   "%40ITEM(Task) %8Effort(Estimate){:} %8CLOCKSUM %20SCHEDULED 
> %20DEADLINE %20TIMESTAMP")
>
> (setq org-agenda-custom-commands
>   '(("o" todo "TODO"
>((org-agenda-overriding-header "Now")
>
>
> ...and ~/test.org contains...
>
> * TODO Buy groceries
>   SCHEDULED: <2017-01-16 Mon>
>   :PROPERTIES:
>   :Effort:   0:10
>   :END:
>   [2017-01-16 Mon 15:11]
> * TODO Mow lawn
>   SCHEDULED: <2017-01-16 Mon>
>   [2017-01-16 Mon 15:11]
> * TODO Clean house
>   SCHEDULED: <2017-01-16 Mon>
>   [2017-01-16 Mon 15:11]
>
> When calling column view, the overlay summary line with total effort
> estimates is missing.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] agenda column view summaries missing in block agendas

2017-01-17 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> If one uses a custom agenda command with multiple blocks, column
> summaries in the agenda display do not display for all blocks.
>
> Steps to replicate:
>
> emacs -Q -l ~/minimal.el
>
> Where minimal contains
>
> (add-to-list 'load-path "~/org-mode/lisp/")
> (add-to-list 'load-path "~/org-mode/contrib/lisp/")
>
> (require 'org)
>
> (setq org-agenda-files '("~/test.org"))
>
> (setq org-columns-default-format
>   "%40ITEM(Task) %8Effort(Estimate){:} %8CLOCKSUM %20SCHEDULED 
> %20DEADLINE %20TIMESTAMP")
>
> (setq org-agenda-custom-commands
>   '(("n" "Now"
>((todo "TODO")
> (agenda "")
>
>
> and ~/test.org contains...
>
> * TODO Buy groceries
>   SCHEDULED: <2017-01-16 Mon>
>   :PROPERTIES:
>   :Effort:   0:10
>   :END:
> * TODO Mow lawn
>   SCHEDULED: <2017-01-16 Mon>
> * TODO Clean house
>   SCHEDULED: <2017-01-16 Mon>
>
>
> If I call the custom agenda command above and then org-agenda-columns,
> no summary data is displayed for the first block (the todo block).
> Summary data does appear at the top of the agenda block.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Allowing multiple date trees in a single file

2017-01-17 Thread Carsten Dominik
Hi Nicolas,

thanks for your reaction.

By default, a day or week tree will assume that it is the only thing in a
file when it is created and handled.
The exception is that if you have an Org entry with a property

DATE_TREE: t

that the date tree will be placed under that specific node.  But since this
is a specific property (key, not value), there was no way to target a
different Org node as parent for a tree.  This is now possible.

Another way to implement this would be to use different VALUES for the
DATE_TREE/WEEK_TREE property - maybe that would actually be a somewhat
cleaner implementation.

I'll rethink that and I will also define a test.

Carsten

On Mon, Jan 16, 2017 at 8:45 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Carsten Dominik  writes:
>
> > here is a patch that allows to have multiple date trees or iso-week trees
> > in a single file by allowing to specify the property name that will be
> used
> > to place the tree.  The property name can be set in
> org-capture-templates,
> > individually for every template if so desired.  I use that to have three
> > different kind of journals in a single file.
> >
> > Any objections gains me to merge this change into Master?
>
> AFAIR, WEEK_TREE and DATE_TREE allow to select the type of tree being
> inserted. How is the new property allowing to do the same?
>
> Also, there are some tests defined in "test-org-capture.el" and
> "test-org-datetree.el". Would you mind extending those so as to include
> your new property ?
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] org-agenda timetable

2017-01-17 Thread Emilio J . Padrón González
Hi!

On Fri, Jan 13, 2017 at 03:45:27PM +, Eric S Fraga wrote:
> >>
> >> I'm using org-agenda [...] I'd like to get the information from the
> >> org-agenda and display it as a "timetable".
> >
> > Did you get a satisfactory solution?
> 
> Not sure what is wanted here but maybe calfw is what you want?

Hei, that's pretty cool!

I'm giving it a try right now and calfw-org is just what I was looking
for :-)

Thanks a lot!

Cheers,
E



[O] Capturing the results of shell execution

2017-01-17 Thread Alex Bennée

I'm using org-babel snippets to automate some of my workflow. However
I'm not interested in dumping all of the compile output, I'd rather get
a simple value at the end to see if all was OK:

#+name: build-test
#+begin_src sh :results value
  set -e
  ./configure --cross-prefix=aarch64-linux-gnu- --arch=arm64
  make clean
  make -j9
#+end_src

However there isn't a way to tell the difference between a failing
sequence and a passing one apart from *Org-Babel Error Output* being
popped up. It seems org-babel-eval just slurps up the return code and
blindly returns (buffer-string) regardless of the desires of the
:results keyword.

Is this an intentional limitation of babels sh evaluation?

Redirecting all the compile output in the snippet seems a little clumsy
a solution:

#+name: build-test
#+begin_src sh :results output
  set -e
  ./configure --cross-prefix=aarch64-linux-gnu- --arch=arm64
  make clean > /dev/null
  make -j9 > /dev/null
  echo "Build complete: `date`"
#+end_src

Ideally I'd like #+RESULTS to have a nice 0/1 which can be used to gate
other parts of the process.

Am I missing something?

--
Alex Bennée



Re: [O] Capturing the results of shell execution

2017-01-17 Thread Michael Welle
Hello,

Alex Bennée  writes:

> I'm using org-babel snippets to automate some of my workflow. However
> I'm not interested in dumping all of the compile output, I'd rather get
> a simple value at the end to see if all was OK:
>
> #+name: build-test
> #+begin_src sh :results value
>
>   set -e
>   ./configure --cross-prefix=aarch64-linux-gnu- --arch=arm64
>   make clean
>   make -j9
> #+end_src
do it with shell?

#+begin_src sh :results output
(
  set -e
  echo "Build complete: `date`"
  exit 1
) 2>&1 > /tmp/log
echo success: $?
#+end_src

Regards
hmw



Re: [O] Allowing multiple date trees in a single file

2017-01-17 Thread Nicolas Goaziou
Hello,

Carsten Dominik  writes:

> Another way to implement this would be to use different VALUES for the
> DATE_TREE/WEEK_TREE property - maybe that would actually be a somewhat
> cleaner implementation.

I think ":DATE_TREE: week" ":DATE_TREE: t" is cleaner, indeed.

> I'll rethink that and I will also define a test.

I also agree there's an opportunity to refactor this and come out with
a more generic interface.

Yet another option is to define new capture targets, e.g.

 - file+datetree+olp
 - file+datetree+olp+date
 - file+datetree+regexp
 - file+datetree+regexp+date
 - ...
 - file+weektree+olp
 - ...

Those would ignore WEEK_TREE and DATE_TREE properties altogether.

Regards,


-- 
Nicolas Goaziou



[O] Org release_9.0 hangs

2017-01-17 Thread Shiyuan
Hi all,
I am using emacs 24.5 (shipped with Ubuntu 16.04 LTS). When I try to
switch to org release 9.0 from git repos, emacs hangs when starting up,

This is what I did for switching to release_9.0

git clone git://orgmode.org/org-mode.git
cd org-mode
git checkout release_9.0
make autoloads

My .emacs is only two lines as follows, and I remove .emacs.d completely to
rule out any possible interactions with other packages,

(add-to-list 'load-path "~/org-mode/lisp")
(add-to-list 'load-path "~/org-mode/contrib/lisp" t)

By searching this list, I've found other people experiencing hanging
problems. My case is more dramatic, it always happen, even when I try to
open  an empty org file. Everything seems good for release_8.3.6. The
changes introducing in  release_9.0 seems to cause the hanging problem. Any
suggesting in how to track down the problem?

Shiyuan


Re: [O] Org release_9.0 hangs

2017-01-17 Thread Kaushal Modi
Can you recreate the org-mode hangs on the latest commit of the stable
(maint) branch?

Do git checkout maint instead of git checkout release_9.0.

That's said, I have yet to see emacs hang up due to org. I am on the master
branch of org.

On Tue, Jan 17, 2017 at 1:41 PM Shiyuan  wrote:

> Hi all,
> I am using emacs 24.5 (shipped with Ubuntu 16.04 LTS). When I try to
> switch to org release 9.0 from git repos, emacs hangs when starting up,
>
> This is what I did for switching to release_9.0
>
> git clone git://orgmode.org/org-mode.git
> cd org-mode
> git checkout release_9.0
> make autoloads
>
-- 

Kaushal Modi


[O] bug#25466: 25.1.91; hs-show-all broken

2017-01-17 Thread Glenn Morris
Andreas Röhler wrote:

> With org-mode, hs-minor-mode: hs-show-all has no effect, but"Showing
> all blocks ... done" is messaged.
>
> BTW M-x show-all RET works as expected.

I don't think hideshow has ever done anything useful in Org mode, which
is Outline-based. Perhaps you are asking for a new feature of some kind.





[O] Process substitution in babel

2017-01-17 Thread Joe Riel
Can one use process substitution in babel? 

#+BEGIN_SRC bash
comm <(ls) <(ls)
#+END_SRC

I get an error

Syntax error: "(" unexpected

-- 
Joe Riel




Re: [O] Org release_9.0 hangs

2017-01-17 Thread Stig Brautaset

Shiyuan  writes:

> Hi all,
> I am using emacs 24.5 (shipped with Ubuntu 16.04 LTS). When I try to
> switch to org release 9.0 from git repos, emacs hangs when starting up,

I don't know about tracking down, but I've not experienced any hangs
since I turned off the element cache a couple days ago so that might be
worth a try in the absence of anything else:

: (setq org-element-use-cache nil)

Stig



Re: [O] org-get-heading and COMMENT

2017-01-17 Thread Matt Price
Sorry for the delay. I am very slow with regexps!

On Sat, Jan 14, 2017 at 6:04 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Matt Price  writes:
>
> > I see that
> >
> > (org-get-heading t t)
> >
> > executed on a heading like:
> >
> > * COMMENT Heading Title
> >
> > returns:
> >
> > COMMENT Heading Title
> >
> > Should there be a third switch, something like NO-COMMENT?
>
> I have no objection, but it would also need to have NO-PRIORITY for
> completeness. Do you want to provide a patch for that?
>
> Regards,
>
> --
> Nicolas Goaziou
>
From 7c78da444b74a7f75645d2af854859a6a7bf476a Mon Sep 17 00:00:00 2001
From: Matt Price 
Date: Tue, 17 Jan 2017 18:03:12 -0500
Subject: [PATCH 4/4] Add support for new switches to org-get-heading

NO-COMMENT tag, if true, will not return the COMMENT string with
heading.

NO-PRIORITY, if true, will not return the priority string (e.g.,
[#A]).
---
 lisp/org.el | 49 +
 1 file changed, 29 insertions(+), 20 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index cf1581204..349255bf9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8015,29 +8015,38 @@ So this will delete or add empty lines."
 (insert empty-lines)
 (move-to-column column)))
 
-(defun org-get-heading (&optional no-tags no-todo)
+(defun org-get-heading (&optional no-tags no-todo no-comment no-priority)
   "Return the heading of the current entry, without the stars.
-When NO-TAGS is non-nil, don't include tags.
-When NO-TODO is non-nil, don't include TODO keywords."
+When NO-TAGS is non-nil, don't include tags.
+When NO-TODO is non-nil, don't include TODO keywords.
+When NO-COMMENTS is non-nil, don't include comment string.
+When NO-PRIORITY is non-nil, don't include priority string."
   (save-excursion
 (org-back-to-heading t)
-(let ((case-fold-search nil))
-  (cond
-   ((and no-tags no-todo)
-	(looking-at org-complex-heading-regexp)
-	;; Return value has to be a string, but match group 4 is
-	;; optional.
-	(or (match-string 4) ""))
-   (no-tags
-	(looking-at (concat org-outline-regexp
-			"\\(.*?\\)"
-			"\\(?:[ \t]+:[[:alnum:]:_@#%]+:\\)?[ \t]*$"))
-	(match-string 1))
-   (no-todo
-	(looking-at org-todo-line-regexp)
-	(match-string 3))
-   (t (looking-at org-heading-regexp)
-	  (match-string 2))
+(looking-at org-complex-heading-regexp)
+(let* ((case-fold-search nil)
+	   (todo (or (match-string 2) nil))
+	   (priority (or (match-string 3) nil))
+	   (headlineplus (or (match-string 4) nil))
+	   (tags (or (match-string 5) nil))
+	   (returnval "")
+	   )
+  (if (and (not no-todo) todo)
+	  (setq returnval (concat todo returnval)))
+  (if (and (not no-priority) priority)
+	  (setq returnval (concat returnval (if (> (length returnval) 0) " ") priority 
+  )))
+  (if (and no-comment (string= "COMMENT" (substring headlineplus 0 7)))
+	  (setq returnval (concat returnval
+  (if (>  (length returnval) 0 ) 
+  " "
+"")
+  (substring headlineplus 8 nil)))
+	(setq returnval (concat returnval " " headlineplus)))
+  (if (and (not no-tags) tags)
+	  (setq returnval (concat returnval " " tags)))
+  returnval
+  )))
 
 (defvar orgstruct-mode)   ; defined below
 
-- 
2.11.0



Re: [O] Beamer framebreak

2017-01-17 Thread edgar

Date: Sun, 15 Jan 2017 10:53:27 +
From: Eric S Fraga 
To: 
Subject: Re: [O] Fwd: Beamer framebreak
Message-ID: <87tw90bnmg@ucl.ac.uk>
Content-Type: text/plain; charset="us-ascii"


If you want to use three levels as frames in some places, I would
suggest you make all frames third level.  Second level headlines then
become subsections but you can actually skip form 1st to 3rd level
headlines and the beamer export won't care, e.g.

* section
*** a frame
*** another frame
* second section
** subsection
*** frame


This sounds interesting. I will try. Thanks.



I think you'll find it easier to simply have a consistent layout across
the document.

Thanks again.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Beamer framebreak

2017-01-17 Thread edgar

Date: Sun, 15 Jan 2017 09:22:54 -0600
From: John Hendy 
To: ed...@openmail.cc
Cc: emacs-orgmode 
Subject: Re: [O] Fwd: Beamer framebreak
Message-ID:

Content-Type: text/plain; charset="utf-8"



My personal opinion is while it *looks* like it should work as this
utopian note-taking software that can also spit out presentations from
said content... it hasn't functioned like this in my experience.

Would be nice, right? :) .


- beamer_frame_level has been replaced with H:n, I believe.
   - old tutorial (mentioned):
http://orgmode.org/worg/exporters/beamer/tutorial.html
   - new tutorial (not mentioned):
http://orgmode.org/worg/exporters/beamer/ox-beamer.html

Thanks. I get confused between tutorials many times.


your'e asking why "Notes on project description" and "Notes on project
summary" are on the same slide? They are a list, not headlines, so Org
doesn't recognize them as having anything to do with frames. Org
thinks they are content (bullets).
Ok. You may not believe this, but I was confused about how headlines 
worked, and an asterisk looked like a headline to me (or something). 
Thanks.



adding content :)

"weird sounds from knee bending" is the technical term for "Oh, sh...t!"


Hope that helps some?
It is _really_ great! Thank you very much for all your effort and time 
:) ! I appreciate it a lot.



Cheers!
P.S. Sorry for the late answer. My life is a turmoil right now.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Beamer framebreak

2017-01-17 Thread John Hendy
No problem at all and hope that helped. It's definitely confusing initially!

Re. the headline thing, I just meant that this:

* something

** something

is not this:

- something
   - something

Asterisks are headlines, but I took your inquiring why the "Notes on
project" (with dashes) were not on separate slides. I might have
misunderstood, though.


Good luck!

On Tue, Jan 17, 2017 at 7:53 PM,   wrote:
>> Date: Sun, 15 Jan 2017 09:22:54 -0600
>> From: John Hendy 
>> To: ed...@openmail.cc
>> Cc: emacs-orgmode 
>> Subject: Re: [O] Fwd: Beamer framebreak
>> Message-ID:
>>
>> 
>> Content-Type: text/plain; charset="utf-8"
>
>
>> My personal opinion is while it *looks* like it should work as this
>> utopian note-taking software that can also spit out presentations from
>> said content... it hasn't functioned like this in my experience.
>
> Would be nice, right? :) .
>
>> - beamer_frame_level has been replaced with H:n, I believe.
>>- old tutorial (mentioned):
>> http://orgmode.org/worg/exporters/beamer/tutorial.html
>>- new tutorial (not mentioned):
>> http://orgmode.org/worg/exporters/beamer/ox-beamer.html
>
> Thanks. I get confused between tutorials many times.
>
>> your'e asking why "Notes on project description" and "Notes on project
>> summary" are on the same slide? They are a list, not headlines, so Org
>> doesn't recognize them as having anything to do with frames. Org
>> thinks they are content (bullets).
>
> Ok. You may not believe this, but I was confused about how headlines worked,
> and an asterisk looked like a headline to me (or something). Thanks.
>
>> adding content :)
>
> "weird sounds from knee bending" is the technical term for "Oh, sh...t!"
>
>> Hope that helps some?
>
> It is _really_ great! Thank you very much for all your effort and time :) !
> I appreciate it a lot.
>
>
> Cheers!
> P.S. Sorry for the late answer. My life is a turmoil right now.
>
>
> -
>
> ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the
> NSA's hands!
> $24.95 ONETIME Lifetime accounts with Privacy Features!  15GB disk! No
> bandwidth quotas!
> Commercial and Bulk Mail Options!



Re: [O] Bug: org-clone-subtree-with-time-shift not asking for time-shift

2017-01-17 Thread Kyle Meyer
Nicolas Goaziou  writes:

> Karl Voit  writes:

[...]

>> You're right, I can confirm your issue. I get "Before first headline
>> at position 1 in buffer  *temp*" as well.
>
> Fixed (hopefully) this time.

Yes, c31462f33 resolved the issue.  That commit also introduced a
regression: a blank string passed as the SHIFT argument causes an error.
I've followed up with 1fbc7a424 to restore the previous behavior.

Thanks.

--
Kyle



Re: [O] Allowing multiple date trees in a single file

2017-01-17 Thread Carsten Dominik
On Tue, Jan 17, 2017 at 6:50 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Carsten Dominik  writes:
>
> > Another way to implement this would be to use different VALUES for the
> > DATE_TREE/WEEK_TREE property - maybe that would actually be a somewhat
> > cleaner implementation.
>
> I think ":DATE_TREE: week" ":DATE_TREE: t" is cleaner, indeed.
>

This is not quite what I meant.

I meant

:DATE_TREE: my_diary
:DATE_TREE: food_and_health
:DATE_TREE: movies watched


>
> > I'll rethink that and I will also define a test.
>
> I also agree there's an opportunity to refactor this and come out with
> a more generic interface.
>
> Yet another option is to define new capture targets, e.g.
>
>  - file+datetree+olp
>  - file+datetree+olp+date
>  - file+datetree+regexp
>  - file+datetree+regexp+date
>  - ...
>  - file+weektree+olp
>  - ...
>
> Those would ignore WEEK_TREE and DATE_TREE properties altogether.
>

Yes, one could have additional ways - but I am not going to take out the
existing ones, which would needlessly break things with various users.

Another thing I was thinking is a way to force prompting for a date, for
example through a prefix argument, so that a single capture template could
be used for using the current date and optionally a set one.

Carsten


>
> Regards,
>
>
> --
> Nicolas Goaziou
>