Re: [O] :no-expand not working on variables?
Eric Schulte schulte.e...@gmail.com writes: According to the manual :no-expand is only supposed to have an effect during tangling, not execution. Thanks Eric - re-reading the manual, it became clear. Maybe to clarify this in the manual, one could say: , | The `:no-expand' header argument can be used to turn off this behavior | for tangling and has no effect on the expansion during code execution. ` instead of: , | The `:no-expand' header argument can be used to turn off this behavior. ` Rainer Best, Rainer M Krug rai...@krugs.de writes: Hi shouldn't the following not give an error from R as it should not be expanding the variables? --8---cut here---start-8--- #+PROPERTY: no-expand TRUE #+PROPERTY: var YEAR=2014 * a noexpand code #+begin_src R :results output :no-expand cat(YEAR) #+end_src #+RESULTS: : 2014 --8---cut here---end---8--- The manual states: , | 14.8.2.11 `:no-expand' | .. | | By default, code blocks are expanded with `org-babel-expand-src-block' | during tangling. This has the effect of assigning values to variables | specified with `:var' (see *Note var::), and of replacing noweb | references (see *Note Noweb reference syntax::) with their targets. The | `:no-expand' header argument can be used to turn off this behavior. ` Org-mode version 8.2.5h (release_8.2.5h-869-gdcfe09 @ /Users/rainerkrug/.emacs.d/org-mode/lisp/) Cheers, Rainer -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 pgpiQ_XcFb1yb.pgp Description: PGP signature
Re: [O] [BABEL] BUG Re: Omitting try/catch blocks from tangled R code?
Eric Schulte schulte.e...@gmail.com writes: Apologies - I am still struggling with encryption.. So here is my example: --8---cut here---start-8--- #+TITLE: single_to_multi #+DATE: 2013-10-15 Tue #+AUTHOR: Rainer M. Krug #+EMAIL: rai...@krugs.de ≈* Load R packages and data #+BEGIN_SRC R cat(Loading Data\n) #+END_SRC --8---cut here---end---8--- I am using only org loaded and R enabled. C-c C-c on the block produces the error emacs version: GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 AppKit 1265) of 2014-02-13 on Rainers-MacBook-Pro-2.local org version: Org-mode version 8.2.5h (release_8.2.5h-837-gb296cc @ /Users/rainerkrug/.emacs.d/org-mode/lisp/) Thanks, a fixed version of the patch is attached. If this works please let me know and I'll apply. Still the same error: , | Debugger entered--Lisp error: (wrong-type-argument sequencep 99) | Mapconcat(identity cat(\YEAR\) \n) | Org-babel-execute:R(cat(\YEAR\) ((:comments . ) (:shebang . ) (:cache . no) (:padline . ) (:noweb . no) (:tangle . no) (:exports . code) (:results . replace output) (:session . none) (:hlines . no) (:result-type . output) (:result-params output replace) (:rowname-names) (:colname-names))) | org-babel-execute-src-block(nil) | org-babel-execute-src-block-maybe() | org-babel-execute-maybe() | org-babel-execute-safely-maybe() | run-hook-with-args-until-success(org-babel-execute-safely-maybe) | org-ctrl-c-ctrl-c(nil) | call-interactively(org-ctrl-c-ctrl-c nil nil) ` Cheers, Rainer Best, From d67248db79faf19e1bdcac0230c37670b6115bdd Mon Sep 17 00:00:00 2001 From: Eric Schulte schulte.e...@gmail.com Date: Sun, 23 Mar 2014 20:01:37 -0600 Subject: [PATCH] only wrap R code graphics-file on execution Move this out of the expand-body function so that it is *never* applied to tangled code. --- lisp/ob-R.el | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 62aa7f2..780d99f 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -97,24 +97,15 @@ this variable.) Expand BODY according to PARAMS, return the expanded body. (let ((graphics-file (or graphics-file (org-babel-R-graphical-output-file params -(mapconcat - #'identity - (let ((inside -(append - (when (cdr (assoc :prologue params)) - (list (cdr (assoc :prologue params - (org-babel-variable-assignments:R params) - (list body) - (when (cdr (assoc :epilogue params)) - (list (cdr (assoc :epilogue params))) - (if graphics-file - (append -(list (org-babel-R-construct-graphics-device-call - graphics-file params)) -inside -(list },error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off())) - inside)) - \n))) +(mapconcat #'identity +(append + (when (cdr (assoc :prologue params)) + (list (cdr (assoc :prologue params + (org-babel-variable-assignments:R params) + (list body) + (when (cdr (assoc :epilogue params)) + (list (cdr (assoc :epilogue params) +\n))) (defun org-babel-execute:R (body params) Execute a block of R code. @@ -127,7 +118,18 @@ This function is called by `org-babel-execute-src-block'. (colnames-p (cdr (assoc :colnames params))) (rownames-p (cdr (assoc :rownames params))) (graphics-file (org-babel-R-graphical-output-file params)) -(full-body (org-babel-expand-body:R body params graphics-file)) +(full-body + (let ((inside +(list (org-babel-expand-body:R body params graphics-file + (mapconcat #'identity + (if graphics-file + (append + (list (org-babel-R-construct-graphics-device-call + graphics-file params)) + inside + (list },error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='', axes=FALSE); text(x=0, y=0, labels=e$message, col='red'); paste('ERROR', e$message, sep=' : ')}); dev.off())) +inside) + \n))) (result (org-babel-R-evaluate session full-body result-type result-params -- 1.9.1 -- Rainer M. Krug email: Raineratkrugsdotde PGP: 0x0F52F982 pgpI5sDy3A9Yg.pgp Description: PGP signature
Re: [O] Chapter headings
Nick Dokos wrote: Steven Arntson ste...@stevenarntson.com writes: Hello, I'm a beginning org-mode user. I'm writing a book with many chapters, each chapter as a top-level header (*). Is there a way to assign chapter numbers automatically, such that I might get a result along the lines of: * 1. This is a chapter containing thousands of words. * 2. This is the next chapter, with many words. * 3. And so on. There are probably many ways to do that, but I want to invert the question: *why* do you want chapter numbers in your org file? I would argue that they are a bad idea in the vast majority of cases. Numbers can be nice be particularly nice when having some colleague (or boss) on the phone asking you to fix the typo on the second paragraph of page 12. When you tell them you don't see page numbers, they give you the section number... and you've to ask for the title, not its number. This is to say that numbers could be a positive feedback for the writer, but they certainly would have to be overlays on the Org headings, not saved with the file. Best regards, Seb -- Sebastien Vauban
Re: [O] Proposal to replace the prefix repetition with whitespace during expansion of noweb references
Pontus Michael wrote: I recommend to introduce a change that will replace the inserted prefix with whitespace of equal length. If it was the case then provided example would produce the following code after expansion: #+begin_src emacs-lisp (concat foo bar) #+end_src Here are the arguments in support of my proposal: 1) The proposed behavior is identical to one produced by original noweb. 2) Documentation provides a reasoning for current behavior as an example of reference expansion after the introduction of single-line comment with intention to comment all the lines caught in expansion. This reasoning follows simplistic assumption of semantics of arbitrary language and takes advantage of the single line comment notation used for non-intended purpose (i.e. multiline comment should have been used instead). 3) Continuing the line of examples given in emacs lisp, which lacks the notation for multiline comments I fail to see a situation where docstrings would not only serve the intended purpose, but in many cases contribute to quality and readability of the code. 4) Current behavior lacks the mechanism for handling multiple noweb references present on the same line. If prefix would be extracted from the unexpanded code and expansion would include raw noweb references notation. Clearly this is unexpected behavior. If my proposal will find support in the community I can put my own effort in bringing this change into existence. I am more or less the one who asked for the current behavior because I wanted to be able to easily comment blocks in SQL or ELisp or ... --8---cut here---start-8--- SELECT * FROM table WHERE cond1 AND -- cond2 AND cond3 --8---cut here---end---8--- However, as you say, in the SQL case, I could have used multiline comments. This is a pity it does not exist in ELisp. However, your arguments 1 and 4 are important to me. Hence, I'd see no objection to move in the direction you propose (insert whitespaces, so that indentation is correctly done). Best regards, Seb -- Sebastien Vauban
Re: [O] Q: Drawers
Bastien wrote: dickbarends dickbare...@me.com writes: Why is the name „Drawers” selected for the Drawers functionality in emacs org-mode? I assume this is because that's where you put stuff you want to hide and search for occasionnaly. Like real drawers. Along with the open/close functionality... Best regards, Seb -- Sebastien Vauban
Re: [O] How to get rid of clocktable summary time in the form 2d 02:00
Bastien wrote: Buddy Butterfly buddy.butter...@web.de writes: I would like to have the summary times in a clocktable be displayed only in hours, like 48:00 instead of 2d. Or, is it possible to define that 1d corresponds to 8:00 as a working day? So in the above example I would rather like to see 5d (workingdays) corresponding to 40:00. Clocktable counts 1d as 24h (which is right ;-) but not in business. See `org-time-clocksum-use-effort-durations' and `org-effort-durations' for a start. Eventually take a look at related posts: - Multiple notions for what's a day http://lists.gnu.org/archive/html/emacs-orgmode/2012-12/msg01093.html - Computations on efforts expressed in days http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00049.html Best regards, Seb -- Sebastien Vauban
[O] Donations summary March 2014
Dear all, as promised, I am going to publish a summary of Org-mode donations every month. March 2014, a total of US$ 66.67 from 2 contributors Many thanks to those who have contributed. Cheers - Carsten
Re: [O] How can you sort an Org clock table?
Ah yes, I see that I have to move the point into the table cell. I was trying with the table header. Slightly odd that. Means that it only works on tables that aggregate clock times across multiple files, where the times are put in the same cell. Can you replicate? If you do a clocktable with the scope set to that file, then there's no way to order the cells. How hard would it be to modify org-dblock-write do you think? In hours work for someone familiar with elisp, but not the org codebase. On 31 March 2014 03:06, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: Yeah, tried that. Doesn't work! :( AFAICT, it works fine on your first stackoverflow example. There is probably no hope of getting this method to work the way you want on your second example though: org-sort does not know anything about the substructure of the table. The only way I can think of is to make the dynblock function that produces the table (org-dblock-write:clocktable) do the sorting. On 30 March 2014 23:24, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: I posted a question on StackOverflow: http://stackoverflow.com/questions/22749704/how-can-you-sort-an-org-clock-table Summary is: how do I sort an clock table by the % column? Is there anything out there I can use to get this working? If not, how complex a job would it be to write something that did this? If you point me in the right direction, I'll see what I can come up with. Never tried on a clock table, but the following works on a generic table, so I assume that it will work on a clock table too: put point in the column by which you want to sort the table (in the body of the table, not in the header) and say M-x org-sort RET n (I assume you want numeric sorting, but org-sort provides several kinds). org-sort is normally bound to C-c ^ too, so C-c ^ n should be all that's needed. -- Nick -- Nick
Re: [O] Reference to org-drawers in the manual
On 2014-03-30, 16:49, Nicolas Goaziou wrote: We removed a limitation, not the feature itself. Now you can use drawers without having to specify its name in a DRAWER keyword. That is great. Thank you for the clarification! Christian -- Christian Wittern, Kyoto
Re: [O] Propagating Workflow States
Esben Stien b...@esben-stien.name writes: Any way to disable this?; it should start with TODO. If I'm reading the docstring correctly, try C-u C-S-RET HTH, -- Nico.
Re: [O] How can you sort an Org clock table?
Noah Slater nsla...@tumbolia.org writes: Ah yes, I see that I have to move the point into the table cell. I was trying with the table header. Slightly odd that. Means that it only works on tables that aggregate clock times across multiple files, where the times are put in the same cell. Can you replicate? If you do a clocktable with the scope set to that file, then there's no way to order the cells. How hard would it be to modify org-dblock-write do you think? In hours work for someone familiar with elisp, but not the org codebase. No idea - I have never used clocktables. On 31 March 2014 03:06, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: Yeah, tried that. Doesn't work! :( AFAICT, it works fine on your first stackoverflow example. There is probably no hope of getting this method to work the way you want on your second example though: org-sort does not know anything about the substructure of the table. The only way I can think of is to make the dynblock function that produces the table (org-dblock-write:clocktable) do the sorting. On 30 March 2014 23:24, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: I posted a question on StackOverflow: http://stackoverflow.com/questions/22749704/how-can-you-sort-an-org-clock-table Summary is: how do I sort an clock table by the % column? Is there anything out there I can use to get this working? If not, how complex a job would it be to write something that did this? If you point me in the right direction, I'll see what I can come up with. Never tried on a clock table, but the following works on a generic table, so I assume that it will work on a clock table too: put point in the column by which you want to sort the table (in the body of the table, not in the header) and say M-x org-sort RET n (I assume you want numeric sorting, but org-sort provides several kinds). org-sort is normally bound to C-c ^ too, so C-c ^ n should be all that's needed. -- Nick -- Nick -- Nick
Re: [O] How can you sort an Org clock table?
Okay thanks. If anyone else does know, I'd really appreciate it. Thanks! :) On 31 March 2014 14:45, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: Ah yes, I see that I have to move the point into the table cell. I was trying with the table header. Slightly odd that. Means that it only works on tables that aggregate clock times across multiple files, where the times are put in the same cell. Can you replicate? If you do a clocktable with the scope set to that file, then there's no way to order the cells. How hard would it be to modify org-dblock-write do you think? In hours work for someone familiar with elisp, but not the org codebase. No idea - I have never used clocktables. On 31 March 2014 03:06, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: Yeah, tried that. Doesn't work! :( AFAICT, it works fine on your first stackoverflow example. There is probably no hope of getting this method to work the way you want on your second example though: org-sort does not know anything about the substructure of the table. The only way I can think of is to make the dynblock function that produces the table (org-dblock-write:clocktable) do the sorting. On 30 March 2014 23:24, Nick Dokos ndo...@gmail.com wrote: Noah Slater nsla...@tumbolia.org writes: I posted a question on StackOverflow: http://stackoverflow.com/questions/22749704/how-can-you-sort-an-org-clock-table Summary is: how do I sort an clock table by the % column? Is there anything out there I can use to get this working? If not, how complex a job would it be to write something that did this? If you point me in the right direction, I'll see what I can come up with. Never tried on a clock table, but the following works on a generic table, so I assume that it will work on a clock table too: put point in the column by which you want to sort the table (in the body of the table, not in the header) and say M-x org-sort RET n (I assume you want numeric sorting, but org-sort provides several kinds). org-sort is normally bound to C-c ^ too, so C-c ^ n should be all that's needed. -- Nick -- Nick -- Nick
Re: [O] [BUG] `org-agenda-sorting-strategy' does not work in `tags-todo'
Hi Bastien, Sebastien Vauban writes: Though the deadline-up sorting does not work, as demo'ed in the previous post. Can you point at that post again? Here is the original post about the deadline-up sorting: http://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg00518.html Also, the example in your previous email is quite complex. If something does not work in `org-agenda-sorting-strategy' can you make the example minimal, with no special config or skip functions? Simply eval this minimalistic custom command: --8---cut here---start-8--- (add-to-list 'org-agenda-custom-commands '(B Today tags-todo DEADLINE=\today\ ((org-agenda-overriding-header Today) (org-agenda-sorting-strategy '(deadline-up t) --8---cut here---end---8--- and then use `C-c a B' on your own Org agenda files. If you use the followup mode, you'll see that entries are sorted by category, instead of being sorted by deadline date... I'd like to fix any problem in this area before 8.2.3, which will go into Emacs 24.4. That'd be pretty cool, indeed. Best regards, Seb -- Sebastien Vauban
[O] in-buffer settings, tags, org-element, org-id. . .
. . . I'm getting confused about how to use these features. Sometimes, by chance, I'll find an example/use. but often as not I'm looking at a raw reference dump with no clue how to use (best practices) these features. For example, org-id has http://orgmode.org/worg/org-api/org-id-api.html but no real explanation on what it is or how to use it. Googling doesn't bring anything either. in-buffer settings ( http://orgmode.org/manual/In_002dbuffer-settings.html#In_002dbuffer-settings) is fairly cryptic for me too. Sometimes I can figure out what's going on, but I'm far from having a best use understanding. For example, I can look at the source for at WORG page ( http://orgmode.org/worg/worg-setup.org.html) and see: #+STARTUP:align fold nodlcheck hidestars oddeven lognotestate #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@) #+TAGS: Write(w) Update(u) Fix(f) Check(c) #+TITLE: Worg setup on the http://orgmode.org server #+AUTHOR: Worg people #+EMAIL: mdl AT imapmail DOT org #+LANGUAGE: en #+PRIORITIES: A C B #+CATEGORY: worg #+OPTIONS:H:3 num:nil toc:nil \n:nil ::t |:t ^:t -:t f:t *:t tex:t d:(HIDE) tags:not-in-toc I can then sift through the reference in-buffer settings, but I'm not much wiser on the whytofors. Has anybody, tutorial-wise, really sorted these concepts out properly? One task I'd like to have is the ability to embed keywords throughout an org file so that a parser can find and grab these sections. I'm assailed with seemingly many ways: PROPERTIES, org-element, org-id, tags -- most/all of which I have only the dimmest grasp. Thanks, LB
Re: [O] in-buffer settings, tags, org-element, org-id. . .
Lawrence Bottorff borg...@gmail.com writes: One task I'd like to have is the ability to embed keywords throughout an org file so that a parser can find and grab these sections. I'm assailed with seemingly many ways: PROPERTIES, org-element, org-id, tags -- most/all of which I have only the dimmest grasp. tags properties are standard for this I would say ... -- cheers, Thorsten
Re: [O] Propagating Workflow States
Bastien b...@gnu.org writes: I guess you meant C-S-RET, bound to `org-insert-todo-heading' not C-RET, boud to `org-insert-heading'. Sorry, what I meant was M-RET. Actually M-RET and M-S-RET returns the same when I do M-x describe-key: C-M-j runs the command org-insert-todo-heading, which is an interactive compiled Lisp function in `org.el'. Any way to disable this?; it should start with TODO. Just use C-RET or track what's wrong in your config. Hmm, yeah, easier said than done;). I do M-S-RET below this line: *** MAIL foo .. and I get *** MAIL , instead of: *** TODO , but if I do M-S-RET below a TOTO heading, I get a TODO. So there's something that remembers the last state. Weird.. -- Esben Stien is b0ef@e s a http://www. s tn m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@n n
Re: [O] Propagating Workflow States
Nicolas Richard theonewiththeevill...@yahoo.fr writes: Any way to disable this?; it should start with TODO. If I'm reading the docstring correctly, try C-u C-S-RET C-S-RET returns: C-j runs the command org-return-indent, which is an interactive compiled Lisp function in `org.el'. -- Esben Stien is b0ef@e s a http://www. s tn m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@n n
Re: [O] Propagating Workflow States
Esben Stien b...@esben-stien.name writes: C-S-RET returns: C-j runs the command org-return-indent, which is an interactive compiled Lisp function in `org.el'. Ah you're using non-GUI emacs. That's ok, just use C-u (that is called a prefix argument) before whatever key chord you hit to do what you described. -- Nico.
[O] Generate a table of contents without exporting
Hi, I know you can generate a table of contents when exporting, but can you do it just within org? For context, I'm uploading an .org file to github and I don't need to export it to another format because github recognizes and displays it just fine. It's long so a ToC would be nice. Do I just have to write it myself?
[O] footnote for each section in html export
Hi all, Is there anyway to customize the html export so that the footnote of each headline is put at the end of the section instead of all at the end of the webpage? Thanks, Zhenjiang
Re: [O] Generate a table of contents without exporting
RG Williams rgwi...@gmail.com writes: Hi, I know you can generate a table of contents when exporting, but can you do it just within org? For context, I'm uploading an .org file to github and I don't need to export it to another format because github recognizes and displays it just fine. It's long so a ToC would be nice. Do I just have to write it myself? Calling ,-- | M-x org-org-export-as-org `-- on this org buffer #+begin_src org #+OPTIONS: toc:2 * A ** A1 ** A2 * B ** B1 ** B2 #+end_src yields this ,- | # Created 2014-04-01 Di 00:28 | #+TITLE: tmp7 | #+AUTHOR: Thorsten Jolitz | #+OPTIONS: toc:2 | | * A | ** A1 | ** A2 | | * B | ** B1 | ** B2 | | # Emacs 24.3.1 (Org mode 8.2.5h) `- so unfortunately exporting with toc does not seem to be implemented in ox-org.el, but maybe you'll get better advice. -- cheers, Thorsten
Re: [O] How to get rid of clocktable summary time in the form 2d 02:00
Am 31.03.2014 07:50, schrieb Bastien: Hi buddy, Buddy Butterfly buddy.butter...@web.de writes: I would like to have the summary times in a clocktable be displayed only in hours, like 48:00 instead of 2d. Or, is it possible to define that 1d corresponds to 8:00 as a working day? So in the above example I would rather like to see 5d (workingdays) corresponding to 40:00. Clocktable counts 1d as 24h (which is right ;-) but not in business. See `org-time-clocksum-use-effort-durations' and `org-effort-durations' for a start. Tried to set org-time-clocksum-use-effort-durations to on but no luck! Any other hints? HTH,
Re: [O] How to get rid of clocktable summary time in the form 2d 02:00
Am 31.03.2014 10:46, schrieb Sebastien Vauban: Bastien wrote: Buddy Butterfly buddy.butter...@web.de writes: I would like to have the summary times in a clocktable be displayed only in hours, like 48:00 instead of 2d. Or, is it possible to define that 1d corresponds to 8:00 as a working day? So in the above example I would rather like to see 5d (workingdays) corresponding to 40:00. Clocktable counts 1d as 24h (which is right ;-) but not in business. See `org-time-clocksum-use-effort-durations' and `org-effort-durations' for a start. Eventually take a look at related posts: - Multiple notions for what's a day http://lists.gnu.org/archive/html/emacs-orgmode/2012-12/msg01093.html - Computations on efforts expressed in days http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00049.html It looks like this links are describing exactly the same issue. But I still have no clue how to change it. I upgraded to Kubuntu 13.10 from 12.10. This is where the change came in. Ubuntu 13.10 uses Emacs 24.3.1. Will it be fixed in a later version? Best regards, Seb
[O] Limits on capture mode?
I'm dusting off my org-mode set up from 3 years ago. One of the features I would like is the ability to capture information from web pages including URL. I've configured the org-protocol, activated the server, and created the bookmarklet. It seems to work with small amounts of text.. The problem is that there seems to be some undocumented (?) upper limit to the number of characters that can be copied. It looks like it might be around a 1000. When I try to send more than that, the process doesn't seem to happen (there's no indication that anything is happening). Is there some way to crank up the setting? A 1000 characters is not really enough. Thank you! Mark
Re: [O] Generate a table of contents without exporting
Thorsten Jolitz tjolitz at gmail.com writes: Calling ,-- | M-x org-org-export-as-org `-- ... so unfortunately exporting with toc does not seem to be implemented in ox-org.el, but maybe you'll get better advice. Thanks for trying! :) RD
[O] how to enter ==
If I enter code inline that has an == that is taken as an escape for code So how to enter '==' literally
Re: [O] how to enter ==
* One thing that may work: = ^H= ** In emacs that would be: = Cqh= ** In vi that would be = Cvh= *** i.e. you enter a Cntrl-h--the literal control character ^H--which is literally: BackSpace --this may not work in this case; but, it works in a lot of strange cases. * Could also make a variable: export EQUALS==; etc. On Mon, Mar 31, 2014 at 9:52 PM, Rustom Mody rustompm...@gmail.com wrote: If I enter code inline that has an == that is taken as an escape for code So how to enter '==' literally
[O] [PATCH] Noweb expansion doesn't duplicate prefix across lines
* lisp/ob-core.el (org-babel-expand-noweb-references): Change the the behavior of noweb expansion by replacing the prefix duplication with whitespace. Fix handling of multiple noweb references on the same line by using temporary buffer to replace noweb references in place instead of collecting the intervals between references and their expansion text into a variable. * doc/org.texi: Reflect the change by removing the section under subheading Noweb prefix lines. Tests pass and don't require actualization. --- doc/org.texi| 24 lisp/ob-core.el | 26 +++--- 2 files changed, 7 insertions(+), 43 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 9205abb..876f673 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -15042,30 +15042,6 @@ references will be removed when the code block is exported. expanded before the block is evaluated. @end itemize -@subsubheading Noweb prefix lines -Noweb insertions are now placed behind the line prefix of the -@code{reference}. -This behavior is illustrated in the following example. Because the -@code{example} noweb reference appears behind the SQL comment syntax, -each line of the expanded noweb reference will be commented. - -This code block: - -@example --- example -@end example - -expands to: - -@example --- this is the --- multi-line body of example -@end example - -Note that noweb replacement text that does not contain any newlines will not -be affected by this change, so it is still possible to use inline noweb -references. - @node noweb-ref @subsubsection @code{:noweb-ref} @cindex @code{:noweb-ref}, src header argument diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 0adfc33..1ae16d7 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2536,34 +2536,23 @@ block but are passed literally to the \example-block\. (comment (string= noweb (cdr (assoc :comments (nth 2 info) (rx-prefix (concat \\( org-babel-src-name-regexp \\| :noweb-ref[ \t]+ \\))) - (new-body ) - (nb-add (lambda (text) (setq new-body (concat new-body text (c-wrap (lambda (text) (with-temp-buffer (funcall (intern (concat lang -mode))) (comment-region (point) (progn (insert text) (point))) (org-babel-trim (buffer-string) - index source-name evaluate prefix) + source-name evaluate prefix) (with-temp-buffer (org-set-local 'org-babel-noweb-wrap-start ob-nww-start) (org-set-local 'org-babel-noweb-wrap-end ob-nww-end) (insert body) (goto-char (point-min)) - (setq index (point)) - (while (and (re-search-forward (org-babel-noweb-wrap) nil t)) + (while (re-search-forward (org-babel-noweb-wrap) nil t) + (goto-char (match-beginning 0)) (save-match-data (setf source-name (match-string 1))) (save-match-data (setq evaluate (string-match \(.*\) source-name))) - (save-match-data - (setq prefix - (buffer-substring (match-beginning 0) - (save-excursion -(beginning-of-line 1) (point) - ;; add interval to new-body (removing noweb reference) - (goto-char (match-beginning 0)) - (funcall nb-add (buffer-substring index (point))) - (goto-char (match-end 0)) - (setq index (point)) - (funcall - nb-add + (save-match-data (setq prefix (make-string (current-column) ?\s))) + (delete-region (point) (match-end 0)) + (insert (with-current-buffer parent-buffer (save-restriction (widen) @@ -2625,8 +2614,7 @@ block but are passed literally to the \example-block\. `org-babel-noweb-error-langs'))) ))) [\n\r]) (concat \n prefix)) - (funcall nb-add (buffer-substring index (point-max -new-body)) + (buffer-string (defun org-babel-script-escape (str optional force) Safely convert tables into elisp lists.
Re: [O] how to enter ==
On Tue, Apr 1, 2014 at 7:34 AM, briangpowell . briangpowel...@gmail.com wrote: * One thing that may work: = ^H= ** In emacs that would be: = Cqh= ** In vi that would be = Cvh= *** i.e. you enter a Cntrl-h--the literal control character ^H--which is literally: BackSpace --this may not work in this case; but, it works in a lot of strange cases. This doesn't work * Could also make a variable: export EQUALS==; etc. I dont understand -- are you recommending an org-macro?
Re: [O] Show Only Diary Entries in Agenda
khj I'd like to toggle (hide/show) the *non*-diary entries in the khj agenda view ... to basically get a quick view of my diary/calender. Sorry about replying to my own posting, but I just realized this can be done simply: * Move to a Diary entry in the Agenda display * Enter `' (org-agenda-filter-by-category) ... and just the Diary entries are displayed! Easy! -Kenneth -- Prof Kenneth H Jacker k...@cs.appstate.edu Computer Science Dept www.cs.appstate.edu/~khj Appalachian State Univ Boone, NC 28608 USA
Re: [O] how to enter ==
On Tue, Apr 1, 2014 at 8:01 AM, Rustom Mody rustompm...@gmail.com wrote: On Tue, Apr 1, 2014 at 7:34 AM, briangpowell . briangpowel...@gmail.com wrote: * One thing that may work: = ^H= ** In emacs that would be: = Cqh= ** In vi that would be = Cvh= *** i.e. you enter a Cntrl-h--the literal control character ^H--which is literally: BackSpace --this may not work in this case; but, it works in a lot of strange cases. This doesn't work * Could also make a variable: export EQUALS==; etc. I dont understand -- are you recommending an org-macro? For the time being I am getting along with == in place of == ie two side-by-side FULL WIDTH EQUALS SIGN Not very nice looking though...
[O] radio links should not match empty text
Hi, recently this syntax: started highlighting all spaces (spaces between words) as if they were links. I see them with a blue underline. I found this because I used some Unicode-art like where I certainly didn't mean to define a radio link. This happens since this change: #+BEGIN_QUOTE commit 1c1936fbb1f0c42e5c7e1d3c903626aa5993a357 Author: Nicolas Goaziou n.goaz...@gmail.com Date: Tue Mar 25 10:15:25 2014 +0100 Allow radio links after an apostrophe and mid-word * lisp/org.el (org-make-target-link-regexp): Allow radio links after an apostrophe and mid-word. Small refactoring. * testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test. See http://permalink.gmane.org/gmane.emacs.orgmode/84108. #+END_QUOTE Greetings, Daniel