From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alain Schneble (Realize IT GmbH)" Subject: Bug: clockreport in org-agenda-list - table misaligned if org-descriptive-links is nil Date: Mon, 30 Mar 2015 20:11:48 +0000 Message-ID: <728674d5657a40168a56bc4927650df8@rintintin.hq.realize.ch.lan.rit> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycgzf-0002aL-5M for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 17:13:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycgza-0002sS-4V for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 17:13:11 -0400 Received: from clientmail.realize.ch ([46.140.89.53]:4985) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1YcgzZ-0002rx-O6 for emacs-orgmode@gnu.org; Mon, 30 Mar 2015 17:13:06 -0400 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 cloc= kreport): 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/ *or= g-agenda-mode* b) *org-agenda-mode* /calls/ (add-to-invisibility-spec '(org-link)) In contrast, *org-mode* /calls/ (if org-descriptive-links (add-to-invisi= bility-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-cloc= ktable* 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 buf= fer-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 display= ed links in different org buffers can get inconsistent with the flag hold i= n the org-descriptive-links variable. Cheers Alain ---=20 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)/e= macs-24.4/share/emacs/24.4/lisp/org/) current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (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-func= tion org-html-format-inlinetask-function 'ignore org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-comman= d-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 o= rg-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-co= mmand-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-confi= gure-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 )