You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clearly, the table code relies on monospaced fonts and images don't fit well
here. So I think you should just strip images, that is, the display text
property.
This is a very simply patch that fixes the issue for me:
diff --git a/calfw-org.el b/calfw-org.el
index 99fe18e..5dcdc17 100644
--- a/calfw-org.el
+++ b/calfw-org.el
@@ -69,7 +69,10 @@
(buffer (marker-buffer marker)))
(propertize
(concat item " " (buffer-name buffer))
- 'keymap cfw:org-text-keymap)))
+ 'keymap cfw:org-text-keymap
+ ;; Delete the display property, since displaying images will break our
+ ;; table layout.
+ 'display nil)))
(defvar cfw:org-schedule-summary-transformer 'cfw:org-summary-format
"Transformation function which transforms the org item string to calendar title.
However, I'm not convinced that it is a good idea to only fix the org mode
stuff. Most probably the filtering (or better, a nifty implementation of how
to correctly handle display specs) of display text properties should be in
calfw.el, but I can't spot the right location at a first glance.
The text was updated successfully, but these errors were encountered:
Yes, I also think that calfw should display images in the grids.
So, I will try org-google-weather to research using images in org files.
Please give me a time to research.
If it takes much time for me to implement the function, I would merge your patch to the master branch to avoid the problem.
Yes, I also think that calfw should display images in the grids. So,
I will try org-google-weather to research using images in org files.
Please give me a time to research.
Sure. By the way, I just noticed that besides images also unicode
characters skrew the table layout. Again as an example,
org-google-weather inserts a ℃ character which is slightly wider than
normal ascii chars, at least with the font emacs chooses to display it.
(I use DeJaVu Sans Mono by default, but that doesn't contain this
character, and so emacs falls back to xft:-unknown-AntPoltSemiCond.)
If it takes much time for me to implement the function, I would merge
your patch to the master branch to avoid the problem.
Feel free to do so. But as I've said, I think a proper handling of
display text properties (even if it's simply removing them) belongs into
calfw.el instead of only the org mode backend.
Bye,
Tassilo
localauthor
pushed a commit
to localauthor/emacs-calfw
that referenced
this issue
May 25, 2021
I've just discovered calfw and it's awesome! I use it together with org-mode.
One minor glitch is that the tables get confused by images. For example, in
one of my org files I have this entry:
This uses the org-google-weather package to insert a short weather forecast
including an icon (sunny, cloudy, etc.) into the org agenda buffer.
Screenshot Org Agenda: http://dl.dropbox.com/u/30611246/img/org-agenda.png
When that is converted to a calfw calendar table, then the borders of the cells
are wrong.
Screenshot Calfw: http://dl.dropbox.com/u/30611246/img/org-calfw.png
Clearly, the table code relies on monospaced fonts and images don't fit well
here. So I think you should just strip images, that is, the display text
property.
This is a very simply patch that fixes the issue for me:
However, I'm not convinced that it is a good idea to only fix the org mode
stuff. Most probably the filtering (or better, a nifty implementation of how
to correctly handle display specs) of display text properties should be in
calfw.el, but I can't spot the right location at a first glance.
The text was updated successfully, but these errors were encountered: