[O] Macro that calls external program
Hi, I am new to emacs and orgmode. I spent the last couple days reading most of the docs before diving in, but I didn't see anywhere how I could have a macro that instead of replacing the macro with lisp code, calls an external program instead. Something like: #+MACRO: func call /home/josh/mybinary $1 {{{func(Text Argument)}}} and this would be setup to call an external program and the output of the program would replace the macro on export. /home/josh/mybinary "Text Argument" Thanks! Josh
Re: [O] [ANN] Changes to link syntax
On 10/03/2019 11:19, Nicolas Goaziou wrote: > When in doubt, use the function ~org-link-escape~ in order to turn > a link string into its properly escaped form. > > The old ~org-link-escape~ and ~org-link-unescape~ functions have > been renamed into ~org-link-encode~ and ~org-link-decode~. Aren't those two sentences slightly contradictory? If ~org-link-escape~ has been renamed ~org-link-encode~ I think that the later should be mentioned in the first sentence. Cheers, Dan
Re: [O] [ANN] Changes to link syntax
On 2019-03-10 1:02 PM, Samuel Wales wrote: > the org capture firefox extensions, and similar extensions, or > org-protocol, might need changing. > > [...] Also seems like there are a couple more internal Org functions that need changing: when opening a new empty org file using latest Org master, I get the following error: File mode specification error: (void-function org-element-restriction) Also, calling org-insert-last-stored-link seems to cause error(s) like this one: Error during redisplay: (jit-lock-function 1) signaled (void-function org-element-link-parser) Best, -- Amin Bandali https://aminb.org
Re: [O] manual: stale bindings for org-clock-report and org-columns-insert-dblock
Hello, Nikolay Kudryavtsev writes: > I was able to debug the Icicles interaction bug: > > In org-dblock-write:clocktable there's a check ((pred functionp) > (funcall scope)) which checks whether the scope is a function. Since > the default scope is currently "file", it gets funcalled. Icicles > provides a function called file. There it can be disabled by setting > (setq icicle-define-alias-commands-flag nil), but getting to that > would generally mean that the user ran into some problems and did the > same debugging I had to do. Icicles is doing it wrong. Packages are supposed to provide only prefixed functions, since there is no namespace in Emacs. > I'm not 100% sure but I'd rather prefer org not calling any functions > with generic names like "file" or "subtree", so maybe prepending some > predicate on a call is warranted, so instead of "file", something like > "org-scope-file" would get checked, but I don't really understand the > intended use of this feature. I pushed a different change. Tell me if it fixes your issue. > As for dynamic reloading, I retested and can confirm that it's broken > since 69c300bbf. To repeat, start with elpa org, add master org to the > load path, do org-reload. So, you are doing a mixed installation on purpose. No wonder you have troubles. Don't reload a different installation on top of a loaded one. Regards, -- Nicolas Goaziou
Re: [O] Bug: org-table-separator-space behaviour under zoom [9.2.2 (9.2.2-elpa @ /home/lord/.emacs.d/elpa/org-20190304/)]
Hello, Vadim Zaliva writes: > Yes, that helped. OK. I pushed that change. Thank you for the feedback. > If there is a way to file a bug report without subscribing to the mailing > list? > I subscribed to the list just to report this bug and unsubscribed > since. You can send an email to the mailing list without being subscribed. It will be moderated though, so it can take a couple of days. Regards, -- Nicolas Goaziou
Re: [O] [ANN] Changes to link syntax
the org capture firefox extensions, and similar extensions, or org-protocol, might need changing. On 3/10/19, Nicolas Goaziou wrote: > Hello, > > I finally pushed changed about escape syntax in bracket links. Here is > the excerpt from ORG-NEWS: > > Org used to percent-encode sensitive characters in the URI part of the > bracket links. > > Now, escaping mechanism uses the usual backslash character, according > to the following rules, applied in order: > > 1. All consecutive =\= characters at the end of the link must be >escaped; > 2. Any =]= character at the very end of the link must be escaped; > 3. Any =]= character followed by either =[= or =]= must be escaped; > 4. Other =]= and =\= characters need not be escaped. > > When in doubt, use the function ~org-link-escape~ in order to turn > a link string into its properly escaped form. > > The old ~org-link-escape~ and ~org-link-unescape~ functions have > been renamed into ~org-link-encode~ and ~org-link-decode~. > > I added a checker in "org-lint.el" to detect old percent-encoding escape > syntax in links. > > Internally, I also moved all link related code from "org.el" to "ol.el", > and renamed libraries defining a new link type with "ol-" prefix. (e.g. > "org-bbdb.el" to "ol-bbdb.el"), much like "ox-" prefix. > > Feedback is welcome. > > Regards, > > -- > Nicolas Goaziou > > -- 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: [O] babel detangling visits a large number of files
Hello, Eric S Fraga writes: > Hello, > > motivated by having just watched this video, > > https://www.youtube.com/watch?time_continue=479=BLomb52wjvE > > I decided to play around a bit with detangling. > > When I try, it takes some time to get to the original src block. Even > though the comment entry before the code looks very reasonable, e.g.: > > #+begin_src julia > # [[file:~/s/research/strawberry/src/fresa.org::modulestart][modulestart]] > module Fresa > [... code elided ...] > end > # modulestart ends here > #+end_src > > invoking org-babel-tangle-jump-to-org proceeds to visit a large number > of files (I only know because many of them require accepting some local > file variable settings when the files are visited) and org further > complains about a large number of multiply defined IDs. > > Given that the detangling information in the comment has the file > explicitly stated, why should the detangling procedure care about IDs > and why does it need to visit so many files? Have I configured > something wrongly? I think I fixed it in master branch. Could you test it ? Beware, master branch also include the link syntax change. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Possible bug in org-protocol
pierre.techouey...@free.fr (Pierre Téchoueyres) writes: > Nicolas Goaziou writes: >> Could you send a complete version of the patch? > > What dou you think of the attached one ? Perfect. Applied. Thank you.
[O] [ANN] Changes to link syntax
Hello, I finally pushed changed about escape syntax in bracket links. Here is the excerpt from ORG-NEWS: Org used to percent-encode sensitive characters in the URI part of the bracket links. Now, escaping mechanism uses the usual backslash character, according to the following rules, applied in order: 1. All consecutive =\= characters at the end of the link must be escaped; 2. Any =]= character at the very end of the link must be escaped; 3. Any =]= character followed by either =[= or =]= must be escaped; 4. Other =]= and =\= characters need not be escaped. When in doubt, use the function ~org-link-escape~ in order to turn a link string into its properly escaped form. The old ~org-link-escape~ and ~org-link-unescape~ functions have been renamed into ~org-link-encode~ and ~org-link-decode~. I added a checker in "org-lint.el" to detect old percent-encoding escape syntax in links. Internally, I also moved all link related code from "org.el" to "ol.el", and renamed libraries defining a new link type with "ol-" prefix. (e.g. "org-bbdb.el" to "ol-bbdb.el"), much like "ox-" prefix. Feedback is welcome. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Possible bug in org-protocol
Hello Nicolas, Nicolas Goaziou writes: > ... >> Is simple diffs an acceptable format for patches or should I send you an >> fully formatted git commit ? > > The latter, please. > > Could you send a complete version of the patch? What dou you think of the attached one ? Regards, Pierre >From 92db52eb3e546ed03f0ade483a6cb149300ca6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= Date: Sun, 10 Mar 2019 17:50:22 +0100 Subject: [PATCH] org-protocol: Fix URL handling -- add tests * testing/lisp/test-org-protocol.el (test-org-protocol/org-protocol-parse-parameters): add test for the commit e0bfdec22 which un-escape extracted link as it is url-encoded externally. --- testing/lisp/test-org-protocol.el | 10 ++ 1 file changed, 10 insertions(+) diff --git a/testing/lisp/test-org-protocol.el b/testing/lisp/test-org-protocol.el index fc764386c..6ee368dcf 100644 --- a/testing/lisp/test-org-protocol.el +++ b/testing/lisp/test-org-protocol.el @@ -35,6 +35,16 @@ (let ((data (org-protocol-parse-parameters "url=abc=def" t))) (should (string= (plist-get data :url) "abc")) (should (string= (plist-get data :title) "def"))) + ;; Parse new-style complex links + (let* ((url (concat "template=p&" + "url=https%3A%2F%2Forgmode.org%2Forg.html%23capture-protocol&" + "title=The%20Org%20Manual&" + "body=9.4.2%20capture%20protocol")) + (data (org-protocol-parse-parameters url))) +(should (string= (plist-get data :template) "p")) +(should (string= (plist-get data :url) "https://orgmode.org/org.html#capture-protocol;)) +(should (string= (plist-get data :title) "The Org Manual")) +(should (string= (plist-get data :body) "9.4.2 capture protocol"))) ;; Parse old-style links (let ((data (org-protocol-parse-parameters "abc/def" nil '(:url :title (should (string= (plist-get data :url) "abc")) -- 2.20.1
Re: [O] [PATCH] Faulty logic in org-cmp-tag/alpha
Hello, Carlos Pita writes: > Hi all, > > there is a problem in this kind of logic: > > (cond ((not ta) +1) > ((not tb) -1) > ((string-lessp ta tb) -1) > ((string-lessp tb ta) +1 > > in that when both ta and tb are nil then they are arbitrarily sorted. > Since the agenda sorting strategy is lexicographic this logic > virtually invalidates any strategy that puts tag or alpha first, v.g. > '(tag-up priority-down). > > I've attached a patch returning nil when both ta and tb are nil so as > to fallback to the next sorting criterion without favoring lhs nor > rhs. Applied. Thank you. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] Possible bug in org-protocol
Hello, pierre.techouey...@free.fr (Pierre Téchoueyres) writes: > Thanks for your quick action. I've also written another test for > this patch. Would you mind adding it too ? Thank you for the patch. > Is simple diffs an acceptable format for patches or should I send you an > fully formatted git commit ? The latter, please. Could you send a complete version of the patch? Regards, -- Nicolas Goaziou
Re: [O] clocktable - Wrong type argument: plistp - after upgrade
Hello, Nikolay Kudryavtsev writes: > It's not a big deal by any means, but maybe the manual should be > improved, since it has leftovers from laxer times. I wouldn't expect > users to know that dblocks properties should be a proper plist, so > reminding them is probably a good idea. > > So for fileskip0, stepskip0 and other boolean values(are there any > more?) maybe the manual sentence should follow the form of one > for :emphasize, that is, start with "When ‘t’,". Fixed. Thank you. Regards, -- Nicolas Goaziou