Re: [O] Changing title for outline
Hi Erich, Erich Neuwirth erich.neuwi...@univie.ac.at writes: Suing this at the end of file #+ Local Variables: #+ org-beamer-outline-frame-title: Themen #+ End: Brings up a prompt about changing local variables, but accepting the changes does still not produce the desired result. The header line of the outline frame still is Outline What version of Emacs and Org are you using ? -- Bastien
[O] [RFC] Emphasis regexp
Hi all I must be missing something since I think these are very common use cases: How is one supposed to get code emphasis to recognize the beginning and end as expected in the four examples ='the file.org'= and =$1= and =a = 'x'= and =b = y=? Can I change =org-emphasis-regexp-components= in the Org repository accordingly to allow single and double quotes for border or would that break too many use cases? To try out what would break in existing Org files with what I suggest, use #+NAME: change_border #+BEGIN_SRC emacs-lisp (setq org-emphasis-regexp-components '( \t('\{ - \t.,:!?;'\)}\\ \t\r\n, . 1)) #+END_SRC and reload Org mode and reopen the Org buffers that were already opened. Additionally and at the cost of giving up (why would they be needed?) '=foo bar=' and =foo bar=, which possibly should anyway be either just 'foo bar' and foo bar or =foo bar=, also the examples =c='z'= and =d=t= would work when using #+NAME: change_pre_and_post_and_border #+BEGIN_SRC emacs-lisp (setq org-emphasis-regexp-components '( \t({ - \t.,:!?;)}\\ \t\r\n, . 1)) #+END_SRC As a reminder and to reset during trials, the current state is #+BEGIN_SRC emacs-lisp (setq org-emphasis-regexp-components '( \t('\{ - \t.,:!?;'\)}\\ \t\r\n,\' . 1)) #+END_SRC Which one of the following is your preference for =org-emphasis-regexp-components= and why?: - as in named block change_pre_and_post_and_border - as in named block change_border - keep current state - other Below is the history of =org-emphasis-regexp-components= for further argumentation. The git commits d45806cc and 8ddd57dc (repository conversion (?) in 2008) have a commit message that does not tell why single and double quotes were added to be possible for pre and post and to be not allowed for border. Is there a version control Org repository prior to git with some more comment that has not been converted to git? #+BEGIN_VERSE 2ff8fc11 org.el (Carsten Dominik 2008-01-31 11:32:03 +0100 2327) '( \t( \t.,?;:'\) \t\r\n,.. 1 nil) d45806cc org.el (Carsten Dominik 2008-01-31 11:32:41 +0100 2641) '( \t( \t.,?;'\) \t\r\n, . 1 nil) bd2ceb1b org.el (Carsten Dominik 2008-01-31 11:33:26 +0100 2800) '( \t('\ \t.,?;'\) \t\r\n, . 1 nil) 8ddd57dc org.el (Carsten Dominik 2008-01-31 11:34:30 +0100 3421) '( \t('\- \t.,:?;'\) \t\r\n,\' . 1 nil) 93570c03 org.el (Carsten Dominik 2008-01-31 11:37:51 +0100 3955) '( \t('\- \t.,:?;'\) \t\r\n,\' . 1) fe939ecb9 lisp/org.el (Carsten Dominik 2008-03-22 16:52:18 +0100 2631) '( \t('\- \t.,:?;'\) \t\r\n,\' . 1) 19f700a60 lisp/org.el (Carsten Dominik 2009-03-23 11:14:29 +0100 2631) '( \t('\ - \t.,:!?;'\) \t\r\n,\' . 1) 49878b038 lisp/org.el (Carsten Dominik 2009-03-30 11:49:10 +0200 2762) '( \t('\{ - \t.,:!?;'\)} \t\r\n,\' . 1) 8d0acabf2 lisp/org.el (Carsten Dominik 2009-08-01 23:32:28 +0200 2782) '( \t('\{ - \t.,:!?;'\)}\\ \t\r\n,\' . 1) 0ba7d3d2f lisp/org.el (Carsten Dominik 2009-08-18 07:45:35 +0100 2807) '( \t('`\{ - \t.,:!?;'\)}\\ \t\r\n,\' . 1) 44bb3134d lisp/org.el (Carsten Dominik 2009-08-27 10:29:04 +0200 4244) '( \t('\{ - \t.,:!?;'\)}\\ \t\r\n,\' . 1) #+END_VERSE Michael
Re: [O] Preservation of white space in babel blocks, exporting to PDF
Hello, John Hendy jw.he...@gmail.com writes: I'd still like to understand the src vs. example block discrepancy if possible. It's really odd, especially since Nicholas isn't able to reproduce even with the same minimal config. There is no discrepancy. You indent your code with tabs and these tabs appear in the TeX file, but Beamer cannot handle them properly. The same problem will arise in an example block. I couldn't reproduce it because I only indent with spaces. Regards, -- Nicolas Goaziou
[O] renaming of ob-sh to ob-shell
Hello, The commit 80754a8 says updated names in test-ob-shell but it reintroduced the file test-ob-sh.el which was renamed in the parent of that commit. I attach a patch which changs that and various other things related to the renaming, namely : the customize interface, the README, and a change in org-test (the one mentionned in 87a9et6mzz@gmail.com I guess). From 8351ad5f1b94ba0ca7768a1d765df1248645fbf4 Mon Sep 17 00:00:00 2001 From: Nicolas Richard theonewiththeevill...@yahoo.fr Date: Fri, 31 Jan 2014 17:02:03 +0100 Subject: [PATCH] Renaming of ob-sh to ob-shell: various fixes * lisp/org.el (org-babel-load-languages): * testing/org-test.el: * testing/README: change 'sh' to 'shell' * testing/lisp/test-ob-sh.el: re-rename test file (fixes 80754a8) --- lisp/org.el | 2 +- testing/README| 2 +- testing/lisp/test-ob-sh.el| 52 --- testing/lisp/test-ob-shell.el | 15 +++-- testing/org-test.el | 2 +- 5 files changed, 11 insertions(+), 62 deletions(-) delete mode 100644 testing/lisp/test-ob-sh.el diff --git a/lisp/org.el b/lisp/org.el index 20dcb92..5158678 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -275,7 +275,7 @@ requirements) is loaded. (const :tag Scala scala) (const :tag Scheme scheme) (const :tag Screen screen) - (const :tag Shell Script sh) + (const :tag Shell Script shell) (const :tag Shen shen) (const :tag Sql sql) (const :tag Sqlite sqlite) diff --git a/testing/README b/testing/README index e25a109..c7e352b 100644 --- a/testing/README +++ b/testing/README @@ -24,7 +24,7 @@ Also note that many of the current tests uses babel evaluation... -l lisp/org-id.el -l testing/org-test.el \ --eval (progn (org-reload) (setq org-confirm-babel-evaluate nil) \ (org-babel-do-load-languages 'org-babel-load-languages \ -'((emacs-lisp . t) (sh . t) (org . t \ +'((emacs-lisp . t) (shell . t) (org . t \ -f org-test-run-batch-tests #+END_SRC diff --git a/testing/lisp/test-ob-sh.el b/testing/lisp/test-ob-sh.el deleted file mode 100644 index 09278e7..000 --- a/testing/lisp/test-ob-sh.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; test-ob-shell.el - -;; Copyright (c) 2010-2014 Eric Schulte -;; Authors: Eric Schulte - -;; This file is not part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see http://www.gnu.org/licenses/. - -;;; Comment: - -;; Template test file for Org-mode tests - -;;; Code: -(org-test-for-executable sh) -(unless (featurep 'ob-shell) - (signal 'missing-test-dependency Support for Shell code blocks)) - -(ert-deftest test-ob-shell/dont-insert-spaces-on-expanded-bodies () - Expanded shell bodies should not start with a blank line -unless the body of the tangled block does. - (should-not (string-match ^[\n\r][\t ]*[\n\r] - (org-babel-expand-body:generic echo 2 '( - (should (string-match ^[\n\r][\t ]*[\n\r] - (org-babel-expand-body:generic \n\necho 2 '() - -(ert-deftest test-ob-shell/dont-error-on-empty-results () - Was throwing an elisp error when shell blocks threw errors and -returned empty results. - (should (null (org-babel-execute:sh ls NoSuchFileOrDirectory.txt nil - -(ert-deftest test-ob-shell/session () - This also tests `org-babel-comint-with-output' in -ob-comint.el, which was not previously tested. - (let ((res (org-babel-execute:sh echo 1; echo 2 '((:session . yes) -(should res) -(should (listp res - -(provide 'test-ob-shell) - -;;; test-ob-shell.el ends here diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el index 87e2a95..2b3e48f 100644 --- a/testing/lisp/test-ob-shell.el +++ b/testing/lisp/test-ob-shell.el @@ -1,4 +1,4 @@ -;;; test-ob-sh.el +;;; test-ob-shell.el ;; Copyright (c) 2010-2014 Eric Schulte ;; Authors: Eric Schulte @@ -25,9 +25,9 @@ ;;; Code: (org-test-for-executable sh) (unless (featurep 'ob-shell) - (signal 'missing-test-dependency Support for Sh code blocks)) + (signal 'missing-test-dependency Support for Shell code blocks)) -(ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies () +(ert-deftest test-ob-shell/dont-insert-spaces-on-expanded-bodies () Expanded shell bodies should not start with a blank line unless the body of the tangled block does. (should-not (string-match ^[\n\r][\t ]*[\n\r] @@ -35,18 +35,19 @@
Re: [O] Bug: Wrong type argument: Integer or marker-p, nil
Hello, Bastien b...@gnu.org writes: Done, thanks. Thank you for taking care of it. BTW, shouldn't ca0c77033d729a51688eabbb9847249cf50ad6c4 be applied on maint too? I would not consider this a bug, and if so, a very minor one. Honestly, I didn't read the thread relative to this commit, so I don't know what it fixes or enhances. So you can disregard my suggestion. Regards, -- Nicolas Goaziou
Re: [O] A small hack to document programs externally
Bastien b...@gnu.org writes: Hi Alan, Alan Schmitt alan.schm...@polytechnique.org writes: I've just written a small hack to refer to code in other files from an org-mode buffer, so that the referred code would be copied in the buffer to be exported when exporting the org buffer. (Our use case is a large Coq development which we want to document online. Our may constraint is that we need the documentation to live in files outside the code, yet still refer to the actual code.) It would be nice to have this on worg/org-hacks.org ! I finally found the time to do it: http://orgmode.org/worg/org-hacks.html#sec-1-10-4 Any criticism is highly welcome! Alan
Re: [O] renaming of ob-sh to ob-shell
Nicolas Richard theonewiththeevill...@yahoo.fr writes: Hello, I attach a patch which changs that and various other things related to the renaming, namely : the customize interface, the README, and a change in org-test (the one mentionned in 87a9et6mzz@gmail.com I guess). Good job. I wonder if a library can have two (provide ...) statements, in that case ob-shell.el could have simply used both of these: ,- | (provide 'sh) | (provide 'shell) `- -- cheers, Thorsten
Re: [O] Stop clock on closing emacs
Am Sat, Feb 01, 2014 at 11:53:09AM +0530, Rustom Mody wrote: In (info (org)Clocking Work Time) is given this: (setq org-clock-persist 'history) (org-clock-persistence-insinuate) I have both in my configuration and the clock is not being stopped when I close emacs. It is saved and I can recover it the next time, but this is something different. I would like emacs/orgmode to insert the time I'm closing emacs as end time of the running clock. Thanks in any case for your answer. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
Re: [O] how to group together fields
Hello Stefan, please keep the mailing list cc'd so everyone can read your response. On 2014-02-01 03:10 Stefan Huchler wrote: thx for looking over it. My idea was that I have 2 :COLUMNS: rows, comment out one or the other. I dont need one table that shows me both, thats impossible yes, but one table for the one information and another for the other. You would have to maintain two seperate and differently structured trees of your data to achieve this. I do not know if this is the way you want to go, as it would require you to keep both trees in sync by hand. Regards, -- Alexander Baier
Re: [O] how to group together fields
Hello Stefan, again, please sent your mail also to the org mailing list. Just do a follow-up in your mail client, instead of a reply, that should do the right thing I guess. On 2014-02-01 12:25 Stefan Huchler wrote: Hello Alex, thats exactly what don´t want ^^. I tried something similar a while ago with TBLFM function but it did not work. I dont care to much about how I can do it, how exactly I manage the data (in lists in attributes in tables) I just don´t want redundancy. It should be no rocket science, so I can reproduce it, if nothing else maybe you could generate org-trees from this or so. This can surely be done by using the mapping api I referenced in the first post. You need to know some elisp for this thought. But I would be willing to post something along those lines, if you wanted to go down that way. Putting the collected data into an org-tree or presenting it in another way should be doable, too. Its sad all data is there but because org-mode dont know something like group by, its not working. it would be very powerful, I thought thats what org-mode/emacs is all about. Well, the question is, if you want to implement a whole database upon the org-format.
Re: [O] Code block option :results raw does not replace #+RESULTS
On Fri, 2014-01-31 at 18:16 -0500, Nick Dokos wrote: Is this the expected behavior for this option? Yes - raw does not keep track of where the results begin and end and cannot erase the old ones before adding the new ones. Try calling org-babel-remove-result: you'll see that it gets rid of the #+RESULTS: line but it doesn't touch the actual results. Once it has inserted them, they become part of the buffer, outside the jurisdiction of the code block/babel. Nick That makes sense as I don't see the #RESULTS: line repeated. I'm adding that to my notes. Thank you for the explanation! Regards, Greg
Re: [O] Stop clock on closing emacs
On 01.02.2014 11:45, Igor Sosa Mayor wrote: I would like emacs/orgmode to insert the time I'm closing emacs as end time of the running clock. Use `kill-emacs-hook': (defun org-clock-out-maybe () Stop a currently running clock. (org-clock-out nil t)) (add-hook 'kill-emacs-hook 'org-clock-out-maybe) -- Florian Beck
Re: [O] renaming of ob-sh to ob-shell
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Richard theonewiththeevill...@yahoo.fr writes: Hello, I attach a patch which changs that and various other things related to the renaming, namely : the customize interface, the README, and a change in org-test (the one mentionned in 87a9et6mzz@gmail.com I guess). Good job. I wonder if a library can have two (provide ...) statements, in that case ob-shell.el could have simply used both of these: ,- | (provide 'sh) | (provide 'shell) `- I meant ,- | (provide 'ob-sh) | (provide 'ob-shell) `- of course ... -- cheers, Thorsten
Re: [O] how to group together fields
Hello Stefan, I say it again: _Please_ Cc the org-mode mailing list, when replying, so everyone can read our correspondence. On 2014-02-01 12:46 Stefan Huchler wrote: sry I maybe miss readed you. I have no problem in a different structure. If you could join 2 different org trees by linking in the data or something, like a tee table and a vendor table but have no redundant data, I would be ok. clearly my way would be even better but I would be ok with a other structure. Linking to another org-header is possible, but you cannot use this to feed information to the aggregate functions of Column View. Regarding normal tables, I have no idea. This tree is not fixed, its only a demonstration what I want to do. I want to manage data somehow that is not redundant where I can type in data once and get this 2 tables when I need them generated. And if possible it should not be that I every time I want to use something similar I have to write a big special function for it. One could try write it general enough to be applicable to similar situations I think. I am not shure If I do always the most obious only good way (as a pythoneer would say ^^) to reach my goal. But in general in my oppinion emacs is not only a editor not only a operation system (package manager...) but also a office suite ( authoring, spreadsheet ) so why not have a somewhat full personal database system. The alternative would be for me to use for such small things sqlite and write some code for representation and sql statements. so the effort to do this and the big problems with backups with real databases would be enorm. Sorry hope that sounds not like whinig, but I saw 2 days ago a presentation (video) from one of or the author from org-mode, and he said that some people use it as database. So a database should be able to do such basic operation like group by in my oppinion. And you can express the logik like I did, its only a question if the org-columns function can use it. I think a lot of people either use it as a more or less flat listing (with the structure beeing strongly influenced by the aggregate functions they want to run over it) or they write a bunch of elisp to help them extract information. maybe I have to hack it myself even if I wrote 10 lines of lisp in my live ;) Maybe Bastien (author of Column View I think) can say something to this, with regard to supplying custom elisp as an aggregate function. Regards, -- Alexander Baier
Re: [O] Python Code Block error with header option :results output
On Sat, 2014-02-01 at 07:56 +0100, Christian Moe wrote: You should only use return like that in a python code block when you have :results value. To expand briefly on that (since this can be perplexing): The need to use `return' at all when returning the value is a special quirk of Python code blocks, and does not apply to (any?) other languages. As explained on Worg, with `:results value' (the default), Internally, the value is obtained by wrapping the code in a function definition in the external language, and evaluating that function. Therefore, code should be written as if it were the body of such a function. In particular, note that Python does not automatically return a value from a function unless a return statement is present, and so a ‘return’ statement will usually be required in Python. http://orgmode.org/manual/Results-of-evaluation.html So when using `:results output', using `return' causes an error because there is no function to return anything from. Yours, Christian Thank you Christian for the detailed explanation. It is indeed perplexing at first! Regards, Greg
Re: [O] Stop clock on closing emacs
Am Sat, Feb 01, 2014 at 01:03:07PM +0100, Florian Beck wrote: Use `kill-emacs-hook': (defun org-clock-out-maybe () Stop a currently running clock. (org-clock-out nil t)) (add-hook 'kill-emacs-hook 'org-clock-out-maybe) Thanks a lot. This is much better. But: are you really using this idea? The problem is that the kill-emacs-hook does not ask for save the modified buffer. That means: I see that the end time is being put into the org buffer, but the buffer/file is not being saved... I solved the problem (but maybe there is a more elegant way...) adding the following: (defun org-clock-out-maybe () Stop a currently running clock. (org-clock-out nil t) (org-save-all-org-buffers)) -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
Re: [O] [RFC] Make QUOTE an export keyword instead of an element type
Hello, Bastien b...@gnu.org writes: I don't think `org-toggle-fixed-width-section' should be deleted entirely, as fixed-width text is still supported in this form: : Some text and using C-c : is very handy. What do you think? I tend to use rectangular regions for that. Anyway, I removed it because, even if we want to keep it, it needs to be rewritten, using parser and unit tests. It also needs to be renamed. If we don't need C-c : binding, it is possible to re-implement it. Regards, -- Nicolas Goaziou
Re: [O] Stop clock on closing emacs
On 01.02.2014 14:07, Igor Sosa Mayor wrote: Thanks a lot. This is much better. But: are you really using this idea? The problem is that the kill-emacs-hook does not ask for save the modified buffer. That means: I see that the end time is being put into the org buffer, but the buffer/file is not being saved... You are right. I didn't think of this because... I solved the problem (but maybe there is a more elegant way...) adding the following: (defun org-clock-out-maybe () Stop a currently running clock. (org-clock-out nil t) (org-save-all-org-buffers)) ... I call `save-all-buffer' in the exit hook. Sorry for the confusion. -- Florian Beck
[O] Org Grep news
Hi, gang. :-) I took last two days as holidays, to let the pressure out a bit, and used them to have mere fun with a few things, among which, Org Grep. The tool used to have one main output, with Emacs commands to transform that output one-way into two other formats. I shuffled the code and added more, so it can switch freely between those three formats, now called views. Buttons on the title line ease that switching. 1. The [browse] view is read-only, with a few extra Emacs commands. 2. The [edit] view is full-Org editable, and uses transient checklists. 3. The [tree] view regroups grep hits by directory, hierarchically. Org Grep yields [browse] view initially. When there are many hits, one can switch to the [tree] view and go pruning, using C-x C-c C-w, say, retaining only what is most promising. Then switch back to either [browse] or [edit] on the reduced set of hits. Convenient for me! :-) François P.S. For the curious, it's still https://github.com/pinard/org-grep .
Re: [O] [RFC] Emphasis regexp
On 01.02.2014 09:27, Michael Brand wrote: Additionally and at the cost of giving up (why would they be needed?) '=foo bar=' and =foo bar=, which possibly should anyway be either just 'foo bar' and foo bar or =foo bar=, `org-emphasis-regexp-components' also controls, well, regular emphasis. And *this* kind of quote is something I need from time to time. -- Florian Beck
Re: [O] renaming of ob-sh to ob-shell
Thorsten Jolitz tjol...@gmail.com writes: I meant ,- | (provide 'ob-sh) | (provide 'ob-shell) `- of course ... I guess that that would indeed avoid loading an older ob-sh.el. Perhaps together with something like (mapc (lambda (x) (when (member '(require . ob-sh) x) (warn `ob-sh' was required by %s and is deprecated, please check (car x load-history) Result is a warning like this: Warning (emacs): `ob-sh' was required by /path/to/file.el and is deprecated, please check -- Nico.
[O] Links sorting and exporting.
I have conceived of an idea that I want to build into the ORG framework. The problem I am trying to solve: I have a variety of links that I use on a regular basis. I am wanting to be able to invoke a link generation command that will store them in a bookmarks.org file (or it could be a user defined file). However, searching them isn't always easy and I want to be able to publish them as a resource for a group of users. I can search them easy enough in org but others can't. Idea I have: It would be interesting to have org, or maybe it would have to be an external function, that would go through a file or set of files(user defined list?) (work, group @ work, home) and generate a main bookmark page (in the example, one for work, one for group @ work, and one for home) that links to a file that is named for that tag and contains an html file of each link that contains that tag. This could cause some things too appear in more than one file, for example, something might appear in CIFS and performance but it's related to each topic. This could be manually triggered or scheduled for updating and publishing out to a web server. I am thinking that we would have a user defined file list in the configuration, would need to go find all the unique tags in each file and make the launch page for each file by generating relative links to the sub pages, the collect the list of links for each tag generating the sub page. Thinking it would be best to generate these in .org format and then publish them out in html to a user defined location. Thoughts on this? Is this already done? I know some parts of it are already present and I just need to make glue for those parts. I think the part that will need to be constructed outside of the glue is the sorting and generation of separate files
[O] showing children in agenda
If I have a task with children, and the parent is SCHEDULED today so it is showing up in the agenda, is there a way to make children automagically show up? My specific use case is that I have a parent task, broken down by sub-tasks as children. I only schedule the parent rather than all the sub-tasks, but it would be nice when the parent shows up in the agenda that I can see the children and easily set estimates and clock in as I see them. Is there some method to achieve this, or do I need to set each child as SCHEDULED and TODO also? Thanks, -k.
Re: [O] Stop clock on closing emacs
Am Sat, Feb 01, 2014 at 02:58:23PM +0100, Florian Beck wrote: ... I call `save-all-buffer' in the exit hook. Sorry for the confusion. on the contrary! Your hint was very helpful! I have finally this working and I'm very happy with it! -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
[O] IDs w/ human friendly component
I've never cared that the ID field was not human friendly. But I've just learned about the Estimate Table where you can see your estimates and actual clock time to complete tasks. If you want to see the estimates for the current tree, you need to know the ID, which is not human friendly. It seems like with IDO mode, the first few characters or words of the title, stripped of whitespace, could be pre- or ap- pended onto the ID, and then it would be easy to select IDs. If this were how IDs were created, would this break some other features? Do others see this as a good or bad thing? Or is there some other way to tell the Estimate Table to work on the local tree. Cheers, -k.
[O] Name for part of Org mode buffer before first headline
Aloha all, Is there a canonical name for the part of the Org mode buffer before the first headline? I checked the manual and probed my failure-prone memory off and on over the last few days, but didn't come up with anything. I'm looking for the Org mode equivalent of LaTeX's preamble. All the best, Tom -- T.S. Dye Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com
[O] bootstrapping myself back into org again
Some issues I have in starting to use org to publish stuff to the web again... * Image inlining without an explicit .jpg extension most of my images these days come from stuff uploaded via android, and have an identifier like: http://lh6.googleusercontent.com/WPKXTEXXcFcp_gmW-G17uoMGvhzL6pDHQUvZIWUQPMM=w600-h800 Various attempts at quoting the result [[{{{]] don't work. Suggestions? pure html? That gets me to trying to find stuff that I figure exists but haven't found yet: * disquis I've seen it mentioned but so far haven't found the code to do so. * table-of-contents styling I see there is a table-of-contents id in the default html, but no styling... ideally appearing over on the right. http://www.bufferbloat.net/projects/cerowrt/wiki/CeroWrt_310_Release_Notes * a fixed sidebar in my case I'd hoped to generate a div tag that included a sidebar via javascript. My old blog was in ikiwiki and it would be nice to go pure org for the next. -- Dave Täht Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html
Re: [O] Preservation of white space in babel blocks, exporting to PDF
Hello, John Hendy jw.he...@gmail.com writes: On Sat, Feb 1, 2014 at 2:28 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: There is no discrepancy. You indent your code with tabs and these tabs appear in the TeX file, but Beamer cannot handle them properly. The same problem will arise in an example block. From whence comes this assumption? In the previous emails, I mentioned the different treatment between src and example blocks with the same code. I don't know why I'd complain about the .tex containing some sort of tab character if I'd put it there myself! Again, you have `indent-tabs-mode' set to a non-nil value. This is what I mean by you indent your code with tabs. Babel happens to indent source blocks when re-inserting them after evaluation. So you get tabs even if you didn't explicitly write them in the first place. Regards, -- Nicolas Goaziou
Re: [O] Preservation of white space in babel blocks, exporting to PDF
Completing myself, Nicolas Goaziou n.goaz...@gmail.com writes: Babel happens to indent source blocks when re-inserting them after evaluation. So you get tabs even if you didn't explicitly write them in the first place. ... but this shouldn't happen if `org-src-preserve-indentation' is non-nil. I fixed that in maint. Thank you for the report.
Re: [O] Simple quote becomes double in LaTeX export
Hello, Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org writes: With a text in French, and Babel present in my list of LaTeX classes, the following title gets its simple quote converted to a double one: #+TITLE: Notes sur l'/elevator pitch/ #+LANGUAGE: fr * Objectif Ceci est l'objectif... gives: % ... \title{Notes sur l\fg{}\emph{elevator pitch}} % ... ^ This should be fixed in maint. Thank you for reporting it. Regards, -- Nicolas Goaziou
[O] keep latex overlays and run code blocks?
Hi All, I have been using org-mode and emacs for lectures in an engineering course. I often have equations, and then source blocks that implement them. I can display the latex fragments, but when I try to run the source blocks, I have to type C-c C-c twice, because the first one removes the overlays, and the second one runs the block. that is pretty inconvenient, because then I have to put the overlays back on. It looks like this is hard-coded in org-ctrl-c-ctrl-c in line 20358 of org.el: (org-remove-latex-fragment-image-overlays) What do you think of creating another customizable variable to control this, with a default value to preserve the current behavior. then we could do this: (when org-remove-latex-fragment-image-overlays-CcCc-p (org-remove-latex-fragment-image-overlays)) Then, I could keep the equations up, and run and modify code blocks in class! John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu
[O] Org not preserving Python indent levels on LaTex export due to tabs
I'm having trouble with getting python source=code blocks to export to LaTeX properly. I've figured out what's going wrong: the exporter is inserting tab characters on lines with 2 or more indentation levels in python. If I use org to export to .tex first, and then untabify the .tex files, the indent levels are preserved (assuming the tabs correctly lined up with the corresponding python in the first place, which many times they don't). Here's a test.org file: * Heading 1 LaTeX export does not work on python src blocks with more than 2 levels of indentation. For example (4 spaces per indent level, not tabs): #+BEGIN_SRC python -n def foo(x): print(Hi: %s % x) if x == James: print(James is the best!) else: return x #+END_SRC The above should be indented properly. But it isn't. The resulting .tex file has tabs on the second indent level lines and the tab doesn't even line up with the 4 spaces per tab either. Any ideas how to get rid of this? If I run a =C-x h M-x untabify= on the .tex file, then it exports just fine. But I don't /want/ to do that each and every time I export my org files. Here's the verbatim portion of the generated LaTeX source: #+BEGIN_SRC latex -n \begin{verbatim} 1 def foo(x): 2 print(Hi: %s % x) 3 if x == James: 4 print(James is the best!) 5 else: 6 return x \end{verbatim} #+END_SRC Note: lines 4 and 6 in the =\begin{verbatim}= blocks. Line 4 is 4[space][space][tab]print(James...) How do I get org to export with all spaces and no tabs for verbatims in LaTeX?
Re: [O] Preservation of white space in babel blocks, exporting to PDF
On Feb 1, 2014 2:26 PM, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, John Hendy jw.he...@gmail.com writes: On Sat, Feb 1, 2014 at 2:28 AM, Nicolas Goaziou n.goaz...@gmail.com wrote: There is no discrepancy. You indent your code with tabs and these tabs appear in the TeX file, but Beamer cannot handle them properly. The same problem will arise in an example block. From whence comes this assumption? In the previous emails, I mentioned the different treatment between src and example blocks with the same code. I don't know why I'd complain about the .tex containing some sort of tab character if I'd put it there myself! Again, you have `indent-tabs-mode' set to a non-nil value. This is what I mean by you indent your code with tabs. What do you mean, again? Have you mentioned that variable in this conversation yet? I've not done anything with that variable, as evidenced by the minimal config I sent. Thus, I take it that the default org setting is non-nil? I am a bit frustrated by trying to be as clear as I could about the situation with reproducible examples, and then finding out the behavior was apparently obvious, but due to a variable I didn't know existed... I'll try a fresh pull tomorrow as well as looking at indent-tabs-mode. John Babel happens to indent source blocks when re-inserting them after evaluation. So you get tabs even if you didn't explicitly write them in the first place. Regards, -- Nicolas Goaziou
[O] new(ish) behaviour wrt to {s }s
At some point orgmode has started escaping {s and }s which I don't want to be escaped on conversion to LaTeX. For example when I put in orgmode \textsubscript{some subscript}, I get out in the .tex file \textsubscript\{some subsubscript}. Likewise with a user-defined function like \Bracketed{...}. Is there a flag/option I can use to tell orgmode to *never* escape my {s and }s on export to LaTeX? ~ Dr Benjamin Slade pgp fingerprint: 21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19 ~ {sent by mu4e on Emacs running under GNU/Linux} (Choose Linux, Choose Freedom)
[O] ob-clojure: presentation of map structures?
How may I use an Org document to illustrate Clojure src blocks that produce Clojure data structures -- particularly maps -- as pretty-printed text? I think I am using Org master in Emacs 24.3. #+BEGIN_SRC clojure :results value what options? (zipmap [Peru Paris Sankt-Peterburg Philadelphia Plattsburgh Pluto] (range)) #+END_SRC By the way, Clojure pprint makes the value into the following, which would be very respectable (with the addition of : org markup) as a result block in the Org buffer: {Pluto 5, Plattsburgh 4, Philadelphia 3, Putingrad 2, Paris 1, Peru 0} Floundering among the options, I tried :results value pp. It yielded this: : {\Pluto\ 5,\n \Plattsburgh\ 4,\n \Philadelphia\ 3,\n \Sankt-Peterburg\ 2,\n \Paris\ 1,\n \Peru\ 0}\n pprint's good intentions are evident, but they collided with a superior force.
Re: [O] IDs w/ human friendly component
Have you tried changing the strange ID to the ID that you want? (e.g. 7f3b531b-f1c9-41aa-854b-37235500495f → introduction). They should be unique. I use my manually written IDs for some important headers which I want to detect from outside org. In addition there's CUSTOM_ID, but I think that's the id=… you want in HTML exports. El Sat, 1 Feb 2014 14:39:15 -0500 (EST) Ken Mankoff va escriure: I've never cared that the ID field was not human friendly. But I've just learned about the Estimate Table where you can see your estimates and actual clock time to complete tasks. If you want to see the estimates for the current tree, you need to know the ID, which is not human friendly. It seems like with IDO mode, the first few characters or words of the title, stripped of whitespace, could be pre- or ap- pended onto the ID, and then it would be easy to select IDs. If this were how IDs were created, would this break some other features? Do others see this as a good or bad thing? Or is there some other way to tell the Estimate Table to work on the local tree. Cheers, -k.
Re: [O] renaming of ob-sh to ob-shell
Applied. Thanks for catching this error and taking the time to provide this thorough fix! Nicolas Richard theonewiththeevill...@yahoo.fr writes: Hello, The commit 80754a8 says updated names in test-ob-shell but it reintroduced the file test-ob-sh.el which was renamed in the parent of that commit. I attach a patch which changs that and various other things related to the renaming, namely : the customize interface, the README, and a change in org-test (the one mentionned in 87a9et6mzz@gmail.com I guess). From 8351ad5f1b94ba0ca7768a1d765df1248645fbf4 Mon Sep 17 00:00:00 2001 From: Nicolas Richard theonewiththeevill...@yahoo.fr Date: Fri, 31 Jan 2014 17:02:03 +0100 Subject: [PATCH] Renaming of ob-sh to ob-shell: various fixes * lisp/org.el (org-babel-load-languages): * testing/org-test.el: * testing/README: change 'sh' to 'shell' * testing/lisp/test-ob-sh.el: re-rename test file (fixes 80754a8) --- lisp/org.el | 2 +- testing/README| 2 +- testing/lisp/test-ob-sh.el| 52 --- testing/lisp/test-ob-shell.el | 15 +++-- testing/org-test.el | 2 +- 5 files changed, 11 insertions(+), 62 deletions(-) delete mode 100644 testing/lisp/test-ob-sh.el diff --git a/lisp/org.el b/lisp/org.el index 20dcb92..5158678 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -275,7 +275,7 @@ requirements) is loaded. (const :tag Scala scala) (const :tag Scheme scheme) (const :tag Screen screen) - (const :tag Shell Script sh) + (const :tag Shell Script shell) (const :tag Shen shen) (const :tag Sql sql) (const :tag Sqlite sqlite) diff --git a/testing/README b/testing/README index e25a109..c7e352b 100644 --- a/testing/README +++ b/testing/README @@ -24,7 +24,7 @@ Also note that many of the current tests uses babel evaluation... -l lisp/org-id.el -l testing/org-test.el \ --eval (progn (org-reload) (setq org-confirm-babel-evaluate nil) \ (org-babel-do-load-languages 'org-babel-load-languages \ -'((emacs-lisp . t) (sh . t) (org . t \ +'((emacs-lisp . t) (shell . t) (org . t \ -f org-test-run-batch-tests #+END_SRC diff --git a/testing/lisp/test-ob-sh.el b/testing/lisp/test-ob-sh.el deleted file mode 100644 index 09278e7..000 --- a/testing/lisp/test-ob-sh.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; test-ob-shell.el - -;; Copyright (c) 2010-2014 Eric Schulte -;; Authors: Eric Schulte - -;; This file is not part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see http://www.gnu.org/licenses/. - -;;; Comment: - -;; Template test file for Org-mode tests - -;;; Code: -(org-test-for-executable sh) -(unless (featurep 'ob-shell) - (signal 'missing-test-dependency Support for Shell code blocks)) - -(ert-deftest test-ob-shell/dont-insert-spaces-on-expanded-bodies () - Expanded shell bodies should not start with a blank line -unless the body of the tangled block does. - (should-not (string-match ^[\n\r][\t ]*[\n\r] - (org-babel-expand-body:generic echo 2 '( - (should (string-match ^[\n\r][\t ]*[\n\r] - (org-babel-expand-body:generic \n\necho 2 '() - -(ert-deftest test-ob-shell/dont-error-on-empty-results () - Was throwing an elisp error when shell blocks threw errors and -returned empty results. - (should (null (org-babel-execute:sh ls NoSuchFileOrDirectory.txt nil - -(ert-deftest test-ob-shell/session () - This also tests `org-babel-comint-with-output' in -ob-comint.el, which was not previously tested. - (let ((res (org-babel-execute:sh echo 1; echo 2 '((:session . yes) -(should res) -(should (listp res - -(provide 'test-ob-shell) - -;;; test-ob-shell.el ends here diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el index 87e2a95..2b3e48f 100644 --- a/testing/lisp/test-ob-shell.el +++ b/testing/lisp/test-ob-shell.el @@ -1,4 +1,4 @@ -;;; test-ob-sh.el +;;; test-ob-shell.el ;; Copyright (c) 2010-2014 Eric Schulte ;; Authors: Eric Schulte @@ -25,9 +25,9 @@ ;;; Code: (org-test-for-executable sh) (unless (featurep 'ob-shell) - (signal 'missing-test-dependency Support
Re: [O] ob-clojure: presentation of map structures?
Phill Wolf phill.w...@gmail.com writes: How may I use an Org document to illustrate Clojure src blocks that produce Clojure data structures -- particularly maps -- as pretty-printed text? I think I am using Org master in Emacs 24.3. #+BEGIN_SRC clojure :results value what options? (zipmap [Peru Paris Sankt-Peterburg Philadelphia Plattsburgh Pluto] (range)) #+END_SRC By the way, Clojure pprint makes the value into the following, which would be very respectable (with the addition of : org markup) as a result block in the Org buffer: {Pluto 5, Plattsburgh 4, Philadelphia 3, Putingrad 2, Paris 1, Peru 0} Floundering among the options, I tried :results value pp. It yielded this: : {\Pluto\ 5,\n \Plattsburgh\ 4,\n \Philadelphia\ 3,\n \Sankt-Peterburg\ 2,\n \Paris\ 1,\n \Peru\ 0}\n pprint's good intentions are evident, but they collided with a superior force. Maybe try :results pp org. -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] Org not preserving Python indent levels on LaTex export due to tabs
Hello, James Ryland Miller james.ryland.mil...@gmail.com writes: I'm having trouble with getting python source=code blocks to export to LaTeX properly. I've figured out what's going wrong: the exporter is inserting tab characters on lines with 2 or more indentation levels in python. If I use org to export to .tex first, and then untabify the .tex files, the indent levels are preserved (assuming the tabs correctly lined up with the corresponding python in the first place, which many times they don't). Try to set `org-src-preserve-indentation' to a non-nil value (on a very recent Org) or add a -i flag to you source block: #+BEGIN_SRC python -n -i ... #+END_SRC This should prevent Org from touching indentation within the block. Regards, -- Nicolas Goaziou
Re: [O] new(ish) behaviour wrt to {s }s
Hello, Benjamin Slade sl...@jnanam.net writes: At some point orgmode has started escaping {s and }s which I don't want to be escaped on conversion to LaTeX. For example when I put in orgmode \textsubscript{some subscript}, I get out in the .tex file \textsubscript\{some subsubscript}. Likewise with a user-defined function like \Bracketed{...}. Org doesn't support full LaTeX syntax. If you want to insert raw LaTeX, you need to use specific markup, for example an export snippet: @@latex:\textsubscript{some subsubscript}@@ Is there a flag/option I can use to tell orgmode to *never* escape my {s and }s on export to LaTeX? No. But you could write a filter to do so, see: (info (org) Advanced configuration). Regards, -- Nicolas Goaziou