From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wLXYH/7QHGL8CwEAgWs5BA (envelope-from ) for ; Mon, 28 Feb 2022 14:41:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iPKVHP7QHGIgugAAauVa8A (envelope-from ) for ; Mon, 28 Feb 2022 14:41:18 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 14AFF38F4F for ; Mon, 28 Feb 2022 14:41:18 +0100 (CET) Received: from localhost ([::1]:34812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOgH6-0007XN-U9 for larch@yhetil.org; Mon, 28 Feb 2022 08:41:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOg8L-0000Zz-Mz for emacs-orgmode@gnu.org; Mon, 28 Feb 2022 08:32:16 -0500 Received: from [2607:f8b0:4864:20::c2b] (port=39590 helo=mail-oo1-xc2b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOg8J-0003pt-I0 for emacs-orgmode@gnu.org; Mon, 28 Feb 2022 08:32:13 -0500 Received: by mail-oo1-xc2b.google.com with SMTP id i6-20020a4ac506000000b0031c5ac6c078so18742193ooq.6 for ; Mon, 28 Feb 2022 05:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:user-agent:from:to:subject:date:message-id:mime-version; bh=GOI88fQB+RbjRnd7TdJrx1f5o0EsjaONkgZGpUW7ZdE=; b=KSpdos50UMa5G80KFvW4FOnmZeR/wkYhEIoGAE0RggEM5uQr9lIaZ204RVdF5qq4v7 dKTr1APfDxPbqY/54Mr4F9rel11LVD5QIh2YechH5UiH7EkTkk9EP8nhDuJZtTO0YBPt 51BurVQAZorSDgueBpd4gLkqsFMv11Sk6gqANJtLYaSE3Y+zaX4QsCdtc3bnvyPmNit3 KvjYCM9c0Amm6qEg0w5yIecWirOgpFRqwGqxVJ/fjNIC+NpP5Om33u94w/+gqEyFSIGg Xe09dN5FfZdHFBgfo+pvvn9o0hnyMXgAW3ME9+A2J0vmgttAsnyAUicB9p7OZXd24Ofe 27QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:user-agent:from:to:subject:date :message-id:mime-version; bh=GOI88fQB+RbjRnd7TdJrx1f5o0EsjaONkgZGpUW7ZdE=; b=KQye06IAgTsMHrx+XeN66yhHek1ESARm/yQnMg6vz01V5gK84jZ+gxpk/8PH0uiNsR V2I2qEMAHwLtNk55U+ZYw3VrAj2NGJJeCaLAYZqjk7qQCEXXBRziHT5ydQBCK3TgHH5U ONDLa2yzgeIMhVUpYkohZCbsFI0bmGmbN64cxuaQyk86f0XqpmQyFd63EijR98yV06dK pMZNXxP2pJglhuMV4fBGX/snKCRQPIiGz/jrwrLS2oLaqdfL2taQU/qr0p9QiHA7Tzzm zZqWOYfsf1bQNULrLfDdIL6Yvc+6vk58GawZDOh6aLdMjzAVccGFJZrEjtnKT8eXZ1JR YCbQ== X-Gm-Message-State: AOAM531fjxh9Chv2YjXAvFv1EHW7fI2Bkl4WTAVzYWdejWv6cXpHbSy6 V3nom2E1+me4Q2K+1RYPNTQexi8Byec8dw== X-Google-Smtp-Source: ABdhPJwoBRBNR2Ti+F4Pz02NRlnBXBWZNfusVykGWleb8gBS+1GYhkbnFrGJBj+yFqOAKGPhVUq0kA== X-Received: by 2002:a4a:3845:0:b0:2e9:b01:6257 with SMTP id o5-20020a4a3845000000b002e90b016257mr8832316oof.78.1646055129112; Mon, 28 Feb 2022 05:32:09 -0800 (PST) Received: from gusbrs-laptop ([154.21.22.174]) by smtp.gmail.com with ESMTPSA id e12-20020a056870c0cc00b000d6bf3c0613sm4435789oad.43.2022.02.28.05.32.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 05:32:08 -0800 (PST) User-agent: mu4e 1.6.10; emacs 28.0.91 From: Gustavo Barros To: emacs-orgmode@gnu.org Subject: [BUG] Propertized space in Agenda's mode-name [9.5.2 (release_9.5.2-3-geb9f34 @ /usr/local/share/emacs/28.0.91/lisp/org/)] Date: Mon, 28 Feb 2022 10:26:50 -0300 Message-ID: <878rtv9kx6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::c2b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::c2b; envelope-from=gusbrs.2016@gmail.com; helo=mail-oo1-xc2b.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646055678; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GOI88fQB+RbjRnd7TdJrx1f5o0EsjaONkgZGpUW7ZdE=; b=Jv6n78y16WXTADSnr8rCtZgRLmq2dWtG4uNTlPWDZifgR93TcXd2tB6L2K4Tyri85NRsup KJFEV26++R6gokMK40iBR/pZU97wbFBMVZbSClSeFupCBcWnII+UKPW78S25YVlKtQncuO CJNTTJF6WBttMglnoHQu7rxw7rZB3mvAtPxE/AQXanPiWO8tZJZlGRRxvhkEqr/vREW4JQ 1W0bfjENH+R0E4vyTKQ1ShvtJ7AhxEjeL4RiSWl++TDl9f7XEXZ6d8EjNUYm6jxrbz2ufE 3DEo0E5DbjyqOzmzrftaV8q7FScJVRtC73dSeXZPggxHGsOQO6BV6im6woTECQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646055678; a=rsa-sha256; cv=none; b=s8dGZYCbmbSvBlNq3/iPU8unBN4+bMOfsf3YYpIC2EgtDvvl9RgaOwjOvA1KlvPggRn1Pb j0vCRLoLM0sR9aXy665p9cwrkeldh81T1lN2qsPJiUqkyaRflHhUBT4zbt/ie/UOaZ/ct3 Rqckysa84KTtzR67zpHopeKtEcL9Z9SOHmtXgXA+tfB3WVF0T9cLI1fAYC18XIWQEPhyJY UQbWY70V9P0XqfAIqflCejWxqeoI+E+9ZrvrNT4dlIO2ORzLNCL4U4MA0rFjZIdZDZQu8S h8V+xY6IVoiXyLFGM3QCoIVW3tBowdZTs9+bvDMbEdOc3THH1DSr78BCqysiaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KSpdos50; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.10 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KSpdos50; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 14AFF38F4F X-Spam-Score: 5.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: nkugc3sJxFmj Hi All, I'm trying out the pre-release this week, and in thus doing, I met a particularly strange issue related to Org Agenda's `mode-name'. And one space in particular, the one that is added before `org-agenda-current-span'. The `mode-name' for the Agenda is set by `org-agenda-set-mode-name', and inside it we find: #+begin_src emacs-lisp " " '(:eval (org-agenda-span-name org-agenda-current-span)) #+end_src Now, this space somehow gets propertized. A recipe for it. Start `emacs -Q'. Set things up: #+begin_src emacs-lisp (setq org-agenda-files '("~/agenda.org")) (setq eval-expression-print-level nil) (setq eval-expression-print-length nil) #+end_src Let's say =agenda.org= contains: #+begin_src org ,* TODO Task SCHEDULED: <2022-02-28 Mon> #+end_src Call `M-x org-agenda RET a'. Now examine `mode-name' with `M-: mode-name RET' to get: #+begin_src emacs-lisp ("Org-Agenda" "" #(" " 0 1 (todo-state #("TODO" 0 4 (fontified nil org-category "agenda")) org-habit-p nil priority 1099 warntime nil ts-date 738214 date (2 28 2022) type "scheduled" org-hd-marker # org-marker # face org-scheduled-today undone-face org-scheduled-today help-echo "mouse-2 or RET jump to Org file ~/agenda.org" mouse-face highlight done-face org-agenda-done org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(DONE\\|TODO\\)\\)?\\(?: +\\(\\[#.\\]\\)\\)?\\(?: +\\(.*?\\)\\)??\\(?:[ ]+\\(:[[:alnum:]_@#%:]+:\\)\\)?[ ]*$" org-todo-regexp "\\(DONE\\|TODO\\)" org-not-done-regexp "\\(TODO\\)" dotime time format (((org-prefix-has-time t) (org-prefix-has-tag nil) (org-prefix-category-length 12) (org-prefix-has-effort nil) (org-prefix-has-breadcrumbs nil)) (format " %s %s%s%s" (format "%s" (if (member category-icon '("" nil)) "" (concat category-icon "" (get-text-property 0 'extra-space category-icon)))) (format "%-12s" (if (member category '("" nil)) "" (concat category ":" (get-text-property 0 'extra-space category)))) (if (member time '("" nil)) "" (format "%-12s" (concat time ""))) (format "%s" (if (member extra '("" nil)) "" (concat extra " " (get-text-property 0 'extra-space extra)))))) extra "Scheduled: " time "" level " " txt #("TODO Task" 0 9 (fontified nil org-category "agenda" org-heading t)) breadcrumbs nil duration nil time-of-day nil org-priority-lowest 67 org-priority-highest 65 tags nil org-category "agenda")) (:eval (org-agenda-span-name org-agenda-current-span)) "" "" "" " Ddl" " Grid" "" "" "" "" "" "" "" "" "") #+end_src So, it appears that the Org Agenda buffer's properties are somehow getting to that particular space in `mode-name'. It completely beats me how it is so but, alas, it is there. This is a problem because, depending on what the content of your agenda is, this might result in this space getting some visually distinctive property. In my case, I get a blank gap in the mode-line at this point. I couldn't generate a simple ECM that gets this effect. But, at this point, it should be clear it can happen, given these properties are there. This was all tested with the latest pre-release tarball, and the Org built-in there. (I did not get the mode-line gap with 27.2 and the latest Org release for the same agendas). Btw, since we are talking about this particular space in `mode-name', I always had some qualms with the fact that it is unconditionally added there, so that we get a double space for Agendas for which `(:eval (org-agenda-span-name org-agenda-current-span))' results in an empty string (e.g. a simple todo agenda). Couldn't this space be added there conditionally there? It is likely trivial to handle it directly in `org-agenda-span-name' (I know it also used in `org-agenda-list', but an optional argument could make the distinction). WDYT? Best regards, Gustavo. Emacs : GNU Emacs 28.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-02-26 Package: Org mode version 9.5.2 (release_9.5.2-3-geb9f34 @ /usr/local/share/emacs/28.0.91/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-agenda-files '("~/agenda.org") org-export-before-parsing-hook '(org-attach-expand-links) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) )