* [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/)]
@ 2022-02-28 13:26 Gustavo Barros
2022-10-22 7:15 ` Ihor Radchenko
0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Barros @ 2022-02-28 13:26 UTC (permalink / raw)
To: emacs-orgmode
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 #<marker
(moves after insertion) at 1 in agenda.org> org-marker #<marker (moves
after insertion) at 24 in agenda.org> 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)
)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2022-02-28 13:26 [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/)] Gustavo Barros
@ 2022-10-22 7:15 ` Ihor Radchenko
2022-10-22 10:51 ` Gustavo Barros
0 siblings, 1 reply; 12+ messages in thread
From: Ihor Radchenko @ 2022-10-22 7:15 UTC (permalink / raw)
To: Gustavo Barros; +Cc: emacs-orgmode
Gustavo Barros <gusbrs.2016@gmail.com> writes:
> 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
> ...
> 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.
I am unable to reproduce with the latest Org.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2022-10-22 7:15 ` Ihor Radchenko
@ 2022-10-22 10:51 ` Gustavo Barros
2023-04-13 13:03 ` Gustavo Barros
0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Barros @ 2022-10-22 10:51 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi Ihor,
On Sat, 22 Oct 2022 at 04:14, Ihor Radchenko <yantar92@posteo.net> wrote:
> I am unable to reproduce with the latest Org.
thanks for checking this report.
I've retested things here and, though I can still reproduce it with
Org 9.5.5, I can confirm the issue is gone on 9.6-pre with the latest
commit on master.
Lucky us! :-)
Best regards,
Gustavo.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2022-10-22 10:51 ` Gustavo Barros
@ 2023-04-13 13:03 ` Gustavo Barros
2023-04-13 14:26 ` Ihor Radchenko
0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Barros @ 2023-04-13 13:03 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi All,
On Sat, 22 Oct 2022 at 07:51, Gustavo Barros <gusbrs.2016@gmail.com> wrote:
>
> On Sat, 22 Oct 2022 at 04:14, Ihor Radchenko <yantar92@posteo.net> wrote:
>
> > I am unable to reproduce with the latest Org.
>
> thanks for checking this report.
> I've retested things here and, though I can still reproduce it with
> Org 9.5.5, I can confirm the issue is gone on 9.6-pre with the latest
> commit on master.
> Lucky us! :-)
For the record, I'm trying the new Emacs pretest with Org 9.6.3 and
the `mode-name` is still has the propertized space and, in some
situations (e.g. `org-tags-view`) the blank gap in the mode line still
creeps in for me.
Best regards,
Gustavo.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 13:03 ` Gustavo Barros
@ 2023-04-13 14:26 ` Ihor Radchenko
2023-04-13 14:30 ` Gustavo Barros
0 siblings, 1 reply; 12+ messages in thread
From: Ihor Radchenko @ 2023-04-13 14:26 UTC (permalink / raw)
To: Gustavo Barros; +Cc: emacs-orgmode
Gustavo Barros <gusbrs.2016@gmail.com> writes:
> For the record, I'm trying the new Emacs pretest with Org 9.6.3 and
> the `mode-name` is still has the propertized space and, in some
> situations (e.g. `org-tags-view`) the blank gap in the mode line still
> creeps in for me.
I still cannot reproduce on bugfix.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 14:26 ` Ihor Radchenko
@ 2023-04-13 14:30 ` Gustavo Barros
2023-04-13 14:55 ` Ihor Radchenko
0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Barros @ 2023-04-13 14:30 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi Ihor,
On Thu, 13 Apr 2023 at 11:24, Ihor Radchenko <yantar92@posteo.net> wrote:
>
> Gustavo Barros <gusbrs.2016@gmail.com> writes:
>
> > For the record, I'm trying the new Emacs pretest with Org 9.6.3 and
> > the `mode-name` is still has the propertized space and, in some
> > situations (e.g. `org-tags-view`) the blank gap in the mode line still
> > creeps in for me.
>
> I still cannot reproduce on bugfix.
thanks for checking this again. When you say you can't reproduce you
mean that you get no blank gaps in the mode line, or that, if you
inspect `mode-name`, the space is not propertized? (Just tested the
latter and I do find it propertized even in `emacs -Q`).
Best,
Gustavo.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 14:30 ` Gustavo Barros
@ 2023-04-13 14:55 ` Ihor Radchenko
2023-04-13 15:07 ` Gustavo Barros
0 siblings, 1 reply; 12+ messages in thread
From: Ihor Radchenko @ 2023-04-13 14:55 UTC (permalink / raw)
To: Gustavo Barros; +Cc: emacs-orgmode
Gustavo Barros <gusbrs.2016@gmail.com> writes:
>> I still cannot reproduce on bugfix.
>
> thanks for checking this again. When you say you can't reproduce you
> mean that you get no blank gaps in the mode line, or that, if you
> inspect `mode-name`, the space is not propertized? (Just tested the
> latter and I do find it propertized even in `emacs -Q`).
I inspected `mode-name'.
I tried harder, and I was able to reproduce using literally emacs -Q.
In contrast, I cannot reproduce when running from Emacs git directory
(not using built-in Org version), even when I use the same release tag.
It looks like Emacs bug then. I suspect some funny staff going on during compilation.
May you report it to Emacs bug tracker, linking to this bug report?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 14:55 ` Ihor Radchenko
@ 2023-04-13 15:07 ` Gustavo Barros
2023-04-13 15:13 ` Ihor Radchenko
0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Barros @ 2023-04-13 15:07 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi Ihor,
On Thu, 13 Apr 2023 at 11:52, Ihor Radchenko <yantar92@posteo.net> wrote:
> I inspected `mode-name'.
> I tried harder, and I was able to reproduce using literally emacs -Q.
Thanks, and I'm glad to know I'm not crazy then.
> It looks like Emacs bug then. I suspect some funny staff going on during compilation.
> May you report it to Emacs bug tracker, linking to this bug report?
Mhm, I don't know why you say it is an Emacs bug. From my side, it
only affects Org Agenda. So I've reported it to Org. Besides, it would
be a legitimate place to report this even if it was a more general
issue.
Best regards,
Gustavo.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 15:07 ` Gustavo Barros
@ 2023-04-13 15:13 ` Ihor Radchenko
2023-04-13 15:22 ` Gustavo Barros
0 siblings, 1 reply; 12+ messages in thread
From: Ihor Radchenko @ 2023-04-13 15:13 UTC (permalink / raw)
To: Gustavo Barros; +Cc: emacs-orgmode
Gustavo Barros <gusbrs.2016@gmail.com> writes:
>> It looks like Emacs bug then. I suspect some funny staff going on during compilation.
>> May you report it to Emacs bug tracker, linking to this bug report?
>
> Mhm, I don't know why you say it is an Emacs bug. From my side, it
> only affects Org Agenda. So I've reported it to Org. Besides, it would
> be a legitimate place to report this even if it was a more general
> issue.
Basically, we need to bring Emacs devs in. Because I have no clue what
is going on. And reporting to Emacs bug tracker is the way to involve
Emacs devs.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 15:13 ` Ihor Radchenko
@ 2023-04-13 15:22 ` Gustavo Barros
2023-04-13 15:49 ` Ihor Radchenko
0 siblings, 1 reply; 12+ messages in thread
From: Gustavo Barros @ 2023-04-13 15:22 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Hi Ihor,
On Thu, 13 Apr 2023 at 12:10, Ihor Radchenko <yantar92@posteo.net> wrote:
> Basically, we need to bring Emacs devs in. Because I have no clue what
> is going on. And reporting to Emacs bug tracker is the way to involve
> Emacs devs.
I get that. But please look at it from my perspective too. This is a
reiteration of a previous report. Now you are asking me to make a
third one, which would have to start from scratch.
Also, if Emacs devs are requested to chime in by Org devs it is
different from "just another user's report". Besides, I don't even
understand why you say this is an Emacs problem, so I'd be at a loss
at even trying to explain what the general problem is.
Best,
Gustavo.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [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/)]
2023-04-13 15:22 ` Gustavo Barros
@ 2023-04-13 15:49 ` Ihor Radchenko
2023-04-14 23:07 ` Gustavo Barros
0 siblings, 1 reply; 12+ messages in thread
From: Ihor Radchenko @ 2023-04-13 15:49 UTC (permalink / raw)
To: Gustavo Barros; +Cc: emacs-orgmode
Gustavo Barros <gusbrs.2016@gmail.com> writes:
> I get that. But please look at it from my perspective too. This is a
> reiteration of a previous report. Now you are asking me to make a
> third one, which would have to start from scratch.
Not from scratch, if you link this discussion.
> Also, if Emacs devs are requested to chime in by Org devs it is
> different from "just another user's report". Besides, I don't even
> understand why you say this is an Emacs problem, so I'd be at a loss
> at even trying to explain what the general problem is.
I suspect that it might be Emacs problem.
It will be enough for you to mention that I asked you to report to Emacs
bug tracker.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-04-14 23:08 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 13:26 [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/)] Gustavo Barros
2022-10-22 7:15 ` Ihor Radchenko
2022-10-22 10:51 ` Gustavo Barros
2023-04-13 13:03 ` Gustavo Barros
2023-04-13 14:26 ` Ihor Radchenko
2023-04-13 14:30 ` Gustavo Barros
2023-04-13 14:55 ` Ihor Radchenko
2023-04-13 15:07 ` Gustavo Barros
2023-04-13 15:13 ` Ihor Radchenko
2023-04-13 15:22 ` Gustavo Barros
2023-04-13 15:49 ` Ihor Radchenko
2023-04-14 23:07 ` Gustavo Barros
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).