Filtering agenda clockreport not working?
Hello, In the org mode manual the description for org-agenda-clockreport-mode states that using a prefix argument when toggling this mode (i.e. typing “C-u R”) causes the clock table to exclude contributions to entries hidden by agenda filtering (as activated by typing “/“). I have tried this with a tags filter active, and the clock table is the same as when I don’t use a prefix argument. If I have clocked tasks tagged with a filtered out tag, they are still included in the agenda clock table. I looked at the source code for the org-agenda-clockreport-mode function in org v9.5.4, and it appears that any prefix argument is ignored. Am I misunderstanding something, or could this be a bug? Many thanks for your help. Best wishes, John
Org Publish HTML and PDF With GPG Files
Good Afternoon, I have my org directory filled with encrypted files ending in ".org.gpg". The publish documentation says that org-mode will automatically replace references to ".org" files with ".html", but this is not an automatic action if the files are ".org.gpg". The resulting HTML files must then be edited (in batch with a call to sed) for the page links to work like expected. This happens when exporting to PDF as well. I have been looking over the org-mode documentation and I have found no real answer to this problem other than looking at the publishing source code and modifying it to additionally catch ".org.gpg" files. Is there some customization setting within Emacs that I could edit that would allow for this to work the way I expect? Or would this require changing the way the publishing works? v/r, MR. Lehi Toskin
Re: [PATCH v3] ol-info: Define :insert-description function
On 22/08/2022 11:10, Ihor Radchenko wrote: Maybe, in addition to "Return cons consisting of file name and node name", you can put something like "File name may also be a virtual file name (see `Info-virtual-files')." I have tried to fix docstrings. I am ok with current behavior. It is only the docstring that I find slightly confusing. I am still unsure how to treat links with missed filename, so I changed it from "(org) Something" to "(dir) Something". The latter is not valid, but it is more consistent with "(dir) Top" for "info:" (empty path) links. There is huge room for improvements in "ol-info.el", e.g. other virtual files such as "(*History*)" may signal an error during HTML export. May you open a separate bug report about this? I do not think it deserves an entry on updates.orgmode.org, especially taking into account that it might be tricky to delete it.From 59b154e089788f49158b465c5b177c99889f2e06 Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Sat, 30 Jul 2022 19:13:01 +0700 Subject: [PATCH v3] ol-info: Define :insert-description function * lisp/ol-info.el (org-info--link-file-node): New helper to parse info link info file (manual) name and node. (org-info-follow-link, org-info-export): Use `org-info--link-file-node'. (org-info-description-as-command): New function to create description for info links that may executed to view the manual. (org-link-parameters): Specify `org-info-description-as-command' as `:insert-description' for info links. (org-info-other-documents): Add URL of directory index. * testing/lisp/test-org-info.el (test-org-info/export): Add cases for texinfo export with link description. (test-org-info/link-file-node, test-org-info/description-as-command): New tests for new functions `org-info--link-file-node' and `org-info-description-as-command'. Use recently added :insert-description feature of `org-link'. Alternative separators between file name and node ":", "::", "#:" are preserved. Added interpretation of empty path or omitted file name as info dir index. --- lisp/ol-info.el | 82 - testing/lisp/test-org-info.el | 85 ++- 2 files changed, 146 insertions(+), 21 deletions(-) diff --git a/lisp/ol-info.el b/lisp/ol-info.el index dc5f6d5ba..7be63b3e1 100644 --- a/lisp/ol-info.el +++ b/lisp/ol-info.el @@ -30,6 +30,7 @@ ;;; Code: +(require 'subr-x) ; `string-trim', `string-remove-prefix' (require 'ol) ;; Declare external functions and variables @@ -43,7 +44,8 @@ (org-link-set-parameters "info" :follow #'org-info-open :export #'org-info-export - :store #'org-info-store-link) + :store #'org-info-store-link + :insert-description #'org-info-description-as-command) ;; Implementation (defun org-info-store-link () @@ -63,24 +65,65 @@ "Follow an Info file and node link specified by PATH." (org-info-follow-link path)) +(defun org-info--link-file-node (path) + "Extract file name and node from info link PATH. + +Return cons consisting of file name and node name or \"Top\" if node +part is not specified. Components may be separated by \":\" or by \"#\". +File may be a virtual one, see `Info-virtual-files'." + (if (not path) + '("dir" . "Top") +(string-match "\\`\\([^#:]*\\)\\(?:[#:]:?\\(.*\\)\\)?\\'" path) +(let* ((node (match-string 2 path)) + ;; Do not reorder, `string-trim' modifies match. + (file (string-trim (match-string 1 path + (cons + (if (org-string-nw-p file) file "dir") + (if (org-string-nw-p node) (string-trim node) "Top") + +(defun org-info-description-as-command (link desc) + "Info link description that can be pasted as command. + +For the following LINK + +\"info:elisp#Non-ASCII in Strings\" + +the result is + +info \"(elisp) Non-ASCII in Strings\" + +that may be executed as shell command or evaluated by +\\[eval-expression] (wrapped with parenthesis) to read the manual +in Emacs. + +Calling convention is similar to `org-link-make-description-function'. +DESC has higher priority and returned when it is not nil or empty string. +If LINK is not an info link then DESC is returned." + (let* ((prefix "info:") + (need-file-node (and (not (org-string-nw-p desc)) + (string-prefix-p prefix link +(pcase (and need-file-node +(org-info--link-file-node (string-remove-prefix prefix link))) + ;; Unlike (info "dir"), "info dir" shell command opens "(coreutils)dir invocation". + (`("dir" . "Top") "info \"(dir)\"") + (`(,file . "Top") (format "info %s" file)) + (`(,file . ,node) (format "info \"(%s) %s\"" file node)) + (_ desc (defun org-info-follow-link (name) "Follow an Info file and node link specified by NAME." - (if (or (string-match "\\(.*\\)\\(?:#\\|::\\)\\(.*\\)" name) - (string-match "\\(.*\\)" name)) - (let ((filename (match-string 1 name)) -
Re: [External] : Re: org-mode compile issue this morning - how to report this?
git bisect shows that this emacs commit is the problem (if I understand correctly ... this is the first time I have used git bisect): [6ddcf67052545a0f77233f1a952dc90e296cda35] Make it possible to mark generalized variables as obsolete Here is the bug report: Subject: 29.0.50; emacs commit 6ddcf67052545a0f77233f1a952dc90e296cda35 causes org-mode build to fail dortmann@ddo-linux:git-org-mode$ ( set -eu ; make clean ; make ; make autoloads ) make -C lisp clean make[1]: Entering directory '/home/dortmann/src/git-org-mode/lisp' rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc rm -f *.elc make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp' make -C doc clean make[1]: Entering directory '/home/dortmann/src/git-org-mode/doc' rm -f *.pdf *.html *.info *_letter.tex org-version.inc org-version.tex \ *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs *.toc \ *.tp *.tps *.vr *.vrs *.log *.ps make[1]: Leaving directory '/home/dortmann/src/git-org-mode/doc' make -C doc clean; make -C lisp clean; make[1]: Entering directory '/home/dortmann/src/git-org-mode/doc' rm -f *.pdf *.html *.info *_letter.tex org-version.inc org-version.tex \ *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs *.toc \ *.tp *.tps *.vr *.vrs *.log *.ps make[1]: Leaving directory '/home/dortmann/src/git-org-mode/doc' make[1]: Entering directory '/home/dortmann/src/git-org-mode/lisp' rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc rm -f *.elc make[1]: Leaving directory '/home/dortmann/src/git-org-mode/lisp' make -C lisp compile make[1]: Entering directory '/home/dortmann/src/git-org-mode/lisp' rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc org-version: 9.5.4 (release_9.5.4-758-g3c11e9) Loading /home/dortmann/src/git-org-mode/lisp/org-compat.el (source)... Error: error ("Eager macro-expansion failure: (void-function byte-compile-warn-obsolete)") debug-early-backtrace() debug-early(error (error "Eager macro-expansion failure: (void-function byte-compile-warn-obsolete)")) error("Eager macro-expansion failure: %S" (void-function byte-compile-warn-obsolete)) internal-macroexpand-for-load((defalias 'org-string-width #'(lambda (string &optional pixels) "Return width of STRING when displayed in the current buffer.\nReturn width in pixels when PIXELS is non-nil." (if (and (version< emacs-version "28") (not pixels)) (org--string-width-1 string) (remove-text-properties 0 (length string) '(wrap-prefix t line-prefix t) string) (unless pixels (remove-text-properties 0 (length string) '(face t) string)) (let ((current-invisibility-spec (or (and (not (listp buffer-invisibility-spec)) buffer-invisibility-spec) (let (result) (dolist (el buffer-invisibility-spec) (unless (or (memq el '(org-fold-drawer org-fold-block org-fold-outline)) (and (listp el) (memq (car el) '(org-fold-drawer org-fold-block org-fold-outline (push el result))) result))) (current-char-property-alias-alist char-property-alias-alist)) (with-temp-buffer (setq-local display-line-numbers nil) (setq-local buffer-invisibility-spec (if (listp current-invisibility-spec) (mapcar (lambda (el) (if (and (consp el) (cdr el)) (list (car el)) el)) current-invisibility-spec) current-invisibility-spec)) (setq-local char-property-alias-alist current-char-property-alias-alist) (let (pixel-width symbol-width) (with-silent-modifications (setf (buffer-string) string) (setq pixel-width (if (get-buffer-window (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))) (set-window-buffer nil (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max) (unless pixels (setf (buffer-string) "a") (setq symbol-width (if (get-buffer-window (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))) (set-window-buffer nil (current-buffer)) (car (window-text-pixel-size nil (line-beginning-position) (point-max))) (if pixels pixel-width (/ pixel-width symbol-width t) load-with-code-conversion("/home/dortmann/src/git-org-mode/lisp/org-macs.el" "/home/dortmann/src/git-org-mode/lisp/org-macs.el" nil t) require(org-macs) load-with-code-conversion("/home/dortmann/src/git-org-mode/lisp/org-compat.el" "/home/dortmann/src/git-org-mode/lisp/org-compat.el" nil nil) load("org-compat.el") command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-folded nil org-element-cache-persistent nil)" "--eval" "(add-to-list 'load-path \".\")" "--eval" "(load \"org-compat.el\")" "--eval" "(load \"../mk/org-fixup.el\")" "--eval" "(org-make-org-version \"9.5.4\" \"release_9.5.4-758-g3c11e9\")")) command-line() normal-top-level() Eager macro-expansion failure: (void-function byte-compile-warn-obsolete) make[1]: *** [Makefile:72: org-version.el] Error 255 make[1]: Leaving directory '/home/dortma