emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Center currently clocked headline to top of screen
@ 2013-08-22  8:36 Sebastien Vauban
  2013-08-22 11:36 ` Daniel Clemente
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2013-08-22  8:36 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

When jumping to the currently clocked headline (via `C-c C-x C-j'), it seems
(to me) more logical to recenter that headline at the top of the screen (vs at
the center of the screen, that is the current behavior).

Here the patch to do so.

Best regards,
  Seb

From dc2cabbab8ed13b47c310821447ac7c0ed58af55 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
Date: Thu, 22 Aug 2013 10:31:08 +0200
Subject: [PATCH] Move current headline to top of screen

---
 lisp/org-clock.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 656fb4c..b7d2add 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1691,7 +1691,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection."
     (org-show-entry)
     (org-back-to-heading t)
     (org-cycle-hide-drawers 'children)
-    (recenter)
+    (recenter 0)
     (org-reveal)
     (if recent
 	(message "No running clock, this is the most recently clocked task"))
-- 
1.7.9

-- 
Sebastien Vauban

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

* Re: [PATCH] Center currently clocked headline to top of screen
  2013-08-22  8:36 [PATCH] Center currently clocked headline to top of screen Sebastien Vauban
@ 2013-08-22 11:36 ` Daniel Clemente
  2013-08-30 16:15   ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Clemente @ 2013-08-22 11:36 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode


Seeing a bit of context is nice; maybe putting it at line 2 or 3 is better than at the top and I think it is better than centered. It could also be configurable.


El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure:
> 
> Hello,
> 
> When jumping to the currently clocked headline (via `C-c C-x C-j'), it seems
> (to me) more logical to recenter that headline at the top of the screen (vs at
> the center of the screen, that is the current behavior).
> 

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

* Re: [PATCH] Center currently clocked headline to top of screen
  2013-08-22 11:36 ` Daniel Clemente
@ 2013-08-30 16:15   ` Carsten Dominik
  2013-09-02 14:02     ` Sebastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2013-08-30 16:15 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: Sebastien Vauban, emacs-orgmode

Hi Daniel and Sebastien, 

On 22.8.2013, at 13:36, Daniel Clemente <n142857@gmail.com> wrote:

> 
> Seeing a bit of context is nice; maybe putting it at line 2 or 3 is better than at the top and I think it is better than centered. It could also be configurable.

Yup, I have made this a (recenter 2).  Non-configurable until arrival of more votes.

Cheers

- Carsten

> 
> 
> El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure:
>> 
>> Hello,
>> 
>> When jumping to the currently clocked headline (via `C-c C-x C-j'), it seems
>> (to me) more logical to recenter that headline at the top of the screen (vs at
>> the center of the screen, that is the current behavior).
>> 
> 

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

* Re: [PATCH] Center currently clocked headline to top of screen
  2013-08-30 16:15   ` Carsten Dominik
@ 2013-09-02 14:02     ` Sebastien Vauban
  2013-09-02 14:16       ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2013-09-02 14:02 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Carsten, Daniel and all,

Carsten Dominik wrote:
>> El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure:
>>
>>> When jumping to the currently clocked headline (via `C-c C-x C-j'), it
>>> seems (to me) more logical to recenter that headline at the top of the
>>> screen (vs at the center of the screen, that is the current behavior).
>
>> Seeing a bit of context is nice; maybe putting it at line 2 or 3 is better
>> than at the top and I think it is better than centered. It could also be
>> configurable.
>
> Yup, I have made this a (recenter 2). Non-configurable until arrival of more
> votes.

I'd vote for (recenter 0), as:

- I generally only clock on projects, and

- I'm not interested by seeing the last action(s) of the previous project,
  when jumping to the currently clocking task.

May I submit a patch with a configurable variable?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [PATCH] Center currently clocked headline to top of screen
  2013-09-02 14:02     ` Sebastien Vauban
@ 2013-09-02 14:16       ` Carsten Dominik
  2013-09-10  9:57         ` Sebastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2013-09-02 14:16 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode


On Sep 2, 2013, at 4:02 PM, Sebastien Vauban <sva-news@mygooglest.com> wrote:

> Hi Carsten, Daniel and all,
> 
> Carsten Dominik wrote:
>>> El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure:
>>> 
>>>> When jumping to the currently clocked headline (via `C-c C-x C-j'), it
>>>> seems (to me) more logical to recenter that headline at the top of the
>>>> screen (vs at the center of the screen, that is the current behavior).
>> 
>>> Seeing a bit of context is nice; maybe putting it at line 2 or 3 is better
>>> than at the top and I think it is better than centered. It could also be
>>> configurable.
>> 
>> Yup, I have made this a (recenter 2). Non-configurable until arrival of more
>> votes.
> 
> I'd vote for (recenter 0), as:
> 
> - I generally only clock on projects, and
> 
> - I'm not interested by seeing the last action(s) of the previous project,
>  when jumping to the currently clocking task.
> 
> May I submit a patch with a configurable variable?

Yes.

- Carsten

> 
> Best regards,
>  Seb
> 
> -- 
> Sebastien Vauban
> 
> 

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

* Re: [PATCH] Center currently clocked headline to top of screen
  2013-09-02 14:16       ` Carsten Dominik
@ 2013-09-10  9:57         ` Sebastien Vauban
  2013-09-13  6:10           ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastien Vauban @ 2013-09-10  9:57 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Carsten,

Carsten Dominik wrote:
> On Sep 2, 2013, at 4:02 PM, Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org> wrote:
>> Carsten Dominik wrote:
>>>> El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure:
>>>> 
>>>>> When jumping to the currently clocked headline (via `C-c C-x C-j'), it
>>>>> seems (to me) more logical to recenter that headline at the top of the
>>>>> screen (vs at the center of the screen, that is the current behavior).
>>> 
>>>> Seeing a bit of context is nice; maybe putting it at line 2 or 3 is
>>>> better than at the top and I think it is better than centered. It could
>>>> also be configurable.
>>> 
>>> Yup, I have made this a (recenter 2). Non-configurable until arrival of
>>> more votes.
>> 
>> I'd vote for (recenter 0), as:
>> 
>> - I generally only clock on projects, and
>> 
>> - I'm not interested by seeing the last action(s) of the previous project,
>>   when jumping to the currently clocking task.
>> 
>> May I submit a patch with a configurable variable?
>
> Yes.

Here it is!

Best regards,
  Seb

From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
Date: Tue, 10 Sep 2013 11:52:51 +0200
Subject: [PATCH] Add option with number of context lines before currently clocked-in entry

* org-clock.el (org-clock-goto-before-context): New option.
  (org-clock-goto): Use that option.

---
 lisp/org-clock.el |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 524dbf1..c39b589 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1668,6 +1668,9 @@ Optional argument N tells to change by that many units."
   (message "Clock canceled")
   (run-hooks 'org-clock-cancel-hook))
 
+(defvar org-clock-goto-before-context 2
+  "Number of lines of context to display before currently clocked-in entry.")
+
 ;;;###autoload
 (defun org-clock-goto (&optional select)
   "Go to the currently clocked-in entry, or to the most recently clocked one.
@@ -1691,7 +1694,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection."
     (org-show-entry)
     (org-back-to-heading t)
     (org-cycle-hide-drawers 'children)
-    (recenter 2)
+    (recenter org-clock-goto-before-context)
     (org-reveal)
     (if recent
 	(message "No running clock, this is the most recently clocked task"))
-- 
1.7.9

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

* Re: [PATCH] Center currently clocked headline to top of screen
  2013-09-10  9:57         ` Sebastien Vauban
@ 2013-09-13  6:10           ` Carsten Dominik
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2013-09-13  6:10 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2607 bytes --]

Applied, thank you.

- Carsten

On 10.9.2013, at 11:57, Sebastien Vauban <sva-news@mygooglest.com> wrote:

> Hi Carsten,
> 
> Carsten Dominik wrote:
>> On Sep 2, 2013, at 4:02 PM, Sebastien Vauban <sva-news@mygooglest.com> wrote:
>>> Carsten Dominik wrote:
>>>>> El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure:
>>>>> 
>>>>>> When jumping to the currently clocked headline (via `C-c C-x C-j'), it
>>>>>> seems (to me) more logical to recenter that headline at the top of the
>>>>>> screen (vs at the center of the screen, that is the current behavior).
>>>> 
>>>>> Seeing a bit of context is nice; maybe putting it at line 2 or 3 is
>>>>> better than at the top and I think it is better than centered. It could
>>>>> also be configurable.
>>>> 
>>>> Yup, I have made this a (recenter 2). Non-configurable until arrival of
>>>> more votes.
>>> 
>>> I'd vote for (recenter 0), as:
>>> 
>>> - I generally only clock on projects, and
>>> 
>>> - I'm not interested by seeing the last action(s) of the previous project,
>>>  when jumping to the currently clocking task.
>>> 
>>> May I submit a patch with a configurable variable?
>> 
>> Yes.
> 
> Here it is!
> 
> Best regards,
>  Seb
> 
> From: "Sebastien Vauban" <sva-news@mygooglest.com>
> Date: Tue, 10 Sep 2013 11:52:51 +0200
> Subject: [PATCH] Add option with number of context lines before currently clocked-in entry
> 
> * org-clock.el (org-clock-goto-before-context): New option.
>  (org-clock-goto): Use that option.
> 
> ---
> lisp/org-clock.el |    5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index 524dbf1..c39b589 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -1668,6 +1668,9 @@ Optional argument N tells to change by that many units."
>   (message "Clock canceled")
>   (run-hooks 'org-clock-cancel-hook))
> 
> +(defvar org-clock-goto-before-context 2
> +  "Number of lines of context to display before currently clocked-in entry.")
> +
> ;;;###autoload
> (defun org-clock-goto (&optional select)
>   "Go to the currently clocked-in entry, or to the most recently clocked one.
> @@ -1691,7 +1694,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection."
>     (org-show-entry)
>     (org-back-to-heading t)
>     (org-cycle-hide-drawers 'children)
> -    (recenter 2)
> +    (recenter org-clock-goto-before-context)
>     (org-reveal)
>     (if recent
> 	(message "No running clock, this is the most recently clocked task"))
> -- 
> 1.7.9
> 
> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

end of thread, other threads:[~2013-09-13  6:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-22  8:36 [PATCH] Center currently clocked headline to top of screen Sebastien Vauban
2013-08-22 11:36 ` Daniel Clemente
2013-08-30 16:15   ` Carsten Dominik
2013-09-02 14:02     ` Sebastien Vauban
2013-09-02 14:16       ` Carsten Dominik
2013-09-10  9:57         ` Sebastien Vauban
2013-09-13  6:10           ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).