From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Move Currently clocked in task to left on modeline Date: Mon, 22 Jul 2019 19:39:12 -0400 Message-ID: <875zntod0f.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50478) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hphtt-0003fS-8N for emacs-orgmode@gnu.org; Mon, 22 Jul 2019 19:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hphts-000351-AI for emacs-orgmode@gnu.org; Mon, 22 Jul 2019 19:39:25 -0400 Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:52602 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hphts-00033I-3F for emacs-orgmode@gnu.org; Mon, 22 Jul 2019 19:39:24 -0400 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hphtn-000poo-NG for emacs-orgmode@gnu.org; Tue, 23 Jul 2019 01:39:19 +0200 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" To: emacs-orgmode@gnu.org Nathan Neff writes: > Hello all, > > How can I move the currently clocked task to be on the left side > of my modeline in emacs? > The way the information ends up in the mode line is a bit convoluted: - The main variable is `mode-line-format': you should read its doc string carefully. - `mode-line-format' includes the variable `mode-line-misc-info' towards the end. - `mode-line-misc-info' includes the variable `global-mode-string' (in a somewhat peculiar way that I don't quite understand). - `org-clock-in', `org-clock-out' and `org-clock-cancel' affect the mode line by modifying the `global-mode-string' variable to append or delete `org-mode-line-string' to/from it and then forcing a mode-line update with (drum roll) `force-mode-line-update'. - The rest of the org mode code mucks around with `org-mode-line-string' exclusively. In short, there is no way to change the position of the currently clocked task without rewriting code. You might be able to move *all* of the org information by modifying an earlier mode-line component (rather than `global-mode-string' which is part of the final component). But it would not be trivial. -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler