[BUG] Wrong display when URL contains "/-/" [9.6.1 (release_9.6.1-264-g236bd4)]
Dear Org Mode developpers, The following content is not displaying correctly for me (see attached screenshot): [[https://host/some/-/path][[pre link]]] this is underlined, but shouldn't be [[https://host/another/-/path][[post link]]] [[https://host/some/path][[pre link]]] this is okay [[https://host/another/path][[post link]]] I guess that this is caused by the presence of "/-/" substrings in the URLs. Such URLs containing this substring are used, in instance, by GitLab. Best, Rafael Laboissière Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.16.0) of 2023-01-18, modified by Debian Package: Org mode version 9.6.1 (release_9.6.1-264-g236bd4 @ /home/rafael/.emacs.d/el-get/org-mode/lisp/) current state: == (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-persist-after-read-hook '(org-element--cache-persist-after-read) org-export-before-parsing-hook '(org-attach-expand-links) org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-cycle-optimize-window-after-visibility-change org-cycle-display-inline-images) org-persist-before-read-hook '(org-element--cache-persist-before-read) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-fold-show-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-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-persist-directory "/var/tmp/org-persist-l3BeFI" org-fold-core-isearch-open-function 'org-fold--isearch-reveal org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link :insert-description org-info-description-as-command) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn U
Index not translated to pt-BR
Hello, good morning! The table of Contents doesn't translate when exporting to utf-8 or ODT with pt_BR as the value for the LANGUAGE keyword. I believe the line below (6180, ox.el file): ("pt_BR" :html "ndice" :utf8 "Índice" :ascii "Indice") should be something like: ("pt_BR" :html "ndice" :utf-8 "Índice" :ascii "Indice") or: ("pt_BR" :default "Índice" :html "ndice" :ascii "Indice") I'm using GNU Emacs 28.2, Org mode version 9.5.5. Thank you.
Unwanted italics formatting between two URLs
Hello, In an org-mode buffer, I have the following: [[https://first/-/url/][pre]] text [[https://second-url/?][post]] The “pre” and “text” words appear (wrongly) in italics, as you can see in the attached screenshot. This misbehavior is certainly related to the presence of the characters “-” and “?” in the URLs. I am using Org mode version 9.5.1 (release_9.5.1-11-g96d91b) Best, Rafael Laboissière
Re: emacs-jupyter does not send result form babel block
John Kitchin writes: >> On Sat, Sep 4, 2021 at 4:22 PM Rafael wrote: >> >>> >>> I am using emacs-jupyter (https://github.com/nnicandro/emacs-jupyter), >>> and I have just noticed that results from a block are not sent to >>> another block. I think it has to do with this issue >>> https://github.com/nnicandro/emacs-jupyter/issues/222. Can somebody >>> suggest a workaround? (I actually want to use the output from a kernel >>> different from python, but since the problem happens also with the python >>> kernel I'm using it as an example). >>> >>> #+name: atest >>> #+begin_src jupyter-python :session test >>> 1+1 >>> #+end_src >>> >>> #+RESULTS: graphst >>> : 2 >>> >>> #+begin_src python :var adjs=atest >>> adjs >>> #+end_src >>> >>> #+RESULTS >> : nil >> >> > > I think this is a bug in jupyter-org-client.el in this function: > > (defun jupyter-org--add-result (req result) > (cond >((jupyter-org-request-silent-p req) > (unless (equal (jupyter-org-request-silent-p req) "none") > (message "%s" (org-element-interpret-data result >((jupyter-org-request-async-p req) > (jupyter-org--clear-request-id req) > (jupyter-org--do-insert-result req result)) >(t > (push result (jupyter-org-request-results req) > > The problem is that when the jupyter block is executed to define the > variable in the python header, it is run with a "silent" results param. The > function above is responsible for adding the results to the > jupyter-org-request struct, and here when it sees the results are silent, > it does not do that, so the results are nil, which is why you see what you > see. > > I don't think that behavior is correct. It isn't quite right to just remove > the first block though, at least in this case. The result in this function > is already structured as a fixed-width results element intended to be > interpreted as a results string, and not the numeric value returned. So the > fix is probably upstream from this. > > I am not sure what the fix is for this. The code path from C-cC-c to > executing the code, handling the request to the kernel, getting results and > to the output is very hard to follow for me. I would post an issue at > https://github.com/nnicandro/emacs-jupyter/issues. Thanks for your answer and sorry for not following up. There is already an issue about this which has been open since March 2020, see https://github.com/nnicandro/emacs-jupyter/issues/222.
emacs-jupyter does not send result form babel block
I am using emacs-jupyter (https://github.com/nnicandro/emacs-jupyter), and I have just noticed that results from a block are not sent to another block. I think it has to do with this issue https://github.com/nnicandro/emacs-jupyter/issues/222. Can somebody suggest a workaround? (I actually want to use the output from a kernel different from python, but since the problem happens also with the python kernel I'm using it as an example). #+name: atest #+begin_src jupyter-python :session test 1+1 #+end_src #+RESULTS: graphst : 2 #+begin_src python :var adjs=atest adjs #+end_src #+RESULTS : nil
Re: bug#48676: Arbitrary code execution in Org export macros
Thanks, you managed to understand my question. I was wondeing if there was a risk of privilege escalation. Fortunately that seems not to be the case. El jue., 27 may. 2021 15:13, Tim Cross escribió: > > Rafael Ramirez Morales writes: > > > Just a couple of questions: > > who is the owner of the HELLO file? > > OR > > who is the owner of the "touch" process? > > > > Is the owner the unprivileged user or the "emacs" system? > > > > Thanks. > > > > Not clear exactly what your asking. The process which will execute the > 'touch' will be a sub-process of the process running Emacs. This will > typically be the user who executes Emacs and willl have the same > permissions and access rights as the user running Emacs. There is no > 'emacs' system and the privileges will be the same as the user who runs > Emacs. This is assuming a 'normal' installation, not some unusual setup > which uses setuid or similar to alter the way Emacs runs or the > ownership of files in a directory etc. > >
bug#48676: Arbitrary code execution in Org export macros
Just a couple of questions: who is the owner of the HELLO file? OR who is the owner of the "touch" process? Is the owner the unprivileged user or the "emacs" system? Thanks. On Wed, 26 May 2021 at 17:53, Glenn Morris wrote: > Package: emacs,org-mode > Version: 28.0.50 > Severity: important > Tags: security > > emacs -Q hello.org, where hello.org contains: > > #+macro: hello (eval (shell-command-to-string "touch /tmp/HELLO")) > Hello. {{{hello}}} > > Then: > M-x org-export-dispatch > t A > > -> now /tmp/HELLO exist, with no prompting. > > This seems contrary to normal Emacs practice for risky local variables, > and to the section "Code Evaluation and Security Issues" in the Org manual > (which does not mention macros). > >
Re: Bug: no math-mode detection for align-environment [9.3.7 (9.3.7-13-ge62ca4-elpaplus @ /home/stefi/.emacs.d/elpa/org-plus-contrib-20200713/)]
Kyle Meyer writes: > Stefi writes: > >> I recently updated my emacs packages and noticed that \begin{align*} >> does not trigger math-mode detection any more, so org-cdlatex does not >> work. However, begin{equation} still does trigger the math-mode >> detection. I have read the documentation of >> "org-inside-LaTeX-fragment-p" and found something about matchers, but >> nothing about equation or align environment and why it might be treated >> differently for math-mode detection. > > The default value for :matches is ("begin" "$1" "$" "$$" "\\(" "\\["). > It looks like the value hasn't been touched in a long time, and that > AFAICT the "begin" should cover "align" just as it covers "equation". > And I'm not spotting any recent changes on Org's end that should affect > this. > >> My test-file.org: >> 8<-8<-8<-8<- >> >> * blabla >> \begin{equation} >> \label{eq:1} \frac{}{} >> test_{cds} \frac{}{} >> \end{equation} >> >> \begin{align} >> \label{eq:2} >> test$_d$ fr >> \end{align} >> >> $\frac{}{} fds_{fdsf} \frac{}{}$ >> >> \begin{align*} >> fr >> \end{align*} >> >> >> 8<-8<-8<-8<- >> >> - detection works for: \begin{equation}, $$, \[\] (not in testfile) >> - detection does not work for: \begin{align}, begin{align*}; subscript _ >> does insert extra $_{}$, which it should not in math mode, and fr does >> not get expanded to \frac{}{} >> >> Emacs : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) >> of 2020-05-19 >> Package: Org mode version 9.3.7 (9.3.7-13-ge62ca4-elpaplus @ >> /home/stefi/.emacs.d/elpa/org-plus-contrib-20200713/) > > On master, maint, and the commit matching your reported version > (e62ca4), I tried org-inside-LaTeX-fragment-p within each block of your > test file, and it returns non-nil, including in the align and align* > blocks. So I dunno... > > Could some org-cdlatex users out there give the test file a try? I can confirm that with Org mode version 9.3.7 (9.3.7-16-g521d7f-elpaplus @ /home/rafael/Documents/new-emacs.d/elpa/org-plus-contrib-20200803/) and GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2019-12-23 and using org-cdlatex, fr does not expand inside align but it does inside equation, just as Stefi says.
CUSTOM_id ignored on blocks by ox-beamer
Consider the following example: #+begin_src org ,#+title: Test ,#+options: H:2 ,* Section :PROPERTIES: :CUSTOM_ID: section :END: ,** Frame :PROPERTIES: :CUSTOM_ID: frame :END: ,*** Block :PROPERTIES: :CUSTOM_ID: block :END: #+end_src If I export this to Beamer, then both section and frame get appropiate labels, (either with org-latex-prefer-user-labels set to t or nil), but the custom_id for block is completely ignored. I want to use theorems as blocks in frames, so it would be very useful to me if the custom_id in the block is exported as \label{block}. Is there a way to have this by setting a variable, or something? It works if I include #+beamer: \label{block} below the properties drawer, but I would prefer not to duplicate the label, of course. Best regards, Rafael
Setting org-export-headline-levels depending on export backend
I would like to have an org document export nicely (including some subtleties like theorems) to a latex document and to a beamer presentation. I have been mostly successful using filters, but it would help me a lot if there was some way to declare to use the #+option H:2 when exporting to beamer, and H:3 when exporting to latex. Thoughts?
[O] Pushing commits to the Work Git repository
Hi, Is there any policy for pushing commits to the Worg Git repository? I fixed the GitHub paths in file org-outside-org.org, as per the patch attached to this message and would like to contribute it. Best, Rafael >From 1458b431c347fdf53ce84eecc2e2503385e93984 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere Date: Wed, 6 Feb 2019 16:33:36 +0100 Subject: [PATCH] Transfer maintainership of outshine, outorg, and navi-mode --- org-tutorials/org-outside-org.org | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/org-tutorials/org-outside-org.org b/org-tutorials/org-outside-org.org index 8fe2ae92..b8bc5606 100644 --- a/org-tutorials/org-outside-org.org +++ b/org-tutorials/org-outside-org.org @@ -134,8 +134,8 @@ To sum it up in one sentence: Download =outshine.el= (or clone the github-repo) and copy it to a location where Emacs can find it: -| https://github.com/tj64/outshine | -| git clone g...@github.com:tj64/outshine.git | +| https://github.com/alphapapa/outshine | +| git clone g...@github.com:alphapapa/outshine.git | Use this in your '.emacs' to get started: @@ -323,8 +323,8 @@ works too). You can download the file (or clone the github-repo) here: -| https://github.com/tj64/outorg | -| git clone g...@github.com:tj64/outorg.git | +| https://github.com/alphapapa/outorg | +| git clone g...@github.com:alphapapa/outorg.git | /outorg/ requires Org-mode too, thus should be loaded after Org-mode. Insert @@ -597,10 +597,10 @@ offering a vast amount of possible 'views' at the original-buffer. Download (or clone the github-repos of) the three required libraries -| `navi-mode.el' | https://github.com/tj64/navi | -|| git clone g...@github.com:tj64/navi.git | -| `outshine.el' | https://github.com/tj64/outshine | -| `outorg.el'| https://github.com/tj64/outorg | +| `navi-mode.el' | https://github.com/alphapapa/navi | +|| git clone g...@github.com:alphapapa/navi.git | +| `outshine.el' | https://github.com/alphapapa/outshine | +| `outorg.el'| https://github.com/alphapapa/outorg | and put them in a place where Emacs can find them (on the Emacs 'load-path'). Follow the installation instructions in =outshine.el= and =outorg.el=. -- 2.19.2
Re: [O] [PATCH] test-org/fuzzy-links
* Nicolas Goaziou <m...@nicolasgoaziou.fr> [2017-04-15 16:53]: Rafael Laboissière <raf...@laboissiere.net> writes: Function org-backward-heading-same-level fails in a specific case. Suppose the following org-mode file: == * first * second * third == where '* first' is right at the beginning of the file. When the cursor is at line '* third' and org-backward-heading-same-level is called, we go to the previous line correctly. However when the cursor is at '* second', org-backward-heading-same-level does bring us to the first line but emits an error "Beginning of buffer". It seems that the patch attached to this message fixes the problem. Thank you. I eventually applied a slightly different patch, and added some tests. Thanks. Best, Rafael
[O] [PATCH] test-org/fuzzy-links
Function org-backward-heading-same-level fails in a specific case. Suppose the following org-mode file: == * first * second * third == where '* first' is right at the beginning of the file. When the cursor is at line '* third' and org-backward-heading-same-level is called, we go to the previous line correctly. However when the cursor is at '* second', org-backward-heading-same-level does bring us to the first line but emits an error "Beginning of buffer". It seems that the patch attached to this message fixes the problem. Best, Rafael >From ff792a00e28b7b0ca4fde98f72611ef8079daf04 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere <raf...@laboissiere.net> Date: Wed, 12 Apr 2017 22:18:54 +0200 Subject: [PATCH] Do not fail when heading is at the beginning of the buffer * org.el (org-forward-heading-same-level): Do not move backward when at the beginning of the buffer --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 17caa3fa6..b46369ad5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -24071,7 +24071,8 @@ non-nil it will also look at invisible ones." (count (if arg (abs arg) 1)) (result (point))) (while (and (prog1 (> count 0) - (forward-char (if (and arg (< arg 0)) -1 1))) + (forward-char (if (and arg (< arg 0)) + (if (= (point) 1) 0 -1) 1))) (funcall f org-outline-regexp-bol nil 'move)) (let ((l (- (match-end 0) (match-beginning 0) 1))) (cond ((< l level) (setq count 0)) -- 2.11.0
[O] allowframebreaks in beamer export
I would like to export to beamer, in such a way that all frames have the 'allowframebreaks' option. I thought the following would work, but when I export, the frames in the .tex file have no allowframebreaks. Maybe I am misunderstanding the way that properties are inherited, so my question is: is there a way to have all frames with allowframebreaks option, without having to declare explicitly the 'BEAMER_OPT' property in all frame subheadings? #+BEGIN_SRC org ,#+title: Presentation ,#+latex_header: \usepackage{lipsum} ,#+options: H:2 ,* A part :PROPERTIES: :BEAMER_OPT: allowframebreaks=0.8 :END: ,** First \lipsum[1-2] ,** Second \lipsum[3-4] ,* COMMENT Local Variables # Local Variables: # org-use-property-inheritance: t # End: #+END_SRC (BTW, I know and understand when the beamer manual says that the 'allowframebreaks' option is evil, but in this case I want to produce reading notes only for my use, and I find that beamer export is rather convenient.)
Re: [O] OT: two interesting articles about (non-)reproducible research
* Nick Dokos <ndo...@gmail.com> [2016-04-08 14:54]: [off-topic: not even a gratuitous org reference. My only excuse is the general interest of list members on reproducible research (org-babel! OK, that's the requisite gratuitous reference: I feel better now :-) )] 538.com has published a couple of interesting articles on some poli-sci research: http://fivethirtyeight.com/features/how-two-grad-students-uncovered-michael-lacour-fraud-and-a-way-to-change-opinions-on-transgender-rights/#ss-1 and http://fivethirtyeight.com/datalab/as-a-major-retraction-shows-were-all-vulnerable-to-faked-data/ N.B. the reference to the "open data" policies of AJPS - that seems to be clearly the future direction of research (and, imo, it's about time). Ironically, the results "found" in the retreated paper by LaCour & Green (2014) have been recently replicated by Broockman & Kalla (2016): http://www.sciencemag.org/news/2016/04/talking-people-about-gay-and-transgender-issues-can-change-their-prejudices Rafael
Re: [O] [PATCH] call_*() is not working inside #+DATE
* Nicolas Goaziou <m...@nicolasgoaziou.fr> [2016-03-15 19:50]: The problem is that the documentation patch is (partly) wrong. From maint, you can try calling `org-babel-execute-buffer' in the following document #+DATE: src_emacs-lisp{(+ 1 1)} It is possible to evaluate code snippets in keywords. It is strange, the inline source code block above is not evaluated for me from maint [commit 3e79c60] when calling `org-babel-execute-buffer'. Rafael
Re: [O] [PATCH] call_*() is not working inside #+DATE
* Nicolas Goaziou <m...@nicolasgoaziou.fr> [2016-03-14 20:41]: Rafael Laboissiere <raf...@laboissiere.net> writes: * Rafael Laboissiere <raf...@laboissiere.net> [2016-03-12 08:57]: [snip] I went ahead and committed the patch. I think this is a bit premature, as we're still discussing how to fix this issue, so this documentation patch is likely to be removed soon. Hopefully, a solution will be found soon and the documentation will be adjusted accordingly. Notice that, in section "Evaluating code blocks", it is written "It is also possible to evaluate named code blocks from anywhere […]". Moreover, I don't think the problem doesn't appear on maint branch, where you applied your patch. So, at the very least, it should be removed from there. The problem affects both master and maint, currently. Rafael Laboissière
Re: [O] [PATCH] call_*() is not working inside #+DATE
* Rafael Laboissiere <raf...@laboissiere.net> [2016-03-12 08:57]: [snip] I investigated this issue further and discovered that the constructs call_(args) and src_{code} are not evaluated at all when they appear in a keyword line (starting with "#+:"). Org-babel behaves in this way probably on purpose. At any rate, it would be better if the current behavior is documented somewhere. This may be accomplished with the patch attached below. I went ahead and committed the patch. Rafael Laboissière
Re: [O] [PATCH] call_*() is not working inside #+DATE
* Nicolas Goaziou <m...@nicolasgoaziou.fr> [2016-03-13 18:24]: Rafael Laboissiere <raf...@laboissiere.net> writes: It would be much better if the following construct worked: #+DATE: src_sh{git show -s --date=short --format="%cd [%h]" HEAD} Unfortunately, it does not. This behavior (or misbehavior, I do not know) can be traced down to the org-element-context function. [snip] Values from keyword are not parsed. Org used to make an exception for an arbitrary bunch of them (e.g., DATE, TITLE, etc.). Now it is up to the export back-ends to decide what keyword is going to be parsed. I can think of two ways to solve this: 1. Only evaluate the Babel code during export. Upon exporting the document, parsed keywords are known, so `org-babel-exp-process-buffer' may try to find "hidden" Babel code and execute it. This would however introduce a discrepancy between org-babel-execute-buffer and the behaviour upon exporting. 2. Sort parsed keywords from regular ones at the syntax level, much like we did for export blocks recently. I.e., every keyword is parsed expect those marked as verbatim. I don't have an idea bout the involved syntax. This would probably induce some backward incompatibility. WDYT? Thanks for your proposal. I would vote for solution #1. The discrepancy between org-babel-execute-buffer and the behaviour upon exporting that you mention would not bother me. Whatever solution is adopted (or if the current behavior is kept), the info documentation must be updated. Do you agree with the patch that I proposed earlier in this thread? Best, Rafael
Re: [O] commit 7b9f2fba66
* Achim Gratz <strom...@nexgo.de> [2016-01-26 18:11]: Getting the copyright assigned would be good since if you've had some previous changes (not the two commits you did yourself), then quite likely you've already exhausted your TINYCHANGE budget. The papers have been signed with the Free Software Foundation. I went ahead and changed the org-contribute.org file in Worg to reflect the new situation [commit 697ec6c]. Please, tell me whether I should send the PDF file with the signed form to someone. Best, Rafael Laboissière
Re: [O] [PATCH] call_*() is not working inside #+DATE
* Eric S Fraga <e.fr...@ucl.ac.uk> [2016-03-12 08:51]: On Saturday, 12 Mar 2016 at 08:57, Rafael Laboissiere wrote: P.S.: For those who are reading this message and are interested in a solution for my original problem, here is the way I am getting around it right now. Thanks for this alternate solution. You are welcome. It would be much better if the following construct worked: #+DATE: src_sh{git show -s --date=short --format="%cd [%h]" HEAD} Unfortunately, it does not. This behavior (or misbehavior, I do not know) can be traced down to the org-element-context function. Suppose that you have the following content in a org-mode buffer: #+DATE: src_sh{date} src_sh{date} With the cursor just after the underscore in the #+DATE line, org-element-context returns: (keyword (:key "DATE" :value "src_sh{date}" :begin 1 :end 22 :post-blank 0 :post-affiliated 1 :parent nil)) On the other hand, with the cursor just after the underscore in the next line, org-element-context returns (as it should be): (inline-src-block (:language "sh" :value "date" :parameters nil :begin 22 :end 34 :post-blank 0 :parent (paragraph (:begin 22 :end 35 :contents-begin 22 :contents-end 35 :post-blank 0 :post-affiliated 22 :parent nil This is the reason why Org-babel does not evaluate the inline source block in the #+DATE line. Best, Rafael Laboissière
Re: [O] [PATCH] call_*() is not working inside #+DATE
* Rafael Laboissiere <raf...@laboissiere.net> [2016-03-07 02:58]: The following used to work for me in the past: #+NAME: date #+BEGIN_SRC sh :results silent :exports results :tangle no date #+END_SRC #+TITLE: Sample #+AUTHOR: Me #+DATE: call_date() and I saw the output of the shell command "date" when exporting the file to LaTeX. However does not work for the current HEAD of the Git repository. Using git-bisect, I discovered that the culprit is commit 85ff663, i.e. my code above works for commit 85ff663^ but fails for commit 85ff663. Commit 85ff663 was a pretty large commit and, besides that, the new code introduced by it was posteriorly changed, so it is hard to find where the bug comes from. Could someone more acquainted with the code try to look at this bug, please? I investigated this issue further and discovered that the constructs call_(args) and src_{code} are not evaluated at all when they appear in a keyword line (starting with "#+:"). Org-babel behaves in this way probably on purpose. At any rate, it would be better if the current behavior is documented somewhere. This may be accomplished with the patch attached below. Best, Rafael Laboissière P.S.: For those who are reading this message and are interested in a solution for my original problem, here is the way I am getting around it right now. When exporting to LaTeX, I wanted to have, as the contents of the \date{} macro, the date and the hash of the last Git commit of the current checkout HEAD, to which my Org document belongs. Here is how I am doing it now: #+TITLE: Sample #+AUTHOR: Me #+BEGIN_SRC sh :results silent :exports results :tangle no git show -s --date=short --format="%cd [%h]" HEAD > GitDateCommit.tex #+END_SRC #+DATE: \input{GitDateCommit} >From fa47439f9897c4bab436ecf4c9f08fa686ff0231 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere <raf...@laboissiere.net> Date: Fri, 11 Mar 2016 23:04:00 +0100 Subject: [PATCH] Document lack of evaluation of inline code blocks in keyword lines doc/org.texi (Evaluating code blocks): Add footnote explaining that inline code blocks are not evaluated inside keyword lines. --- doc/org.texi | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index e423df7..ce478f5 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -15030,13 +15030,16 @@ evaluation from the @kbd{C-c C-c} key binding.}. This will call the its results into the Org mode buffer. @cindex #+CALL -It is also possible to evaluate named code blocks from anywhere in an Org -mode buffer or an Org mode table. These named code blocks can be located in -the current Org mode buffer or in the ``Library of Babel'' (@pxref{Library of -Babel}). Named code blocks can be evaluated with a separate @code{#+CALL:} -line or inline within a block of text. In both cases the result is wrapped -according to the value of @code{org-babel-inline-result-wrap}, which by -default is @code{"=%s="} for markup that produces verbatim text. +It is also possible to evaluate named code blocks from +anywhere@footnote{Actually, the constructs call_() and src_@{@} +are not evaluated when they appear in a keyword line (i.e. lines starting +with @code{#+KEYWORD:}, @pxref{In-buffer settings}).} in an Org mode buffer +or an Org mode table. These named code blocks can be located in the current +Org mode buffer or in the ``Library of Babel'' (@pxref{Library of Babel}). +Named code blocks can be evaluated with a separate @code{#+CALL:} line or +inline within a block of text. In both cases the result is wrapped according +to the value of @code{org-babel-inline-result-wrap}, which by default is +@code{"=%s="} for markup that produces verbatim text. The syntax of the @code{#+CALL:} line is -- 2.7.0
[O] call_*() is not working inside #+DATE
The following used to work for me in the past: #+NAME: date #+BEGIN_SRC sh :results silent :exports results :tangle no date #+END_SRC #+TITLE: Sample #+AUTHOR: Me #+DATE: call_date() and I saw the output of the shell command "date" when exporting the file to LaTeX. However does not work for the current HEAD of the Git repository. Using git-bisect, I discovered that the culprit is commit 85ff663, i.e. my code above works for commit 85ff663^ but fails for commit 85ff663. Commit 85ff663 was a pretty large commit and, besides that, the new code introduced by it was posteriorly changed, so it is hard to find where the bug comes from. Could someone more acquainted with the code try to look at this bug, please? Thanks, Rafael Laboissière
[O] Orgtbl: edit table like code, in a separate buffer?
Hello group. I was wondering if it was technically possible to invoke a separate buffer to edit a table in org mode. My working scenario is a table with several columns with limited width so as to edit a buffer with org-startup-indented on. I would like to achieve something like what is done with source blocks: upon invoking a command, the table would open in a separate buffer, with indent (i.e. visual line-wrapping) option off and that ignores column width limits. Is there any way to achieve this? Is there another way to go about this problem? Thanks.
Re: [O] commit 7b9f2fba66 (was: commit 860bcfbf93)
* Achim Gratz <strom...@nexgo.de> [2016-01-25 19:34]: Achim Gratz writes: This commit is marked as TINYCHANGE, but committed by the author himself. How and why did someone not having assigned copyright to the FSF get push access to the Orgmode repository? The same thing again, with no previous communication on the mailing list and again on maint without a clear indication of whether that's changing functionality. Again, who gave this person the commit bit? I am the author of the commits and I sincerely apologize for breaking the usual rules of development of Org-mode. I contributed in the past to both Worg and Org-mode itself. I do not remember who gave me push access to the Git repositories, it was some years ago. I have forgotten that all my contributions and patches to Org-mode where integrated by others into Git. This time, when I fixed the bugs in my commits 860bcfb and 7b9f2fb, I thought that I have pushed changes in the past myself. Sorry for the confusion. As a matter of fact, none of those two commits introduced changes in functionality. Nicolas Goaziou contacted me privately and suggested to get the copyright assignment from FSF. I am about to sent the form to them and will keep you informed when it is finished. In the meanwhile, I will send my patches to the ML, if there will be any. Best regards, Rafael Laboissière
[O] @@beamer:some code@@ in math mode
Apparently the shortcut @@beamer:some code@@ does not work in math mode. This: -- This is a test @@beamer:some code@@ to check \(x=@@beamer:y@@\) -- exports (in beamer export) to: -- This is a test some code to check \(x=@@beamer:y@@\) -- Could it be made to work in math mode too? I want to apply this solution: http://tex.stackexchange.com/a/60692/250 to one presentation. Regards, Rafael
Re: [O] beamer_env tag issue with empty headlines
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Rafael rvf0...@gmail.com writes: I mean that I would like to have a new variable, say, 'org-no-headlines-between-colons', that when set to t, would cause org to treat any part of a heading between colons as a tag. My question was: what for? Do you have a (simple) use-case? Just like the OP said: When exporting to beamer, there are some headings that do not merit a named heading. Like columns. Or for example, in my case, I have theorems without a name. Say: *** :B_theorem: :PROPERTIES: :BEAMER_env: theorem :END: Let \(X\) be a \(T_{1}\) space. Then \(X\) is regular if an only if given a point \(x\in X\) and a neighborhood \(U\) of \(x\) there is a neighborhood \(V\) of \(x\) such that \(\overline{V}\subseteq U\). Or sometimes, in definitions, I could include a named heading, but it looks redundant to me, as the defined term is already emphasized. *** Normal space :B_definition: :PROPERTIES: :BEAMER_env: definition :END: Let \(X\) be a \(T_{1}\) space. We say that \(X\) is *normal* if for any \(F\subseteq X\) and \(G\subseteq X\) disjoint closed sets, there are disjoint open sets \(U,V\) such that \(F\subseteq U\) and \(G\subseteq V\). I do not think I will ever need two colons in a heading. Hence I think the option to interpret anything between colons in a heading as a tag would be useful. Thanks for your answers, Rafael
Re: [O] beamer_env tag issue with empty headlines
Nicolas Goaziou m...@nicolasgoaziou.fr writes: This is an ambiguous headline. Indeed, it's impossible to tell if it is an empty headline with tags or a headline without tags whose title is :B_block:BMCOL:. I think the last option is better as the first one prevents any headline's title from being enclosed within colons. This is restrictive. In any case, there are workarounds available for what you have to do. I've been using filters to fix this, is there any other trick that works for all exporters? On the other hand, I wish there would be a variable org-no-headlines-between-colons, to solve these sort of ambiguities. Regards, Rafael
Re: [O] beamer_env tag issue with empty headlines
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Rafael rvf0...@gmail.com writes: On the other hand, I wish there would be a variable org-no-headlines-between-colons, to solve these sort of ambiguities. What do you mean exactly? What beamer code do you want to generate? Hi, I mean that I would like to have a new variable, say, 'org-no-headlines-between-colons', that when set to t, would cause org to treat any part of a heading between colons as a tag. Best regards, Rafael
[O] [PATCH] Fix typo in org.texi
The patch below fixes (what i think) is a minor typo in the info documentation. Thanks for your great work on org-mode, Best, Rafael From 65d995992fdcb5a04c413f83fe5c68edf4508835 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Sun, 19 Oct 2014 22:37:39 +0200 Subject: [PATCH] org.texi: Remove extraneous backslash in key sequence * doc/org.texi (ASCII bar plots): Remove the backslash character in the key binding sequence for orgtbl-ascii-plot command. I think that this backslash is not needed, since previously in the same section, at subheading Graphical plots using Gnuplot, there is a similar key sequence without backslash @kbd{C-c g}. TINYCHANGE --- doc/org.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/org.texi b/doc/org.texi index 767fa1a..8e18d34 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3345,7 +3345,7 @@ the data file. @subheading ASCII bar plots -While the cursor is on a column, typing @kbd{C-c \ a} or +While the cursor is on a column, typing @kbd{C-c a} or @kbd{M-x orgtbl-ascii-plot @key{RET}} create a new column containing an ASCII-art bars plot. The plot is implemented through a regular column formula. When the source column changes, the bar plot may be updated by -- 2.1.1
Re: [O] Please help with a filter
Charles Berry ccbe...@ucsd.edu writes: Rafael rvf0068 at gmail.com writes: I want that the result of exporting to markdown the following two blocks be identical: You probably want a derived backend taking 'md as the parent. Yes, that's what I feared.. :) I thought I could delay creating a derived backend for later, but I guess now is the time. Thanks for your answer, it was helpful indeed.
[O] Please help with a filter
I want that the result of exporting to markdown the following two blocks be identical: #+begin_src org #+BEGIN_MARKDOWN div class=sage script type=text/x-sage2+3/script /div #+END_MARKDOWN #+BEGIN_SRC sage 2+3 #+END_SRC #+end_src I have tried the following, which seems similar to examples in the web, and I think it should work, but it doesn't: #+begin_src emacs-lisp (defun org-octopress-src-block (contents backend info) (when (eq backend 'md) (let ( (lang (org-element-property :language info)) (value (org-element-property :value info))) (message Language is %s. Value is %s lang value) (when (eq lang sage ) (format div class=\sage\ script type=\text/x-sage\%s/script /div\n value )) )) ) (add-to-list 'org-export-filter-src-block-functions 'org-octopress-src-block) #+end_src My debugging message says: 'Language is nil. Value is nil', so I cannot get the name of the language from the source code. What should I do to get the filter to work? Thanks in advance,
[O] Markdown exporter deletes a line before a list
I'm not sure if this is a feature or a bug. Consider this org file: #+BEGIN_SRC org ,* A test - one - two ,* Another test Consider this list: - three - four #+END_SRC Using the markdown exporter, this exports to (after the toc): #+BEGIN_EXAMPLE # A testa id=sec-1/a - one - two # Another testa id=sec-2/a Consider this list: - three - four #+END_EXAMPLE That is, if the list follows a heading, a blank line is added, which is OK. But if there is text between the heading and the list, the blank line is deleted, which is definitely not OK to me. If this is a feature, I would appreciate some guidance to have the markdown exporter to preserve a blank line before lists. I tried the test with org just pulled from git, and emacs -Q -l, as described in the manual. Thanks for any advice, Rafael
Re: [O] publishing to gihub gh-pages branch
Bastien b...@gnu.org writes: regcl re...@channing.harvard.edu writes: Thanks, but I guess I didn't find the solutions you have mentioned. Could you please point them out? I'm thinking of this for example: http://orgmode.org/worg/org-tutorials/org-jekyll.html This is not a complete solution for the problem at hand, but a start for looking further. I'm just reading this, maybe this Python tool: https://github.com/davisp/ghp-import could be useful to the OP.
[O] Schedule for the World Cup in org format
Hi all, Following https://github.com/djcb/org-euro2012 as a template, I have produced a schedule for the upcoming world cup in org format, which can be obtained from https://github.com/rvf0068/org-wc2014 The times are Mexico City time, which is GMT-5. There is a function I copied from the org-euro file to shift times, but which I haven't used.
[O] Bug in org-beamer-publish-to-pdf?
Hi all, Using Org-mode version 8.2.5h (release_8.2.5h-829-g9665f8) from git, and GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2014-02-22 on king, modified by Debian I think there is a bug in org-beamer-publish-to-pdf. The code of the function is: #+BEGIN_SRC emacs-lisp (defun org-beamer-publish-to-pdf (plist filename pub-dir) (org-publish-attachment plist (org-latex-compile (org-publish-org-to 'beamer filename .tex plist)) pub-dir)) #+END_SRC It seems to me that (org-publish-org-to 'beamer filename .tex plist) only returns filename.tex without the directory. Hence org-latex-compile wants to compile a .tex file in my home directory, (rather than at the base directory of the publishing) and fails at not finding it there. Certainly not the most elegant solution, but the following works for me. Although only with (setq org-latex-pdf-process '(texi2dvi -p -b -V %f)), since with the default setting for org-latex-pdf-process, still pdflatex complains about not being able to write to the log file. #+BEGIN_SRC emacs-lisp (defun org-beamer-publish-to-pdf (plist filename pub-dir) (org-publish-attachment plist (org-latex-compile (concat (plist-get plist :base-directory) (substring (org-publish-org-to 'beamer filename .tex plist) 1 nil) )) pub-dir)) #+END_SRC
[O] Change key binding in math mode only
Hi all, I have been writing presentations in org-mode lately with a lot of math content. I am using org-cdlatex, and have already customized it to, say, type R'B inside math mode to obtain \mathbb{R}. I wonder, however, if it would be possible to make this procedure shorter, and obtain \mathbb{R} as soon as pressing R, *but only inside math mode*. I guess I could approximate this with abbrevs or yasnippet, but I think this would require an extra key besides the R, which is closer to what I already have. I would appreciate any tips in this direction! Rafael
Re: [O] Change key binding in math mode only
Rafael rvf0...@gmail.com writes: I have been writing presentations in org-mode lately with a lot of math content. I am using org-cdlatex, and have already customized it to, say, type R'B inside math mode to obtain \mathbb{R}. I wonder, however, if it would be possible to make this procedure shorter, and obtain \mathbb{R} as soon as pressing R, *but only inside math mode*. I guess I could approximate this with abbrevs or yasnippet, but I think this would require an extra key besides the R, which is closer to what I already have. I remembered that Org knows already if point is inside a math expression, so by looking at the source I came up with the following, that seems to work. Sorry for the noise. #+BEGIN_SRC emacs-lisp (defun org-cdlatex-real-numbers () (interactive) (if (org-inside-LaTeX-fragment-p) (insert \\mathbb{R}) (insert R) )) (add-hook 'org-mode-hook (lambda () (local-set-key (kbd R) 'org-cdlatex-real-numbers ))) #+END_SRC
Re: [O] How to replace \( by $$ and such when exporting to markdown
Rasmus ras...@gmx.us writes: Rafael rvf0...@gmail.com writes: I'm trying to publish some beamer presentations with mathematical content as pages in octopress. I think I'm on my way to get a working setup, but I would like some help to achieve the following: With an up-to-date org (from git), define some functions that, when exporting to markdown with ox-md, automatically replace all instances of \(, \), \[ and \] with $$. You want to look into filters, probably org-export-filter-latex-fragment-functions and org-export-filter-latex-environment-functions. They are listed in ox.el. It should be fairly easy to deal with in your case with regexp. Thanks, I finally came up with: (defun my-math-replacement (contents backend info) (when (eq backend 'md) (replace-regexp-in-string (\\|)\\|\\[\\|\\] $$ contents) )) (add-to-list 'org-export-filter-latex-fragment-functions 'my-math-replacement) Too bad the backend is not named 'markdown (I suffered a lot with my filters not working because of this! ;-) )
[O] How to replace \( by $$ and such when exporting to markdown
Hi all, I'm trying to publish some beamer presentations with mathematical content as pages in octopress. I think I'm on my way to get a working setup, but I would like some help to achieve the following: With an up-to-date org (from git), define some functions that, when exporting to markdown with ox-md, automatically replace all instances of \(, \), \[ and \] with $$. Thanks in advance for any help. Rafael
Re: [O] Bibliography
Vikas Rawal vikasli...@agrarianresearch.org writes: Note for Mac OSX users:. I am using Ubuntu Precise, not OSX, and TeXlive 2012, not 2010, and I got the Executing bibtex2html failed when testing this also (even without limit:t). The only way I can imagine to work around was to first run the recommended 'export TMPDIR=.' in a terminal, and then 'emacs' in the same terminal. I wish I knew a cleaner way to do that, since I imagine it would not be wise to put 'export TMPDIR=.' in .bashrc. This may be the cleaner solution: http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00164.html Thanks for your followup! In my case, though, Emacs can find the executable of bibtex2html. However, another message in the thread you mentioned together with some googling led me to adding 'TEXMFOUTPUT = /tmp' to /usr/local/texlive/2012/texmf.cnf, and now I can reproduce your results, namely, without limit:t, the bibliography in the html export appears twice and with it, I get Executing bibtex2html failed.
Re: [O] Bibliography
Vikas Rawal vikasli...@agrarianresearch.org writes: I attach a port of org-exp-bibtex.el (renamed ox-bibtex.el) for the new export framework. Would you mind testing it? I am attaching my test files. I have following problems. 1. When I use limit:t, I get an error: if: Executing bibtex2html failed For this, maybe you are getting the error mentioned in the page https://www.lri.fr/~filliatr/bibtex2html/, in the paragraph starting Note for Mac OSX users:. I am using Ubuntu Precise, not OSX, and TeXlive 2012, not 2010, and I got the Executing bibtex2html failed when testing this also (even without limit:t). The only way I can imagine to work around was to first run the recommended 'export TMPDIR=.' in a terminal, and then 'emacs' in the same terminal. I wish I knew a cleaner way to do that, since I imagine it would not be wise to put 'export TMPDIR=.' in .bashrc. However, the exported html file does not include any bibliograpy at all. :( 2. The bibliography is inserted in the exported html file above the main body of org file as well as below the main body of the org file. Am I doing something silly? Vikas
Re: [O] org-blog 0.9 release
Michael Alan Dorman mdor...@ironicdesign.com writes: I've just tagged version 0.90 of my org-blog minor mode on github[1]. This is intended to be a simple but powerful assistant to using Org for writing blog posts---there's only two commands at this point, and I don't anticipate that number going beyond three anytime soon (though I do have that third one planned! ;) At the moment it only supports WordPress blogs, but the design is very modular, and adding support for other back-ends (including, I hope, static publishing back-ends) should be relatively painless. If it's not, I would be happy to change things to make it so, once I understand the issues. Thanks a lot for your work! I just tried it and it worked for me, to post a basic org-mode file. Are you aware of https://github.com/punchagan/org2blog? It also has the purpose to post to wordpress from org, however its author has been busy lately, and apparently major work is going to be needed to make all its features to work with the new exporter. I hope that you could find the time and motivation to make your package deal with: - inclusion of image files - matematical symbols (that is, wordpress can display LaTeX stuff like $latex a^2+b^2=c^2$ nicely. - syntax code highlighting, native to wordpress. See for example http://thread.gmane.org/gmane.emacs.orgmode/29178/, where some of these feature requests were done for org2blog, and for example my post: http://graphtheoryinlatex.wordpress.com/2012/06/02/a-cayley-graph/ to see these features in action. Rafael
Re: [O] problems with org-protocol + capture templates
Bastien b...@gnu.org writes: Hi Sébastien, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Alvar Maciel wrote: Hi to all, I'm using org-mode as personal day planner with almost all the configuration of http://doc.norang.ca/org-mode.html I try to use org-protocol to send links to emacs using the config of worg. But when emacs open i can not select the template of the capture mode (it's weird months ago was working) and i don't know were is my mistake. this is my keybindidng var orgProtoString = 'org-protocol://capture://'+ encodeURIComponent(gBrowser.currentURI.spec) + '/' + encodeURIComponent(gBrowser.contentWindow.document.title) + '/' + encodeURIComponent(content.window.getSelection()); gBrowser.loadURI(orgProtoString); my capture template (setq org-capture-templates (quote ((t todo entry (file ~/en uso/2013/org/refile.org) * TODO %?\n%U\n%a\n :clock-in t :clock-resume t) (r respond entry (file ~/en uso/2013/org/refile.org) * NEXT Respond to %:from on %:subject\nSCHEDULED: %t\n%U\n%a\n :clock-in t :clock-resume t :immediate-finish t) (n note entry (file ~/en uso/2013/org/refile.org) * %? :NOTE:\n%U\n%a\n :clock-in t :clock-resume t) (j Journal entry (file+datetree ~/Dropbox/en uso/2013/org/diary.org) * %?\n%U\n :clock-in t :clock-resume t) (w org-protocol entry (file ~/en uso/2013/org/refile.org) * TODO Review %c\n%U\n :immediate-finish t) (p Phone call entry (file ~/en uso/2013/org/refile.org) * PHONE %? :PHONE:\n%U :clock-in t :clock-resume t) (h Habit entry (file ~/en uso/2013/org/refile.org) * NEXT %?\n%U\n%a\nSCHEDULED: %(format-time-string \%Y-%m-%d %a .+1d/3d\)\n:PROPERTIES:\n:STYLE: habit\n:REPEAT_TO_STATE: NEXT\n:END:\n AFAIK, no, you can't dynamically select your template. I'm not using org-protocol anymore but I certainly *do* remember that you can dynamically select a capture template. So maybe Alvar's issue needs some investigation. I just had a problem with org-protocol not working. After plenty of googling, reinstalling and fussing, I think that I solved it and I believe that the problem was related that I was playing with different Emacs versions in Ubuntu and momentarily I had no emacsclient. See for example http://ubuntuforums.org/showthread.php?t=2092293
Re: [O] [Bug] Yasnippet/Org: properties messed up when expanding $1
Karl Voit devn...@karl-voit.at writes: * Karl Voit devn...@karl-voit.at wrote: I updated Org to latest git and I moved from Debian yasnippet to github yasnippet (latest) and I still do have this issue. So it's my set-up which is causing this effect. Damn. I guess I have to debug this by disabling parts of my config ... So a quick test of my set-up with disabling all(!) of my Org-mode settings caused the same issue. Therefore, it's not my Org-mode set-up which is causing all this hazzle. Next test: «emacs -q» and I loaded only yasnippet: , | (defun my-load-local-el (part) ... ) | (my-load-local-el contrib/yasnippet/yasnippet.el) ;; load-path | (require 'yasnippet) | (setq yas/root-directory ~/.emacs.d/snippets) | (yas/load-directory yas/root-directory) ` And yes, I still got the issue. :-( I guess I have to do a bug report to yasnippet. I think I have the newest (github) yasnippet, and doing C-h f on yas/load-directory, it says that it is an obsolete function, recommending yas-load-directory instead. Maybe it is worth a try.
[O] Fix broken URL in org-bibtex.el
The patch attached below fixes a very minor problem in org-bibtex.el. Cheers, Rafael From 852681cb0789b4d1a7c0081e634322690b9ae47d Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Sun, 4 Nov 2012 09:14:44 +0100 Subject: [PATCH] org-bibtex.el: Fix broken URL * lisp/org-bibtex.el: In the documentation section of the file, fix the broken URL to Andrew Roberts' document on BibTeX entries. TINYCHANGE --- lisp/org-bibtex.el |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index f8e07ad..cafd3bb 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -88,7 +88,7 @@ ;; ;; - All Bibtex information is taken from the document compiled by ;; Andrew Roberts from the Bibtex manual, available at -;; http://www.andy-roberts.net/misc/latex/sessions/bibtex/bibentries.pdf +;; http://www.andy-roberts.net/res/writing/latex/bibentries.pdf ;; ;;; History: ;; -- 1.7.10.4
Re: [O] Contradiction between code and doc as regards commented lines
* Bastien b...@altern.org [2012-10-28 11:10]: Rafael Laboissiere raf...@laboissiere.net writes: You might be interested in applying the patch attached below, which fixes the comments in the *Remember* buffer, allowing them to get correctly fontified. Applied, thanks! Thanks. I just noticed that my patch have a bad side effect, since the commented lines at the beginning of the *Remember* buffer are not filtered out before inclusion into the destination org file. The patch attached below fixes this. Also, the org-remember-handler function attempts to strip comment lines at the end of the buffer. I changed the code such that only lines that really respect the definition of comment lines (as per the documentation) are actually stripped. Rafael From 72ad3f6f97a87da5b5dfd0df03ca2aed147a61af Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Sun, 28 Oct 2012 17:38:19 +0100 Subject: [PATCH 2/2] org-remember.el: Correctly strip the comment lines in remember buffer * org-remember.el (org-remember-handler): Correctly strip the comment lines in the temporary buffer *Remember* when handling a remember note. --- lisp/org-remember.el |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-remember.el b/lisp/org-remember.el index bfbca73..5cfe70f 100644 --- a/lisp/org-remember.el +++ b/lisp/org-remember.el @@ -840,12 +840,12 @@ See also the variable `org-reverse-note-order'. (if (= end beg) (setq beg (1- beg))) (put-text-property beg end 'org-position-cursor t))) (goto-char (point-min)) - (while (looking-at ^[ \t]*\n\\|^##.*\n) + (while (looking-at ^[ \t]*\n\\|^# .*\n) (replace-match )) (when org-remember-delete-empty-lines-at-end (goto-char (point-max)) (beginning-of-line 1) -(while (and (looking-at [ \t]*$\\|##.*) ( (point) 1)) +(while (and (looking-at [ \t]*$\\|[ \t]*# .*) ( (point) 1)) (delete-region (1- (point)) (point-max)) (beginning-of-line 1))) (catch 'quit -- 1.7.10.4
[O] Contradiction between code and doc as regards commented lines
Before Git commit e8046d2, lines like this were treated as comments in org-mode: ### This used to be a comment At present, lines as the above are not highlighted as comments and will be exported verbatim. Only lines like the following are considered to be comments, currently: # Only this is now a comment This behavior is clearly in contradiction with the documentation, according to this relevant part of doc/org.texi: @node Comment lines, , Horizontal rules, Structural markup elements [snip] Lines starting with zero or more whitespace characters followed by @samp{#} are treated as comments and will never be exported. Please, fix the documentation (or restore the previous behavior, if the documentation is meant to be correct). Cheers, Rafael
Re: [O] Contradiction between code and doc as regards commented lines
* Bastien b...@altern.org [2012-10-27 21:44]: Rafael Laboissiere raf...@laboissiere.net writes: Please, fix the documentation (or restore the previous behavior, if the documentation is meant to be correct). Done, thanks. Thanks. You might be interested in applying the patch attached below, which fixes the comments in the *Remember* buffer, allowing them to get correctly fontified. Rafael From b1ae1021338a156dc7f65256cc6f085b6b2bf103 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Sat, 27 Oct 2012 23:40:39 +0200 Subject: [PATCH] org-remember.el: Start the commented lines with the appropriate characters * org-remember.el (org-remember-apply-template): Start the commented lines in the Remember temporary buffer with the appropriate characters. TINYCHANGE --- lisp/org-remember.el | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-remember.el b/lisp/org-remember.el index d555ca6..bfbca73 100644 --- a/lisp/org-remember.el +++ b/lisp/org-remember.el @@ -472,12 +472,12 @@ to be run from that hook to function properly. (erase-buffer) (insert (substitute-command-keys (format - ## %s \%s\ - \* %s\ -## C-u C-c C-c like C-c C-c, and immediately visit note at target location -## C-0 C-c C-c \%s\ - \* %s\ -## %s to select file and header location interactively. -## C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item -## To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n + # %s \%s\ - \* %s\ +# C-u C-c C-c like C-c C-c, and immediately visit note at target location +# C-0 C-c C-c \%s\ - \* %s\ +# %s to select file and header location interactively. +# C-2 C-c C-c as child (C-3: as sibling) of the currently clocked item +# To switch templates, use `\\[org-remember]'. To abort use `C-c C-k'.\n\n (if org-remember-store-without-prompt C-c C-c C-1 C-c C-c) (abbreviate-file-name (or file org-default-notes-file)) (or headline ) -- 1.7.10.4
Re: [O] Org-mode as a replacement for delicious (bookmark management)
Karl Voit devn...@karl-voit.at writes: * Storing bookmarks from browsers (me: Chrome) org-protocol.el[1] seems promising. And also [2] is quite interesting. But unfortunately those still lack advanced support for tagging: I would have to send the URL to Emacs Org-mode, switch from browser to Emacs, jump to the most recently added entry, go into tagging mode, add tags (having Org-mode tag completion), exit tagging mode. This means a lot of additional steps to my current situation. I am not happy about those additional steps. I think you can save some steps here. You can define the capture template in such a way that, immediately after switching from the browser to Emacs, you can add tags with C-c C-q to the filled captured template before sending it away with C-c C-c. I do not understand what you mean by tagging mode. Best regards,
[O] Commented internal links bad in new export
The manual says, in section 4.2 Internal links: Targets may be located anywhere; sometimes it is convenient to put them into a comment line. For example # My Target But if I use such commented targets, then the new exporter does not see them, neither the one to LaTeX nor the HTML one. Thought you might want to know. I'm using Org-mode version 7.8.09 (release_7.8.09-519-geb48e4) Best regards, Rafael
[O] Theorems in org-mode?
Motivated by the side note by Nicolas in http://www.mail-archive.com/emacs-orgmode@gnu.org/msg55225.html, I tried the example at the end of this message, which requires org-special-blocks.el. It exports nicely to LaTeX-PDF with the new exporter (not so much with the old), so thanks! I wonder what I would need to add to make it export nicely to HTML with either the old or the new exporter. The old exporter inserts the labels with the text of the theorems, and the new inserts stuff like \begin{theorem} .. \end{theorem} with the text of the theorems. Now, the org-special-blocks documentation says: When #+begin_foo is encountered by the html exporter, a div with class foo is inserted into the HTML file. It is up to the user to add this class to his or her stylesheet if this div is to mean anything. I have used #+STYLE: style.theorem {} #+STYLE: .theorem:before {content: Theorem: ; font-weight: bold}/style but if somebody with actual HTML knowledge could suggest something prettier I would appreciate it. Best regards, Rafael #+begin_src org #+title: Theorems in org-mode #+latex_header: \usepackage{amsthm} #+latex_header: \newtheorem{theorem}{Theorem} #+latex_header: \newtheorem{definition}{Definition} #+options: ^:nil * Some theory #+begin_definition def-1 A /right triangle/ is a triangle with a right angle. #+end_definition #+begin_theorem thm-1 We have that $a^2+b^2=c^2$. #+end_theorem This is an equation: #+begin_equation eq-1 a^2+b^2=c^2 #+end_equation * Some references Theorem [[thm-1]] deals with triangles as in Definition [[def-1]], and satisfies equation ([[eq-1]]). #+end_src
Re: [O] Error in org2blog/wp-login: Must provide a callback function to url-retrieve
Steinar Bang s...@dod.no writes: When I try to log in, using `M-x org2blog/wp-login RET', I get the following error message in the minibuffer: Must provide a callback function to url-retrieve Are anyone else successfully using org2blog with emacs 23? I just checked that org2blog works for me with GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-08-14 on rothera, modified by Debian in Ubuntu 11.10. But I have the following header in xml-rpc.el. ;; Author: Mark A. Hershberger m...@everybody.org ;; Original Author: Daniel Lundin dan...@codefactory.se ;; Version: 1.6.8 ;; Created: May 13 2001 ;; Keywords: xml rpc network ;; URL: http://launchpad.net/xml-rpc-el ;; Last Modified: 2010-03-05 13:41:20 mah
Re: [O] Bug in org-diary (Bad sexp)?
Rafael Villarroel rvf0...@gmail.com writes: I think there might be a bug related to the recent changes in the agenda code, since it has just appeared in the last days. The following are minimal steps: (Ubuntu 11.10, GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-08-14 on rothera, modified by Debian, Org version just pulled: Org-mode version 7.8.09 (release_7.8.09.230.gec7b)) With the following file, say simpleorg.el (setq debug-on-error t debug-on-signal nil debug-on-quit nil) (add-to-list 'load-path ~/Downloads/org-mode/lisp) (require 'org-install) and a ~/diary file containing only: %%(org-diary) - and starting with 'emacs -Q -l simpleorg.el' Then M-x diary gives: Bad sexp at line 1 in ~/diary: (org-diary) FWIW, using the tip from http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00702.html to go back to a previous state, I can confirm that commit 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0 is good and that commit 973efcd9c9f5a29ffc9db2c317fab44112a97b07 introduced the error described above.
[O] Bug in org-diary (Bad sexp)?
I think there might be a bug related to the recent changes in the agenda code, since it has just appeared in the last days. The following are minimal steps: (Ubuntu 11.10, GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-08-14 on rothera, modified by Debian, Org version just pulled: Org-mode version 7.8.09 (release_7.8.09.230.gec7b)) With the following file, say simpleorg.el (setq debug-on-error t debug-on-signal nil debug-on-quit nil) (add-to-list 'load-path ~/Downloads/org-mode/lisp) (require 'org-install) and a ~/diary file containing only: %%(org-diary) - and starting with 'emacs -Q -l simpleorg.el' Then M-x diary gives: Bad sexp at line 1 in ~/diary: (org-diary) For some reason I do not get a backtrace. Hopefully somebody will be able at least to reproduce! Best regards, Rafael
Re: [O] Extending attr_latex
Christopher Witte ch...@witte.net.au writes: I putting together a presentation using org and exporting to beamer. I was wondering if there is easy way to get each item in a list to display incrementally. Beamer supports this with the \begin{itemize}[+-] environment option. Perhaps this could be achieved by extending the #+ATTR_LaTeX: syntax. I do it like this. ** Overlays :PROPERTIES: :BEAMER_envargs: [+-] :END: - one - two - three - four - five
Re: [O] Hang on incomplete input
Ken Williams ken.willi...@windlogics.com writes: Apparently, org-mode Babel (or maybe Emacs, or ESS) will hang when given incomplete input, like the following: #+begin_src R ddply(x, #+end_src I was just tearing my hair out trying to figure out why my code was hanging, because of course it's much longer and I didn't notice the missing paren. Is this replicable on other people's platforms too? I'm using GNU Emacs on Windows, with org-mode 7.7 and ESS 5.14. There are other situations where I really wish org-mode (or Emacs, or ESS) didn't freeze up while evaluating R code - for example if I accidentally did 'debug()' on a function that's now being called, or even just on long-running calculations. Any chance evaluation could be done in a separate thread or something? In Ubuntu 10.10, emacs 23.2 and recent org, I get an *Org-Babel Error Output* buffer, saying: Error: unexpected '}' in: ddply(x, } Execution halted
[O] Some commands are not exported to LaTeX
With Emacs 23.3.1 in Ubuntu 11.10, and recent org (Org-mode version 7.7 (release_7.7.601.g55e4d), loaded after emacs -Q), consider the following file. When exporting to LaTeX, the rows starting with #+attr_html, #attr_latex, #+caption, do not appear. Both html and odt export are fine. #+TITLE: Hello, World * An org mode code example #+begin_src org ,#+title: Hello ,* This is an example ,#+attr_html: width=50% ,#+attr_latex: height=0.5\textheight ,#+attr_odt: (:scale 0.5) ,#+caption: A caption ,[[file:figure.jpg]] #+end_src
Re: [O] org-protocol is bitrotting away
Florian Hars flor...@hars.de writes: Of cousre my first error was to try to do something productive on a current ubuntu, but since they have again broken the canonical way to configure protocol handlers, 90% of all howtos describing how to configure org-protocol plain don't work on ubuntu 11.10. gconftool does no longer work, setting things in about:config in firefox has no effect, the current season's incantantion is to put [Desktop Entry] Name=org-protocol Exec=emacsclient %U Type=Application Terminal=false Categories=System; MimeType=x-scheme-handler/org-protocol; into ~/.local/share/applications/org-protocol.desktop and then run update-desktop-database .local/share/applications/ , as mentioned before: http://permalink.gmane.org/gmane.emacs.orgmode/41733 Hmm. With Ubuntu 11.10 and Firefox that came with it, these steps were not enough. I had Firefox asking for the application to open org-protocol links, and choosing 'org-protocol' did not work, as it had in Natty. However, choosing '/usr/bin/emacsclient' for the application, worked for me. More serious is the problen that firefox 7.0.1 steadfastly refuses to set location.href to the URIs required by org-protocol, it throws rather scary looking exceptions if the result of encodeURIComponent(location.href) in the URI does not appear after a question mark. I sort of got it working by changing the URI to org-protocol://capture://?x=+encodeURIComponent(l)+/+... and then added the same three characters in org-protocol-check-filename-for-protocol: (regexp-quote (plist-get (cdr prolist) :protocol)) :/+\\(\\?x=\\)?))) - Florian.
[O] [PATCH] Improve documentation + fix typos
Dear Org-mode developpers, You will find here attached three patches for org-mode. Two of them improve the External links node of the info documentation. The other one just fixes minor typos. Best regards, Rafael Laboissière From b6aac367829af8b6507d04c3f820e3cdbd33853a Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Tue, 11 Oct 2011 00:22:09 +0200 Subject: [PATCH 1/3] Fix typos in variable description * lisp/org.el (org-link-search-must-match-exact-headline): fix typos --- lisp/org.el |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b26e1a3..3446ce2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1493,9 +1493,9 @@ When nil, the link search tries to match a phrase with all words in the search text. :group 'org-link-follow :type '(choice - (const :tag Use fuzy text search nil) + (const :tag Use fuzzy text search nil) (const :tag Match only exact headline t) - (const :tag Match extact headline or query to create it + (const :tag Match exact headline or query to create it query-to-create))) (defcustom org-link-frame-setup -- 1.7.6.3 From f9b109a147cc5dac6016e46773da11f7dee4dbe3 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Tue, 11 Oct 2011 00:58:36 +0200 Subject: [PATCH 2/3] Add footnote on how the hyperlink text is searched in Org files * org.texi (External links): Add footnote on how the behavior of the text search in Org files are controled by the variable org-link-search-must-match-exact-headline. This change is necessary in order to avoid misleading the user as regards of the behavior of the search, in particular because the default value of org-link-search-must-match-exact-headline is 'query-to-create. --- doc/org.texi |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 957b393..eb6941f 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3172,7 +3172,13 @@ file:/myself@@some.where:papers/last.pdf @r{file, path on remote machine} /myself@@some.where:papers/last.pdf@r{same as above} file:sometextfile::NNN@r{file with line number to jump to} file:projects.org @r{another Org file} -file:projects.org::some words @r{text search in Org file} +file:projects.org::some words @r{text search in Org file}@footnote{ +The actual behavior of the search will depend on the value of +the variable @code{org-link-search-must-match-exact-headline}. If its value +is nil, then a fuzzy text search will be done. If it is t, then only the +exact headline will be matched. If the value is @code{'query-to-create}, +then an exact headline will be searched; if it is not found, then the user +will be queried to create it.} file:projects.org::*task title@r{heading search in Org file} docview:papers/last.pdf::NNN @r{open file in doc-view mode at page NNN} id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID} -- 1.7.6.3 From 2cac1d22741efe90cdafa43f9f918647ee19a979 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Tue, 11 Oct 2011 01:15:37 +0200 Subject: [PATCH 3/3] Accurate description of info hyperlink format Hyperlinks in the form info:file#node work with plain spaces in the node part and do not need to have spaces encoded as %20. This is the case for me, who is using the Debian emacs-snapshot package, version 20110926-1. --- doc/org.texi |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index eb6941f..573cbc9 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3197,7 +3197,7 @@ gnus:group@r{Gnus group link} gnus:group#id @r{Gnus article link} bbdb:R.*Stallman @r{BBDB link (with regexp)} irc:/irc.com/#emacs/bob @r{IRC link} -info:org#External%20links @r{Info node link (with encoded space)} +info:org#External links @r{Info node link} shell:ls *.org@r{A shell command} elisp:org-agenda @r{Interactive Elisp command} elisp:(find-file-other-frame Elisp.org) @r{Elisp form to evaluate} -- 1.7.6.3
[O] Odd behavior with first org file opened
Hi! My Emacs version is GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.21.6) of 2010-09-01 on rhenium, modified by Debian (from Ubuntu 11.04) and my org-version is recent: Org-mode version 7.6 (release_7.6.146.g6b389.dirty) If I run: emacs -Q -L ~/Dropbox/emacs/site-lisp/org-mode/lisp/ (that's where I put org-mode), and then open any org file (I have tried with a very simple one, with only one heading), such file is not syntactically colored. However, if I open any second org file, then it is colored without problem. Or if I say M-x revert-file with the first. If I test the same with emacs -Q, using the org-mode coming with Emacs, then everything works fine. Hopefully you can help me solve this! Best regards, Rafael
Re: [O] Again problems with latex inside footnotes.
Hi Bastien, I have enough interest in using org-mode to produce latex texts to get involved. I can't do it right now cause I'm in a critical time to produce results for my thesis, but I've been delaying learning e-lisp and taking a good look on org-mode for some time. Nick Dokos above said that org-mode uses a huge regexp to parse the latex. When this pressing phase pass I'll certainly take a look on that. I played a bit (only a bit) with funcional parsers in Haskell (monadic parsers and parsers based on arrows) and, in my experience, they are much, much more easy to write and more powerful than regexp's (they can parse html! :D). Well, lisp is functional... Maybe I'll take a look at this in the near future. --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 On Wed, Jul 13, 2011 at 05:40, Bastien b...@altern.org wrote: Hi Rafael, Nick Dokos nicholas.do...@hp.com writes: Although patches have been applied to deal with a host of such problems, it is a long-standing problem that is unlikely to be completely solved - ever[fn:1]. Yes, we need to rework the way the exporters handle espace chars, especially the LaTeX one --- it's not only ugly and buggy. Don't hold your breath though, I won't be on this before 7.7. Thanks for your understanding, -- Bastien
[O] Again problems with latex inside footnotes.
Hi, sorry for bothering you again with it, but I'm having a problem with latex inside footnotes and I couldn't find the answer in the manual. When I try something like: 8--- blablabla [fn:bla] [fn:bla] this is what \cite{she} said. 8--- this gets exported as: ---8--- blablabla \footnote{ this is what \cite\{she\} said. ---8--- I believe I'm missing something very basic. I believe that if I put a #+Latex:xxx the xxx part would be exported verbatim to the latex file. But this would break the footnote. Is there a way to insert inline latex snippets? --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803
Re: [O] Again problems with latex inside footnotes.
Also, I have problems with equations even when I use \(...\) instead of $...$. This, for example: --8-- * example Example[fn:note]. [fn:note]An equation: \(\bar{a}\). ---8-- becomes this: ---8--- Example\footnote{An equation: \(\bar\{a\}\). }. ---8--- I'm not really sure, but I suspect this worked before I instaled the latest version of org-mode. Sorry for any inconvenience. -- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803
[O] Problem with latex and footnotes
Hi. I'm noticed a problem with latex equations and footnotes. I'm not sure, but I believe it started after I downloaded the newest version of org-mode. When I try to export a $...$ block that is inside a footnote, the latex file end up with \$...\$ instead of $...$. As an example, this: #+LaTeX_CLASS: article * test This is just a test [fn:test]. [fn:test] This is an equation: $x = y$. Gets exported into this (just the relevant section): \section{test} \label{sec-1} This is just a test \footnote{This is an equation: \$x = y\$. }. Is there a way around it? Thanks in advance. --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803
Re: [O] Problem with latex and footnotes
Hummm... thanks for the tip! It works now. :D --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 On Fri, Jul 8, 2011 at 15:26, Nick Dokos nicholas.do...@hp.com wrote: Rafael Calsaverini rafael.calsaver...@gmail.com wrote: Hi. I'm noticed a problem with latex equations and footnotes. I'm not sure, but I believe it started after I downloaded the newest version of org-mode. When I try to export a $...$ block that is inside a footnote, the latex file end up with \$...\$ instead of $...$. As an example, this: #+LaTeX_CLASS: article * test This is just a test [fn:test]. [fn:test] This is an equation: $x = y$. This works: --8---cut here---start-8--- #+LaTeX_CLASS: article * test This is just a test [fn:test]. [fn:test] This is an equation: \(x = y\). --8---cut here---end---8--- It is generally a good idea (and not just in org-mode) to avoid $...$ and $$...$$ for math. The recommended way is \(...\) for inline equations and \[...\] for diplayed math. Nick
Re: [O] Fwd: Exporting latex without preamble
Hi Bastien, I was planning to use this to create an automated platform for writing my PhD thesis.The plan was to use org to edit separate files corresponding to the chapters of the thesis. Those chapters would then be exported to latex and included (preferably by an automated tool) in a master file that takes care of administrative boilerplate (preambles, cover sheets, boring style configurations, etc, etc...). The idea was to separate latex boilerplate from the text itself. I must use all kinds of custom styles in latex to conform to my university norms, and I wanted to start to write the text in a way that was independent of this boilerplate and only care about it when I must compile a distribution version. I guess I'll have to try to do this differently. What I really was interested in doing is a org-thesis or org-text-production package, in the spirit of org-babel or org2blog. But I don't know much of lisp to be honest (the only functional language I'm familiar with is haskell). My original idea involved a huge makefile and some python scripts, which seems to be a sub-optimal solution. I also played a bit with using an org master file to include each chapters, but I had some problems. Anyway, if you have any kind of tip or suggestion about this, I'm really interested! :D Thanks, --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 On Tue, Jun 28, 2011 at 20:05, Bastien b...@altern.org wrote: Hi Rafael, Rafael Calsaverini rafael.calsaver...@gmail.com writes: is it possible to export an org file to latex with no preamble and no \begin{document}?? Not at the moment. Is it something you need regularily? -- Bastien
Re: [O] Fwd: Exporting latex without preamble
Thanks for the tip! If I succeed I'll post something in my blog and tell here. --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 On Wed, Jun 29, 2011 at 13:28, Bastien b...@altern.org wrote: Hi Rafael, thanks for the clear explanations! Rafael Calsaverini rafael.calsaver...@gmail.com writes: Anyway, if you have any kind of tip or suggestion about this, I'm really interested! :D Maybe you should have a look at section 11.4 Include files of the manuals: it's precisely design to tackle the problem you describe. HTH, -- Bastien
[O] Exporting latex without preamble
Hi, is it possible to export an org file to latex with no preamble and no \begin{document}?? I just needed to translate org-mode syntax to latex syntax, with no other headers and preambles around the text. Is this possible? I tried to add a clean class to my .emacs like this: ; (add-to-list 'org-export-latex-classes '(clean [NO-DEFAULT-PACKAGES] [NO-PACKAGES] [NO-EXTRA] (\\section{%s} . \\section*{%s}) (\\subsection{%s} . \\subsection*{%s}) (\\subsubsection{%s} . \\subsubsection*{%s}) (\\paragraph{%s} . \\paragraph*{%s}) (\\subparagraph{%s} . \\subparagraph*{%s}))) ; But when I try to export this file: * Test ** Test 1 blablabla ** Test 2 lorem ipsum blabla I get this: % Created 2011-06-28 Tue 16:13 \providecommand{\alert}[1]{\textbf{#1}} \title{bla} \author{Rafael S. Calsaverini} \date{\today} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{Test} \label{sec-1} \subsection{Test 1} \label{sec-1-1} blablabla \subsection{Test 2} \label{sec-1-2} lorem ipsum blabla \end{document} Is there any option to turn the preamble off? --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803
[O] Fwd: Exporting latex without preamble
Hi, is it possible to export an org file to latex with no preamble and no \begin{document}?? I just needed to translate org-mode syntax to latex syntax, with no other headers and preambles around the text. Is this possible? I tried to add a clean class to my .emacs like this: ; (add-to-list 'org-export-latex-classes '(clean [NO-DEFAULT-PACKAGES] [NO-PACKAGES] [NO-EXTRA] (\\section{%s} . \\section*{%s}) (\\subsection{%s} . \\subsection*{%s}) (\\subsubsection{%s} . \\subsubsection*{%s}) (\\paragraph{%s} . \\paragraph*{%s}) (\\subparagraph{%s} . \\subparagraph*{%s}))) ; But when I try to export this file: * Test ** Test 1 blablabla ** Test 2 lorem ipsum blabla I get this: % Created 2011-06-28 Tue 16:13 \providecommand{\alert}[1]{\textbf{#1}} \title{bla} \author{Rafael S. Calsaverini} \date{\today} \begin{document} \maketitle \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{Test} \label{sec-1} \subsection{Test 1} \label{sec-1-1} blablabla \subsection{Test 2} \label{sec-1-2} lorem ipsum blabla \end{document} Is there any option to turn the preamble off? --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803
[O] Firefox 4 in Ubuntu 11.04 and org-protocol
Hi! Has anybody been succesful in using the tutorial http://orgmode.org/worg/org-contrib/org-protocol.html in the setting described in the subject (Firefox 4, Ubuntu 11.04)? Those instructions worked perfectly for me in previous versions of Ubuntu and Firefox, but now I always get the dreaded message Firefox doesn't know how to open this address, because the protocol (org-protocol) isn't associated with any program. I have run the two commands starting with 'gconftool-2', I have checked with gconf-editor that the settings intended have been set, I have tried the method in http://kb.mozillazine.org/Register_protocol and also that in http://support.mozilla.com/en-US/kb/The%20protocol%20is%20not%20associated%20with%20any%20program?s=protocolas=s. No luck so far...
[O] Re: Release 7.5
Bastien b...@altern.org writes: * Imagemagick post-processing of LaTeX code block results It is now possible to use imagemagick to process the output of LaTeX code blocks through to a wide variety of output formats. This patch is thanks to Andreas Leha, the following description is from his email to the mailing list. But wasn't this recently removed? http://orgmode.org/w/?p=org-mode.git;a=commit;h=c6f6b3421ee9050a980f8fa0b5615e3f7136e7a8 (is there any chance of getting it back?) Best regards, Rafael
[Orgmode] Full manual for beamer export?
Hello all, The org-beamer tutorial at Worg http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html refers to a detailed manual for org-beamer in the first paragraph of section 3. However, the link is dead, and googling I cannot find another document that could possibly be refering to, except the Beamer section in the Org manual (12.6.6). So my question is: Is there really a full org-beamer manual, and where is it? Best regards, Rafael ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Question on org-beamer markup
Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Erik Iverson wrote: According to http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html the following markup should work when exporting to PDF from an org-beamer document. - the first, very @important@, point! - the previous point shows the use of the special markup which translates to the Beamer specific /alert/ command for highlighting text. However, upon export the resulting .tex file does not actually contain this translation from @important@ to the alert command, but rather sill has @important@ in the output. Am I missing some part of the setup process? You must update *manually* the var =org-export-latex-emphasis-alist=: #+begin_src emacs-lisp ;; alist of LaTeX expressions to convert emphasis fontifiers (setq org-export-latex-emphasis-alist '((* \\textbf{%s} nil) (/ \\emph{%s} nil) (_ \\underline{%s} nil) (+ \\st{%s} nil) (= \\url{%s} nil) ;; `url' breaks lines in long strings (was `verb') (~ \\verb~%s~ t) (@ \\alert{%s} nil))) #+end_src This should be enough right? (add-to-list 'org-emphasis-alist '(@ org-warning i /i)) (add-to-list 'org-export-latex-emphasis-alist '(@ \\alert{%s} nil)) However, it does not work for me with Org-mode version 7.4 (release_7.4.166.gf7a7.dirty) (that is, neither the text between @'s is fontified, nor is exported to an alert, as Erik mentioned. This, however, does work for me: (add-to-list 'org-emphasis-alist '(+ org-warning i /i)) (add-to-list 'org-export-latex-emphasis-alist '(+ \\alert{%s} nil)) so I'm thinking, maybe there is something else to be done to declare @ as a valid delimiter? Regards, Rafael ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: My Gnus does not work with newest org
Richard Riley rile...@googlemail.com writes: Rafael Villarroel rvf0...@gmail.com writes: Hello all, I have defined the following: (setq gnus-home-directory ~/Dropbox/gnus) (setq gnus-directory ~/Dropbox/gnus/News) (setq message-directory ~/Dropbox/gnus/Mail) and so my init Gnus file is at ~/Dropbox/gnus/.gnus. When loading org-mode just pulled from git, after M-x gnus I get the message that the nntp server cannot be loaded, then after C-h v org-init-file, I get that You mean gnus-init-file? Try customising it appropriately. Gnus kind of does its own thing Thanks for your answer, Richard. Yes, I meant gnus-init-file :). I also tried (setq gnus-init-fine ~/Dropbox/gnus/.gnus). But then Gnus starts downloading the list of newsgroups in the server, presumably because it cannot find the other files where the suscribed groups are indicated. I guess I could set some other variables and make it work somehow, but I would always live in fear that there is still some other variable that has to be tweaked and my setup would end up in a mess.. Besides, as I mentioned, org 7.3 works just fine, but I would like to try the latest and greatest features mentioned in this list. this variable points to ~/.gnus, which does not exist in my setup. This is Gnus 5.13. However, I do not have any problems with org 7.3. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: My Gnus does not work with newest org
Rafael Villarroel rvf0...@gmail.com writes: I have defined the following: (setq gnus-home-directory ~/Dropbox/gnus) (setq gnus-directory ~/Dropbox/gnus/News) (setq message-directory ~/Dropbox/gnus/Mail) and so my init Gnus file is at ~/Dropbox/gnus/.gnus. When loading org-mode just pulled from git, after M-x gnus I get the message that the nntp server cannot be loaded, then after C-h v org-init-file, I get that this variable points to ~/.gnus, which does not exist in my setup. This is Gnus 5.13. However, I do not have any problems with org 7.3. I see now that org-mode 7.4 is OK too. Something odd about recent versions (pulled from git) is that gnus-init-file is defined just after Emacs starts (and points, incorrectly for me, to ~/.gnus). However, with org 7.4., I have to run M-x gnus to have gnus-init-file defined, and with value ~/Dropbox/gnus/.gnus, as desired. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] My Gnus does not work with newest org
Hello all, I have defined the following: (setq gnus-home-directory ~/Dropbox/gnus) (setq gnus-directory ~/Dropbox/gnus/News) (setq message-directory ~/Dropbox/gnus/Mail) and so my init Gnus file is at ~/Dropbox/gnus/.gnus. When loading org-mode just pulled from git, after M-x gnus I get the message that the nntp server cannot be loaded, then after C-h v org-init-file, I get that this variable points to ~/.gnus, which does not exist in my setup. This is Gnus 5.13. However, I do not have any problems with org 7.3. I would appreciate any advice on how to make this work! Thanks. Rafael ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] The \only overlay in beamer
Hi there. I'm trying to use the \only command to produce a beamer presentation but it seems that org-beamer filters out this. I've tried it in many different ways, and didn't get the desired effect. Particularly, I've tried the obviously wrong thing: #+STARTUP: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [smaller, presentation] * Foo ** Slide 1 \only1 { *** Block1 :B_block: :PROPERTIES: :BEAMER_env: block :END: - bla11 - bla12 - bla13 } \only2{ *** Block2 :B_block: :PROPERTIES: :BEAMER_env: block :END: - bla21 - bla22 - bla23 } Which obviously break-up. And I also tried what I believe would be a nice syntax for this: * Foo ** Slide 1 *** Block1:B_block: :PROPERTIES: :BEAMER_envargs: \only1 :BEAMER_env: block :END: - bla11 - bla12 - bla13 *** Block2 :B_block: :PROPERTIES: :BEAMER_envargs: \only2 :BEAMER_env: block :END: - bla21 - bla22 - bla23 Apparently the parser just removes the \only and interprets this as 1 and 2. The resulting latex is exactly the same as if the \only wasn't there. Is there a way to use the \only overlay in a clean way? Thank you very much. --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bibtex and latex export
Hi there, I'm trying to use org-mode to compose latex documents and I'm having a problem with bibtex. When I export to pdf with C-c C-e p, pdflatex runs and everything works gracefully with respect to the latex code (the output is even prettier than I used to have patience to do only with latex), but bibtex isn't called. I tried to fiddle with org-exp-bibtex, which is nice, but apparently it don't call bibtex either. I tried to edit the function that calls pdflatex to include a call to bibtex, but to be honest I know zero about lisp, so I couldn't even edit a simple list of commands. :P (I must be the only emacs user in the world that can't write or read lisp... it would be swell if I could use haskell to extend emacs instead of lisp :P). How should I go about automatically including a call to bibtex whenever I want to export my org document as a pdf? Thanks for your time, and sorry to bore you with simple questions... --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bibtex and latex export
Hi there, I'm trying to use org-mode to compose latex documents and I'm having a problem with bibtex. When I export to pdf with C-c C-e p, pdflatex runs and everything works gracefully with respect to the latex code (the output is even prettier than I used to have patience to do only with latex), but bibtex isn't called. I've tried to fiddle with org-exp-bibtex, which is nice, but apparently it don't call bibtex either. I've tried to edit the function that calls pdflatex to include a call to bibtex, but to be honest I know zero about lisp, so I couldn't even edit a simple list of commands. :P (I must be the only emacs user in the world that can't write or read lisp... it would be swell if I could use haskell to extend emacs instead of lisp :P). How should I go about automatically including a call to bibtex whenever I want to export my org document as a pdf? Thanks for your time, and sorry to bore you with simple questions... --- Rafael Calsaverini Dep. de Física Geral, Sala 336 Instituto de Física - Universidade de São Paulo rafael.calsaver...@gmail.com http://stoa.usp.br/calsaverini/weblog CEL: (11) 7525-6222 USP: (11) 3091-6803 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Agenda and weather forecast | language and units
Juan Pechiar pech...@computer.org writes: E.g. %%(org-google-weather Montevideo,Uruguay es) Unfortunately, none of Pachuca, Pachuca,Mexico, Pachuca,Hidalgo,Mexico work for me (I get a Bad sexp error) :( (New York is fine, however..). ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: gnash crunch... latex whitespace defaults! + numbering in only some subheadings
Matt Price mopto...@gmail.com writes: 1) what is te recommended or canonical way to reduce whitespace, not only in the margins, but especially between paragraphs? In particular, I use a lot of lists and subheadings; latex puts enormous emounts of whatespace between items, and very quickly the syllabus becomes difficult to navigate. It would be great for me if I could make these settings default, too -- I would much rather have my paper copies look more word-processor-ish, to ocnform iwth expectations in my discipline (history). Not exactly the canonical way, but I have the following in documents I'm planning to export to LaTeX to make whitespace bearable: #+LATEX_HEADER: #+LATEX_HEADER: \let\olditemize=\itemize #+LATEX_HEADER: \def\itemize{ #+LATEX_HEADER: \olditemize #+LATEX_HEADER: \setlength{\itemsep}{-0.8ex} #+LATEX_HEADER: } #+LATEX_HEADER: \let\oldenumerate=\enumerate #+LATEX_HEADER: \def\enumerate{ #+LATEX_HEADER: \oldenumerate #+LATEX_HEADER: \setlength{\itemsep}{-0.8ex} #+LATEX_HEADER: } ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to customize the org-mode's BEGIN_SRC HTML output
Puneeth puncha...@gmail.com writes: The line breaks being stripped off is due to code in org2blog. It has nothing to do with org-mode's export. Wordpress does not ignore linebreaks in the content, which looks very ugly for normal posts. Code in org2blog strips off the line breaks from the html generated by org-export-as-html. It checks for pre and blockquote tags and leaves out the newlines within those tags. This is (most) probably what is causing trouble. I'll only be able to look into it in the weekend. Anybody is free to beat me to that. :) This is a workaround, all based on work by Puneeth and Benjamin, that seems to work for me. I did not know what to do with Benjamin's advice stuff (Just evaluating it changed nothing in the output). ;; Benjamin's stuff, one line changed (defun bnb/org2blog-src-blocks-to-wp-syntaxhighlighter () Export #+BEGIN_SRC blocks as Wordpress Syntaxhighlighter tags. There is a special header option, :syntaxhl that contains the options to pass to syntaxhighlighter. This is intended to be added to `org-export-preprocess-hooks' (interactive) (save-window-excursion (let ((case-fold-search t) (colon-re ^[ \t]*:\\([ \t]\\|$\\)) lang body headers syntaxhl beg) (goto-char (point-min)) (while (re-search-forward colon-re nil t) (replace-match (match-string 1)) (beginning-of-line 1) (insert [text light=\true\]\n) (setq beg (point)) (while (looking-at colon-re) (replace-match (match-string 1)) (end-of-line 1) (or (eobp) (forward-char 1))) (end-of-line 1) (add-text-properties beg (if (bolp) (1- (point)) (point)) '(org-protected t)) (insert \n[/text])) (unless (boundp 'org-babel-src-block-regexp) (require 'ob)) (while (re-search-forward (concat \\( org-babel-src-block-regexp \\| org-babel-inline-src-block-regexp \\)) nil t) (setq lang (match-string-no-properties 3)) (if (string-match - lang) (error SyntaxHighlighter does not support languages with '-' in the names)) (setq headers (match-string-no-properties 5)) (setq body (match-string-no-properties 6)) (save-match-data (setq syntaxhl (if (string-match :syntaxhl[ ]+\\([^ ]+\\) headers) (concat (replace-regexp-in-string \; (match-string 1 headers)) (replace-match ;(concat \n\n[ lang syntaxhl ]\n body [/ lang ]\n) (concat \n\n[sourcecode language=\ lang syntaxhl \]\n body [/sourcecode]\n) nil t) (add-hook 'org-export-preprocess-hook 'bnb/org2blog-src-blocks-to-wp-syntaxhighlighter) ;; searching for [sourcecode ... ] ... [/sourcecode] so that newlines ;; are not removed ;; Puneeth's stuff, two lines changed (defun org2blog-strip-new-lines (html) Strip the new lines from the html, except in pre and blockquote tags. (save-excursion (with-temp-buffer (let* (start-pos end-pos) (insert html) (setq start-pos (point-min)) (goto-char start-pos) (while (re-search-forward \\[sourcecode.* nil t 1) (setq end-pos (match-beginning 0)) (replace-regexp \\\n nil start-pos end-pos) (re-search-forward \\[/sourcecode.* nil t 1) (setq start-pos (match-end 0)) (goto-char start-pos)) (setq end-pos (point-max)) (replace-regexp \\\n nil start-pos end-pos) (buffer-substring-no-properties (point-min) (point-max)) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode