* [bug] Alignment bug in clock tables @ 2014-10-02 15:41 Francesco Pizzolante 2014-10-03 10:21 ` Joost Helberg 0 siblings, 1 reply; 13+ messages in thread From: Francesco Pizzolante @ 2014-10-02 15:41 UTC (permalink / raw) To: mailing-list-org-mode Hi, I'm having an alignment issue in clock tables, both in the agenda and in dynamic blocks. By default, \emsp is displayed in clock tables for level 2 (or above) to indent headings. To avoid that, I set the variable `org-pretty-entities' to t, and in this case the alignment of the table is broken when you regenerate it. I currently see no solution if I want correct alignment in clock tables without seeing \emsp. Any idea how to achieve that? Here's a small screen capture that shows the issue: http://screencast.com/t/qpmxDV8R543G Thanks. Francesco ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2014-10-02 15:41 [bug] Alignment bug in clock tables Francesco Pizzolante @ 2014-10-03 10:21 ` Joost Helberg [not found] ` <8738b5o3lt.fsf-JFNXyGN8thM@public.gmane.org> 0 siblings, 1 reply; 13+ messages in thread From: Joost Helberg @ 2014-10-03 10:21 UTC (permalink / raw) To: Francesco Pizzolante; +Cc: mailing-list-org-mode Francesco, I reported this on September 2nd too. Hitting C-c C-c inside the table fixes the formatting. Also moving to a position inside the table and doing: M-x org-table-align fixes the formatting. Hence I tried to create a new formatter function in order to re-align after writing the table: (defun my-formatter( ipos tables params ) (progn (org-clocktable-write-default ipos tables params) (forward-line 2) (org-table-align) ) ) and install this as the formatter, but it didn't help. If it would have helped, I could have fixed the default table-writer by adding (org-table-align). Anyone an idea? regards, Joost Helberg >>>>> "Francesco" == Francesco Pizzolante <fpz@missioncriticalit.com> writes: > From: Francesco Pizzolante <fpz@missioncriticalit.com> > To: mailing-list-org-mode <emacs-orgmode@gnu.org> > Subject: [O] [bug] Alignment bug in clock tables > Date: 2014-10-02T17:41:07+0200 > Hi, > I'm having an alignment issue in clock tables, both in the agenda and in > dynamic blocks. > By default, \emsp is displayed in clock tables for level 2 (or above) to > indent headings. To avoid that, I set the variable `org-pretty-entities' > to t, and in this case the alignment of the table is broken when you > regenerate it. > I currently see no solution if I want correct alignment in clock tables > without seeing \emsp. > Any idea how to achieve that? > Here's a small screen capture that shows the issue: > http://screencast.com/t/qpmxDV8R543G > Thanks. > Francesco -- Snow B.V. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <8738b5o3lt.fsf-JFNXyGN8thM@public.gmane.org>]
* Re: [bug] Alignment bug in clock tables [not found] ` <8738b5o3lt.fsf-JFNXyGN8thM@public.gmane.org> @ 2014-10-17 6:29 ` Francesco Pizzolante 2014-11-03 15:45 ` Stormking 0 siblings, 1 reply; 13+ messages in thread From: Francesco Pizzolante @ 2014-10-17 6:29 UTC (permalink / raw) To: Joost Helberg; +Cc: mailing-list-org-mode Hi Joost, > I reported this on September 2nd too. Hitting C-c C-c inside the table > fixes the formatting. Also moving to a position inside the table and > doing: M-x org-table-align fixes the formatting. Hence > I tried to create a new formatter function in order to re-align after > writing the table: > > (defun my-formatter( ipos tables params ) > (progn > (org-clocktable-write-default ipos tables params) > (forward-line 2) > (org-table-align) > ) > ) > > and install this as the formatter, but it didn't help. If it would have > helped, I could have fixed the default table-writer by adding > (org-table-align). > > Anyone an idea? On my side, I tried another *workaround*: I call (org-table-align) in a before-save-hook. This way, all tables are correctly aligned when I save. I simply call: (org-table-map-tables 'org-table-align t) But this only works when you save and thus only for file buffers (and you can still see the misalignment when you create/update the dynamic blocks). Currently I have no solution for agenda buffers when displaying clock tables. Any hint to fix this is welcome. Regards, Francesco ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2014-10-17 6:29 ` Francesco Pizzolante @ 2014-11-03 15:45 ` Stormking 2014-11-07 15:16 ` Stormking 0 siblings, 1 reply; 13+ messages in thread From: Stormking @ 2014-11-03 15:45 UTC (permalink / raw) To: emacs-orgmode Francesco Pizzolante <fpz@...> writes: > > Hi Joost, > > > I reported this on September 2nd too. I'm having this problem, too. The code that aligns the clocktable seems to count the "\emsp" entity as five characters. But with pretty entities turned on, it's displayed as only one character. The same is true for the code that shortens the headline if the narrow option is used. Ciao, Stormking ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2014-11-03 15:45 ` Stormking @ 2014-11-07 15:16 ` Stormking [not found] ` <loom.20141107T160907-625-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org> 0 siblings, 1 reply; 13+ messages in thread From: Stormking @ 2014-11-07 15:16 UTC (permalink / raw) To: emacs-orgmode Stormking <stormking <at> web.de> writes: > > Francesco Pizzolante <fpz <at> ...> writes: > > > > > Hi Joost, > > > > > I reported this on September 2nd too. > > I'm having this problem, too. For now, I have added the following code to my init.el: (eval-after-load "org-clock" '(defun org-clocktable-indent-string (level) (if (= level 1) "" (concat "\\" (let ((str " ")) (dotimes (k (1- level) str) (setq str (concat "_" str)))))))) It redefines the function org-clocktable-indent-string to what it was before the whole emsp thing. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <loom.20141107T160907-625-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>]
* Re: [bug] Alignment bug in clock tables [not found] ` <loom.20141107T160907-625-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org> @ 2015-02-11 10:26 ` Francesco Pizzolante 2015-02-18 12:17 ` Stormking 0 siblings, 1 reply; 13+ messages in thread From: Francesco Pizzolante @ 2015-02-11 10:26 UTC (permalink / raw) To: Stormking; +Cc: emacs-orgmode-mXXj517/zsQ Hi Stormking, Sorry for my very late reply: I thank you very much for your workaround which enables me to have well aligned clock tables. I also take the opportunity to bump up this thread. I think you correctly spotted the exact cause of our issue. Here's what you say in a previous message: > I'm having this problem, too. The code that aligns the clocktable > seems to count the "\emsp" entity as five characters. But with > pretty entities turned on, it's displayed as only one character. To make it short: the alignment code counts "\emsp" as 5 chars, while it is displayed as one. I recall the small screencast here: http://screencast.com/t/qpmxDV8R543G Anyone to fix this in the code? Thanks. Regards, Francesco ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-11 10:26 ` Francesco Pizzolante @ 2015-02-18 12:17 ` Stormking 2015-02-18 14:22 ` Nicolas Goaziou 0 siblings, 1 reply; 13+ messages in thread From: Stormking @ 2015-02-18 12:17 UTC (permalink / raw) To: emacs-orgmode Francesco Pizzolante <fpz@...> writes: > > Hi Stormking, > > Sorry for my very late reply: I thank you very much for your workaround > which enables me to have well aligned clock tables. > > I also take the opportunity to bump up this thread. Without any effect, it seems. I wonder if anybody actually uses these features. Ciao, Stormking ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-18 12:17 ` Stormking @ 2015-02-18 14:22 ` Nicolas Goaziou 2015-02-18 14:48 ` Stormking 0 siblings, 1 reply; 13+ messages in thread From: Nicolas Goaziou @ 2015-02-18 14:22 UTC (permalink / raw) To: Stormking; +Cc: emacs-orgmode Hello, Stormking <stormking@web.de> writes: > Without any effect, it seems. I wonder if anybody actually uses these > features. What character do you suggest to use instead of \emph? "*" is not possible due to a collision with bold syntax (i.e. "***" is parsed as a bold star). Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-18 14:22 ` Nicolas Goaziou @ 2015-02-18 14:48 ` Stormking 2015-02-18 14:57 ` Nicolas Goaziou 0 siblings, 1 reply; 13+ messages in thread From: Stormking @ 2015-02-18 14:48 UTC (permalink / raw) To: emacs-orgmode Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes: > > Hello, > > Stormking <stormking <at> web.de> writes: > > > Without any effect, it seems. I wonder if anybody actually uses these > > features. > > What character do you suggest to use instead of \emph? Wouldn't it be better to fix the alignment code so it works with pretty entities? Because that's the real problem here. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-18 14:48 ` Stormking @ 2015-02-18 14:57 ` Nicolas Goaziou 2015-02-18 15:05 ` Stormking 0 siblings, 1 reply; 13+ messages in thread From: Nicolas Goaziou @ 2015-02-18 14:57 UTC (permalink / raw) To: Stormking; +Cc: emacs-orgmode Stormking <stormking@web.de> writes: > Wouldn't it be better to fix the alignment code so it works with > pretty entities? Because that's the real problem here. There are two problems here. One is obviously due to misalignment when using overlays. The other one is that \emph is not easily readable when `org-pretty-entities' is nil. Patches welcome. Regards, ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-18 14:57 ` Nicolas Goaziou @ 2015-02-18 15:05 ` Stormking 2015-02-18 15:08 ` Stormking 2015-02-18 15:13 ` Nicolas Goaziou 0 siblings, 2 replies; 13+ messages in thread From: Stormking @ 2015-02-18 15:05 UTC (permalink / raw) To: emacs-orgmode Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes: > > Stormking <stormking <at> web.de> writes: > > > Wouldn't it be better to fix the alignment code so it works with > > pretty entities? Because that's the real problem here. > > There are two problems here. > > One is obviously due to misalignment when using overlays. > > The other one is that \emph is not easily readable when > `org-pretty-entities' is nil. You are right but I always have pretty entities turned on, so it doesn't bother me that much. Wasn't it changed to \emsp (m-dash) so it would look better in exported HTML or LaTeX? Otherwise, I would suggest something like \-- or \__ I just tested the alignment in a generic table. I have set \emsp to be displayed as as dash ("-"). An explicit re-align of a table containing this entity works, but the auto-alignment that happens while you type does not. Ciao, Stormking ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-18 15:05 ` Stormking @ 2015-02-18 15:08 ` Stormking 2015-02-18 15:13 ` Nicolas Goaziou 1 sibling, 0 replies; 13+ messages in thread From: Stormking @ 2015-02-18 15:08 UTC (permalink / raw) To: emacs-orgmode Stormking <stormking <at> web.de> writes: > Wasn't it changed to \emsp > (m-dash) so it would look better in exported HTML or LaTeX? I have to correct myself on this one, \emsp ist a m-space, not a m-dash ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [bug] Alignment bug in clock tables 2015-02-18 15:05 ` Stormking 2015-02-18 15:08 ` Stormking @ 2015-02-18 15:13 ` Nicolas Goaziou 1 sibling, 0 replies; 13+ messages in thread From: Nicolas Goaziou @ 2015-02-18 15:13 UTC (permalink / raw) To: Stormking; +Cc: emacs-orgmode Stormking <stormking@web.de> writes: > You are right but I always have pretty entities turned on, so > it doesn't bother me that much. Wasn't it changed to \emsp > (m-dash) so it would look better in exported HTML or LaTeX? It was. > Otherwise, I would suggest something like \-- or \__ See above. > I just tested the alignment in a generic table. I have set \emsp > to be displayed as as dash ("-"). An explicit re-align of a table > containing this entity works, Same as displaying "-". > but the auto-alignment that happens while you type does not. Ditto. Regards, ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-02-18 15:12 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-02 15:41 [bug] Alignment bug in clock tables Francesco Pizzolante 2014-10-03 10:21 ` Joost Helberg [not found] ` <8738b5o3lt.fsf-JFNXyGN8thM@public.gmane.org> 2014-10-17 6:29 ` Francesco Pizzolante 2014-11-03 15:45 ` Stormking 2014-11-07 15:16 ` Stormking [not found] ` <loom.20141107T160907-625-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org> 2015-02-11 10:26 ` Francesco Pizzolante 2015-02-18 12:17 ` Stormking 2015-02-18 14:22 ` Nicolas Goaziou 2015-02-18 14:48 ` Stormking 2015-02-18 14:57 ` Nicolas Goaziou 2015-02-18 15:05 ` Stormking 2015-02-18 15:08 ` Stormking 2015-02-18 15:13 ` Nicolas Goaziou
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).