Re: [O] Bug: org-agenda-do-date-earlier does not honor org-shiftleft-final-hook [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/mhoffman/.emacs.d/elpa/org-9.1.14/)]

2019-05-03 Thread Michael Hoffman

On 12/3/18 5:30 PM, Michael Hoffman wrote:

1. What exactly did you do?

- Execute:
(with-eval-after-load 'org
   (add-hook 'org-shiftleft-final-hook 'windmove-left))
(org-agenda nil "a")
(split-window-horizontally)

- Type S-left

2. What did you expect to happen?

(windmove-left)

3. What happened instead?

Received message "Command not allowed in this line"



Workaround:

(defvar org-agenda-mode-map)
(with-eval-after-load 'org-agenda
  (define-key org-agenda-mode-map [S-left] #'windmove-left)
  (define-key org-agenda-mode-map [S-right] #'windmove-right))

Michael Hoffman




Re: [O] Bug: org-agenda-do-date-earlier does not honor org-shiftleft-final-hook [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/mhoffman/.emacs.d/elpa/org-9.1.14/)]

2018-12-04 Thread Michael Hoffman

On 2018-12-04 4:10 a.m., Nicolas Goaziou wrote:

Michael Hoffman  writes:

1. What exactly did you do?

- Execute:
(with-eval-after-load 'org
   (add-hook 'org-shiftleft-final-hook 'windmove-left))
(org-agenda nil "a")
(split-window-horizontally)

- Type S-left

2. What did you expect to happen?

(windmove-left)

3. What happened instead?

Received message "Command not allowed in this line"


That means one of the commands called by `org-shiftleft' failed.


Thanks for your response.

It does not appear that `org-shiftleft' is called at all in agenda buffers now. 
The `org-agenda-do-date-earlier'. C-h k S-left gives me:

```
 runs the command org-agenda-do-date-earlier (found in
org-agenda-mode-map), which is an interactive compiled Lisp function
in ‘org-agenda.el’.

It is bound to , C-c C-x ,  
 .

(org-agenda-do-date-earlier ARG)

Not documented.
```

`org-agenda.el' has `(org-defkey org-agenda-mode-map [(shift left)] 
'org-agenda-do-date-earlier)` rather than a call to `org-shiftleft'.

I agree that the expected behavior would be for `org-shiftleft' to be called 
here and to call `org-agenda-do-date-earlier' when not overridden.

Michael




[O] Bug: org-agenda-do-date-earlier does not honor org-shiftleft-final-hook [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/mhoffman/.emacs.d/elpa/org-9.1.14/)]

2018-12-03 Thread Michael Hoffman

1. What exactly did you do?

- Execute:
(with-eval-after-load 'org
  (add-hook 'org-shiftleft-final-hook 'windmove-left))
(org-agenda nil "a")
(split-window-horizontally)

- Type S-left

2. What did you expect to happen?

(windmove-left)

3. What happened instead?

Received message "Command not allowed in this line"

Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-29
Package: Org mode version 9.1.14 (9.1.14-1-g4931fc-elpa @ 
/home/mhoffman/.emacs.d/elpa/org-9.1.14/)

current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-columns-default-format "\"%TODO %40FILE %30ITEM %20DEADLINE %1PRIORITY 
%ALLTAGS\""
 org-agenda-skip-scheduled-if-deadline-is-shown t
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-tags-todo-honor-ignore-options t
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-refile-targets '((org-agenda-files :maxlevel . 3))
 org-agenda-files '("~/Dropbox/notes/todo.org" "~/Dropbox/org")
 org-shiftup-final-hook '(windmove-up)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all append 
local] 5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all 
append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes
 guide-key/org-mode-hook-func)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
 org-shiftdown-final-hook '(windmove-down)
 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-shiftright-final-hook '(windmove-right)
 org-load-hook '(#[nil "\300\301\302\303#\210\300\304\302\305#\207"
   [org-link-set-parameters "buffer" :follow org-buffer-open 
"term" org-term-open]
   4]
 )
 org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled
 org-ellipsis "▼"
 org-agenda-span 90
 org-tab-follows-link t
 org-confirm-shell-link-not-regexp "\\`thunderbird &\\'"
 org-occur-hook '(org-first-headline-recenter)
 org-lowest-priority 68
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t)" "QUICK(q)" "WAITING(w)" "NEXT(n)" "STALL(s)" 
"|"
  "DONE(d)" "CANCELLED(c)")
 )
 org-support-shift-select 'always
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-log-repeat nil
 org-default-priority 67
 org-shiftleft-final-hook '(windmove-left)
 org-return-follows-link t
 org-refile-use-outline-path t
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store 
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export 
:store
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export 
org-docview-export :store
org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export 
:complete
org-bbdb-complete-link :store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys") 
("file+emacs")
   ("doi" :follow org--open-doi-link) ("elisp" :follow 
org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" 
path
   ("help" :follow org--open-help-link)
   ("http" :follow (lambda (path) (browse-url (concat 
"http:" path
   ("https" :follow (lambda (path) (browse-url (concat 
"https:" path
   ("mailto" :follow (lambda (path) (browse-url (concat 
"mailto:"; path
   ("news" :follow (lambda (path) (browse-url (concat 
"news:"; path
   ("shell" :follow org--open-shell-link))
 org-todo-keyword-faces '(("QUICK" :foreground "sienna" :weight bold))
 org-deadli

Re: [O] Bulk re-scheduling in agenda view

2018-04-26 Thread Michael Hoffman

On 4/26/2018 7:34 PM, Bastien wrote:

Michael Hoffman  writes:

The org manual
<https://orgmode.org/manual/Agenda-commands.html> seems to indicate
this is possible using double plus:


Schedule all items to a new date. To shift existing schedule dates by
a fixed number of days, use something starting with double plus at the
prompt, for example ‘++8d’ or ‘++2w’.


When I try this, however, I always get re-scheduling from the current
date.


I cannot reproduce this -- beware that the prompt shows the date as
if it was with only one "+"... but the bulk rescheduling effectively
reschedule entries by adding the number of days to *each* of them.


Thanks Bastien. I reported this as a bug later and Nicolas Goaziou fixed 
it. Works as expected now.


Many thanks for your work on org-mode, an essential part of my daily 
workflow.


Michael




[O] Bug: Bulk re-scheduling to a relative offset doesn't work [9.1.6 (9.1.6-48-gfe7619-elpa @ c:/Users/micha/.emacs.d/elpa/org-20180212/)]

2018-02-25 Thread Michael Hoffman
I previously asked a question about this on emacs-orgmode but it seems 
more likely that this is a bug.


https://lists.gnu.org/archive/html/emacs-orgmode/2018-02/msg00183.html

I am bulk re-scheduling items in an agenda view. I would like all the 
selected items to be re-scheduled to a year later from their current 
scheduled date. The org manual 
 seems to indicate this 
is possible using double plus:


> Schedule all items to a new date. To shift existing schedule dates by
> a fixed number of days, use something starting with double plus at the
> prompt, for example ‘++8d’ or ‘++2w’.

When I try this, however, I always get re-scheduling from the current 
date. I am using Org mode version 9.1.6 (9.1.6-48-gfe7619-elpa). Here's 
how to reproduce:


1. Create minimal.org.el:

(setq debug-on-error t
  debug-on-signal nil
  debug-on-quit nil)
(add-to-list 'load-path "c:/Users/micha/.emacs.d/elpa/org-20180212")

2. emacs.exe -Q -l minimal-org.el

3. Create a test.org buffer:

* TODO Task
  SCHEDULED: <2018-01-01 Mon>

4. Add it to the agenda files list with C-c [.

5. M-x org-agenda RET t results in

Global list of TODO items of type: ALL
Available with ‘N r’: (0)[ALL] (1)TODO (2)DONE
  test:   TODO Task

6. Move down to TODO Task and type m to mark

7. B s (bulk schedule). The minibuffer will state:

(Re)Schedule to Date+time [2018-02-11]: [cursor] => <2018-02-11 Sun>

8. ++1y. The right part of the minibuffer now states

<2019-02-11 Mon>

I expected <2019-01-01 Tue>

9. RET.

The task is now rescheduled to <2019-02-11 Mon> rather than <2019-01-01 
Tue> as initially expected.


Emacs  : GNU Emacs 25.2.1 (x86_64-w64-mingw32)
 of 2017-04-24
Package: Org mode version 9.1.6 (9.1.6-48-gfe7619-elpa @ 
c:/Users/micha/.emacs.d/elpa/org-20180212/)


current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store
org-mhe-store-link)
   ("irc" :follow org-irc-visit :store
org-irc-store-link)
   ("info" :follow org-info-open :export
org-info-export :store org-info-store-link)
   ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export
org-bbdb-export :complete org-bbdb-complete-link
:store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys")
   ("file+emacs") ("doi" :follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path
   ("help" :follow org--open-help-link)
   ("http" :follow
(lambda (path) (browse-url (concat "http:" path
   ("https" :follow
   

[O] Bulk re-scheduling in agenda view

2018-02-11 Thread Michael Hoffman
I am bulk re-scheduling items in an agenda view. I would like all the 
selected items to be re-scheduled to a year later from their current 
scheduled date. The org manual 
<https://orgmode.org/manual/Agenda-commands.html> seems to indicate this 
is possible using double plus:


> Schedule all items to a new date. To shift existing schedule dates by
> a fixed number of days, use something starting with double plus at the
> prompt, for example ‘++8d’ or ‘++2w’.

When I try this, however, I always get re-scheduling from the current 
date. I am using Org mode version 9.1.6 (9.1.6-48-gfe7619-elpa). Here's 
how to reproduce:


1. Create minimal.org.el:

(setq debug-on-error t
  debug-on-signal nil
  debug-on-quit nil)
(add-to-list 'load-path "c:/Users/micha/.emacs.d/elpa/org-20180212")

2. emacs.exe -Q -l minimal-org.el

3. Create a test.org buffer:

* TODO Task
  SCHEDULED: <2018-01-01 Mon>

4. Add it to the agenda files list with C-c [.

5. M-x org-agenda RET t results in

Global list of TODO items of type: ALL
Available with ‘N r’: (0)[ALL] (1)TODO (2)DONE
  test:   TODO Task

6. Move down to TODO Task and type m to mark

7. B s (bulk schedule). The minibuffer will state:

(Re)Schedule to Date+time [2018-02-11]: [cursor] => <2018-02-11 Sun>

8. ++1y. The right part of the minibuffer now states

<2019-02-11 Mon>

I expected <2019-01-01 Tue>

9. RET.

The task is now rescheduled to <2019-02-11 Mon> rather than <2019-01-01 
Tue> as initially expected.


Am I doing something wrong here?

Thanks,
Michael Hoffman




Re: [O] Rescheduling timestamps on a headline (not the next line)

2015-10-22 Thread Michael Hoffman

On 10/21/2015 3:51 PM, Matt Lundin wrote:

Michael Hoffman  writes:

I am using org-mode 8.2.10. I often like to keep SCHEDULED and
DEADLINE timestamps on the headline so they are more compact and show
up even when I have collapsed that tree. Unfortunately, in this case,
(org-schedule) and (org-deadline) add a new timestamp on the second
line instead of replacing the previous schedule.


Org-syntax requires planning info (SCHEDULED, DEADLINE) to be on its own
line. Anything can be arbitrarily entered into an org file, but only
certain syntax will work properly.


Thanks Matt. Is there a supported way to have planning info show up on 
the same line as the headline in the org file itself (rather than in an 
agenda)? This can be very handy when organizing a lot of items to have 
them all show up on the screen.


Or at least to have only the planning info show up and not other 
information stored under the headline?


Many thanks,
Michael





[O] Rescheduling timestamps on a headline (not the next line)

2015-09-19 Thread Michael Hoffman
I am using org-mode 8.2.10. I often like to keep SCHEDULED and DEADLINE 
timestamps on the headline so they are more compact and show up even 
when I have collapsed that tree. Unfortunately, in this case, 
(org-schedule) and (org-deadline) add a new timestamp on the second line 
instead of replacing the previous schedule.


Steps to reproduce:

1. Visit new file `test.org`
2. Enter `* Task SCHEDULED: <2015-09-19>` in the buffer
3. C-c C-s for (org-schedule)
4. S-right to select 2015-09-20
5. RET

Output:

* Task SCHEDULED: <2015-09-19>
  SCHEDULED: <2015-09-20 Sun>

What I expected:

* Task SCHEDULED: <2015-09-20 Sun>

Is there a way to get my expected output? (org-add-planning-info) seems 
to go to the end of the headline:


(org-back-to-heading t)
(looking-at (concat org-outline-regexp "\\( *\\)[^\r\n]*"))
(goto-char (match-end 1))
(setq col (current-column))
(goto-char (match-end 0))

Before it starts looking for text to replace.

Many thanks,
Michael




Re: [O] Making org-agenda-list hide items scheduled for the future

2014-01-24 Thread Michael Hoffman

On 01/20/2014 10:24 AM, Fabrice Niessen wrote:

Hello Nick,

Nick Dokos wrote:

"Fabrice Niessen"  writes:

Michael Hoffman wrote:

I use the weekly/daily agenda and want to be able to use the SCHEDULED keyword
to hide items until the scheduled time comes up. I don't want to think about
them until then. How can I set up org-agenda-list to do this?

This is the list of agenda items, not the TODO list. I already have
org-agenda-todo-ignore-scheduled set to future. It does not help.


See my answer on StackOverflow.


It would be useful if you could post a link to your answer.


Yes; such double postings of questions on both SO and the ML aren't
particularly great (and should not be encouraged)...


I should have mentioned the previous question on Stack Overflow. Thanks 
for your response there and here. However, they did not solve my 
problem. So I decided that this mailing list would have been a better 
venue to ask.



Here's the link:

http://stackoverflow.com/questions/21118288/making-org-agenda-list-hide-items-scheduled-for-the-future/21120864

I had no reaction of the OP for 2 days. Dunno if the response resolves
his problem.


It doesn't. I am trying to change the daily/weekly list of agenda items 
(org-agenda-list). Your responses there seem to affect the global TODO 
list but not the (org-todo-list).


Is there a way to hide items in the weekly/daily agenda until they are 
SCHEDULED?


Thanks,
Michael Hoffman




[O] Making org-agenda-list hide items scheduled for the future

2014-01-17 Thread Michael Hoffman
I use the weekly/daily agenda and want to be able to use the SCHEDULED 
keyword to hide items until the scheduled time comes up. I don't want to 
think about them until then. How can I set up org-agenda-list to do this?


This is the list of agenda items, not the TODO list. I already have 
org-agenda-todo-ignore-scheduled set to future. It does not help.


I am using org-mode 8.2.4, Emacs 24.3.2, CentOS Linux 6.5.

Michael Hoffman




Re: [O] org-sort-agenda-notime-is-late is mishandled in org-cmp-ts

2014-01-02 Thread Michael Hoffman

On 12/01/2013 12:12 PM, Michael Crouch wrote:

Bug report for 8.2.3c:

When org-agenda-sorting-strategy is set to deadline-up (or similar
values), the Global Todo list always places non-timestamped entries at
the beginning, even when org-sort-agenda-notime-is-late is true.  This
is inconsistent with the behavior when org-agenda-sorting-strategy is
time-up.

I believe the problem is that the org-cmp-ts function copied a line from
the older org-cmp-time function:
(def (if org-sort-agenda-notime-is-late 9901 -1))

9901 is later than all times of day, but not later than all date/time
stamps.


I get this too on org 8.2.4. Replacing 9901 with most-positive-fixnum 
fixes the problem.


Michael Hoffman





[Orgmode] Re: Automatically move completed TODO items and checkboxes to another file

2010-09-07 Thread Michael Hoffman

Nicolas Goaziou wrote:

Hello,

Michael Hoffman writes:



I've also tried regex-searching for something like "^ - \[ \]" ->
"*** TODO" but it's not foolproof since the number of leading spaces
doesn't always have something to do with the level of the previous
header.


It looks like you're looking for `org-list-make-subtree' (C-c C-*) and
then replacing [CBON] with DONE and [CBOFF] with TODO.

If it's something else, could you explain it with an example?


Try this:

** TODO x
  - [ ] x1
  - [ ] x2
- [ ] x2.1

Set the region to the checkbox lines, then do C-c C-*. The result is:

** TODO x
*** [ ] x1
*** [ ] x2
*** [ ] x2.1

If you set a macro to do each line individually and move down, you 
instead get:


** TODO x
*** [ ] x1
 [ ] x2
* [ ] x2.1

I would regard the correct conversion to be:

** TODO x
*** [ ] x1
*** [ ] x2
 [ ] x2.1

I'm using Emacs 23.1.3 and org-mode 6.21b.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Automatically move completed TODO items and checkboxes to another file

2010-09-03 Thread Michael Hoffman

Bastien wrote:

Hi Michael,

Michael Hoffman <9qobl2...@sneakemail.com> writes:


and then using search/replace to add "TODO "


How did you searched and replaced?


Well, the commands:

C-u C-c C-c
C-x C-x
C-c *

convert the checkboxes to headings but eliminate the hierarchy.

I've also tried regex-searching for something like "^   - \[ \]" -> "*** 
TODO" but it's not foolproof since the number of leading spaces doesn't 
always have something to do with the level of the previous header.



I guess we can keep the hierarchy with an appropriate search and replace
function...


Well, I'm gradually just fixing these things as I go through now.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Automatically move completed TODO items and checkboxes to another file

2010-08-19 Thread Michael Hoffman

Eric S Fraga wrote:

On Tue, 17 Aug 2010 13:34:32 -0700, Michael Hoffman <9qobl2...@sneakemail.com> 
wrote:

I have happily been using org-mode for many years to keep a todo
list. I like keeping a log of the actions I've completed, but I don't
like them in the same file taking up space. Previously I have moved
completed TODO items and checkboxes to another log file manually. Is
there a good way of doing this automatically? Do you have any other
suggestions for how to keep a log of done tasks while removing the
cruft left over from the current list?


Check out the Archiving section in the org info manual.  It does
exactly what you want.


Thanks, this is very useful. Although it doesn't work with checkboxes as 
individual items to option. Can it be made to work with checkboxes, or 
is there an easy way to convert checkboxes to TODO items?


I've tried

C-u C-c C-c
C-x C-x
C-c *

and then using search/replace to add "TODO "

but that unfortunately eliminates any previous hierarchy in the 
checkboxes. Is there a better way?


Michael Hoffman


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Automatically move completed TODO items and checkboxes to another file

2010-08-17 Thread Michael Hoffman
I have happily been using org-mode for many years to keep a todo list. I 
like keeping a log of the actions I've completed, but I don't like them 
in the same file taking up space. Previously I have moved completed TODO 
items and checkboxes to another log file manually. Is there a good way 
of doing this automatically? Do you have any other suggestions for how 
to keep a log of done tasks while removing the cruft left over from the 
current list?


Michael Hoffman


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode