[O] small folding issue
Hi, I see a small folding issue (release_8.2.5h-104-g3589f6, but probably way before; didn't test): If I have a tree at the end of an org file: #+begin_src org * my header abcdefg #+end_src /without/ a newline after the last line, the header folds into * my header...g I found that in a new org file, and I'm not sure I had a org file without a newline at the end before. So I can't say if this is a new issue or not. Best regards Robert
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
Hi, Eric I'm sorry for that I used `flet' in the patch, It's a easy way to let function `current-message' work in batch mode, so I used it even I saw that emacs says `flet' is obsolete, I'm sorry for that. And I made a new patch(attachment) using `defadvice' for `message' to capture the message in batch mode, after the message being captured, the advice function is removed. Is this way OK? And I also sent a request email to ass...@gnu.org, and now waiting the reply. Thanks. On Fri, Apr 11, 2014 at 10:45 AM, Eric Schulte wrote: > We can no longer use `flet' in the Org-mode code base, please re-work > this patch w/o flet. > > Also, I don't see your name in the list of contributors, and (I believe) > this patch is too large to apply w/o FSF assignment. See the following > page on how to contribute to Org-mode. > > http://orgmode.org/worg/org-contribute.html > > KDr2 writes: > > > The bug: > > write file ~/scheme-test.org with the content below: > > ---8<-- > > #+BEGIN_SRC scheme :exports results :results output raw > > (display "Hello Scheme in OrgMode") > > #+END_SRC > > ---8<-- > > > > and run: > > > > emacs --batch --eval='(load "~/.emacs.d/init.el")' ~/scheme-test.org -f > > org-html-export-to-html > > > > you will find the bug: > > > > `org-babel-scheme-execute-with-geiser' uses `current-message' to get the > > results of scheme code blocks, but `current-message' always returns nil > in > > batch mode, and this patch fixes this. > > > > -- > > -- > Eric Schulte > https://cs.unm.edu/~eschulte > PGP: 0x614CA05D > -- -- KDr2, http://kdr2.com From fe5549f3f48acf9b51aeb3706eb8dd3d76ab18c1 Mon Sep 17 00:00:00 2001 From: KDr2 Date: Fri, 11 Apr 2014 12:56:24 +0800 Subject: [PATCH] lisp/ob-scheme.el: Fix scheme code blocks execution error in batch mode * lisp/ob-scheme.el (org-babel-scheme-capture-current-message, org-babel-scheme-execute-with-geiser): Capture scheme code results via current-message both in interactive mode and noninteractive mode. `org-babel-scheme-execute-with-geiser' uses `current-message' to get the results of scheme code blocks, but `current-message' always returns nil in batch mode, and this patch fixes this. Modified from a patch proposal by KDr2(killy.d...@gmail.com) --- lisp/ob-scheme.el | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el index b7117e9..6b82c6e 100644 --- a/lisp/ob-scheme.el +++ b/lisp/ob-scheme.el @@ -118,6 +118,19 @@ org-babel-scheme-execute-with-geiser will use a temporary session." (name result)) +(defmacro org-babel-scheme-capture-current-message (&rest body) + "Capture current message in both interactive and noninteractive mode" + `(if noninteractive + (let ((current-message nil)) + (defadvice message (after capture-current-message activate) + (setq current-message ad-return-value)) + ,@body + (ad-unadvise #'message) + current-message) + (progn + ,@body + (current-message + (defun org-babel-scheme-execute-with-geiser (code output impl repl) "Execute code in specified REPL. If the REPL doesn't exist, create it using the given scheme implementation. @@ -142,10 +155,11 @@ is true; otherwise returns the last value." (current-buffer) (setq geiser-repl--repl repl-buffer) (setq geiser-impl--implementation nil) - (geiser-eval-region (point-min) (point-max)) + (setq result (org-babel-scheme-capture-current-message + (geiser-eval-region (point-min) (point-max (setq result - (if (equal (substring (current-message) 0 3) "=> ") - (replace-regexp-in-string "^=> " "" (current-message)) + (if (and (stringp result) (equal (substring result 0 3) "=> ")) + (replace-regexp-in-string "^=> " "" result) "\"An error occurred.\"")) (when (not repl) (save-current-buffer (set-buffer repl-buffer) -- 1.9.2
Re: [O] Bug: fatal when opening agenda [8.2.5h (8.2.5h-82-gd91d4b-elpaplus /home/jeffrey/.emacs.d/elpa/org-plus-contrib-20140324/)]
Jeffrey DeLeo gmail.com> writes: > > > 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 > > http://orgmode.org/manual/Feedback.html#Feedback > > Your bug report will be posted to the Org-mode mailing list. > > > Trying to use the org-agenda gives fatal error. > (org-agenda) then hit 'a' or 't' > > Stack trace: > > (wrong-type-argument integer-or-marker-p nil) > put-text-property(101818 nil org-effort "0:30") > (save-excursion (org-back-to-heading t) (put-text-property (point-at- bol) > (outline-next-heading) tprop p)) > (while (re-search-forward (concat "^[ ]*:" dprop ": +\\(.*\\)[ > ]*$") Found solution of this bug. Due to the (outline-next-heading) method return nil value when current heading is the last heading in document. So it cannot work correctly during invoke (put-text-properties) Temporary solution: 1. Add new headline at the end of org-mode document, like this: * TODO hello :PROPERTIES: :Effort: 0:10 :END: * duplicated headline 2. Modify the source code of org-mode and then re-compile it. This need to modify the method (org-refresh-properties) in org.el change the following line: (put-text-property (point-at-bol) (outline-next-heading) tprop p) to: (put-text-property (point-at-bol) (or (outline-next-heading) (point-max)) tprop p) Hope it works.
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
We can no longer use `flet' in the Org-mode code base, please re-work this patch w/o flet. Also, I don't see your name in the list of contributors, and (I believe) this patch is too large to apply w/o FSF assignment. See the following page on how to contribute to Org-mode. http://orgmode.org/worg/org-contribute.html KDr2 writes: > The bug: > write file ~/scheme-test.org with the content below: > ---8<-- > #+BEGIN_SRC scheme :exports results :results output raw > (display "Hello Scheme in OrgMode") > #+END_SRC > ---8<-- > > and run: > > emacs --batch --eval='(load "~/.emacs.d/init.el")' ~/scheme-test.org -f > org-html-export-to-html > > you will find the bug: > > `org-babel-scheme-execute-with-geiser' uses `current-message' to get the > results of scheme code blocks, but `current-message' always returns nil in > batch mode, and this patch fixes this. > > -- -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] Prepare release 8.2.6
"R. Michael Weylandt" writes: > On Sat, Apr 5, 2014 at 3:27 PM, Nicolas Goaziou wrote: >> Hello, >> >> Would you mind adding a commit message, TINYCHANGE at its end, and send >> it again with "git format-patch"? > > Hi Nicolas, > > Thanks for taking the time to review my patches (2 attached): > hopefully these are formatted to org standards. > I just tried to apply the second patch, but it no longer applies (with "git am") to the Org-mode repo. Would you mind sending along an updated version? Thanks, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] Export arrays for 'sh' code blocks when using bash
Hi Pascal, This patch looks great, thanks for making the additions. Once last request, would you mind formatting it with "git format-patch"? With that done I'll be happy to apply this to the repo. Also, I think the google-wide copyright stuff is sorted out. Best, Pascal Fleury writes: > Hi Eric, > > Please find attached a new patch that contains the same changes of the > ob-shell.el exporter as before, but also contains unit tests for checking > that it works. > > Let me know if you need some changes in there, and how the google-wide > copyright issues comes along. My information came from Chris DiBona (our > master of open-source licenses), is this helps to find the relevant > documents. > > Thanks, > Pascal > > > > On Sat, Mar 29, 2014 at 8:37 PM, Eric Schulte wrote: > >> Thanks for making these changes. Once they're in and Bastien figures >> out how the google-wide copyright attribution works we should be good to >> go. >> >> Thanks! >> >> Pascal Fleury writes: >> >> > Hi Eric, see comments inline. >> > >> > >> > On Thu, Mar 27, 2014 at 6:43 PM, Eric Schulte > >wrote: >> > >> >> Hi Pascal, >> >> >> >> This looks like a good patch. If I could make three changes/requests. >> >> >> >> >> > Thanks, I am happy to see it makes sense. >> > >> > >> >> 1. This patch should also work for "begin_src bash" code blocks. After >> >>a very quick glance it doesn't appear to. >> >> >> >> I have actually tried this with the latest org-mode release (8.2.5h) and >> > it did plainly not accept 'begin_src bash'. Maybe that's new with the >> > ob-shell.el (I noticed it has been renamed :-) >> > >> > >> >> 2. Could you include one or two tests ensuring that this patch does what >> >>it intends with bash code blocks, and does not affect code blocks >> >>executed with bin/sh? >> >> >> > >> > Will do, seeing it has some traction. >> > >> > >> >> >> >> 3. Large contributions like this require some FSF paperwork. Please see >> >>the following page for information on requirements to contribute. >> >> >> >> >> > I checked internally, and apparently, Google has already such a signed >> > document. It would run on the same document, as I am a google employee. >> > >> > >> >>http://orgmode.org/worg/org-contribute.html >> >> >> >> Thanks, and I look forward to seeing this merged into Org-mode! >> >> Eric >> >> >> >> Pascal Fleury writes: >> >> >> >> > Hello, >> >> > >> >> > I'dl like to propose a patch for inclusion into org-mode (ob-shell.el >> in >> >> > particular). >> >> > >> >> > *TL;DR:* use arrays and associative arrays when exporting variables to >> >> bash >> >> > in 'sh' code blocks. >> >> > >> >> > *Details:* >> >> > When variables are defined in a 'sh' code block, they are exported as >> >> > strings. when the variable itself is an array or a table, then we >> simply >> >> > get a shell variable that contains the list of all values in a >> >> > non-structured form. E.g. >> >> > >> >> > #+NAME: my_list >> >> > | one | >> >> > | two | >> >> > | three | >> >> > >> >> > #+NAME: experiment >> >> > | name | first_attempt| >> >> > | date | [2014-03-27 Thu] | >> >> > | user | fleury | >> >> > >> >> > #+BEGIN_SRC sh :var scalar="some value" :var array=my_list :var >> >> table=config >> >> > echo ${scalar} # -> prints 'some value' >> >> > echo ${array} # -> prints 'one two three' >> >> > echo ${table} # -> prints 'first attempt [2014-03-27 Thu] fleury' >> >> > #+END_SRC >> >> > >> >> > This will print simple strings. Also, there is no easy way to access >> the >> >> > date of the experiment, for example. Now bash has things like arrays >> and >> >> > associative arrays, but the current ob-shell.el does not use these. >> >> > Probably because their syntax is bash-specific, and ob-shell.el is >> >> > shell-agnostic. >> >> > >> >> > My patch (attached) changes this in the case you have >> >> > (setq org-babel-sh-command "bash") >> >> > in your emacs config somewhere. If any other value is used, it >> continues >> >> to >> >> > export them as we do today (I don't know enough about other shells). >> >> > >> >> > In that case, it will export the list as an array, the table as an >> >> > associative array, and the scalar as it does already. So the 'sh' code >> >> > block could then use >> >> > >> >> > #+BEGIN_SRC sh :var scalar="some value" :var array=my_list :var >> >> table=config >> >> > echo ${scalar} >> >> > echo ${array[1]} # -> prints "two" >> >> > echo ${table[user]} # -> prints "fleury" >> >> > #+END_SRC >> >> > >> >> > In the case we have a bigger table, then the first row is used as key, >> >> the >> >> > others are represented as a string with all the values (as it is for >> >> array >> >> > currently). bash does not have multi-dimensional arrays, so it needs >> to >> >> be >> >> > a string. >> >> > >> >> > This makes writing shell snippets much easier in my experience, and >> there >> >> > I'd like to propose this fix for the org-mode community at large. >> >> > >> >> > --p
Re: [O] [BABEL] BUG Re: Omitting try/catch blocks from tangled R code?
> > I applied the patch and it is working. > Great, I've just pushed it up. Best, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
[O] Patch for testing `org-open-at-point'
Hi, I found a bug that `org-open-at-point' doesn't work if the link is a heading property. This used to work and was broken recently. I have written a test for this. The test is suppose to fail in current org-mode version. Please find attached my patch for the test. Hopefully I I didn't place the test in the wrong file. York From df0788134a16baa9762616637c0fe7f568e3e63e Mon Sep 17 00:00:00 2001 From: York Zhao Date: Thu, 10 Apr 2014 21:21:15 -0400 Subject: [PATCH] test-org-element: Add test for `org-open-at-point' with link being heading property. --- testing/lisp/test-org-element.el | 9 + 1 file changed, 9 insertions(+) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 576e3d3..8cfceac 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -1461,6 +1461,15 @@ e^{i\\pi}+1=0 (search-forward "file:") (org-element-property :type (org-element-context)) +(ert-deftest test-org-element/org-open-at-point () + "Test `org-open-at-point' with link being a heading property." + (org-test-with-temp-text + "* Headline +:PROPERTIES: +:URL: [[info:org#Top]] +:END:" +(org-open-at-point))) + Macro -- 1.8.4
[O] [ANN] Syntax highlighting now available in Github in *.org files!
Hello Org mode users and developers, Github has just updated some moments ago their version of the Org Ruby gem which is used for the HTML export, and now code syntax highlight should be available in all the *.org files in your repos. The feedback from Brandon Keepers (@bkeepers) at Github was very helpful to know the requirements and is key person in making this release possible to happen, you can thank him in this now closed ticket: https://github.com/github/markup/issues/253 If you have some feedback on the rendering of the output done by Org Ruby gem, please let me know and submit an issue in the repo and I will follow up (PRs welcome as well of course!): https://github.com/wallyqs/org-ruby/issues Thanks, - Wally
Re: [O] [ANN] Firefox extension for org-protocol and org-capture
Le 10 Apr 2014 22:20, AW a écrit: > > It just does the same thing as the Javascript bookmarklet but without > > the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG > > (or whatever we are supposed to do this week to manage handler for > > protocols). I hope this solution to be easier and more reliable, at > > least for Firefox users. > > But this is all I could find and I still do not know, what it is good for?! Org-protocol is a system which allows to communicate with org-mode from outside, in particular, to call org-capture templates from a web browser. It usually works by registering a new handler for the scheme org-protocol:// and by generating url of the form org-protocol://template/data/foo/bar with a javascript bookmarklet. With Firefox, registering a scheme handler is (according to my experience and other people comments) painful and subject to random failures. The firefox addon avoids this pain and just works. You may also have a look on: - http://orgmode.org/worg/org-contrib/org-protocol.html - http://orgmode.org/manual/Capture.html Regards, Olivier
Re: [O] radio links in middle of words.
Hello, Daniel Clemente writes: > I propose: radio links should be delimited by characters that don't match > [:alpha:] in emacs' regular expression syntax. > Letters (like: aá書ĉ) match, and delimiters (like: -'"/) don't. > > Test it with: > : (string-match-p "[[:alpha:]]" "á") > : (string-match-p "[[:alpha:]]" "書") > : (string-match-p "[[:alpha:]]" "ĉ") > > : (string-match-p "[[:alpha:]]" "'") > : (string-match-p "[[:alpha:]]" "-") > > And the opposite: check for non-letterness: > : (string-match-p "[^[:alpha:]]" "-") > : (string-match-p "[^[:alpha:]]" "á") > > > So a radio link with LINK_TEXT should not only be a match of the > regexp "LINK_TEXT" but of "[^[:alpha:]]LINK_TEXT[^[:alpha:]]" (well, > make it something like "(^|non-letter)LINK_TEXT($|non-text)". > > I think that's better than the current solution and stills allows > for radio links which contain non-letters, like <<>>. What > do you think? It could work. But I think [:alnum:] is needed instead of [:alpha:]. Here's a patch implementing it. Regards, -- Nicolas Goaziou >From 581e68fda98e737043fce479e6eb0cf2b3599c9b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 10 Apr 2014 22:23:27 +0200 Subject: [PATCH] No alphanumeric characters around radio links * lisp/org.el (org-make-target-link-regexp): Change regexp so alphanumeric characters cannot be found next to a radio link. (org-activate-target-links): Apply changes to radio link regexp. * lisp/org-element.el (org-element--object-lex, org-element-link-parser): Apply changes to radio link regexp. * testing/lisp/test-org-element.el (test-org-element/link-parser): Update test. Patch suggested by Daniel Clemente. http://permalink.gmane.org/gmane.emacs.orgmode/84461 --- lisp/org-element.el | 15 +-- lisp/org.el | 10 +- testing/lisp/test-org-element.el | 7 +++ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 06cce47..13837e9 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -2943,12 +2943,14 @@ Assume point is at the beginning of the link." raw-link link search-option application) (cond ;; Type 1: Text targeted from a radio target. - ((and org-target-link-regexp (looking-at org-target-link-regexp)) + ((and org-target-link-regexp + (save-excursion (or (bolp) (backward-char)) + (looking-at org-target-link-regexp))) (setq type "radio" - link-end (match-end 0) - path (org-match-string-no-properties 0) - contents-begin (match-beginning 0) - contents-end (match-end 0))) + link-end (match-end 1) + path (org-match-string-no-properties 1) + contents-begin (match-beginning 1) + contents-end (match-end 1))) ;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]] ((looking-at org-bracket-link-regexp) (setq contents-begin (match-beginning 3) @@ -4184,8 +4186,9 @@ to an appropriate container (e.g., a paragraph)." (save-excursion (let ((limit (and org-target-link-regexp (save-excursion + (or (bolp) (backward-char)) (re-search-forward org-target-link-regexp nil t)) - (match-beginning 0))) + (match-beginning 1))) found) (while (and (not found) (re-search-forward org-element--object-regexp limit t)) diff --git a/lisp/org.el b/lisp/org.el index aa86a3c..321eb71 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6091,13 +6091,13 @@ by a #." (let ((case-fold-search t)) (if (re-search-forward org-target-link-regexp limit t) (progn - (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) - (add-text-properties (match-beginning 0) (match-end 0) + (org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1)) + (add-text-properties (match-beginning 1) (match-end 1) (list 'mouse-face 'highlight 'keymap org-mouse-map 'help-echo "Radio target link" 'org-linked-text t)) - (org-rear-nonsticky-at (match-end 0)) + (org-rear-nonsticky-at (match-end 1)) t) (defun org-update-radio-target-regexp () @@ -6192,13 +6192,13 @@ targets." The regular expression finds the targets also if there is a line break between words." (and targets - (concat "\\(" + (concat "\\(?:^\\|[^[:alnum:]]\\)\\(" (mapconcat (lambda (x) (replace-regexp-in-string " +" "\\s-+" (regexp-quote x) t t)) targets "\\|") - "\\)"))) + "\\)\\(?:$\\|[^[:alnum:]]\\)"))) (defun org-activate-tags (limit) (if (re-search-forward (org-re "^\\*+.*[ \t]\\(:[[:alnum:]_@#%:]+:\\)[ \r\n]") limit t) diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el index 4eccb69..0f81a79 100644 --- a/testing/lisp/test-org-element.el +++ b/testing/lisp/test-org-element.el @@ -1336,12 +1336,11 @@ e^{i\\pi}+1=0 (should (equal "radio" -(org-test-with-temp
[O] bug#16751: 24.3.50; Export during Org export to HTML
Nicolas Goaziou writes: > Unless I'm mistaken, the following patch should fix the issue. Applied. -- Nicolas Goaziou
Re: [O] [RFC] Properly handle keyword + COMMENT keyword
Nicolas Goaziou writes: > Thus, this patch > > - properly fontifies headlines with both a regular keyword and >a COMMENT keyword, > > - fixes `org-toggle-comment' and `org-todo' to handle both COMMENT >keyword and another one > > - adds some consistency to functions implementing their own COMMENT >matching (e.g., with or without case-sensitivity). Applied. -- Nicolas Goaziou
Re: [O] [ANN] Firefox extension for org-protocol and org-capture
Am Donnerstag, 10. April 2014, 11:02:52 schrieb Oleh: > > Following all the nice comments you made after my first announce, I just > > uploaded an updated version of the org-capture extension. > > > > You can find it on the main webpage > > http://chadok.info/firefox-org-capture/ or on the Mozilla addons > > repository https://addons.mozilla.org/fr/firefox/addon/org-mode-capture/ > > (review pending from Mozilla people). > > Hi Olivier, > > Thanks for the great extension. > No more meddling with bookmarks and keyconfig for me:). > > Oleh OK, but could somebody, who understood this add-on, explain its use? Olivier wrote some time ago: > It just does the same thing as the Javascript bookmarklet but without > the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG > (or whatever we are supposed to do this week to manage handler for > protocols). I hope this solution to be easier and more reliable, at > least for Firefox users. But this is all I could find and I still do not know, what it is good for?! Regards, Alexander
Re: [O] [RFC] Org Minor Mode?
Hello, Thorsten Jolitz writes: > What do you think - is there any chance that Org-mode switches from > static hardcoded regexp strings (all over the place) to dynamic > regexps calculated at runtime (using libraries like drx.el or rx.el)? I hope not. The syntax should stabilize, not drift away. > There would be a cost definitely, but then a true org-minor-mode could > become reality that offers the full power of Org-mode in programming > mode's comment section (I'm actually working on it by merging outshine > with orgstruct: [[https://github.com/tj64/omm][omm.el]]). I don't see why you would need the "full power of Org-mode" (whatever that means) in mere comments. In any case, you can override `org-outline-regexp' and `org-outline-regexp-bol' in any minor mode. Regards, -- Nicolas Goaziou
[O] [RFC] Org Minor Mode?
Hi List, I cite from a recent thread on Emacs Help: #+begin_quote Right, I'm very much convinced that the power of Org-mode could be unleashed in a true org-minor-mode that works in the comment-sections of programming major-modes. [...] The major "flaw" of Org-mode that inhibits its use as minor-mode is the wide-spread use of hard-coded regexps, i.e. regexps of this form ,-- | "^\\*+ ... $" `-- in many many variants all over the place. Those three elements "^" (bol), "$" (eol) and "*" (star) are not portable, since in comment-sections of programming major-modes the above should look like: PicoLisp (comment-start repeated with padding) ,-- | "^## *+ ... $" `-- Elisp outshine-style (comment-start repeated with padding) ,-- | "^;; *+ ... $" `-- old-school Elisp (comment-start repeated no padding, different star) ,-- | "^;;;+ ... $" `-- #+end_quote Now I just announced [[https://github.com/tj64/drx][drx.el]] on Emacs Help, I cite again: #+begin_quote Its main purpose is to abstract from hardcoded "^", "$" and "\\*" in regexps. Here are a few examples: # basic usage #+begin_src emacs-lisp (drx "foo" t nil t) #+end_src #+results: : ^foo$ # org-mode version #+begin_src emacs-lisp (drx " foo" t '(t "+") t) #+end_src #+results: : ^\(\*+\) foo$ # css-mode version with # as star #+begin_src emacs-lisp (let ((drx-BOL "^/* ") (drx-EOL "*/$") (drx-STAR "#")) (drx " foo" t '(t "+") t)) #+end_src #+results: : ^/* \(#+\) foo*/$ Many more things are possible, the more than 80 ERT tests in drx.el give many examples with expected output. #+end_quote What do you think - is there any chance that Org-mode switches from static hardcoded regexp strings (all over the place) to dynamic regexps calculated at runtime (using libraries like drx.el or rx.el)? There would be a cost definitely, but then a true org-minor-mode could become reality that offers the full power of Org-mode in programming mode's comment section (I'm actually working on it by merging outshine with orgstruct: [[https://github.com/tj64/omm][omm.el]]). -- cheers, Thorsten
Re: [O] LaTeX export: Handle hash symbol in footnote url links
On 2/26/14 3:11 PM, Nicolas Goaziou wrote: > Hello, > > Michael Bach writes: > >> Thanks for your answer. `\url` can handle hash symbols in its argument >> without escaping alright - as can be expected. AFAICS, the problem lies >> in the `\footnote` command. And yes, I was thinking of `ox-latex` >> figuring out that the url is in a footnote and escape accordingly. >> >> I can see that the export engine should not and cannot cover all special >> cases, but since links and footnotes are `first-class` org-mode >> concepts, it would be nice to have them play along in this situation. >> From a typographic point of view, I figured url links in footnotes are >> not that unusual. > > This needs to be properly defined. > > Where protecting characters in verbatim parts of the buffer should > happen? Within footnotes only? In every verbatim part? And on which > characters? > Ok, using org-element, we could escape special symbols - for now, only '#', '%' and '&' come to mind - in http links iff they are inside a footnote and exporter backend is latex. As I said, if this is too special a case to be supported, I was playing around with regexps and `org-export-filter-final-output-functions' as seen e.g. in [1]. On other occasions that involved in-buffer replacements, I had success using group matching with the `re-search-forward', `replace-match' and `match-string' functions (see also [2]). But IIUC, since the export filter function gets passed a string with the .tex export results, I need a function that operates on a string such as `replace-regexp-in-string' as seen in [1]. Now I assume for in-string regexp replacement and the use case at hand I would need a (missing) lookbehind feature [3], don't I? Please let me know whether you think this is feasible. Best Regards, Michael [1] https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00146.html [2] http://stackoverflow.com/questions/6395898/emacs-how-do-i-replace-regexp-with-a-lisp-function-in-a-defun [3] http://comments.gmane.org/gmane.emacs.devel/147844
Re: [O] open in browser after html export?
Matt Price writes: > As I understand the manual, when I export to HTMl with C-c C-e h o, > the .html file thus created should open up in my default browser, > right? Instead, it get is being opened in a new window inside Emacs, > and does not appear in a browser. i imagine I have some variable set > to a bad value somewhere -- but what variable should it be? I have > checked that browse-url and browse-url-firefox both work well on > in-text url's. Anyone know how org decides how to open an html file? > You need to start with the org variable org-file-apps. There you can define the programs that are used to open various files. In your case, you probably just need to modify the x?html? entry to point to your browser. This is not on windows, correct? just do an Meta-x customize-apropos RET org-file-apps RET modify it accordingly, and you should be in business. I'm running org-mode on emacs under Cygwin under Windows 7, and I can open html files in Chrome, and pdf files in Adobe Reader with no problems, once I set this variable correctly. Dave
[O] open in browser after html export?
As I understand the manual, when I export to HTMl with C-c C-e h o, the .html file thus created should open up in my default browser, right? Instead, it get is being opened in a new window inside Emacs, and does not appear in a browser. i imagine I have some variable set to a bad value somewhere -- but what variable should it be? I have checked that browse-url and browse-url-firefox both work well on in-text url's. Anyone know how org decides how to open an html file? thanks, Matt
Re: [O] radio links in middle of words.
> > > Can't we break at non-letters? Not at non-„word-constituents“, but at > > non-letters. If emacs doesn't provide that concept, better build it. > > I don't know. Could you define precisely that concept? > I propose: radio links should be delimited by characters that don't match [:alpha:] in emacs' regular expression syntax. Letters (like: aá書ĉ) match, and delimiters (like: -'"/) don't. Test it with: : (string-match-p "[[:alpha:]]" "á") : (string-match-p "[[:alpha:]]" "書") : (string-match-p "[[:alpha:]]" "ĉ") : (string-match-p "[[:alpha:]]" "'") : (string-match-p "[[:alpha:]]" "-") And the opposite: check for non-letterness: : (string-match-p "[^[:alpha:]]" "-") : (string-match-p "[^[:alpha:]]" "á") So a radio link with LINK_TEXT should not only be a match of the regexp "LINK_TEXT" but of "[^[:alpha:]]LINK_TEXT[^[:alpha:]]" (well, make it something like "(^|non-letter)LINK_TEXT($|non-text)". I think that's better than the current solution and stills allows for radio links which contain non-letters, like <<>>. What do you think? Daniel
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
org-plus-contrib-20140407 And the file lisp/ob-scheme.el is the same as it in the master branch: And the error message before patched: Loading /home/kdr2/.emacs.d/init.el (source)... Loading /home/kdr2/.emacs.d/src/elisp/common.el (source)... Loading pde-load... Loading pde-loaddefs... ../.emacs.d/src/elisp/tools/init-ace-jump.el: `flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'. Loading /home/kdr2/.emacs.d/src/elisp/misc.el (source)... Loading desktop... Loading /home/kdr2/.emacs.d/src/elisp/themes/wombat-custom.el (source)... Loading vline... Evaluate this scheme code block on your system? (y or n) y executing Scheme code block... Starting Geiser REPL for guile ... Package assoc is obsolete! Package complete is obsolete! Guile REPL up and running! => "Hello Scheme in OrgMode" Debugger entered--Lisp error: (wrong-type-argument arrayp nil) org-babel-scheme-execute-with-geiser("(display \"Hello Scheme in OrgMode\")" t guile nil) org-babel-execute:scheme("(display \"Hello Scheme in OrgMode\")" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "results") (:results . "raw output replace") (:colname-names) (:hlines . "no") (:result-params "replace" "output" "raw") (:result-type . output) (:rowname-names) (:session . "none"))) org-babel-execute-src-block(nil ("scheme" "(display \"Hello Scheme in OrgMode\")" ((:colname-names) (:rowname-names) (:result-params "replace" "out put" "raw" "replace" "output" "raw") (:result-type . output) (:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangl e . "no") (:exports . "results") (:results . "replace output raw") (:session . "none") (:rowname-names) (:result-type . output) (:result-params "repl ace" "output" "raw") (:hlines . "no") (:colname-names)) "" nil 0 1)) org-babel-exp-results(("scheme" "(display \"Hello Scheme in OrgMode\")" ((:cache . "no") (:colname-names) (:comments . "") (:exports . "results") ( :hlines . "no") (:noweb . "no") (:padline . "") (:result-params "replace" "output" "raw") (:result-type . output) (:results . "replace output raw") ( :rowname-names) (:session . "none") (:shebang . "") (:tangle . "no")) "" nil 0 1) block nil "a01854650514fd2cec7ce6957a4622b52118fcd3") org-babel-exp-do-export(("scheme" "(display \"Hello Scheme in OrgMode\")" ((:cache . "no") (:colname-names) (:comments . "") (:exports . "results") (:hlines . "no") (:noweb . "no") (:padline . "") (:result-params "replace" "output" "raw") (:result-type . output) (:results . "replace output raw"$ (:rowname-names) (:session . "none") (:shebang . "") (:tangle . "no")) "" nil 0 1) block "a01854650514fd2cec7ce6957a4622b52118fcd3") org-babel-exp-src-block(("scheme" ":exports" "results" ":results" "output" "raw")) org-babel-exp-process-buffer() org-export-execute-babel-code() org-export-as(html nil nil nil nil) org-export-to-file(html "./test.html" nil nil nil nil nil) org-html-export-to-html() call-interactively(org-html-export-to-html nil nil) command-execute(org-html-export-to-html) command-line-1(("--eval=(load \"~/.emacs.d/init.el\")" "/home/kdr2/ test.org" "-f" "org-html-export-to-html")) command-line() normal-top-level() On Thu, Apr 10, 2014 at 7:22 PM, Oleh wrote: > > Version of geiser I installed: geiser-20140326.951, If it has been > changed, > > it must be changed in the past 2 weeks ... > > > > That's exactly the version that I have. > Which org-mode are you using? > -- -- KDr2, http://kdr2.com
Re: [O] Maintainer change on May 1st
Am Tue, Apr 08, 2014 at 09:29:46AM -0400, Jonathan Leech-Pepin schrieb: > > Another thank you to both of you for your hard work. And absolutely no > objections to the change. +1
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
> Version of geiser I installed: geiser-20140326.951, If it has been changed, > it must be changed in the past 2 weeks ... > That's exactly the version that I have. Which org-mode are you using?
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
Version of geiser I installed: geiser-20140326.951, If it has been changed, it must be changed in the past 2 weeks ... On Thu, Apr 10, 2014 at 6:54 PM, Oleh wrote: > Of course it works, that's the first thing I tried. > The issue probably is that the implementation of geiser functions that > ob-scheme uses has been changed. > > Oleh > > On Thu, Apr 10, 2014 at 11:02 AM, KDr2 wrote: > > Does your "M-x run-geiser" work? It will lead you to a scheme REPL like > > this: > > > > GNU Guile 2.0.9-deb+1-1 > > Copyright (C) 1995-2013 Free Software Foundation, Inc. > > > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > > This program is free software, and you are welcome to redistribute it > > under certain conditions; type `,show c' for details. > > > > Enter `,help' for help. > > scheme@(guile-user)> 1 > > $2 = 1 > > scheme@(guile-user)> > > > > > > > > > > On Thu, Apr 10, 2014 at 4:55 PM, Oleh wrote: > >> > >> > 0. I use Debian(sid) and Emacs 24 > >> > 1. install guile (using apt): http://www.gnu.org/software/guile/ > >> > 2. install geiser(http://www.nongnu.org/geiser/) with elpa > >> > and setting for geiser: > >> > > >> > (setq geiser-active-implementations '(guile)) > >> > (setq geiser-default-implementation 'guile) > >> > > >> > >> I've got emacs trunk, GNU Guile 2.0.9, geiser from MELPA and I'm > >> getting the results in a *Geiser dbg* window instead of org-mode when > >> I eval. So the issue is either with ob-scheme or with my geiser, > >> which is the development version, but I don't see why it shouldn't > >> work. > >> > >> regards, > >> Oleh > > > > > > > > > > -- > > -- > > > > KDr2, http://kdr2.com > -- -- KDr2, http://kdr2.com
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
Of course it works, that's the first thing I tried. The issue probably is that the implementation of geiser functions that ob-scheme uses has been changed. Oleh On Thu, Apr 10, 2014 at 11:02 AM, KDr2 wrote: > Does your "M-x run-geiser" work? It will lead you to a scheme REPL like > this: > > GNU Guile 2.0.9-deb+1-1 > Copyright (C) 1995-2013 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> 1 > $2 = 1 > scheme@(guile-user)> > > > > > On Thu, Apr 10, 2014 at 4:55 PM, Oleh wrote: >> >> > 0. I use Debian(sid) and Emacs 24 >> > 1. install guile (using apt): http://www.gnu.org/software/guile/ >> > 2. install geiser(http://www.nongnu.org/geiser/) with elpa >> > and setting for geiser: >> > >> > (setq geiser-active-implementations '(guile)) >> > (setq geiser-default-implementation 'guile) >> > >> >> I've got emacs trunk, GNU Guile 2.0.9, geiser from MELPA and I'm >> getting the results in a *Geiser dbg* window instead of org-mode when >> I eval. So the issue is either with ob-scheme or with my geiser, >> which is the development version, but I don't see why it shouldn't >> work. >> >> regards, >> Oleh > > > > > -- > -- > > KDr2, http://kdr2.com
Re: [O] update to ob-clojure.el
Hi Nicolas, > >> I've made an update to ob-clojure.el, which wasn't working for me with >> the new cider (the required function was removed). > > As long as we have to support Emacs 23, I think you shouldn't replace > "case" with "cl-case". I've reverted it. I'll keep this in mind for future commits, thanks. regards, Oleh
Re: [O] Patch to fix `org-test-with-temp-text'
Hello, York Zhao writes: > I've just found a bug in `org-test-with-temp-text' and have fixed it. Please > find attached my patch for the fix. Here's the description from git commit > message: Applied. Thank you. Regards, -- Nicolas Goaziou
Re: [O] Override global export-option prop:t
Hello, Thorsten Jolitz writes: > I see ... but is there any possibility to export a buffer with global > option prop:t but inhibit the property-drawer export for one specific > subtree (would be subtree A in the example above)? > > Similar to :noexport: tags for headlines? Not out of the box. You may want to write a hook for that. Regards, -- Nicolas Goaziou
Re: [O] update to ob-clojure.el
Hello, Oleh writes: > I've made an update to ob-clojure.el, which wasn't working for me with > the new cider (the required function was removed). As long as we have to support Emacs 23, I think you shouldn't replace "case" with "cl-case". Regards, -- Nicolas Goaziou
Re: [O] [ANN] Firefox extension for org-protocol and org-capture
> Following all the nice comments you made after my first announce, I just > uploaded an updated version of the org-capture extension. > > You can find it on the main webpage > http://chadok.info/firefox-org-capture/ or on the Mozilla addons > repository https://addons.mozilla.org/fr/firefox/addon/org-mode-capture/ > (review pending from Mozilla people). Hi Olivier, Thanks for the great extension. No more meddling with bookmarks and keyconfig for me:). Oleh
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
Does your "M-x run-geiser" work? It will lead you to a scheme REPL like this: GNU Guile 2.0.9-deb+1-1 Copyright (C) 1995-2013 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> 1 $2 = 1 scheme@(guile-user)> On Thu, Apr 10, 2014 at 4:55 PM, Oleh wrote: > > 0. I use Debian(sid) and Emacs 24 > > 1. install guile (using apt): http://www.gnu.org/software/guile/ > > 2. install geiser(http://www.nongnu.org/geiser/) with elpa > > and setting for geiser: > > > > (setq geiser-active-implementations '(guile)) > > (setq geiser-default-implementation 'guile) > > > > I've got emacs trunk, GNU Guile 2.0.9, geiser from MELPA and I'm > getting the results in a *Geiser dbg* window instead of org-mode when > I eval. So the issue is either with ob-scheme or with my geiser, > which is the development version, but I don't see why it shouldn't > work. > > regards, > Oleh > -- -- KDr2, http://kdr2.com
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
> 0. I use Debian(sid) and Emacs 24 > 1. install guile (using apt): http://www.gnu.org/software/guile/ > 2. install geiser(http://www.nongnu.org/geiser/) with elpa > and setting for geiser: > > (setq geiser-active-implementations '(guile)) > (setq geiser-default-implementation 'guile) > I've got emacs trunk, GNU Guile 2.0.9, geiser from MELPA and I'm getting the results in a *Geiser dbg* window instead of org-mode when I eval. So the issue is either with ob-scheme or with my geiser, which is the development version, but I don't see why it shouldn't work. regards, Oleh
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
Hi, Oleh Thanks for you reply. Here is my config steps: 0. I use Debian(sid) and Emacs 24 1. install guile (using apt): http://www.gnu.org/software/guile/ 2. install geiser(http://www.nongnu.org/geiser/) with elpa and setting for geiser: (setq geiser-active-implementations '(guile)) (setq geiser-default-implementation 'guile) That's all, there's no special settings for orgmode. Thanks again. On Thu, Apr 10, 2014 at 4:27 PM, Oleh wrote: > Hi, > > I tried to have a look at your patch, but ob-scheme has stopped working > for me. Can you send me the minimal init.el to make your scheme-test.org > work in interactive mode? > > regards, > Oleh > > On Tue, Apr 8, 2014 at 3:56 PM, KDr2 wrote: > > Hi, folks > > > > Has anyone reviewed this patch? Or is there a better way to fix the bug? > > > > Thanks. > > > > > > On Wed, Apr 2, 2014 at 11:48 AM, KDr2 wrote: > >> > >> The bug: > >> write file ~/scheme-test.org with the content below: > >> ---8<-- > >> #+BEGIN_SRC scheme :exports results :results output raw > >> (display "Hello Scheme in OrgMode") > >> #+END_SRC > >> ---8<-- > >> > >> and run: > >> > >> emacs --batch --eval='(load "~/.emacs.d/init.el")' ~/scheme-test.org -f > >> org-html-export-to-html > >> > >> you will find the bug: > >> > >> `org-babel-scheme-execute-with-geiser' uses `current-message' to get the > >> results of scheme code blocks, but `current-message' always returns nil > in > >> batch mode, and this patch fixes this. > >> > >> -- > >> -- > >> > >> KDr2, http://kdr2.com > > > > > > > > > > -- > > -- > > > > KDr2, http://kdr2.com > -- -- KDr2, http://kdr2.com
[O] update to ob-clojure.el
Hi all, I've made an update to ob-clojure.el, which wasn't working for me with the new cider (the required function was removed). I haven't looked into 'nrepl or 'slime options for evaluation, is anyone using them? Eric, should 'nrepl option be removed as obsolete? And maybe 'slime as well? regards, Oleh
Re: [O] [PATCH] ob-scheme.el: Fix scheme code blocks execution error in batch mode
Hi, I tried to have a look at your patch, but ob-scheme has stopped working for me. Can you send me the minimal init.el to make your scheme-test.org work in interactive mode? regards, Oleh On Tue, Apr 8, 2014 at 3:56 PM, KDr2 wrote: > Hi, folks > > Has anyone reviewed this patch? Or is there a better way to fix the bug? > > Thanks. > > > On Wed, Apr 2, 2014 at 11:48 AM, KDr2 wrote: >> >> The bug: >> write file ~/scheme-test.org with the content below: >> ---8<-- >> #+BEGIN_SRC scheme :exports results :results output raw >> (display "Hello Scheme in OrgMode") >> #+END_SRC >> ---8<-- >> >> and run: >> >> emacs --batch --eval='(load "~/.emacs.d/init.el")' ~/scheme-test.org -f >> org-html-export-to-html >> >> you will find the bug: >> >> `org-babel-scheme-execute-with-geiser' uses `current-message' to get the >> results of scheme code blocks, but `current-message' always returns nil in >> batch mode, and this patch fixes this. >> >> -- >> -- >> >> KDr2, http://kdr2.com > > > > > -- > -- > > KDr2, http://kdr2.com
Re: [O] Fwd: Is `org-preview-latex-fragment` sensitive to alignment specified by document class options?
Hi, I am not sure if this is related but if you look at the description of org-latex-packages-alist below, you'll see a comment about the third argument, SNIPPET-FLAG. This may be what you need although it won't help with document class options. ,[ C-h v org-latex-packages-alist RET ] | org-latex-packages-alist is a variable defined in `org.el'. | Its value is (("" "xcolor") | ("" "tikz") | ("" "listings") | ("version=3" "mhchem") | ("" "amsmath" t)) | | Original value was nil | | Documentation: | Alist of packages to be inserted in every LaTeX header. | | These will be inserted after `org-latex-default-packages-alist'. | Each element is either a cell or a string. | | A cell is of the format: | | ("options" "package" SNIPPET-FLAG) | | SNIPPET-FLAG, when non-nil, indicates that this package is also | needed when turning LaTeX snippets into images for inclusion into | non-LaTeX output. | | A string will be inserted as-is in the header of the document. | | Make sure that you only list packages here which: | | - you want in every file; | - do not conflict with the setup in `org-format-latex-header'; | - do not conflict with the default packages in | `org-latex-default-packages-alist'. | | You can customize this variable. | | [back] ` -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-888-g798bb8