From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org-clock-out overrides frame-title-format [9.2.3 (9.2.3-17-g4df705-elpa @ ~/.emacs.d/elpa/org-20190513/)] Date: Tue, 28 May 2019 11:02:32 +0200 Message-ID: <87woibq7dj.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:32986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVY0F-0004I8-Od for emacs-orgmode@gnu.org; Tue, 28 May 2019 05:02:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVY0E-0008Lk-Ln for emacs-orgmode@gnu.org; Tue, 28 May 2019 05:02:39 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:38343) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hVY0E-0008K9-Gc for emacs-orgmode@gnu.org; Tue, 28 May 2019 05:02:38 -0400 In-Reply-To: (Andrii Kolomoiets's message of "Fri, 17 May 2019 15:15:01 +0300") 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: Andrii Kolomoiets Cc: emacs-orgmode@gnu.org Hello, Andrii Kolomoiets writes: > The org-frame-title-format-backup variable is initialized on > org-clock.el loading and future changes to frame-title-format is > ignored: > > 1. emacs -Q > 2. M-: frame-title-format > It's "%b" > 3. M-: (require 'org-clock) > 4. (setq frame-title-format "%b bar") > 5. C-x b test.org > 6. M-x org-mode > 7. Insert heading (M-RET foo) > 8. M-x org-clock-in > 9. M-x org-clock-out > 10. M-: frame-title-format > It's "%b" again > > With provided patch org-frame-title-format-backup is initialized on > org-clock-in. Also frame-title-format is restored to > org-frame-title-format-backup only if current frame-title-format is > equal to org-clock-frame-title-format in case frame title format is > changed after org-clock-in. Thank you. I think this could be factored out a bit, for example creating a simple function taking care of updating `frame-title-format' if needed. Also, could you provide a proper commit message and use git format-patch to send it again? Regards, -- Nicolas Goaziou