org-capture fails to insert link even on :immediate-finish templates
Hello, I have an org-capture template with :immediate-finish t. In notmuch-mode, it looks like org-capture support is not implemented yet for the search interfaces, and so when capturing on these interfaces (without noticing), I get a capture without the link. Is it possible to make org-capture fail loudly when capturing a =:immediate-finish t= template for which all the substitutions didn't succeed, instead of just having empty strings at the substitution locations? Thank you! Leo
included text
org has a bunch of mechanisms for included text, including macros, the include statement, and maybe babel. i want to take some text and stick it in a paragraph in a few subtrees, but have it be in a single entry. so like: === * my insertable text alpha, beta, gamma * one blog post whatever whatever some greek letters include [syntax for including] and more. * another blog post some types of radiation include [syntax for including]. === what's the usual most non-breakable mechanism for this? thanks. -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html The disease DOES progress. MANY people have died from it. And ANYBODY can get it at any time.
Bug: javascript license not recognized by librejs [9.2.6 (9.2.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/guix.d/org-9.2.6/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. The javascript license notice by org-mode is not recognized by librejs. example: /* @licstart The following is the entire license notice for the JavaScript code in this tag. Copyright (C) 2012-2019 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GNU GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. As additional permission under GNU GPL version 3 section 7, you may distribute non-source (e.g., minimized or compacted) forms of that code without the copy of the GNU GPL normally required by section 4, provided you include this license notice and a URL through which recipients can access the Corresponding Source. @licend The above is the entire license notice for the JavaScript code in this tag. */ *///--> To get this recognized, it could use magnet-style license definition: // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050=gpl-3.0.txt GPL-v3-or-Later *///--> // @license-end This would also have the advantage of being shorter. See https://www.gnu.org/software/librejs/free-your-javascript.html#magnet-link-license Best wishes, Arne Emacs : GNU Emacs 26.1 (build 1, x86_64-unknown-linux-gnu, GTK+ Version 3.24.0) of 2019-01-22 Package: Org mode version 9.2.6 (9.2.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/guix.d/org-9.2.6/) -- Unpolitisch sein heißt politisch sein ohne es zu merken signature.asc Description: PGP signature
Re: tags-todo agenda: Show scheduling info
the following will not work for you due to dependencies. has worked for me for many years. puts ! in agenda prefix if schedule or deadline. if it is agenda agenda [timestamp agenda, daily/weekly agenda] it requires closed also. (with-eval-after-load 'org-agenda ;; bangify agenda prefix (cl-loop for entry in org-agenda-prefix-format do ;; remove colon from category (alpha-asetf (cdr entry) (replace-regexp-in-string ":" "" it)) ;; add ! (alpha-asetf (cdr entry) (replace-regexp-in-string "%i " (concat "%i%" ;; (setq entry '(agenda . " %i hi")) (format "%s" `(alpha-org-agenda-prefix-bangify ,(when (eq (car entry) 'agenda) '(quote and-closed) it))) (defun alpha-org-agenda-prefix-bangify ( and-closed) "If and-closed, require that it also be closed. Useful for agenda agenda where most things are scheduled or deadlined thus would be pointlessly bangified." ;; (looking-back-at (if (and (or (not and-closed) (alpha-org-entry-get "CLOSED")) (or (alpha-org-entry-get "SCHEDULED") (alpha-org-entry-get "DEADLINE"))) "!" " "))) -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html The disease DOES progress. MANY people have died from it. And ANYBODY can get it at any time.
Re: Continued lists
continuing one after prev list is a great idea. then you won't get out of sync. dunno if feasible. -- The Kafka Pandemic What is misopathy? https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html The disease DOES progress. MANY people have died from it. And ANYBODY can get it at any time.
Re: Continued lists
It seems a little tricky to do much better. With numbering you can do something like this where you find the last element of the previous list, and then continue it. This won't do what you want for nested lists I guess. For lettering, you would need to figure out how to increment the letter. but for simple numbered lists, this might do the trick for you. #+BEGIN_SRC emacs-lisp (defun auto-continue () (interactive) (when-let (p (org-in-item-p)) (save-excursion (goto-char (line-end-position)) (goto-char (org-element-property :contents-begin (org-element-context))) (let* ((lists (org-element-map (org-element-parse-buffer) 'plain-list (lambda (lst) (when (eq 'ordered (org-element-property :type lst)) (cons (org-element-property :end lst) (length (org-element-property :structure lst))) (last-list (nth (- (or (-find-index (lambda (x) (> (car x) (point))) lists) (length lists)) 1) lists))) (insert (format "[@%s] " (+ 1 (cdr last-list (org-ctrl-c-ctrl-c) #+END_SRC John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Sat, Nov 2, 2019 at 5:49 AM Jarmo Hurri wrote: > > Greetings. > > I know that lists can be continued using the following syntax: > > # --- > * First heading > 1. a list begins here > * Second heading > 2. [@2] list continues > # --- > > I find myself doing this all the time, especially when working on Beamer > slides. > > Given how smart org mode is (it is!), I find manual list continuation > weird. My questions are: > > a. Is there already a better way? > b. [@b] Could we have one? > > Jarmo > > >
Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]
>>> "FE" == Fraga, Eric writes: > On Saturday, 2 Nov 2019 at 10:38, Uwe Brauer wrote: >> @Eric, I wonder why you did not get these numbers without the patch! > Because I did not properly read your post... > I thought you were referring to the LaTeX fragments themselves, not the > extra HTML generated that numbered the equations whether they should be > numbered or not. > Sorry about misleading everybody! Happens to me also, no problem ;-) smime.p7s Description: S/MIME cryptographic signature
tags-todo agenda: Show scheduling info
Hello all, I'm having trouble with simply trying to show any scheduling information about a heading in a tags-todo search. Can someone point me to how to do this? I thought that I define a custom agenda command like this: (setq org-agenda-custom-commands '( ("p" "Foo" tags-todo "+foo" ( (org-agenda-prefix-format "Hello World %s") (org-agenda-remove-times-when-in-prefix nil) (org-agenda-todo-ignore-with-date nil) And have data like this: * todo Something:foo: SCHEDULED: <2019-11-02 Sat> I want my agenda view to show that this entry is scheduled. However, all I get is this: Hello World Something :foo: >From the documentation for org-agenda-prefix-format it seems that %s should do the trick, right? I've even tried tinkering with org-agenda-remove-times-when-in-prefix. Any ideas? Thanks, --Nate
How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
Fraga, Eric writes on Wed 30 Oct 2019 14:55: > [...] for a number of reasons including advice from this list, I > have moved away from inline tasks almost completely and now use > drawers instead. As far as I can see, the last discussion about that on the list occurred in April 2018 (starting with message https://lists.gnu.org/archive/html/emacs-orgmode/2018-04/msg00235.html). My understanding then was that there was a significant wish from prominent Org developers and/or users to preserve inline tasks in some form, with a decent implementation. So, if I am not sure what "advice" you have in mind, I certainly do observe that my hope of some near future progress has not been fulfilled so far :-) I wouldn't mind using drawers instead, though, hence avoiding all the problems tied to current inline tasks, but can I? You said at that time that my use of inline tasks was appropriate whereas drawers would not be. You also said that you had "already moved to using drawers for a large number of [your] inline task use cases, the ones that weren't really tasks!". Is this consistent with your "almost completely" above? This leads me to the question of what precisely _defines_ a "task"; what is important to me is that such inline "stuff" has an equivalent of the TODO keyword, and an equivalent of tags for searching, both being integrated transparently with regular TODOs and tags. If you (or someone else) can show me how to perform this, I'll start the switch immediately! Regards -- EOST (École et Observatoire des Sciences de la Terre) IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr 5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44 F-67084 Strasbourg Cedex, France| Fax: +33 (0)3 68 85 01 25
Re: org-refile-target-verify-function - use inherited tag & todo
Hi Nate, On Fri, Nov 01 2019, Nathan Neff wrote: Indeed, I do use org-refile-use-outline-path 'file. However, I have a simple directory specified for my org-agenda-files. ("~/org-mode") Therefore I'll need to do something a bit different. It appears that your solution creates "targets" which is the targets list of course, and then it creates "agenda-files" which goes through org-agenda-files and finds all the filenames in org-agenda files. It then mutates "targets", and removes any entry which is a filename from org-agenda-files. Since my org-agenda-files is simply ("~/org-mode/") none of the entries match. Hmmm, let me ask: Why not simply go through targets and remove any entry whose value is a simple filename? Why search org-agenda-files first? This function also assumes that the org-refile-targets always comes from org-agenda-files. I'll play with your function and see what I can get -- thank you for the head-start! Thanks --Nate I'm glad this might be useful to you. And you are correct in all of observations. My main point is simply that, as things stand, you won't be able to trim the file level candidates with `org-refile-target-verify-function`, as they are hardcoded. But this simple function is the sketch of a (hackish) way. `org-refile-get-targets`' main purpose is to return the list of targets. The advice function grabs this return value, filters the list and returns the filtered list. How it filters may depend, as you noted. I've chosen a simple criterion which meets my use case (`org-agenda-files`, as I specify the individual files directly there, and use only those as refile targets). Indeed, it does make some presumptions, as you noted. (The function does not "search org-agenda-files" though, it just gets the list of their names, which is contained in the variable). In your case, you will certainly have to devise another filtering criterion. I think the one you suggest is a good one too. Best regards, Gustavo.
Bug: export html with nice urls [9.1.9 (release_9.1.9-65-g5e4542 @ /gnu/store/djza93lqjcndsldf4794bp8mvipd6fz4-emacs-26.3/share/emacs/26.3/lisp/org/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. When publishing a website from org-mode there is no option to transform org-links to cool urls (without extension). There is the option to not switch to a .html extension, but no way to strip the extension alltogether. This is one of the two final pieces which prevent making the site really nice. I already have a hack for the sitemap with nice URLs, but that’s just that: a hack. ;; TODO: use cool uris, partially breaks local viewing, requires site/.htaccess. see http://www.w3.org/Provider/Style/URI (defun org-publish-sitemap-default-entry-cool-url (entry style project) "Default format for site map ENTRY, as a string. ENTRY is a file name. STYLE is the style of the sitemap. PROJECT is the current project." (cond ((not (directory-name-p entry)) (format "[[file:%s][%s]]" (file-name-sans-extension entry) ;; this is the cool url (org-publish-find-title entry project))) ((eq style 'tree) ;; Return only last subdir. (file-name-nondirectory (directory-file-name entry))) (t entry))) To make this work with every org-link would require hacking org-html-link to not only allow keeping the org-link (if :html-link-org-files-as-html is nil), but also to allow stripping the extension alltogether. It would be great to have this option, because then the org-documents would keep working while the export would work well (with the link from filename-sans-extension to html-file done transparently via htaccess). Best wishes, Arne PS: this is for https://www.draketo.de/index — not yet official, but already usable; I’ve been planning to switch to org-mode for my site for years, and now I’m almost there. Emacs : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /gnu/store/djza93lqjcndsldf4794bp8mvipd6fz4-emacs-26.3/share/emacs/26.3/lisp/org/) current state: == (setq 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-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>") org-enforce-todo-dependencies t org-odt-format-headline-function 'org-odt-format-headline-default-function org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-block-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"] org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-babel-load-languages '((C . t) (R . t) (asymptote) (awk) (calc) (clojure) (comint) (css) (ditaa . t) (dot . t) (emacs-lisp . t) (fortran) (gnuplot . t) (haskell) (io) (java) (js) (latex) (ledger) (lilypond) (lisp) (matlab) (maxima) (mscgen) (ocaml) (octave) (org . t) (perl) (picolisp) (plantuml) (python . t) (ref) (ruby) (sass) (scala) (scheme) (screen) (shell . t) (shen) (sql) (sqlite)) org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"] org-feed-alist '(("Weltenwald, alt" "http://www.draketo.de/rss.xml; "external-rss.org.in" "Weltenwald, alt" :parse-feed org-feed-parse-rss-feed/nonreversed :template "\n* %h\n %U\n %(parse-html-string \"%description\")\n %a\n")
Re: How to change the width of a latex exported inlinetask?
On Friday, 1 Nov 2019 at 23:48, alain.coch...@unistra.fr wrote: > I have succeeded, following exactly what you suggested. Thank you > very much. Excellent. You're very welcome. -- Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]
On Saturday, 2 Nov 2019 at 10:38, Uwe Brauer wrote: > @Eric, I wonder why you did not get these numbers without the patch! Because I did not properly read your post... I thought you were referring to the LaTeX fragments themselves, not the extra HTML generated that numbered the equations whether they should be numbered or not. Sorry about misleading everybody! -- Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
Continued lists
Greetings. I know that lists can be continued using the following syntax: # --- * First heading 1. a list begins here * Second heading 2. [@2] list continues # --- I find myself doing this all the time, especially when working on Beamer slides. Given how smart org mode is (it is!), I find manual list continuation weird. My questions are: a. Is there already a better way? b. [@b] Could we have one? Jarmo
Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]
>>> "TM" == Thibault Marin writes: > Hi, > I think I wrote some of that code, I was not trying to support > "unnumbered" environments. If I understand correctly, this is what you > are trying to get. > The attached patch attempts to solve this. Currently, `displaymath' and > `*' environments do not get numbers, I am not sure if there are other > environments that should not get numbers; please let me know if you have > others in mind. Thanks very much, I pulled the latest master, applied your patch, compiled and installed, and everything works *now* as expected. The only environments without numbers which I use regularly are. align* and sometimes eqnarray* but these are all covered > If you (and others) could test and/or review the patch, we could > probably get it merged at some point. That would be great, thanks again @Eric, I wonder why you did not get these numbers without the patch! Uwe smime.p7s Description: S/MIME cryptographic signature
Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]
>>> "JK" == John Kitchin writes: > Odd indeed. I have restarted Emacs and saw the same thing. But now I > have a more clear picture. I think what is happening is in > org-html--wrap-latex-environment, there is a caption provided which are > the numbers. This only affects latex environments, and does not affect > $$ (//), etc. > #+RESULTS: > : > : > : > : > : > : > : 1 > : > : Thanks for your effort. So the culprit is not org-mime, but the org export engine. Did you see the patch Thibault sent in a different email? I am trying that one out, now. Uwe smime.p7s Description: S/MIME cryptographic signature
Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]
Hi, I think I wrote some of that code, I was not trying to support "unnumbered" environments. If I understand correctly, this is what you are trying to get. The attached patch attempts to solve this. Currently, `displaymath' and `*' environments do not get numbers, I am not sure if there are other environments that should not get numbers; please let me know if you have others in mind. If you (and others) could test and/or review the patch, we could probably get it merged at some point. Thanks, thibault On 2019-11-01T09:55:49-0400, Uwe Brauer wrote: >>> "FE" == Fraga, Eric writes: > On Friday, 1 Nov 2019 at 08:52, Uwe Brauer wrote: >> As the attached screenshots show, the png contain unwanted equations >> numbers (displaymath adn equation* have been used which should not >> generate those numbers). > Uwe, > when I invoke org-mime-htmlize with your equations, as written, I do not get any equation numbers. Thanks, so it is my setting. I wounder how can I debug this? From d66392545762f0ed890a772e08dad3655ea7e522 Mon Sep 17 00:00:00 2001 From: thibault Date: Sat, 2 Nov 2019 02:12:38 -0400 Subject: [PATCH] ox-html: Add equation numbers only for numbered environments * lisp/ox-html.el (org-html-latex-environment): Add caption to numbered environments only (org-html--latex-environment-numbered-p): Determine whether a latex environment should be numbered. --- lisp/ox-html.el | 36 ++-- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 83d0fd2e9..55983ff2f 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2914,19 +2914,35 @@ For instance, change an 'equation' environment to 'equation*'." latex-frag nil nil 1) nil nil 1)) +(defun org-html--latex-environment-numbered-p (latex-frag) + "Return t if LATEX-ENV contains a numbered environment. + +Environments with a star (*) character and displaymath are not numbered." + (not (some 'identity + (mapcar (lambda (el) + (string-match el latex-frag)) + '("\\`[ \t]*begin{[^*}]+?[*]}" + "\\`[ \t]*begin{displaymath}") + (defun org-html-latex-environment (latex-environment _contents info) "Transcode a LATEX-ENVIRONMENT element from Org to HTML. CONTENTS is nil. INFO is a plist holding contextual information." - (let ((processing-type (plist-get info :with-latex)) - (latex-frag (org-remove-indentation - (org-element-property :value latex-environment))) -(attributes (org-export-read-attribute :attr_html latex-environment)) -(label (and (org-element-property :name latex-environment) -(org-export-get-reference latex-environment info))) -(caption (number-to-string - (org-export-get-ordinal - latex-environment info nil - #'org-html--math-environment-p + (let* ((processing-type (plist-get info :with-latex)) + (latex-frag (org-remove-indentation + (org-element-property :value latex-environment))) + (attributes (org-export-read-attribute :attr_html latex-environment)) + (label (and (org-element-property :name latex-environment) + (org-export-get-reference latex-environment info))) + (caption (when (org-html--latex-environment-numbered-p + latex-frag) + (number-to-string + (org-export-get-ordinal + latex-environment info nil + (lambda (l info) + (and (org-html--math-environment-p l) + (org-html--latex-environment-numbered-p + (org-remove-indentation + (org-element-property :value l)) (cond ((memq processing-type '(t mathjax)) (org-html-format-latex -- 2.23.0