From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Modernize frame-title-format: "%b - GNU Emacs" Date: Sun, 30 Aug 2020 16:59:39 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000003b30ee05ae2114ae" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4722"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 31 02:00:25 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCXFI-000171-V5 for ged-emacs-devel@m.gmane-mx.org; Mon, 31 Aug 2020 02:00:25 +0200 Original-Received: from localhost ([::1]:53376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCXFI-0004f5-00 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 Aug 2020 20:00:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCXEd-0004CG-Tx for emacs-devel@gnu.org; Sun, 30 Aug 2020 19:59:43 -0400 Original-Received: from mail-yb1-f181.google.com ([209.85.219.181]:33677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCXEb-0007oM-TF for emacs-devel@gnu.org; Sun, 30 Aug 2020 19:59:43 -0400 Original-Received: by mail-yb1-f181.google.com with SMTP id 145so1912237ybd.0 for ; Sun, 30 Aug 2020 16:59:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=5tXIurYiESA5j0b5yx30xpUSbX/Vv9x2KN0dpAVqEoc=; b=jQBi0dEaU/TpKDFvSzt7K4014Ljq8hAbUnQ4IW0j3YC2PtR88OaXbF8jMp22iSHxyl ncthNu+/Tgn0c8rG8cn7YVa3lUHEZ1Bwm84lq9IVYHundZtNa3qjMNROQmAiXU4JsTKM f6YY62RJqEYEa+XI8lgannMxc42zM9RbKfabNzCteWcV3G6DFk+km4P31u3UoSKDEDPX V0AlyFexFiuyOX47p2ULg/6SFSEhIgqTxHDYPouWppxC5QSHKsblr5/FyEnqceCjYrrg PvM0iqH0b5l2sPr/mdeuDvIVl8D+6NwlAFrj7d7ZdXHwoDTNBRXLUnIQezdxsE53bJmH qtVQ== X-Gm-Message-State: AOAM5320dKPd3ZqIrIanhKq4xrZ0u+p809rQAHyKOwapq22MToJ7RxOi 6oc4yTpdDMah+2o/YPswI/T+pNGSxJjEB7liB7vVNK22 X-Google-Smtp-Source: ABdhPJy0wFWZXItKPIUMau53XW14NLnmBxxVdbHu3PIB2ePXPy8VFRUj/RvirCXl2cTj1RILp3P5flF7wRDjpeqztOg= X-Received: by 2002:a25:a265:: with SMTP id b92mr9845198ybi.389.1598831980121; Sun, 30 Aug 2020 16:59:40 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 30 Aug 2020 16:59:39 -0700 In-Reply-To: Received-SPF: pass client-ip=209.85.219.181; envelope-from=stefankangas@gmail.com; helo=mail-yb1-f181.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/30 19:59:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:254420 Archived-At: --0000000000003b30ee05ae2114ae Content-Type: text/plain; charset="UTF-8" Stefan Kangas writes: > Lars Ljung proposed to change frame-title-format to something more > modern and similar to Firefox, gvim, Gimp, LibreOffice, etc.: > https://debbugs.gnu.org/41147 > > We currently have: > > (setq frame-title-format > '(multiple-frames "%b" > ("" invocation-name "@" system-name))) First, thank you to everyone who has contributed to the discussion so far. I have followed the discussion closely, and thought about this some more to come up with a realistic proposal. The discussion has revealed that it is important for some reasonably common use-cases to keep `system-name', but that there is less need for `invocation-name'. I therefore suggest: (setq frame-title-format '(multiple-frames "%B" ("" "%B - GNU Emacs at " system-name)) The main new feature is that we will show the current buffer or file name in the frame title, even when there is only one frame. The new "%B" specifier, added by me here, is equivalent to: (if buffer-file-name (abbreviate-file-name buffer-file-name) buffer-name)) The proposal is an incremental improvement, which could be the basis of further work (such as adding "*" if the file is modified, etc.). Please find attached a proposed patch; thanks in advance for any reviews or comments. Best regards, Stefan Kangas --0000000000003b30ee05ae2114ae Content-Type: text/x-diff; charset="US-ASCII"; name="0001-Improve-frame-title-format-and-icon-title-format.patch" Content-Disposition: attachment; filename="0001-Improve-frame-title-format-and-icon-title-format.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: d215cd0413e98da7_0.1 RnJvbSA2MDE4NWMyZmE2NjdmZGQ4YTM5MDA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