From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Center currently clocked headline to top of screen Date: Fri, 13 Sep 2013 08:10:20 +0200 Message-ID: <50ED6446-F430-4448-A22D-D8A300806258@gmail.com> References: <861u5mgm1b.fsf@somewhere.org> <87k3jekldq.wl%n142857@gmail.com> <453005D1-8F77-413B-8DB0-FA593DC8860B@gmail.com> <86txi3mida.fsf@somewhere.org> <93522FFB-910F-4EC2-ADBF-115680FAE372@gmail.com> <86k3ipdmoe.fsf@somewhere.org> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DBDCC2A9-40C6-475B-9073-0EDCBD924CA6"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKN0p-0004Kj-Kr for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 02:37:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKN0j-0001MV-Qz for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 02:37:51 -0400 Received: from mail-ee0-x235.google.com ([2a00:1450:4013:c00::235]:41760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKN0j-0001KZ-G3 for emacs-orgmode@gnu.org; Fri, 13 Sep 2013 02:37:45 -0400 Received: by mail-ee0-f53.google.com with SMTP id b15so347894eek.26 for ; Thu, 12 Sep 2013 23:37:44 -0700 (PDT) In-Reply-To: <86k3ipdmoe.fsf@somewhere.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org --Apple-Mail=_DBDCC2A9-40C6-475B-9073-0EDCBD924CA6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Applied, thank you. - Carsten On 10.9.2013, at 11:57, Sebastien Vauban = wrote: > Hi Carsten, >=20 > Carsten Dominik wrote: >> On Sep 2, 2013, at 4:02 PM, Sebastien Vauban = wrote: >>> Carsten Dominik wrote: >>>>> El Thu, 22 Aug 2013 10:36:00 +0200 Sebastien Vauban va escriure: >>>>>=20 >>>>>> 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). >>>>=20 >>>>> 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. >>>>=20 >>>> Yup, I have made this a (recenter 2). Non-configurable until = arrival of >>>> more votes. >>>=20 >>> I'd vote for (recenter 0), as: >>>=20 >>> - I generally only clock on projects, and >>>=20 >>> - I'm not interested by seeing the last action(s) of the previous = project, >>> when jumping to the currently clocking task. >>>=20 >>> May I submit a patch with a configurable variable? >>=20 >> Yes. >=20 > Here it is! >=20 > Best regards, > Seb >=20 > From: "Sebastien Vauban" > Date: Tue, 10 Sep 2013 11:52:51 +0200 > Subject: [PATCH] Add option with number of context lines before = currently clocked-in entry >=20 > * org-clock.el (org-clock-goto-before-context): New option. > (org-clock-goto): Use that option. >=20 > --- > lisp/org-clock.el | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) >=20 > 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)) >=20 > +(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")) > --=20 > 1.7.9 >=20 >=20 --Apple-Mail=_DBDCC2A9-40C6-475B-9073-0EDCBD924CA6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJSMqxMAAoJEO+gg/nAZuwMmHUH/j35raHZrfndl9iaoaI/DcAt Xh8cNIz3tb9olDb1YXNt8EuCOTZOYsxSeKd2usQq5uBvNNOND+sbgJR0qS3nqog0 1cXkJrVrDerJjfhAVP1Bb55htQLSDmIGuSAvyi7JXtWAG42iRq3Z4Xlkm4V4VdiZ BBf8wvdhcEg51n8IxdTeCG0vQahVfLnlCugEIbxX9Pv8Bp6Noqo1intpZH4noH8w oLjqYDYB243y/4bqWIEjSzn/I2WRfoQ3EQxhIbyKWdL18ZPXJoxUZIZl1GJnXU76 1kLKk44uRIgM9dUJe7o1vxPO22Bp1a6766bH1j4dn2MJ2KJfpA3NXhtYTp2CG8Q= =6E2w -----END PGP SIGNATURE----- --Apple-Mail=_DBDCC2A9-40C6-475B-9073-0EDCBD924CA6--