* Bug: clockreport in org-agenda-list - table misaligned if org-descriptive-links is nil
@ 2015-03-30 20:11 Alain Schneble (Realize IT GmbH)
2015-04-11 12:11 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Alain Schneble (Realize IT GmbH) @ 2015-03-30 20:11 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi
Steps to reproduce:
- if org-descriptive-links is non-nil, invoke M-x org-toggle-link-display
- org-descriptive-links is now expected to be nil
- M-x org-agenda-list
- M-x org-agenda-clockreport-mode (or short: v R)
Observation (given that there is at least some data being shown in the clockreport):
1) clockreport table is misaligned
2) clockreport table contains descriptive links even though org-descriptive-links is nil
Cause:
a) *org-agenda-list* /calls/ *org-agenda-prepare* which in turn /calls/ *org-agenda-mode*
b) *org-agenda-mode* /calls/ (add-to-invisibility-spec '(org-link))
In contrast, *org-mode* /calls/ (if org-descriptive-links (add-to-invisibility-spec '(org-link))), hence makes adding org-link to the invisibility spec dependent on org-descriptive-links.
c) the clockreport in the agenda list is constructed in *org-clock-get-clocktable* using a with-temp-buffer in whose context (org-mode) is called. The clockreport table will therefore be aligned based on the invisibility spec of org-mode which is different if org-descriptive-links was set to nil at the time *org-agenda-list* was called.
Suggestions:
1.1) Inherit org-link invisibility spec in *org-clock-get-clocktable* from the "outer" mode (i.e. org-agenda-mode):
...
(let ((descriptive-links (org-in-invisibility-spec-p '(org-link))))
(with-temp-buffer
(org-mode)
(if descriptive-links
(add-to-invisibility-spec '(org-link))
(remove-from-invisibility-spec '(org-link)))
...
)
1.2) ... or make the call to *add-to-invisibility-spec* in *org-agenda-mode* dependent on org-descriptive-links as already done by *org-mode*
Any other suggestions?
Btw, is there a reason why org-descriptive-links is global and not made buffer-local using make-variable-buffer-local after its defcustom definition? I had expected it to be buffer-local. If it isn't buffer local, the displayed links in different org buffers can get inconsistent with the flag hold in the org-descriptive-links variable.
Cheers
Alain
---
Emacs : GNU Emacs 24.4.1 (i686-pc-mingw32)
of 2014-10-24 on LEG570
Package: Org-mode version 8.2.10 (release_8.2.10 @ c:/Program Files (x86)/emacs-24.4/share/emacs/24.4/lisp/org/)
current state:
==============
(setq
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-html-format-inlinetask-function 'ignore
org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-agenda-use-time-grid nil
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-agenda-start-with-log-mode 'clockcheck
org-confirm-babel-evaluate nil
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-babel-pre-tangle-hook '(save-buffer)
org-occur-hook '(org-first-headline-recenter)
org-html-format-headline-function 'ignore
org-metaup-hook '(org-babel-load-in-session-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-catch-invisible-edits 'show
org-descriptive-links nil
org-latex-format-drawer-function '(lambda (name contents) contents)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-ascii-format-drawer-function '(lambda (name contents width) contents)
org-html-format-drawer-function '(lambda (name contents) contents)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-todo-keywords '((type "TODO" "|" "DONE"))
org-agenda-files '("c:/agenda.org")
org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-babel-load-languages '((gnuplot . t) (emacs-lisp . t))
org-latex-format-inlinetask-function 'ignore
org-agenda-start-with-clockreport-mode t
org-confirm-shell-link-function 'yes-or-no-p
)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: clockreport in org-agenda-list - table misaligned if org-descriptive-links is nil
2015-03-30 20:11 Bug: clockreport in org-agenda-list - table misaligned if org-descriptive-links is nil Alain Schneble (Realize IT GmbH)
@ 2015-04-11 12:11 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2015-04-11 12:11 UTC (permalink / raw)
To: Alain Schneble (Realize IT GmbH); +Cc: emacs-orgmode@gnu.org
Hello,
"Alain Schneble (Realize IT GmbH)" <alain.schneble@realize.ch> writes:
> Steps to reproduce:
> - if org-descriptive-links is non-nil, invoke M-x org-toggle-link-display
> - org-descriptive-links is now expected to be nil
> - M-x org-agenda-list
> - M-x org-agenda-clockreport-mode (or short: v R)
>
> Observation (given that there is at least some data being shown in the clockreport):
> 1) clockreport table is misaligned
> 2) clockreport table contains descriptive links even though org-descriptive-links is nil
>
> Cause:
> a) *org-agenda-list* /calls/ *org-agenda-prepare* which in turn /calls/ *org-agenda-mode*
> b) *org-agenda-mode* /calls/ (add-to-invisibility-spec '(org-link))
> In contrast, *org-mode* /calls/ (if org-descriptive-links (add-to-invisibility-spec '(org-link))), hence makes adding org-link to the invisibility spec dependent on org-descriptive-links.
> c) the clockreport in the agenda list is constructed in
> *org-clock-get-clocktable* using a with-temp-buffer in whose context
> (org-mode) is called. The clockreport table will therefore be aligned
> based on the invisibility spec of org-mode which is different if
> org-descriptive-links was set to nil at the time *org-agenda-list* was
> called.
Thanks for the report and the analysis.
> Suggestions:
> 1.1) Inherit org-link invisibility spec in *org-clock-get-clocktable* from the "outer" mode (i.e. org-agenda-mode):
> ...
> (let ((descriptive-links (org-in-invisibility-spec-p '(org-link))))
> (with-temp-buffer
> (org-mode)
> (if descriptive-links
> (add-to-invisibility-spec '(org-link))
> (remove-from-invisibility-spec '(org-link)))
> ...
> )
> 1.2) ... or make the call to *add-to-invisibility-spec* in *org-agenda-mode* dependent on org-descriptive-links as already done by *org-mode*
The latter sounds good. Do you want to prepare a patch for that?
> Btw, is there a reason why org-descriptive-links is global and not
> made buffer-local using make-variable-buffer-local after its defcustom
> definition? I had expected it to be buffer-local. If it isn't buffer
> local, the displayed links in different org buffers can get
> inconsistent with the flag hold in the org-descriptive-links variable.
If it is buffer local, we need a way to toggle it globally in all Org
buffers, possibly by adding an optional argument to
`org-toggle-link-display'.
WDYT?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-11 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 20:11 Bug: clockreport in org-agenda-list - table misaligned if org-descriptive-links is nil Alain Schneble (Realize IT GmbH)
2015-04-11 12:11 ` 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).