Re: [O] helm-org-agenda-files-headings and bulk actions in agenda mode

2017-08-04 Thread Adam Porter
Julien Cubizolles  writes:

> helm-org-agenda-files-headings, used with helm-org-format-outline-path
> is very convenient for choosing entries when refiling one individual
> entry. I couldn't get it to refile *several* entries at once.

Hi Julien,

The helm-org-*-headings functions don't support multiple selection.
AFAIK this is mentioned in the docstrings.  It would be nice to add
that, but Helm is not part of Org mode, so you should mention this on
the Helm issue tracker.

Thanks.




Re: [O] remove TODO state in agenda view

2017-08-04 Thread Adam Porter
Julien Cubizolles  writes:

> Choosing "space" when changing the TODO state of an entry with C-c C-t
> in an org buffer clears the TODO state. However it doesn't work in the
> agenda view.

Hi Julien,

Just tried it, and it works for me.  What version of Org are you using?




Re: [O] refile workflow -- move to same heading in different file?

2017-08-04 Thread Adam Porter
"Raymond Zeitler"  writes:

> I get the same [No Match] result that I was getting originally.

Sounds like something is wrong with your installation or config.  Did
you try with "emacs -q"?

> I'm really not happy about needing yet another package just to get
> some basic functionality to work.

I suggested that it would help the troubleshooting process, not that
it's required.

> Besides, "package-install RET helm RET" results in yet another [No
> Match].  

I guess you don't have MELPA configured.

> Makes me think I should wipe out Emacs entirely and do a fresh
> installation.

I would try with "emacs -q" first.  Although since you're on Windows, it
wouldn't surprise me if something isn't setup correctly.  How did you
install Emacs?

> Meanwhile, if Helm is needed to make this work, maybe it should be
> documented.  I wonder if it works for anyone who's not using Helm

It's not, and it does.

> Gosh, I was really hoping to be doing export to ODT or PDF by now!

If you don't have time to fix it, you could export to HTML and convert
it with Pandoc.




[O] remove TODO state in agenda view

2017-08-04 Thread Julien Cubizolles
Choosing "space" when changing the TODO state of an entry with C-c C-t
in an org buffer clears the TODO state. However it doesn't work in the
agenda view. How can I clear the TODO state in agenda view, possibly in
bulk-mode ?

Julien.




[O] helm-org-agenda-files-headings and bulk actions in agenda mode

2017-08-04 Thread Julien Cubizolles
helm-org-agenda-files-headings, used with helm-org-format-outline-path
is very convenient for choosing entries when refiling one individual
entry. I couldn't get it to refile *several* entries at once.

I tried

+ marking entries with C-space in helm-org-agenda-files-headings, moving
  to another entry then "Refile current or marked heading to selection
  C-c w" with no success: it only acts on one entry

+ marking the entries in the agenda view with m then again
  helm-org-agenda-files-headings, moving to another entry then "Refile
  current or marked heading to selection C-c w". It doesn't use the
  "m" marked entries
  
+ marking the entries in the agenda view with m and choosing the refile
 action in Bulk mode (B-r) but this doesn't use
 helm-org-agenda-files-headings.


In my opinion, the most convenient way would be to have the "Refile
current or marked heading to selection C-c w" action from
helm-org-agenda-files-headings act on the "m" marked entries in the
agenda mode.

Julien.





[O] Time stamped TODOs with current-time from everywhere.

2017-08-04 Thread Michaël Cadilhac
Hi there people;

I have a few TODO templates of the form:

  ("td" "Todo deadline (with reminders)" entry
   (file "~/org/todos.org")
   "* TODO %^{Todo}\n DEADLINE: %^t\n %U\n%i%?")

The goal is to have two time stamps: an inactivated one (%U),
recording the time the TODO was created, and a queried time (%^t), for
the deadline.  If I'm just out of the blue thinking of a TODO, I can
easily add it this way.

However, suppose I'm in Calfw; I jump to some date, hit SPACE and I'm
now in Org-Agenda mode, ready to hit k to capture (because Calfw-Org
does not offer this directly).  Now I expect %U to still be the
current time stamp, and %^t to be prefilled with the date of the
Agenda.  It so happens that *both* time stamps are the one of the
Agenda.  Is this tweakable so that %U is always (current-time)?

Thanks!

Cheers;
Michaël



Re: [O] setting local variables

2017-08-04 Thread Eric Abrahamsen
Nicolas Goaziou  writes:

> Hello,
>
> Eric Abrahamsen  writes:
>
>> And regarding the lists of commands and keys, what would be the
>> recommended way of making a list of @deffns and corresponding index
>> entries?
>
> I don't know what is a list of @deffns. In any case, you can something
> like this:
>
>   #+attr_texinfo: :options category name arguments...
>
>   #+begin_deffn
>   ...
>   #+end_deffn
>
> AFAIU, @deffn takes care of indexing "name".

I just meant that it's very common when writing manuals to have lists of
commands, keys, user options, etc. The texinfo-plus output doesn't quite
look like the Emacs manuals, but it produces something that works.

For example, the below looks like something you'd find in an Emacs
manual.

#+BEGIN_SRC texinfo
  @table @kbd
  @item C-x C-f
  @kindex C-x C-f
  @findex find-file
  Visit a file (@code{find-file}).
  @item C-x C-r
  @kindex C-x C-r
  @findex find-file-read-only
  Visit a file for viewing, without allowing changes to it
  (@code{find-file-read-only}).
  @end table
#+END_SRC

This gets me some of the way:

#+BEGIN_SRC org
#+ATTR_TEXINFO: :options @kbd
#+begin_table
- C-x C-f
#+KINDEX: C-x C-f
Visit a file (@code{find-file}).
- C-x C-r
  #+KINDEX: C-x C-r
  #+FINDEX: find-file-read-only
  Visit a file for viewing, without allowing changes to it
#+end_table
#+END_SRC

But the items are exported incorrectly, with each list item in its own
itemize environment. How would I get something closer to the texinfo
output above?

>> Perhaps it would be enough to expand the example document in
>> the texinfo section of the Org manual.
>
> The point of the example document in the Org manual is to be the exact
> equivalent to the example in the Texinfo example. The latter doesn't use
> "@deffn" commands.

Okay, I see.

On the one hand, it isn't Org's job to teach people how to write Emacs
manuals. On the other hand, if there's a nice solution

Thanks,
Eric




Re: [O] refile workflow -- move to same heading in different file?

2017-08-04 Thread Adam Porter
"Raymond Zeitler"  writes:

> Thanks for your help and patience.  Sorry I cluttered the list with
> an Emacs config problem!

I'm glad to help if I can.  I noticed you didn't mention the part about
the structure of the org-refile-targets list.  Did you try the example I
gave?  That might have been the problem all along.




Re: [O] refile workflow -- move to same heading in different file?

2017-08-04 Thread Adam Porter
Joost Kremers  writes:

> Why convert to HTML first? Pandoc can read Org files pretty well.

Good point!  I must have had a brain cramp, since I have made two
packages that convert to Org with Pandoc... D:




Re: [O] [Orgmode] Slow speed of week and month views

2017-08-04 Thread Adam Porter
Christoph Groth  writes:

> Carsten Dominik wrote in 2010:
>
>> I am afraid I don't see any major speed improvements that could make
>> this happen. Yes, one could parse all the files once, build a table
>> in memory and get the entries for each day from there - 
>> but that comes down to a complete rewrite of the parser, maybe even
>> to switching to an internal representation model for Org-mode.
>
>> I don't see that happening, I am afraid.

Wow, you must have done some digging to find that, Christoph.  :)

> Computing the agenda month view takes 20 seconds in my case. That's
> perhaps the most serious problem with orgmode as I (and I suppose
> others as well) use it.  It would be great if this issue could be
> solved after all.
>
> Would it be really so difficult to do?  The actual parsing seems to be
> done in the function org-agenda-get-day-entries as called by
> org-agenda-list.  Inside org-agenda-get-day-entries the crucial bit
> seems to be (org-agenda-today-p date).  If that bit got replaced by
> something that matches more than a single day, wouldn't this mostly do
> the trick?
>
> This is much easier than "rewriting the parser", so it seems that I'm
> overlooking some problems.

I think Carsten is correct that it would require significant new code.
I looked at the code you mentioned, but I think you missed the bigger
structure.  org-agenda-list first builds a list of day numbers from the
span that is set, then it calls org-agenda-get-day-entries for each day
number.

The (org-agenda-today-p date) form in org-agenda-get-day-entries is only
checked when the function is getting TODO items, and then it calls
org-agenda-get-todos to actually get the entries.  And as far as I can
tell, org-agenda-list doesn't set the :todo selector at all, so the
org-agenda-get-todos function isn't called when building a time-based
agenda view; instead it's called for the org-todo-list command.  This
seems to be confirmed by the docstring for org-agenda-entry-types, which
doesn't indicate that :todo is allowed as a type for daily/weekly
agendas.

I'm not as expert as Carsten or any of the current maintainers, but a
possible way to speed up agenda creation for longer time spans would be
to avoid parsing files repeatedly.  IIUC they are parsed once for every
date shown in the agenda.  Instead, if they were parsed once and
returned a list of items that was filtered or grouped once, that would
probably be faster.

But doing that would, as Carsten said, require rewriting a lot of code.
Essentially you'd be creating a new agenda system, so you'd have to
reimplement a lot of existing code.  You could do it in parallel, rather
than replacing existing code, so you wouldn't have to break the existing
agenda system.  But I don't think there's any way to shortcut writing
the new system.  I don't think there's any "low hanging fruit."

Anyway, something based on org-map-entries might be interesting, but
it's hard to say if it would actually be faster in the end.





Re: [O] remove TODO state in agenda view

2017-08-04 Thread Adam Porter
Julien Cubizolles  writes:

> It's working for me too now. Don't know what I was doing wrong, sorry.

No problem, that happens to me all the time.  At least you didn't do
like I've done and file an actual bug report when restarting Emacs would
have fixed it.  ;)




Re: [O] Time stamped TODOs with current-time from everywhere.

2017-08-04 Thread Adam Porter
Michaël Cadilhac  writes:

> However, suppose I'm in Calfw; I jump to some date, hit SPACE and I'm
> now in Org-Agenda mode, ready to hit k to capture (because Calfw-Org
> does not offer this directly).  Now I expect %U to still be the
> current time stamp, and %^t to be prefilled with the date of the
> Agenda.  It so happens that *both* time stamps are the one of the
> Agenda.  Is this tweakable so that %U is always (current-time)?

I'm not sure if that's a bug, since it seems like %^t should always
prompt, or if it's intended that the agenda date fulfill the prompt.
But either way, you should be able to use a %(sexp) form in the capture
template to insert the current date.




Re: [O] remove TODO state in agenda view

2017-08-04 Thread Julien Cubizolles
Adam Porter  writes:

> Julien Cubizolles  writes:
>
>> Choosing "space" when changing the TODO state of an entry with C-c C-t
>> in an org buffer clears the TODO state. However it doesn't work in the
>> agenda view.
>
> Hi Julien,
>
> Just tried it, and it works for me.  What version of Org are you using?

It's working for me too now. Don't know what I was doing wrong, sorry.




Re: [O] [Orgmode] Slow speed of week and month views

2017-08-04 Thread Christoph Groth

Carsten Dominik wrote in 2010:

I am afraid I don't see any major speed improvements that could 
make this happen. Yes, one could parse all the files once, build 
a table in memory and get the entries for each day from there - 
but that comes down to a complete rewrite of the parser, maybe 
even to switching to an internal representation model for 
Org-mode.



I don't see that happening, I am afraid.


Computing the agenda month view takes 20 seconds in my case. 
That's perhaps the most serious problem with orgmode as I (and I 
suppose others as well) use it.  It would be great if this issue 
could be solved after all.


Would it be really so difficult to do?  The actual parsing seems 
to be done in the function org-agenda-get-day-entries as called by 
org-agenda-list.  Inside org-agenda-get-day-entries the crucial 
bit seems to be (org-agenda-today-p date).  If that bit got 
replaced by something that matches more than a single day, 
wouldn't this mostly do the trick?


This is much easier than "rewriting the parser", so it seems that 
I'm overlooking some problems.




Re: [O] remove TODO state in agenda view

2017-08-04 Thread Julien Cubizolles
Adam Porter  writes:

> Julien Cubizolles  writes:
>
>> Choosing "space" when changing the TODO state of an entry with C-c C-t
>> in an org buffer clears the TODO state. However it doesn't work in the
>> agenda view.
>
> Hi Julien,
>
> Just tried it, and it works for me.  What version of Org are you using?

It's working for me too now. Don't know what I was doing wrong, sorry.




Re: [O] setting local variables

2017-08-04 Thread Nicolas Goaziou
Hello,

Eric Abrahamsen  writes:

> And regarding the lists of commands and keys, what would be the
> recommended way of making a list of @deffns and corresponding index
> entries?

I don't know what is a list of @deffns. In any case, you can something
like this:

  #+attr_texinfo: :options category name arguments...
  #+begin_deffn
  ...
  #+end_deffn

AFAIU, @deffn takes care of indexing "name".

> Perhaps it would be enough to expand the example document in
> the texinfo section of the Org manual.

The point of the example document in the Org manual is to be the exact
equivalent to the example in the Texinfo example. The latter doesn't use
"@deffn" commands.

Regards,

-- 
Nicolas Goaziou



Re: [O] refile workflow -- move to same heading in different file?

2017-08-04 Thread Joost Kremers


On Fri, Aug 04 2017, Adam Porter wrote:

"Raymond Zeitler"  writes:
Gosh, I was really hoping to be doing export to ODT or PDF by 
now!


If you don't have time to fix it, you could export to HTML and 
convert

it with Pandoc.


Why convert to HTML first? Pandoc can read Org files pretty well.

--
Joost Kremers
Life has its moments



Re: [O] helm-org-agenda-files-headings and bulk actions in agenda mode

2017-08-04 Thread Julien Cubizolles
Adam Porter  writes:

> Julien Cubizolles  writes:
>
>> helm-org-agenda-files-headings, used with helm-org-format-outline-path
>> is very convenient for choosing entries when refiling one individual
>> entry. I couldn't get it to refile *several* entries at once.
>
> Hi Julien,
>
> The helm-org-*-headings functions don't support multiple selection.
> AFAIK this is mentioned in the docstrings. 

Indeed it's in the helm-org-heading-refile docstrings.

> It would be nice to add that, but Helm is not part of Org mode, so you
> should mention this on the Helm issue tracker.

Will do.