Re: [BUG] [C-u C-u C-c C-o] open link with external program auto exited before child process open file
I found exactly same problem and some answer on this question: https://askubuntu.com/questions/646631/emacs-doesnot-work-with-xdg-open But I hope Org Mode can provide solution by default. Based on the description in answers. Is there something Org Mode can do to get around this problem? Nicolas Goaziou writes: > Hello, > > stardiviner writes: > >> When I press =[C-u C-u C-c C-o]= to open an image file link with system >> external >> program. It can't open the image file. > > Is it really an Org bug? I.e., is your mailcap file properly set up? > > If you think this is really an Org bug, could you provide an ECM, > including your .mailcap? > > Regards, -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [BUG] [C-u C-u C-c C-o] open link with external program auto exited before child process open file
I tested with following code: #+begin_src emacs-lisp (let ((cmd (format "%s %s" "xdg-open" (shell-quote-argument (expand-file-name "~/Downloads/伦敦底层社会 1,2章.doc") (start-process-shell-command cmd "*org-open-file*" cmd)) (start-process "org-open-file" " *org-open-file*" "xdg-open" (expand-file-name "~/Downloads/伦敦底层社会 1,2章.doc")) #+end_src Both has same problem, xdg-open exited automatically and before really open file. So maybe I should ask question in Emacs-help mailing list? Because this problem seems on ~start-process~ / ~start-process-shell-command~. Christopher M. Miles writes: > I found exactly same problem and some answer on this question: > > https://askubuntu.com/questions/646631/emacs-doesnot-work-with-xdg-open > > But I hope Org Mode can provide solution by default. Based on the description > in > answers. Is there something Org Mode can do to get around this problem? > > Nicolas Goaziou writes: > >> Hello, >> >> stardiviner writes: >> >>> When I press =[C-u C-u C-c C-o]= to open an image file link with system >>> external >>> program. It can't open the image file. >> >> Is it really an Org bug? I.e., is your mailcap file properly set up? >> >> If you think this is really an Org bug, could you provide an ECM, >> including your .mailcap? >> >> Regards, -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 signature.asc Description: PGP signature
Re: [BUG] org-bibtex-read requires that bibtex is properly initialized
On Saturday, 9 Jan 2021 at 22:45, Matthieu Lemerre wrote: > I don't know what the right fix would be though. For now I call > (bibtex-set-dialect) in my init.el, but maybe org-bibtex-read should do it? I don't know whether org-bibtex-read should do it but I also have bibtex-set-dialect in my Emacs init configuration to avoid the problem. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-179-g5b5c42
Re: Generated graphic not included in exported TeX/PDF
Answering my own email. Turns out the problem was that I changed the default value of org-latex-pdf-process and no longer had the "-output-directory %o" part of the command. For some reason, this has not been a problem until recently. Maybe just pure luck. So, maybe check your value of org-latex-pdf-process. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-179-g5b5c42
[PATCH] ob-lilypond: allow user configuration of header-args
Hi all, I hit the problem described in https://www.mail-archive.com/emacs-orgmode@gnu.org/msg127317.html - I couldn't see that anyone else had fixed it so I had a go. The problem is that, unusually, ob-lilypond has some conditional logic on its header-args. Its solution is to set the header-args internally when required, which overrides any user-specified value. The quickest way I could see to preserve the conditional logic was to add a new variable to hold the user configuration, which I called ob-lilypond-header-args. Now the conditional logic sets org-babel-header-args:lilypond to the new variable's value when appropriate. Another way would be to create a context which sets the variable when needed and then resets it. I opted against this as I'm not sure it would have the same behaviour in all cases. Happy to have a go if it would be preferable, though. Cheers, Jamie From f413a36ac9b7ca7c990ee1ab6456cc237ebccf3d Mon Sep 17 00:00:00 2001 From: Jamie Bayne Date: Sat, 2 Jan 2021 02:18:37 + Subject: [PATCH] Allow user to set ob-lilypond header arguments * ob-lilypond.el (org-babel-lilypond-set-header-args): Replace hard-coded settings with user-configurable variable. (org-babel-header-args:lilypond): Modify documentation. (ob-lilypond-header-args): New variable. TINYCHANGE --- lisp/ob-lilypond.el | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index fbdd905a5..11ae9ae88 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -43,6 +43,15 @@ (defvar org-babel-default-header-args:lilypond '() "Default header arguments for lilypond code blocks. NOTE: The arguments are determined at lilypond compile time. +See `org-babel-lilypond-set-header-args' +To configure, see `ob-lilypond-header-args' +.") + +(defvar ob-lilypond-header-args + '((:results . "file") (:exports . "results")) + "User-configurable header arguments for lilypond code blocks. +NOTE: The final value used by org-babel is computed at compile-time +and stored in `org-babel-default-header-args:lilypond' See `org-babel-lilypond-set-header-args'.") (defvar org-babel-lilypond-compile-post-tangle t @@ -403,9 +412,8 @@ These depend upon whether we are in Arrange mode i.e. MODE is t." (:results . "silent") (:cache . "yes") (:comments . "yes"))) -(t - '((:results . "file") - (:exports . "results") +(t + ob-lilypond-header-args))) (defun org-babel-lilypond-set-header-args (mode) "Set org-babel-default-header-args:lilypond -- 2.29.2
[PATCH] lisp/org-refile.el: Add mandatory when argument
* lisp/org-refile.el (org-copy): When argument added --- lisp/org-refile.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 0b44fdfa5..47f22ecc0 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -373,7 +373,7 @@ the *old* location.") (defvar org-refile-keep nil "Non-nil means `org-refile' will copy instead of refile.") -(define-obsolete-function-alias 'org-copy 'org-refile-copy) +(define-obsolete-function-alias 'org-copy 'org-refile-copy "Org 9.4") ;;;###autoload (defun org-refile-copy () -- 2.28.0
Re: [PATCH] Enhance org-html--build-meta-info
Jens Lechtenboerger writes: > On line 1432 I get this suggestion from flycheck: > There should be two spaces after a period (emacs-lisp-checkdoc) > > More importantly, I just realized that for author information, > org-html-plain-text is applied twice, leading to "&" when > translating "&". (Once inside org-html-meta-tags-default, then in > org-html--build-meta-entry.) This should not happen. > > Best wishes > Jens Fixed. [exhales] Thanks for consistently getting back to me on this patch Jens :) -- Timothy >From 3ab8b4f108c8cfa4b0bf11842907c31846832f1a Mon Sep 17 00:00:00 2001 From: TEC Date: Mon, 14 Dec 2020 17:41:33 +0800 Subject: [PATCH 1/2] lisp/ox-html.el: make html meta tag builder nicer * lisp/ox-html.el (org-html--build-meta-info): Multi-line repeated structure extracted to new function `org-html--build-meta-entry'. The keyword value formatting is changed from `org-export-data' to `org-html-encode-plain-text' to avoid potentially nesting HTML tags in meta tags and the element, which would violate W3C. --- lisp/ox-html.el | 118 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 03145e3..f18f8a2 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1835,78 +1835,80 @@ INFO is a plist used as a communication channel." ;;; Template +(defun org-html--build-meta-entry +(label identity &optional content-format &rest content-formatters) + "Build a meta tag using the provided information. + +Construct tag of form , or when CONTENT-FORMAT +is present: + +Here {content} is determined by applying any CONTENT-FORMATTERS to the +CONTENT-FORMAT and encoding the result as plain text." + (concat "\n")) + (defun org-html--build-meta-info (info) "Return meta tags for exported document. INFO is a plist used as a communication channel." - (let* ((protect-string - (lambda (str) -(replace-regexp-in-string - "\"" """ (org-html-encode-plain-text str - (title (org-export-data (plist-get info :title) info)) - ;; Set title to an invisible character instead of leaving it - ;; empty, which is invalid. - (title (if (org-string-nw-p title) title "")) - (author (and (plist-get info :with-author) - (let ((auth (plist-get info :author))) + (let* ((title (org-html-plain-text + (org-element-interpret-data (plist-get info :title)) info)) + ;; Set title to an invisible character instead of leaving it + ;; empty, which is invalid. + (title (if (org-string-nw-p title) title "")) + (author (and (plist-get info :with-author) + (let ((auth (plist-get info :author))) ;; Return raw Org syntax. -(and auth (org-element-interpret-data auth) - (description (plist-get info :description)) - (keywords (plist-get info :keywords)) - (charset (or (and org-html-coding-system - (fboundp 'coding-system-get) - (coding-system-get org-html-coding-system - 'mime-charset)) - "iso-8859-1"))) + (and auth (org-html-plain-text + (org-element-interpret-data auth) info) + (charset (or (and org-html-coding-system + (fboundp 'coding-system-get) + (symbol-name + (coding-system-get org-html-coding-system + 'mime-charset))) + "iso-8859-1"))) (concat (when (plist-get info :time-stamp-file) (format-time-string (concat "\n"))) - (format - (if (org-html-html5-p info) - (org-html-close-tag "meta" "charset=\"%s\"" info) - (org-html-close-tag - "meta" "http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"" - info)) - charset) "\n" + + (if (org-html-html5-p info) + (org-html--build-meta-entry "charset" charset) + (org-html--build-meta-entry "http-equiv" "Content-Type" + (concat "text/html;charset=" charset))) + (let ((viewport-options (cl-remove-if-not (lambda (cell) (org-string-nw-p (cadr cell))) (plist-get info :html-viewport - (and viewport-options - (concat - (org-html-close-tag - "meta" - (format "name=\"viewport\" content=\"%s\"" - (mapconcat - (lambda (elm) (format "%s=%s" (car elm) (cadr elm))) - viewport-options ", ")) - info) - "\n"))) + (if viewport-options + (org-html--build-meta-entry "name" "viewport" + (mapconcat + (lambda (elm) + (format "%s=%s" (car elm) (cadr elm))) + viewport-options ", " + (format "%s\n" title) - (org-html-close-tag "meta" "name=\"generator\" content=\"Org mode\"" info) - "\n" - (and (org-string-nw-p author) - (concat - (org-html-close-tag "meta" - (format "name=\"author\" content=\"%s\"" - (funcall protect-string aut
Display ellipsis at end of headline instead of after tags
Hi. I would prefer to see headline ellipsis always at the end of the headline, but if tags are present, the ellipsis is drawn after the tags. So currently I have something like this: #+begin_example ,* Headline One... ,* Another Headline :tag:another:... ,* Third Headline... #+end_example But I would prefer this: #+begin_example ,* Headline One... ,* Another Headline... :tag:another: ,* Third Headline... #+end_example I skimmed through available variables and the code, but I found nothing to configure this kind of behaviour. Is there an easy way to accomplish this? -- Until the next mail..., Stefan.
Re: [PATCH] Enhance org-html--build-meta-info
On 2021-01-10, TEC wrote: > Jens Lechtenboerger writes: > >> On line 1432 I get this suggestion from flycheck: >> There should be two spaces after a period (emacs-lisp-checkdoc) >> >> More importantly, I just realized that for author information, >> org-html-plain-text is applied twice, leading to "&" when >> translating "&". (Once inside org-html-meta-tags-default, then in >> org-html--build-meta-entry.) This should not happen. >> >> Best wishes >> Jens > > Fixed. [exhales] Sorry, I still see the flycheck warning and "&" for "&". Please try with: "#+AUTHOR: Foo & Bar" In org-html-meta-tags-default, function org-html-plain-text replaces "&" with "&", and in org-html--build-meta-entry, function org-html-encode-plain-text replaces "&" once more. I suggest to remove org-html-plain-text from org-html-meta-tags-default. Best wishes Jens
Re: [PATCH] Enhance org-html--build-meta-info
Jens Lechtenboerger writes: > Sorry, I still see the flycheck warning and "&" for "&". Maybe I accidently sent you the old patches? I'll check tomorrow. -- Timothy.
Re: [PATCH] ob-java, a proposal on import improvement
ian martins writes: > On Fri, Jan 8, 2021 at 11:28 AM John Herrlin wrote: > >> I would like to combine imports from header-args with imports from a >> source block. >> ... >> I didnt get the to work so I made a patch. > > John, Sorry that wasn't working. Thanks for investigating and > submitting a fix. I think the problem was that I was missing static > imports, which you fixed in the first chunk of your patch. I don't > think the rest of the change is necessary. Could you revert the other > chunks and re-test? Thats looks correct! Thanks! Here is a patch with the regexp fix. Take care! >From 3de5cf1c3173285a7f51ab436f02419f8c9f5ffb Mon Sep 17 00:00:00 2001 From: John Herrlin Date: Sun, 10 Jan 2021 21:47:26 +0100 Subject: [PATCH] ob-java: Include static imports in regex * lisp/ob-java.el (org-babel-java--imports-re): Include static imports in Java import regex. TINYCHANGE --- lisp/ob-java.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-java.el b/lisp/ob-java.el index f70a50192..05f591ee3 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -86,7 +86,7 @@ like javac -verbose." (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the package name (0+ space) ?\; line-end) "Regexp for the package statement.") -(defconst org-babel-java--imports-re (rx line-start (0+ space) "import" +(defconst org-babel-java--imports-re (rx line-start (0+ space) "import" (opt space "static") (1+ space) (group (1+ (in alnum ?_ ?.))) ; capture the fully qualified class name (0+ space) ?\; line-end) "Regexp for import statements.") -- 2.30.0
Re: Display ellipsis at end of headline instead of after tags
Not 100% sure about this, but take a look at the hs-set-up-overlay variable, it seems like it might be possible to customize that to achieve this behavior. Best, Tom
Re: [PATCH] I updated patch by deleteing duplicate tags
Thanks for the patch. stardiviner writes: > On Wed, Dec 2, 2020 at 5:30 PM stardiviner wrote: > >> The default [C-c C-q] completing tags only retrieve tags from current >> buffer locally. >> >> By this patch, will merge both buffer-local tags and user defined global >> `org-tags-alist`. It does a bit more than that. It uses org-global-tags-completion-table, which considers tags in all agenda files by default and takes into account org-tag-alist (as well as org-tag-persistent-alist) via the use of the org-current-tag-alist variable. >> This is more reasonable. I'd guess that depends on the user. I personally wouldn't like to see tags from all of my agenda files, and I'm fine not seeing org-tag{-persistent}-alist ones that aren't in the current buffer given that they have fast selection keys. > Subject: [PATCH] org.el: Complete tags from both global and buffer local > > * lisp/org.el: (org-fast-tag-selection): merge buffer local tags with > global alist of tags. Convention/consistency nits: spurious ":" after ".el" and s/merge/Merge/. > --- > lisp/org.el | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index 0e12e4b15..287b8c407 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -12256,10 +12256,13 @@ (defun org-fast-tag-selection (current inherited > table &optional todo-table) > (condition-case nil > (setq tg (completing-read > "Tag: " > - (or buffer-tags > - (with-current-buffer buf > - (setq buffer-tags > - (org-get-buffer-tags)) > + (delq nil > + (delete-dups > + (append (or buffer-tags > + (with-current-buffer buf > +(setq buffer-tags > + > (org-get-buffer-tags > + > (org-global-tags-completion-table)) This change in behavior should come with a NEWS entry and a documentation update. What the manual currently says is now stale: - {{{kbd(TAB)}}} :: #+kindex: TAB Enter a tag in the minibuffer, even if the tag is not in the predefined list. You can complete on all tags present in the buffer. You can also add several tags: just separate them with a comma. As I mentioned above, though, I'm not sure always adding agenda tags is desirable. However, I think it'd probably be safe to look at org-complete-tags-always-offer-all-agenda-tags as an indication of whether the user wants this behavior. org-set-tags-command already considers that option when it generates the table that it passes to org-fast-tag-selection. So perhaps we could just consider the table when calling completing-read for the tab key (something along the lines of the patch at the end of the email). Conceptually that's been discussed/tried before, but it was then backed out of: * https://orgmode.org/list/f753e612-2d5d-4ba7-af0c-d49c7a8dd...@pobox.com/T/#u * 647396464 (org.el: Include tags from `org-tag-alist' when completing with the TAB key, 2012-03-27) * d4ddcbb8b (Revert "org.el: Include tags from `org-tag-alist' when completing with the TAB key.", 2012-04-10) * acc7a0b2b (org.el: Include `org-tag-alist' in the list for tag completions, 2012-03-27) At a quick glance, I think the patch below avoids the problems that led to 647396464 being reverted, but that'd need to be checked more carefully. diff --git a/lisp/org.el b/lisp/org.el index 5b0ae389c..9383719e3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12139,7 +12139,7 @@ (defun org-fast-tag-selection (current inherited table &optional todo-table) fulltable (buf (current-buffer)) (expert (eq org-fast-tag-selection-single-key 'expert)) -(buffer-tags nil) +(tab-tags nil) (fwidth (+ maxlen 3 1 3)) (ncol (/ (- (window-width) 4) fwidth)) (i-face 'org-done) @@ -12274,16 +12274,22 @@ (defun org-fast-tag-selection (current inherited table &optional todo-table) (setq current nil) (when exit-after-next (setq exit-after-next 'now))) ((= c ?\t) +(unless tab-tags + (setq tab-tags +(delq nil + (mapcar (lambda (x) +(let ((item (car-safe x))) + (and (stringp item) + (list item + (org--tag-add-to-alist +
Re: [PATCH] lisp/org-refile.el: Add mandatory when argument
Aaron Jensen writes: > * lisp/org-refile.el (org-copy): When argument added Thanks, but this was handled by 248dfcd71 earlier this week.
Re: [PATCH] Fix typo in f948234cb
Ihor Radchenko writes: > --- > contrib/lisp/org-contacts.el | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, applied (9ea7ff5e2).
ox variable not set when it should be?
this must be user error, but i am not sure where. i have: (with-eval-after-load 'ox ;; a whole bunch of settings and defuns and stuff that ;; would cause compiler warnings if it were not after load ox (setq org-export-with-tasks nil)) and yet, when i export a subtree, the value of that variable (and the others) are not what i set them to. they are default. the variable is set in the ox library. -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
Re: [PATCH] lisp/org-refile.el: Add mandatory when argument
On Sun, Jan 10, 2021 at 4:12 PM Kyle Meyer wrote: > > * lisp/org-refile.el (org-copy): When argument added > > Thanks, but this was handled by 248dfcd71 earlier this week. Ah, excellent!
Re: Bug: [patch] fix: ox-rss died when an entry had an empty date [ ( @ /home/arne/.guix-profile/share/emacs/site-lisp/)]
Dr. Arne Babenhauserheide writes: > When creating an RSS feed, org-publish broke for me with > > signal(error ("Not an Org time string: ")) > error("Not an Org time string: %s" "") > org-parse-time-string("") > org-time-string-to-time("") [...] > Maybe relevant: I have date enabled in options. > #+OPTIONS: date:t I'm not an ox-rss user and don't know if there are more realistic ways to hit this error, but I was able to trigger it by taking an already exported buffer of --8<---cut here---start->8--- * h1 :PROPERTIES: :ID: 76841adc-b233-4f6d-8446-3478f263544b :PUBDATE: <2021-01-10 Sun 17:46> :END: --8<---cut here---end--->8--- and then setting PUBDATE to an empty string and exporting again. I'm not sure if the error you see is indicative of a larger issue, though either way guarding against an empty string as your patch does seems fine. But... > diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el > index 299d22086..97a4bfc8f 100644 > --- a/contrib/lisp/ox-rss.el > +++ b/contrib/lisp/ox-rss.el > @@ -245,7 +245,7 @@ communication channel." > (or (org-element-property :CATEGORY headline) "") info)) >(pubdate0 (org-element-property :PUBDATE headline)) >(pubdate (let ((system-time-locale "C")) > - (if pubdate0 > + (if (and pubdate0 (not (string-empty-p pubdate0)) ... you're missing a closing parenthesis here. Also, a bit downstream I see (if (not pubdate0) "" ;; Skip entries with no PUBDATE prop It seems like this should be updated to look at pubdate rather than pubdate0 to avoid "nil" for the empty string case. What do you think?
Re: [PATCH] org-footnote: fix inserting new footnote mangling drawers (was: Re: Bug: inserting footnote when Footnotes heading has property drawer [9.3.6 (9.3.6-23-g01ee25-elpaplus @ /home/user/.emacs
Thanks for the initial report and the patch. TRS-80 writes: > Attached please find a very simple (one line) patch that I believe > should fix this issue. > > This patch is of course based on latest git (not my personal outdated > version) and also maint branch. I think I've got that right? Looks good to me. > Subject: [PATCH] org-footnote: fix inserting new footnote mangling drawers convention nit: s/fix/Fix/ (no need to resend) > * org-footnote.el (org-footnote-create-definition): Replace > `forward-line' with `org-end-of-meta-data' to skip over any > properties and/or drawers that may be present on the > `org-footnote-section' heading (default "Footnotes"). > > TINYCHANGE > --- > lisp/org-footnote.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I'm planning to squash the following test in when applying. Look okay to you? diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el index eca24d315..50a430785 100644 --- a/testing/lisp/test-org-footnote.el +++ b/testing/lisp/test-org-footnote.el @@ -138,7 +138,20 @@ (ert-deftest test-org-footnote/new () (org-test-with-temp-text "Paragraph\n# Local Variables:\n# foo: t\n# End:" (let ((org-footnote-section "Footnotes")) (org-footnote-new)) - (buffer-string) + (buffer-string + (should + (equal "Para[fn:1] +* Footnotes +:properties: +:custom_id: id +:end: + +\[fn:1]" + (org-test-with-temp-text + "Para\n* Footnotes\n:properties:\n:custom_id: id\n:end:" +(let ((org-footnote-section "Footnotes")) + (org-footnote-new)) +(org-trim (buffer-string)) (ert-deftest test-org-footnote/delete () "Test `org-footnote-delete' specifications."
Re: [PATCH] I updated patch by deleteing duplicate tags
Kyle Meyer writes: > Thanks for the patch. > > stardiviner writes: > >> On Wed, Dec 2, 2020 at 5:30 PM stardiviner wrote: >> >>> The default [C-c C-q] completing tags only retrieve tags from current >>> buffer locally. >>> >>> By this patch, will merge both buffer-local tags and user defined global >>> `org-tags-alist`. > > It does a bit more than that. It uses org-global-tags-completion-table, > which considers tags in all agenda files by default and takes into > account org-tag-alist (as well as org-tag-persistent-alist) via the use > of the org-current-tag-alist variable. > That's what I want. Why obviously user pre-defined tags can't be used globally. Right? It should be. >>> This is more reasonable. > > I'd guess that depends on the user. I personally wouldn't like to see > tags from all of my agenda files, and I'm fine not seeing > org-tag{-persistent}-alist ones that aren't in the current buffer given > that they have fast selection keys. Currently tags selection is now slow, even with 100 pre-defined tags. Should be fine. Tags sometimes is abundant. So if it is slow, then it means the command =org-set-tags-command= should be optimized. > >> Subject: [PATCH] org.el: Complete tags from both global and buffer local >> >> * lisp/org.el: (org-fast-tag-selection): merge buffer local tags with >> global alist of tags. > > Convention/consistency nits: spurious ":" after ".el" and > s/merge/Merge/. Updated. Thanks > >> --- >> lisp/org.el | 11 +++ >> 1 file changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/lisp/org.el b/lisp/org.el >> index 0e12e4b15..287b8c407 100644 >> --- a/lisp/org.el >> +++ b/lisp/org.el >> @@ -12256,10 +12256,13 @@ (defun org-fast-tag-selection (current inherited >> table &optional todo-table) >> (condition-case nil >> (setq tg (completing-read >>"Tag: " >> - (or buffer-tags >> - (with-current-buffer buf >> -(setq buffer-tags >> - (org-get-buffer-tags)) >> + (delq nil >> +(delete-dups >> + (append (or buffer-tags >> + (with-current-buffer buf >> + (setq buffer-tags >> + >> (org-get-buffer-tags >> + >> (org-global-tags-completion-table)) > > This change in behavior should come with a NEWS entry and a > documentation update. What the manual currently says is now stale: > > - {{{kbd(TAB)}}} :: > > #+kindex: TAB > Enter a tag in the minibuffer, even if the tag is not in the > predefined list. You can complete on all tags present in the > buffer. You can also add several tags: just separate them with > a comma. > > As I mentioned above, though, I'm not sure always adding agenda tags is > desirable. However, I think it'd probably be safe to look at > org-complete-tags-always-offer-all-agenda-tags as an indication of > whether the user wants this behavior. org-set-tags-command already > considers that option when it generates the table that it passes to > org-fast-tag-selection. So perhaps we could just consider the table > when calling completing-read for the tab key (something along the lines > of the patch at the end of the email). > Indeed, I add condition on ~org-complete-tags-always-offer-all-agenda-tags~ now. > Conceptually that's been discussed/tried before, but it was then backed > out of: > > * > https://orgmode.org/list/f753e612-2d5d-4ba7-af0c-d49c7a8dd...@pobox.com/T/#u > * 647396464 (org.el: Include tags from `org-tag-alist' when completing > with the TAB key, 2012-03-27) > * d4ddcbb8b (Revert "org.el: Include tags from `org-tag-alist' when > completing with the TAB key.", 2012-04-10) > * acc7a0b2b (org.el: Include `org-tag-alist' in the list for tag > completions, 2012-03-27) > I checked this mailing list thread, the original commit use ~(mapcar 'car table)~. It's more simple. I updated my code to this. My patch only changed the ~completing-read~ part. And I found ido support option is been removed in Org. I think this is right decision. > At a quick glance, I think the patch below avoids the problems that led > to 647396464 being reverted, but that'd need to be checked more > carefully. > > > diff --git a/lisp/org.el b/lisp/org.el > index 5b0ae389c..9383719e3 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -12139,7 +12139,7 @@ (defun org-fast-tag-selection (current inherited > table &optional todo-table) > fulltable >(buf (current-buffer)) >(expert (eq org-fast-tag-selection-single-key 'expert)) > - (buffer-tags nil
Re: Generated graphic not included in exported TeX/PDF
Eric S Fraga writes: > Answering my own email. > > Turns out the problem was that I changed the default value of > org-latex-pdf-process and no longer had the "-output-directory %o" part > of the command. For some reason, this has not been a problem until > recently. Maybe just pure luck. > > So, maybe check your value of org-latex-pdf-process. Interesting. I have latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o %f which I don't think has changed recently. However, since with #+BEGIN_SRC latex :cache yes :eval never-export caching, not exporting, and including the graphics all work, I not sure how to debug the problem. It is not at all clear to me how these three things are connected. Cheers, Loris -- This signature is currently under construction.