emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Why does the clocking format in the mode line string look like this?
@ 2016-05-22 19:45 Trevor Murphy
  2016-05-22 19:45 ` [PATCH] Place `org-clock-heading' outside clock time Trevor Murphy
  0 siblings, 1 reply; 3+ messages in thread
From: Trevor Murphy @ 2016-05-22 19:45 UTC (permalink / raw)
  To: emacs-orgmode

Hey, list!

When I clock into a task, I get a nice notification in my mode line.
Except there's always been this one thing that confuses me.

With an effort property on the task, the mode line looks like this:

    [0:00/0:30] (the task headline)

But with no effort property set, the mode line looks like this:

    [0:00 (the task headline)]

Note that the headline is outside the square brackets in the first
case, and inside in the second case.

Does that look inconsistent to anybody else?  I would have expected
the no-effort-property case to look like this:

    [0:00] (the task headline)

The next email contains a patch I've been using to make the two
consistent, in case this makes sense to you all.  FYI, I signed the
FSF copyright paperwork a long time ago.

Cheers!

Trevor

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

* [PATCH] Place `org-clock-heading' outside clock time.
  2016-05-22 19:45 Why does the clocking format in the mode line string look like this? Trevor Murphy
@ 2016-05-22 19:45 ` Trevor Murphy
  2016-05-23 20:49   ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Trevor Murphy @ 2016-05-22 19:45 UTC (permalink / raw)
  To: emacs-orgmode

* org-clock.el (org-clock-get-clock-string): When `org-clock-effort'
  is nil, arrange the format string components separately, similar to
  how they are arranged when o-c-e is not-nil.
---
 lisp/org-clock.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index c72bed4..a7c2a0a 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -682,7 +682,7 @@ If not, show simply the clocked time like 01:50."
 			  'face 'org-mode-line-clock)))
 	  (format clockstr work-done-str))
       (org-propertize (concat "[" (org-minutes-to-clocksum-string clocked-time)
-			      (format " (%s)" org-clock-heading) "]")
+			      "]" (format " (%s)" org-clock-heading))
 		      'face 'org-mode-line-clock))))
 
 (defun org-clock-get-last-clock-out-time ()
-- 
2.8.2

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

* Re: [PATCH] Place `org-clock-heading' outside clock time.
  2016-05-22 19:45 ` [PATCH] Place `org-clock-heading' outside clock time Trevor Murphy
@ 2016-05-23 20:49   ` Nicolas Goaziou
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2016-05-23 20:49 UTC (permalink / raw)
  To: Trevor Murphy; +Cc: emacs-orgmode

Hello,

Trevor Murphy <trevor.m.murphy@gmail.com> writes:

> * org-clock.el (org-clock-get-clock-string): When `org-clock-effort'
>   is nil, arrange the format string components separately, similar to
>   how they are arranged when o-c-e is not-nil.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2016-05-23 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-22 19:45 Why does the clocking format in the mode line string look like this? Trevor Murphy
2016-05-22 19:45 ` [PATCH] Place `org-clock-heading' outside clock time Trevor Murphy
2016-05-23 20:49   ` Nicolas Goaziou

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).