all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Fix jumping to last refile location in agenda
@ 2009-08-25 16:17 Bernt Hansen
  2009-08-26  4:41 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Bernt Hansen @ 2009-08-25 16:17 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bernt Hansen

C-u C-u C-c C-w now goes to the last refile location in the agenda.
This is the same behaviour as org-refile (when used in an org file)
---
Carsten,

This patch allows C-u C-u C-c C-w on any line in the agenda.  The goto
function (C-u C-c C-w) could possibly work the same way - now you need
to put the point on a task first - it won't work on the date or the
Day-agenda line.

This patch is available at git://git.norang.ca/org-mode for-carsten.

 lisp/org-agenda.el |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 073e668..83e8dd6 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5475,14 +5475,17 @@ If this information is not given, the function uses the tree at point."
 (defun org-agenda-refile (&optional goto rfloc)
   "Refile the item at point."
   (interactive "P")
-  (let* ((marker (or (get-text-property (point) 'org-hd-marker)
-		     (org-agenda-error)))
-	 (buffer (marker-buffer marker))
-	 (pos (marker-position marker))
-	 (rfloc (or rfloc
-		    (org-refile-get-location
-		     (if goto "Goto: " "Refile to: ") buffer
-		     org-refile-allow-creating-parent-nodes))))
+  (if (equal goto '(16))
+      (org-refile-goto-last-stored)
+    (let* ((marker (or (get-text-property (point) 'org-hd-marker)
+		       (org-agenda-error)))
+	   (buffer (marker-buffer marker))
+	   (pos (marker-position marker))
+	   (rfloc))
+      (setq rfloc (or rfloc
+		      (org-refile-get-location
+		       (if goto "Goto: " "Refile to: ") buffer
+		       org-refile-allow-creating-parent-nodes))))
     (with-current-buffer buffer
       (save-excursion
 	(save-restriction
@@ -5491,9 +5494,6 @@ If this information is not given, the function uses the tree at point."
 	  (org-remove-subtree-entries-from-agenda)
 	  (org-refile goto buffer rfloc))))))
 
-
-
-
 (defun org-agenda-open-link ()
   "Follow the link in the current line, if any."
   (interactive)
-- 
1.6.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix jumping to last refile location in agenda
  2009-08-25 16:17 [PATCH] Fix jumping to last refile location in agenda Bernt Hansen
@ 2009-08-26  4:41 ` Carsten Dominik
  2009-08-26 13:53   ` Bernt Hansen
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-08-26  4:41 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Aug 25, 2009, at 6:17 PM, Bernt Hansen wrote:

> C-u C-u C-c C-w now goes to the last refile location in the agenda.
> This is the same behaviour as org-refile (when used in an org file)
> ---
> Carsten,
>
> This patch allows C-u C-u C-c C-w on any line in the agenda.  The goto
> function (C-u C-c C-w) could possibly work the same way - now you need
> to put the point on a task first - it won't work on the date or the
> Day-agenda line.
>
> This patch is available at git://git.norang.ca/org-mode for-carsten.
>
> lisp/org-agenda.el |   22 +++++++++++-----------
> 1 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 073e668..83e8dd6 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -5475,14 +5475,17 @@ If this information is not given, the  
> function uses the tree at point."
> (defun org-agenda-refile (&optional goto rfloc)
>   "Refile the item at point."
>   (interactive "P")
> -  (let* ((marker (or (get-text-property (point) 'org-hd-marker)
> -		     (org-agenda-error)))
> -	 (buffer (marker-buffer marker))
> -	 (pos (marker-position marker))
> -	 (rfloc (or rfloc
> -		    (org-refile-get-location
> -		     (if goto "Goto: " "Refile to: ") buffer
> -		     org-refile-allow-creating-parent-nodes))))
> +  (if (equal goto '(16))
> +      (org-refile-goto-last-stored)
> +    (let* ((marker (or (get-text-property (point) 'org-hd-marker)
> +		       (org-agenda-error)))
> +	   (buffer (marker-buffer marker))
> +	   (pos (marker-position marker))
> +	   (rfloc))
> +      (setq rfloc (or rfloc
> +		      (org-refile-get-location
> +		       (if goto "Goto: " "Refile to: ") buffer
> +		       org-refile-allow-creating-parent-nodes))))
>     (with-current-buffer buffer
>       (save-excursion
> 	(save-restriction
> @@ -5491,9 +5494,6 @@ If this information is not given, the function  
> uses the tree at point."
> 	  (org-remove-subtree-entries-from-agenda)
> 	  (org-refile goto buffer rfloc))))))
>
> -
> -
> -
> (defun org-agenda-open-link ()
>   "Follow the link in the current line, if any."
>   (interactive)
> -- 
> 1.6.4
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix jumping to last refile location in agenda
  2009-08-26  4:41 ` Carsten Dominik
@ 2009-08-26 13:53   ` Bernt Hansen
  2009-08-26 14:11     ` Bernt Hansen
  2009-08-26 14:11     ` Carsten Dominik
  0 siblings, 2 replies; 8+ messages in thread
From: Bernt Hansen @ 2009-08-26 13:53 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Argh.  I think this commit breaks bulk refiling from the agenda.

If I mark two entries (with m) and then B r and enter a location I get a
Refile: prompt in the mini buffer.

Sorry about that.

-Bernt


Carsten Dominik <carsten.dominik@gmail.com> writes:

> Applied, thanks.
>
> - Carsten
>
> On Aug 25, 2009, at 6:17 PM, Bernt Hansen wrote:
>
>> C-u C-u C-c C-w now goes to the last refile location in the agenda.
>> This is the same behaviour as org-refile (when used in an org file)
>> ---
>> Carsten,
>>
>> This patch allows C-u C-u C-c C-w on any line in the agenda.  The goto
>> function (C-u C-c C-w) could possibly work the same way - now you need
>> to put the point on a task first - it won't work on the date or the
>> Day-agenda line.
>>
>> This patch is available at git://git.norang.ca/org-mode for-carsten.
>>
>> lisp/org-agenda.el |   22 +++++++++++-----------
>> 1 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>> index 073e668..83e8dd6 100644
>> --- a/lisp/org-agenda.el
>> +++ b/lisp/org-agenda.el
>> @@ -5475,14 +5475,17 @@ If this information is not given, the
>> function uses the tree at point."
>> (defun org-agenda-refile (&optional goto rfloc)
>>   "Refile the item at point."
>>   (interactive "P")
>> -  (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>> -		     (org-agenda-error)))
>> -	 (buffer (marker-buffer marker))
>> -	 (pos (marker-position marker))
>> -	 (rfloc (or rfloc
>> -		    (org-refile-get-location
>> -		     (if goto "Goto: " "Refile to: ") buffer
>> -		     org-refile-allow-creating-parent-nodes))))
>> +  (if (equal goto '(16))
>> +      (org-refile-goto-last-stored)
>> +    (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>> +		       (org-agenda-error)))
>> +	   (buffer (marker-buffer marker))
>> +	   (pos (marker-position marker))
>> +	   (rfloc))
>> +      (setq rfloc (or rfloc
>> +		      (org-refile-get-location
>> +		       (if goto "Goto: " "Refile to: ") buffer
>> +		       org-refile-allow-creating-parent-nodes))))
>>     (with-current-buffer buffer
>>       (save-excursion
>> 	(save-restriction
>> @@ -5491,9 +5494,6 @@ If this information is not given, the function
>> uses the tree at point."
>> 	  (org-remove-subtree-entries-from-agenda)
>> 	  (org-refile goto buffer rfloc))))))
>>
>> -
>> -
>> -
>> (defun org-agenda-open-link ()
>>   "Follow the link in the current line, if any."
>>   (interactive)
>> -- 
>> 1.6.4
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix jumping to last refile location in agenda
  2009-08-26 13:53   ` Bernt Hansen
@ 2009-08-26 14:11     ` Bernt Hansen
  2009-08-26 14:11     ` Carsten Dominik
  1 sibling, 0 replies; 8+ messages in thread
From: Bernt Hansen @ 2009-08-26 14:11 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Reverting this commit locally doesn't fix it for me so something else
must be going on.

I'm trying to refile two consecutive notes in my refile.org to Notes
(git.org).

/me continues debugging...

-Bernt

Bernt Hansen <bernt@norang.ca> writes:

> Argh.  I think this commit breaks bulk refiling from the agenda.
>
> If I mark two entries (with m) and then B r and enter a location I get a
> Refile: prompt in the mini buffer.
>
> Sorry about that.
>
> -Bernt
>
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Applied, thanks.
>>
>> - Carsten
>>
>> On Aug 25, 2009, at 6:17 PM, Bernt Hansen wrote:
>>
>>> C-u C-u C-c C-w now goes to the last refile location in the agenda.
>>> This is the same behaviour as org-refile (when used in an org file)
>>> ---
>>> Carsten,
>>>
>>> This patch allows C-u C-u C-c C-w on any line in the agenda.  The goto
>>> function (C-u C-c C-w) could possibly work the same way - now you need
>>> to put the point on a task first - it won't work on the date or the
>>> Day-agenda line.
>>>
>>> This patch is available at git://git.norang.ca/org-mode for-carsten.
>>>
>>> lisp/org-agenda.el |   22 +++++++++++-----------
>>> 1 files changed, 11 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>>> index 073e668..83e8dd6 100644
>>> --- a/lisp/org-agenda.el
>>> +++ b/lisp/org-agenda.el
>>> @@ -5475,14 +5475,17 @@ If this information is not given, the
>>> function uses the tree at point."
>>> (defun org-agenda-refile (&optional goto rfloc)
>>>   "Refile the item at point."
>>>   (interactive "P")
>>> -  (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>>> -		     (org-agenda-error)))
>>> -	 (buffer (marker-buffer marker))
>>> -	 (pos (marker-position marker))
>>> -	 (rfloc (or rfloc
>>> -		    (org-refile-get-location
>>> -		     (if goto "Goto: " "Refile to: ") buffer
>>> -		     org-refile-allow-creating-parent-nodes))))
>>> +  (if (equal goto '(16))
>>> +      (org-refile-goto-last-stored)
>>> +    (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>>> +		       (org-agenda-error)))
>>> +	   (buffer (marker-buffer marker))
>>> +	   (pos (marker-position marker))
>>> +	   (rfloc))
>>> +      (setq rfloc (or rfloc
>>> +		      (org-refile-get-location
>>> +		       (if goto "Goto: " "Refile to: ") buffer
>>> +		       org-refile-allow-creating-parent-nodes))))
>>>     (with-current-buffer buffer
>>>       (save-excursion
>>> 	(save-restriction
>>> @@ -5491,9 +5494,6 @@ If this information is not given, the function
>>> uses the tree at point."
>>> 	  (org-remove-subtree-entries-from-agenda)
>>> 	  (org-refile goto buffer rfloc))))))
>>>
>>> -
>>> -
>>> -
>>> (defun org-agenda-open-link ()
>>>   "Follow the link in the current line, if any."
>>>   (interactive)
>>> -- 
>>> 1.6.4
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix jumping to last refile location in agenda
  2009-08-26 13:53   ` Bernt Hansen
  2009-08-26 14:11     ` Bernt Hansen
@ 2009-08-26 14:11     ` Carsten Dominik
  2009-08-26 14:23       ` Bernt Hansen
  2009-08-26 14:35       ` [PATCH] Fix agenda bulk refile bug Bernt Hansen
  1 sibling, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-08-26 14:11 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

So should I revert, or do you have  a fix?

- Carsten

On Aug 26, 2009, at 3:53 PM, Bernt Hansen wrote:

> Argh.  I think this commit breaks bulk refiling from the agenda.
>
> If I mark two entries (with m) and then B r and enter a location I  
> get a
> Refile: prompt in the mini buffer.
>
> Sorry about that.
>
> -Bernt
>
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Applied, thanks.
>>
>> - Carsten
>>
>> On Aug 25, 2009, at 6:17 PM, Bernt Hansen wrote:
>>
>>> C-u C-u C-c C-w now goes to the last refile location in the agenda.
>>> This is the same behaviour as org-refile (when used in an org file)
>>> ---
>>> Carsten,
>>>
>>> This patch allows C-u C-u C-c C-w on any line in the agenda.  The  
>>> goto
>>> function (C-u C-c C-w) could possibly work the same way - now you  
>>> need
>>> to put the point on a task first - it won't work on the date or the
>>> Day-agenda line.
>>>
>>> This patch is available at git://git.norang.ca/org-mode for-carsten.
>>>
>>> lisp/org-agenda.el |   22 +++++++++++-----------
>>> 1 files changed, 11 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>>> index 073e668..83e8dd6 100644
>>> --- a/lisp/org-agenda.el
>>> +++ b/lisp/org-agenda.el
>>> @@ -5475,14 +5475,17 @@ If this information is not given, the
>>> function uses the tree at point."
>>> (defun org-agenda-refile (&optional goto rfloc)
>>>  "Refile the item at point."
>>>  (interactive "P")
>>> -  (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>>> -		     (org-agenda-error)))
>>> -	 (buffer (marker-buffer marker))
>>> -	 (pos (marker-position marker))
>>> -	 (rfloc (or rfloc
>>> -		    (org-refile-get-location
>>> -		     (if goto "Goto: " "Refile to: ") buffer
>>> -		     org-refile-allow-creating-parent-nodes))))
>>> +  (if (equal goto '(16))
>>> +      (org-refile-goto-last-stored)
>>> +    (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>>> +		       (org-agenda-error)))
>>> +	   (buffer (marker-buffer marker))
>>> +	   (pos (marker-position marker))
>>> +	   (rfloc))
>>> +      (setq rfloc (or rfloc
>>> +		      (org-refile-get-location
>>> +		       (if goto "Goto: " "Refile to: ") buffer
>>> +		       org-refile-allow-creating-parent-nodes))))
>>>    (with-current-buffer buffer
>>>      (save-excursion
>>> 	(save-restriction
>>> @@ -5491,9 +5494,6 @@ If this information is not given, the function
>>> uses the tree at point."
>>> 	  (org-remove-subtree-entries-from-agenda)
>>> 	  (org-refile goto buffer rfloc))))))
>>>
>>> -
>>> -
>>> -
>>> (defun org-agenda-open-link ()
>>>  "Follow the link in the current line, if any."
>>>  (interactive)
>>> -- 
>>> 1.6.4
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix jumping to last refile location in agenda
  2009-08-26 14:11     ` Carsten Dominik
@ 2009-08-26 14:23       ` Bernt Hansen
  2009-08-26 14:35       ` [PATCH] Fix agenda bulk refile bug Bernt Hansen
  1 sibling, 0 replies; 8+ messages in thread
From: Bernt Hansen @ 2009-08-26 14:23 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Working on a fix - don't revert it since reverting it doesn't seem to
fix it.

-Bernt


Carsten Dominik <carsten.dominik@gmail.com> writes:

> So should I revert, or do you have  a fix?
>
> - Carsten
>
> On Aug 26, 2009, at 3:53 PM, Bernt Hansen wrote:
>
>> Argh.  I think this commit breaks bulk refiling from the agenda.
>>
>> If I mark two entries (with m) and then B r and enter a location I
>> get a
>> Refile: prompt in the mini buffer.
>>
>> Sorry about that.
>>
>> -Bernt
>>
>>
>> Carsten Dominik <carsten.dominik@gmail.com> writes:
>>
>>> Applied, thanks.
>>>
>>> - Carsten
>>>
>>> On Aug 25, 2009, at 6:17 PM, Bernt Hansen wrote:
>>>
>>>> C-u C-u C-c C-w now goes to the last refile location in the agenda.
>>>> This is the same behaviour as org-refile (when used in an org file)
>>>> ---
>>>> Carsten,
>>>>
>>>> This patch allows C-u C-u C-c C-w on any line in the agenda.  The
>>>> goto
>>>> function (C-u C-c C-w) could possibly work the same way - now you
>>>> need
>>>> to put the point on a task first - it won't work on the date or the
>>>> Day-agenda line.
>>>>
>>>> This patch is available at git://git.norang.ca/org-mode for-carsten.
>>>>
>>>> lisp/org-agenda.el |   22 +++++++++++-----------
>>>> 1 files changed, 11 insertions(+), 11 deletions(-)
>>>>
>>>> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
>>>> index 073e668..83e8dd6 100644
>>>> --- a/lisp/org-agenda.el
>>>> +++ b/lisp/org-agenda.el
>>>> @@ -5475,14 +5475,17 @@ If this information is not given, the
>>>> function uses the tree at point."
>>>> (defun org-agenda-refile (&optional goto rfloc)
>>>>  "Refile the item at point."
>>>>  (interactive "P")
>>>> -  (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>>>> -		     (org-agenda-error)))
>>>> -	 (buffer (marker-buffer marker))
>>>> -	 (pos (marker-position marker))
>>>> -	 (rfloc (or rfloc
>>>> -		    (org-refile-get-location
>>>> -		     (if goto "Goto: " "Refile to: ") buffer
>>>> -		     org-refile-allow-creating-parent-nodes))))
>>>> +  (if (equal goto '(16))
>>>> +      (org-refile-goto-last-stored)
>>>> +    (let* ((marker (or (get-text-property (point) 'org-hd-marker)
>>>> +		       (org-agenda-error)))
>>>> +	   (buffer (marker-buffer marker))
>>>> +	   (pos (marker-position marker))
>>>> +	   (rfloc))
>>>> +      (setq rfloc (or rfloc
>>>> +		      (org-refile-get-location
>>>> +		       (if goto "Goto: " "Refile to: ") buffer
>>>> +		       org-refile-allow-creating-parent-nodes))))
>>>>    (with-current-buffer buffer
>>>>      (save-excursion
>>>> 	(save-restriction
>>>> @@ -5491,9 +5494,6 @@ If this information is not given, the function
>>>> uses the tree at point."
>>>> 	  (org-remove-subtree-entries-from-agenda)
>>>> 	  (org-refile goto buffer rfloc))))))
>>>>
>>>> -
>>>> -
>>>> -
>>>> (defun org-agenda-open-link ()
>>>>  "Follow the link in the current line, if any."
>>>>  (interactive)
>>>> -- 
>>>> 1.6.4
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Emacs-orgmode mailing list
>>>> Remember: use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] Fix agenda bulk refile bug
  2009-08-26 14:11     ` Carsten Dominik
  2009-08-26 14:23       ` Bernt Hansen
@ 2009-08-26 14:35       ` Bernt Hansen
  2009-08-26 14:49         ` Carsten Dominik
  1 sibling, 1 reply; 8+ messages in thread
From: Bernt Hansen @ 2009-08-26 14:35 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Bernt Hansen

Fix bulk refiling in the agenda due to commit
9ec5529 (Fix jumping to last refile location in agenda, 2009-08-20)

This restores the original behaviour.
---
This patch is available in git://git.norang.ca/org-mode for-carsten

As it turns out the revert of the previous patch generated conflicts
and I reverted it incorrectly :-P.  The following patch applied on top
of master seems to fix the problem.

Bernt

 lisp/org-agenda.el |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 84d6566..d915e46 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5481,18 +5481,17 @@ If this information is not given, the function uses the tree at point."
 		       (org-agenda-error)))
 	   (buffer (marker-buffer marker))
 	   (pos (marker-position marker))
-	   (rfloc))
-      (setq rfloc (or rfloc
+	   (rfloc (or rfloc
 		      (org-refile-get-location
 		       (if goto "Goto: " "Refile to: ") buffer
 		       org-refile-allow-creating-parent-nodes))))
-    (with-current-buffer buffer
-      (save-excursion
-	(save-restriction
-	  (widen)
-	  (goto-char marker)
-	  (org-remove-subtree-entries-from-agenda)
-	  (org-refile goto buffer rfloc))))))
+      (with-current-buffer buffer
+	(save-excursion
+	  (save-restriction
+	    (widen)
+	    (goto-char marker)
+	    (org-remove-subtree-entries-from-agenda)
+	    (org-refile goto buffer rfloc)))))))
 
 (defun org-agenda-open-link (&optional arg)
   "Follow the link in the current line, if any.
-- 
1.6.4.1.331.gda1d56

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] Fix agenda bulk refile bug
  2009-08-26 14:35       ` [PATCH] Fix agenda bulk refile bug Bernt Hansen
@ 2009-08-26 14:49         ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-08-26 14:49 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Aug 26, 2009, at 4:35 PM, Bernt Hansen wrote:

> Fix bulk refiling in the agenda due to commit
> 9ec5529 (Fix jumping to last refile location in agenda, 2009-08-20)
>
> This restores the original behaviour.
> ---
> This patch is available in git://git.norang.ca/org-mode for-carsten
>
> As it turns out the revert of the previous patch generated conflicts
> and I reverted it incorrectly :-P.  The following patch applied on top
> of master seems to fix the problem.
>
> Bernt
>
> lisp/org-agenda.el |   17 ++++++++---------
> 1 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 84d6566..d915e46 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -5481,18 +5481,17 @@ If this information is not given, the  
> function uses the tree at point."
> 		       (org-agenda-error)))
> 	   (buffer (marker-buffer marker))
> 	   (pos (marker-position marker))
> -	   (rfloc))
> -      (setq rfloc (or rfloc
> +	   (rfloc (or rfloc
> 		      (org-refile-get-location
> 		       (if goto "Goto: " "Refile to: ") buffer
> 		       org-refile-allow-creating-parent-nodes))))
> -    (with-current-buffer buffer
> -      (save-excursion
> -	(save-restriction
> -	  (widen)
> -	  (goto-char marker)
> -	  (org-remove-subtree-entries-from-agenda)
> -	  (org-refile goto buffer rfloc))))))
> +      (with-current-buffer buffer
> +	(save-excursion
> +	  (save-restriction
> +	    (widen)
> +	    (goto-char marker)
> +	    (org-remove-subtree-entries-from-agenda)
> +	    (org-refile goto buffer rfloc)))))))
>
> (defun org-agenda-open-link (&optional arg)
>   "Follow the link in the current line, if any.
> -- 
> 1.6.4.1.331.gda1d56
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-26 14:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 16:17 [PATCH] Fix jumping to last refile location in agenda Bernt Hansen
2009-08-26  4:41 ` Carsten Dominik
2009-08-26 13:53   ` Bernt Hansen
2009-08-26 14:11     ` Bernt Hansen
2009-08-26 14:11     ` Carsten Dominik
2009-08-26 14:23       ` Bernt Hansen
2009-08-26 14:35       ` [PATCH] Fix agenda bulk refile bug Bernt Hansen
2009-08-26 14:49         ` Carsten Dominik

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.