Re: Search and replace excluding code blocks?

2024-01-30 Thread Berry, Charles
> On Jan 29, 2024, at 3:47 PM, Vikas Rawal wrote: > > Hi all, > > Is it possible to search and replace a regex/string in an org file excluding > the code blocks from its scope? > > Say, I want to replace all opening quotes (") by backticks(``) in the text > but not in the code blocks. Is

Re: Feature request: Allow export to convert broken links to plain text

2023-09-11 Thread Berry, Charles
Ryan, > On Sep 9, 2023, at 9:13 PM, Ryan C. Thompson wrote: > > So, this isn't an ideal solution, since it requires me to prefix any > potential offending links with "maybe:". But it's good enough for me. > It is good that you have a solution, albeit with the caveat you mention above. A

Re: [Pre-PATCH v2] Add the capability to specify lexical scope in tangled files (was: Add new :lexical header argument)

2023-07-15 Thread Berry, Charles
> On Jul 15, 2023, at 9:11 AM, Thomas S. Dye wrote: > > > Ihor Radchenko writes: > >> "Thomas S. Dye" writes: >> Am I correct that language-specific header arguments are not yet covered in the manual? I can't find any reference of "lexical" there. >>> >>> Yes, I believe so.

Re: Preserving leading zeros

2023-05-28 Thread Berry, Charles
William, Have you considered http://gewhere.github.io/org-bibtex ?? Or using the approach therein, viz. use properties to store bib data in org? HTH, Chuck > On May 28, 2023, at 7:46 AM, William Denton wrote: > > I'm thinking about moving a personal library catalogue system into Org. This

Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-29 Thread Berry, Charles
Bastien et al, > On Dec 29, 2022, at 8:00 AM, Bastien Guerry wrote: > > I think it would make sense to convert Elisp lists into R lists > directly. Jeremie, would you be okay with this? > Perhaps there are some hiccups. The R `data.frame' type is a list with some added attributes. In that

Re: [BUG] Header-args :results output of code block don't take precedence above headline header-args [9.6 (release_9.6-32-gc59d6d @ /tmp/org/org-mode/lisp/)]

2022-12-09 Thread Berry, Charles
Rens, This is not a bug. Seee below. > On Dec 7, 2022, at 9:47 AM, Rens Oliemans wrote: > > Hi all, > > A code block with ":results output" as header argument still has its > output silenced if it's inside a headline with ":results none". MWE: > > 1. Create an .org file with the following

Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-05 Thread Berry, Charles
Hi Greg, > On Dec 5, 2022, at 4:41 PM, Greg Minshall wrote: > > hi, Charles, > >> This makes a list like '("a" "b" "c") into a data.frame with one column. > > 1. which version of Org are you running? > : Org mode version 9.6 (9.6-g60de19 @ > /home/minshall/.emacs.d/straight/build/org/): >

Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-05 Thread Berry, Charles
> On Dec 4, 2022, at 6:43 PM, Greg Minshall wrote: > > i see this same behavior. to me, (org-babel-R-assign-elisp) seems to be > the problem, but it hasn't changed any time recently. (nor, if my =git > blame= is done correctly, has anything else in ob-R.el.) > > i don't understand how

Re: [BUG] ob-R: session evaluation returns empty ouputs with Org 9.6 [9.6 ( @ /home/fsantos/.emacs.d/elpa/org-9.6/)]

2022-12-01 Thread Berry, Charles
> On Nov 30, 2022, at 5:48 PM, Ihor Radchenko wrote: > > William Denton writes: > >> I tried that, but it didn't fix it. :( > > Ok. I was able to reproduce on my side. > >> With a minimal setup, running the R block with a :session makes it ask where >> the >> working directory should be

Re: substitutions in html export?

2022-07-18 Thread Berry, Charles
Kevin, > On Jul 17, 2022, at 1:54 PM, kevinbanjo wrote: > > When I look at the doc string for (org-macro-replace-all) it says: > > Optional argument KEYWORDS, when non-nil is a list of keywords, > as strings, where macro expansion is allowed. > > I tried passing it '("export-block") but it

Re: substitutions in html export?

2022-07-17 Thread Berry, Charles
Kevin, > On Jul 17, 2022, at 10:18 AM, kevinbanjo wrote: > > > > On Sun, Jul 17, 2022 at 7:24 AM Ihor Radchenko wrote: > See inline calls in > https://orgmode.org/manual/Evaluating-Code-Blocks.html#Evaluating-Code-Blocks > > I did this and it didn't work (but the one outside the export

Re: Bug: ob-R.el breaks when :session is specified

2022-05-15 Thread Berry, Charles
Um... > On May 15, 2022, at 2:46 AM, Christian Heinrich > wrote: > > I run > > emacs -q --load /tmp/init.el --file=/tmp/test.org > > with my /tmp/init.el being only > >> (require 'package) >> (package-initialize) >> (add-to-list 'load-path "~/.emacs.d/straight/repos/org/lisp/") >>

Re: How to export to markdown programmatically without the table of contents?

2022-05-01 Thread Berry, Charles
> On May 1, 2022, at 2:20 AM, Marcin Borkowski wrote: > > Hi fellow Orgers, > > I'd like to export a Org-mode formatted string to markdown, but without > the table of contents. > > (org-export-string-as my-string 'md t '(toc nil)) > > didn't work (the ToC was still there). What am I

Re: handling as special special block in derived export

2022-01-19 Thread Berry, Charles
Matt, > On Jan 19, 2022, at 5:52 AM, Matt Price wrote: > > However, I'd really like to add a less verbose syntax, like this: > > #+begin_r-stack :frag (appear appear) > [[imglink1]] > [[imglink2]] > #+end_r-stack > > My question is: will the exporter preserve information from these

Re: should a "wrapped" table result behave differently than one that is not?

2022-01-18 Thread Berry, Charles
Eric, > On Jan 18, 2022, at 9:05 AM, Eric S Fraga wrote: > > been wrapped in a RESULTS special block be different than one that is > not wrapped (beyond the wrapping, of course)? Specifically, wrapping > the results seems to cause org to ignore that ATTR_LATEX :center toggle > [1]. A minimal

Re: Way to mark contents of an Org special block as verbatim?

2022-01-09 Thread Berry, Charles
> On Jan 9, 2022, at 8:58 AM, Kaushal Modi wrote: > > How do we disable Org from transforming this: > >E = -J \sum_{i=1}^N s_i s_{i+1} > > to this: > > >E = -J i=1^N s\_i si+1 Ahh! Sorry! So, : (format "{{<%s>}}\n%s{{}}\n" type contents type) has the contents already

Re: Way to mark contents of an Org special block as verbatim?

2022-01-08 Thread Berry, Charles
> On Jan 8, 2022, at 3:29 PM, Kaushal Modi wrote: > >> What am I missing? >> >> It seems like you want your derived backend to transcode special blocks >> somewhat differently than the parent backend. And adding a special block >> export filter doesn't quite do the job. > > I tried out

Re: Way to mark contents of an Org special block as verbatim?

2022-01-08 Thread Berry, Charles
> On Jan 6, 2022, at 11:46 AM, Kaushal Modi wrote: > > On Thu, Jan 6, 2022 at 2:33 PM Juan Manuel Macías > wrote: >> I just realized that there is a much simpler solution for your katex >> environment :-) >> >> You can use an example block, and define your custom environment using >> the

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-31 Thread Berry, Charles
Max, > On Dec 31, 2021, at 4:05 AM, Max Nikulin wrote: > > > Should some function a macro be provided to facilitate declaring languages as > data format (config files, JSON, YAML, etc.) rather than executable source > code? I think we already have this in the form of export blocks, viz.

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-30 Thread Berry, Charles
Rudy, > On Dec 29, 2021, at 11:26 PM, Rudolf Adamkovič wrote: > > (Note: I do not know what ECM stands for.) ECM stands for =Exemple Complet Minimal=, per https://orgmode.org/worg/org-faq.html#ecm, which says "The term refers to test files that can reliably reproduce a bug with the minimal

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-29 Thread Berry, Charles
Max, > On Dec 29, 2021, at 4:53 AM, Max Nikulin wrote: > > On 25/12/2021 02:52, Berry, Charles wrote: >> For that case, setting buffer or heading properties, such as: >> #+begin_src org >> :PROPERTIES: >> :header-args: :eval yes :exports results >>

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-25 Thread Berry, Charles
Rudy, Thanks for the comment, but ... > On Dec 25, 2021, at 1:37 PM, Rudolf Adamkovič wrote: > > I think we look at the problem from two different perspectives. You > look at the problem from the "how" perspective, whereas I look at it > from the "why" perspective. Sure, we can work around

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-24 Thread Berry, Charles
> On Dec 23, 2021, at 8:09 PM, Ihor Radchenko wrote: > > Rudolf Adamkovič writes: > >>> So, Org cannot distinguish between language backends that are simply >>> not loaded and the ones that do not define org-babel-execute:lang. >> >> Oh, if we have this architectural limitation in place,

Re: exporter: How to get :file property on a src block in an exporter

2021-12-22 Thread Berry, Charles
> On Dec 22, 2021, at 2:16 PM, Yasushi SHOJI wrote: > > Hi, > > On Thu, Dec 23, 2021 at 3:22 AM Berry, Charles > wrote: >>> On Dec 22, 2021, at 8:07 AM, Yasushi SHOJI wrote: >>> On Thu, Dec 23, 2021 at 12:52 AM Yasushi SHOJI >>> wrote:

Re: exporter: How to get :file property on a src block in an exporter

2021-12-22 Thread Berry, Charles
> On Dec 22, 2021, at 8:07 AM, Yasushi SHOJI wrote: > > On Thu, Dec 23, 2021 at 12:52 AM Yasushi SHOJI > wrote: >> Then, why don't I have :file in the info? > > The :exports must be "file" to have the file name in the info. I used > to have "code" because > I wanted to export code with

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-21 Thread Berry, Charles
> On Dec 21, 2021, at 2:53 PM, Rudolf Adamkovič wrote: > > I struggle to understand. Why do we need a customization? If Org knows > that some backend exists but has no execute function, why does it even > try to execute it? It cannot. Do I miss something? Sorry if my prior posts were

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-18 Thread Berry, Charles
> On Dec 18, 2021, at 11:57 AM, Charles Berry wrote: > > There are workable approaches under the current setup. > > - Also, when exporting it looks `org-babel-exp-results' does not attempt to run src blocks for which (fboundp (intern (concat "org-babel-execute:" lang))) is nil. So

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-18 Thread Berry, Charles
> On Dec 18, 2021, at 1:49 AM, Ihor Radchenko wrote: > > "Berry, Charles" writes: > >> If I have a typo in the name of a language, the error message you quote >> tells me what my mistake was. >> >> I'd say that is a feature, not a bug.

bug#52545: 29.0.50; Make org-babel-execute-buffer ignore irrelevant src blocks

2021-12-17 Thread Berry, Charles
> On Dec 16, 2021, at 8:51 PM, Kyle Meyer wrote: > > Rudolf Adamkovič: > >> I have a .org file with two kinds of src blocks: >> >> 1. sqlite blocks >> 2. bibtex blocks >> >> I want to execute all sqlite blocks with org-babel-execute-buffer. >> >> When I try to do so, org-mode complains: >>

Re: reference a remote named block in #+CALL: line

2021-11-02 Thread Berry, Charles
Matt, > On Nov 2, 2021, at 3:19 AM, Matt Price wrote: > > I am getting used to calling library-of-babel functions with local data > structures as input variables, e.g. in this line: > > #+CALL: list2table(data=common-issues-list, order="rows") :results table > raw > > where

Re: [PATCH] async process in R

2021-09-28 Thread Berry, Charles
Jeremie, > On Sep 28, 2021, at 12:34 AM, Jeremie Juste wrote: > > Thanks for the feedback. With the following patch, I made sure that > ess-inject-source is set to default before evaluating the buffer. > > So even if I set > (setq ess-inject-source 'function-and-buffer), I get the following >

Re: [PATCH] async process in R

2021-09-27 Thread Berry, Charles
Jeremie, > On Sep 27, 2021, at 3:56 PM, Berry, Charles wrote: > > There is something in my init that doesn't play nice with this. (setq ess-inject-source nil) seems to be the culprit. Also note, even with ess-inject-source set to t, there is an indentation issue: #+be

Re: [PATCH] async process in R

2021-09-27 Thread Berry, Charles
; It may take me a while to figure out what it is. :-( HTH, Chuck > On Sep 27, 2021, at 1:28 PM, Jeremie Juste wrote: > > Hello Chuck, > > On Monday, 27 Sep 2021 at 18:28, Berry, Charles wrote: >> >> It looks like you have `(setq ess-eval-visibly t)' here. I

Re: [PATCH] async process in R

2021-09-27 Thread Berry, Charles
Jeremie, > On Sep 26, 2021, at 10:13 AM, Jeremie Juste wrote: > > But for the time being result output produces the following output. > > #+begin_src R :session *R* :results output :async > Sys.sleep(1) > print(1:5) > #+end_src > > #+RESULTS: > : > Sys.sleep(1) > : > print(1:5) > : [1] 1 2 3

Re: Org babel source blocks ignore buffer-local variables

2021-09-06 Thread Berry, Charles
> On Sep 6, 2021, at 1:53 AM, Dominik Schrempf > wrote: > > Thank you, this solution works. May I ask about the reasons of such a > distinction? [i.e. between exec-path and (getenv "PATH")] Well, this is how `shell' and `shell-command-on-region' both do it, and they seem to be the

Re: Org babel source blocks ignore buffer-local variables

2021-09-04 Thread Berry, Charles
> On Sep 4, 2021, at 5:30 AM, Dominik Schrempf > wrote: > > Hello, > > I use directory local environments with =envrc= [1], and run into trouble when > using (Bash) Org Babel source code blocks. The buffer local environment seems > to > be ignored (see the example at the bottom). > > This

Re: Number format for table results outut from R data.frame/tibble

2021-08-21 Thread Berry, Charles
> On Aug 21, 2021, at 9:58 AM, John Hendy wrote: > > > Interesting, and thanks for taking a look. I don't think I specified > sufficiently that I'm actually aiming for latex/pdf output and > therefore want the org table. John, If you want a latex export, you should use one of the many R

Re: Bug: :session results in unfriendly error reporting

2021-08-16 Thread Berry, Charles
James, > On Aug 15, 2021, at 4:41 PM, James Powell wrote: > > I write a deliberate syntax error into a code block: > > : #+begin_src R :session > : x <- 1 > : y xx z > : #+end_src > > I put my cursor in there and C-c C-c. > > What I expect: a gentle useful report about the error. Right.

Re: ob-R: Error about longer than max-lines even with :result silent

2021-08-15 Thread Berry, Charles
> On Aug 15, 2021, at 6:19 AM, Yasushi SHOJI wrote: > > Hello, > > It seems like the following ECM cause an error: > Error (org-babel): Error reading results: (user-error "Region is > longer than ‘org-table-convert-region-max-lines’ (999) lines; not > converting") > > I assumed that with

Re: bug: Error handling in source blocks.

2021-08-10 Thread Berry, Charles
> On Aug 9, 2021, at 9:13 PM, James Powell wrote: > > Error handling is important and hard to get right. Me, I prefer to > treat every warning as an error (-Werror in gcc, "options(warn=2)" in > R, etc). I want the system to grind to a halt at the least sign of > trouble. If the

Re: Number format for table results outut from R data.frame/tibble

2021-08-06 Thread Berry, Charles
John, > On Aug 6, 2021, at 8:38 AM, John Hendy wrote: > > Greetings, > > I'm wondering how to align the results from the R buffer (which I > like) vs. the results printed by Org-mode for table results. Here's a > toy example: > `tbl_df' objects come with their own print/show method. And it

Re: setting export options in headline properties

2021-07-21 Thread Berry, Charles
Matt, Check (info "(org) Export Settings") and especially, the para near bottom: When exporting sub-trees, special node properties can override the above keywords. These properties have an ‘EXPORT_’ prefix. For example, ‘DATE’ becomes, ‘EXPORT_DATE’ when used for a specific sub-tree. Except

Re: [PATCH] ob-R output file with graphics parameter

2021-07-10 Thread Berry, Charles
Jack, I will be going offline for a week or so, so I will have to defer more discussion. I know that `silent' silences an unwanted file link. And there are a few other ways to do this. So, if it is determined to proceed, adding an implicit `file' will not prohibit uses in which it was not

Re: A requires/provides approach to linking source code blocks

2021-07-09 Thread Berry, Charles
Tim, > On Jul 8, 2021, at 12:32 PM, Tim Cross wrote: > > My concern here is with the additional complexity. This is already a > somewhat complex aspect of org mode and the behaviour you describe can > effectively be done using noweb, although as you say, not as > declarative in style. This

Re: [PATCH] ob-R output file with graphics parameter

2021-07-06 Thread Berry, Charles
> On Jul 6, 2021, at 12:20 PM, Jack Kamm wrote: > > Hi Chuck, > >> Here is an ECM that when exported with `C-c C-e l o y y` (or 'yes RET' for >> each `y' depending on your setup) > > I don't see the example on your last email, could you try re-attaching > it? > > Thanks, > Jack Mea

Re: [PATCH] ob-R output file with graphics parameter

2021-07-06 Thread Berry, Charles
> On Jul 6, 2021, at 8:04 AM, Jack Kamm wrote: > > Hello again, > >>> A user might like to construct a figure consisting of various subfigures >>> such as in a subfloat environment. >>> >>> Will this be reasonably simple to accomplish if `:results graphics' (with >>> no `file' element)

Re: using previous =#+results= when =:eval never=

2021-07-04 Thread Berry, Charles
> On Jul 3, 2021, at 10:19 PM, Greg Minshall wrote: > > Chuck, > > thanks. (i'm not surprised at an e-lisp suggestion from you! :) > > i worry about accidental modification of the base case results during > the chaos of development. it occurs to me (reading through >

Re: using previous =#+results= when =:eval never=

2021-07-03 Thread Berry, Charles
> On Jul 3, 2021, at 9:35 AM, Greg Minshall wrote: > > hi. > > i am trying to simplify adding regression test cases to a program. > > to generate the base, "compared-to" results, i want to write some code > in a source block, then evaluate it, producing the "true" value. > > then, later

Re: [PATCH] ob-R output file with graphics parameter

2021-07-03 Thread Berry, Charles
Sorry if I have misunderstood the proposals here, but ... A user might like to construct a figure consisting of various subfigures such as in a subfloat environment. Will this be reasonably simple to accomplish if `:results graphics' (with no `file' element) automatically inserts a link?

Re: Passing a variable into an R source block.

2021-05-28 Thread Berry, Charles
> On May 28, 2021, at 8:52 AM, Roger Mason wrote: > > Hello, > > I have an SQL source block that returns this: > > #+RESULTS: query > > [snip] > I would like to pass this into R for further processing. At the moment > I have this: > > #+begin_src R :session :colnames yes :var

Re: when executing a src block with latex construct, display problem because of +

2021-05-15 Thread Berry, Charles
Uwe, You used `:exports code :eval never-export' (from an earlier posting). I think you want `:exports both :eval never-export' to keep babel from removing the results. HTH, Chuck > On May 15, 2021, at 1:18 PM, Uwe Brauer wrote: > > Chuck, >> Uwe, >> [snip] > > >> [screenshot deleted] >

Re: when executing a src block with latex construct, display problem because of +

2021-05-15 Thread Berry, Charles
Uwe, [snip] > On May 15, 2021, at 11:10 AM, Uwe Brauer wrote: > > Thanks, it did not help. To make this clear the problem occurs in the > result block, not in the source block. > > > > That is exported to > #+RESULTS: > \begin{align*} >

Re: when executing a src block with latex construct, display problem because of +

2021-05-15 Thread Berry, Charles
Uwe, > On May 15, 2021, at 6:31 AM, Uwe Brauer wrote: > > > Hi > > I have the following src block > > #+begin_src matlab :results output raw :exports code :eval never-export > addpath /home/oub/ALLES/HGs/Matlab-init/Statistic > sens=0.7; > spec=0.95; > aspec=1-spec; > prob=0.1; >

Re: displaying equations with ob-latex

2021-05-06 Thread Berry, Charles
controls size. I tried 2.0 and it seems like a good value for my screen. Best, Chuck >> Sent: Friday, May 07, 2021 at 1:36 PM >> From: "Berry, Charles" >> To: "michael-franz...@gmx.com" >> Cc: "Help Emacs Orgmode" >> Subject: Re: disp

Re: displaying equations with ob-latex

2021-05-06 Thread Berry, Charles
> On May 6, 2021, at 4:20 PM, michael-franz...@gmx.com wrote: > > After I do "C-c C-c", I just get a message saying "Code block evaluation > complete." > Are you doing this in a buffer that has ONLY the text between the `cut here' lines and exactly that? If not, please try it in such a

Re: displaying equations with ob-latex

2021-05-06 Thread Berry, Charles
> On May 6, 2021, at 3:08 PM, michael-franz...@gmx.com wrote: > > Did you manage to get the equations displayed, I have tried again and could > not do > it. It might be beneficial to give more details and some more examples on > what to do. > Yes, the one equation was displayed as a

Re: displaying equations with ob-latex

2021-05-06 Thread Berry, Charles
> On May 6, 2021, at 12:50 AM, michael-franz...@gmx.com wrote: > > > I am trying to use ob-latex but equations are not being displayed in emacs > when I try to execute with "C-c C-c". Right. This is because `:results latex replace' is the default for latex src blocks and the leads to

Re: Is it possible to #+include: src blocks and tangle them too?

2021-04-16 Thread Berry, Charles
Hi Greg, > On Apr 16, 2021, at 8:27 AM, Greg Minshall wrote: > > Rama, > > one other comment/suggestion. > >> I haven’t been able to fully work with Donald Knuth’s suggestion of >> writing a Literate Program directly in a tool like orgmode/noweb since >> it is a nuisance to keep having to

Re: [PATCH] Wrap LaTeX snippets in $$ with markdown export

2021-03-31 Thread Berry, Charles
> On Mar 31, 2021, at 9:41 AM, Timothy wrote: > > I anticipate that this change may be somewhat contentions because ox-md > explicitly follows only the original Markdown spec from 2003, however > I've thought this over and come to the conclusion that this change is > still in keeping with

Re: org-in-org

2021-03-08 Thread Berry, Charles
Greg, > On Mar 7, 2021, at 11:44 PM, Greg Minshall wrote: > > i guess when i used the term "recursive execute function" (i tend to > confuse "execute" and "export"), i was thinking of something like: when > i export an org file, and it runs into an org-in-org block to export, > then your code

Re: org-in-org

2021-03-07 Thread Berry, Charles
> On Mar 7, 2021, at 8:14 AM, Greg Minshall wrote: > > Charles, > > thanks. any thing you'd like to add to the R-via-ESS/org-mode > repository, that would be great. > > in general, afaik, the contents of org-in-org buffers export okay. at > least plain ones. would could like to have the

Re: org-in-org

2021-02-23 Thread Berry, Charles
Greg, See inline > On Feb 23, 2021, at 6:24 AM, Greg Minshall wrote: > > i have a question about org-in-org source blocks. i volunteered to help > in an effort to provide a tutorial of using the ESS (Emacs Speaks > Statistics) package for R, in particular, from org mode. > > i'd like to

Re: Org failing to format a link with verbatim text

2021-02-17 Thread Berry, Charles
> On Feb 17, 2021, at 4:25 PM, Okam wrote: > > > I have attached a minimum working example. The bad formatting also > occurs when just pasting the link. In the example, Org mode highlights > from beginning of the phrase "=verbatim text 1=" to the end of the > phrase "=verbatim text 3=" in

Re: Org failing to format a link with verbatim text

2021-02-16 Thread Berry, Charles
> On Feb 16, 2021, at 1:20 PM, Okam wrote: > > I am using the Emacs gccemacs branch with Org version "9.5-dev". > I have noticed that when I try to insert the stored link > > file:doc/loopy-doc.org::*Destructuring with =dash= > > and use the heading as the link description, that Org

Re: [question] lisp code in :results header arg.?

2021-02-16 Thread Berry, Charles
> On Feb 16, 2021, at 8:30 AM, Juan Manuel Macías > wrote: > > Hi, > > I'm exploring some ways to include a complex LaTeX preamble using source > blocks. Consider this (code at the end of this message), that works fine. > > My question is: In order to do it all in a single block, would

Re: na=\"nil\" in ob-R.elo

2021-01-15 Thread Berry, Charles
> On Jan 14, 2021, at 3:42 PM, Brett Presnell wrote: > > > Probably a silly question, but in ob-R.el, what is the reason for > setting na=\"nil\" when defining org-babel-R-write-object-command? Is > this an elisp compatibility thing? > I don't get it either. The value corresponding to the

Re: did behaviour of RET change again?

2020-12-18 Thread Berry, Charles
> On Dec 18, 2020, at 5:06 AM, Eric S Fraga wrote: > > Just a quick heads-up: > > I have just installed org from git (a few hours ago) and now it seems > that RET no longer indents. Is this intentional? > > I know that there has been some discussion on the mailing list but I > seem to have

Re: How to preserve empty headings

2020-11-30 Thread Berry, Charles
> On Nov 30, 2020, at 11:25 AM, Diego Zamboni wrote: > > What are RET and C-j bound to? > > In my setup, RET is bound to =org-return=, which does not delete spaces, but > C-j is bound to =org-return-and-maybe-indent=, which does. So I have the > opposite behavior as yours. > Probably

Re: How to preserve empty headings

2020-11-30 Thread Berry, Charles
> On Nov 30, 2020, at 9:21 AM, Titus von der Malsburg > wrote: > > > When I start a new line with '* ' followed by RET, the space is automatically > deleted and I’m left with a line that just has the asterisk (i.e. not a > headline). > > Unfortunately there are use cases where empty

Re: Bring up a screen giving option to open a series of orgmode files

2020-11-22 Thread Berry, Charles
> On Nov 22, 2020, at 11:03 AM, Gerardo Moro wrote: > > > M-x find-dired RET Documents/Org/ RET -iname "*.org" RET > > Once I press "RET", what does -iname mean? I am new in Emacs. You mean, this > is just using find-dired to browse the org files? > See (info "(emacs) Dired and Find")

Re: Bring up a screen giving option to open a series of orgmode files

2020-11-22 Thread Berry, Charles
> On Nov 22, 2020, at 2:09 AM, Jean Louis wrote: > > * Gerardo Moro [2020-11-22 13:02]: >> Basically that :) >> I'm looking for some setup that allows me to open a menu with a list of >> files and shortcut access keys to open them. >> >> Probably somebody has done this before. > > Let me

Re: Using a code block as input to another code block

2020-11-22 Thread Berry, Charles
Inline. > On Nov 21, 2020, at 2:30 PM, Magnus Therning wrote: > > I know I can use an example block (literal example) as input to a code > block, but I haven't found a way to fontify examples. Since my input is > code (JSON, and various programming languages) I would really like to > have that,

Re: How to wrap Org code generated by a source block?

2020-11-10 Thread Berry, Charles
> On Nov 10, 2020, at 10:10 AM, Diego Zamboni wrote: > > I tried also with =:wrap src org=, but then upon export it's exported > literally as Org src code, instead of interpreted as such. The drawer was > exactly what I needed, and allows reevaluation of the block, replacing all > the

Re: How to wrap Org code generated by a source block?

2020-11-10 Thread Berry, Charles
> On Nov 10, 2020, at 6:13 AM, Diego Zamboni wrote: > > I want to generate some parts of my document programmatically from an > emacs-lisp src block - i.e. the code produces Org markup which I want to then > export. Is there a way to wrap the #+RESULTS block in an environment that > still

Re: Confusion about org-confirm-babel-evaluate's behavior while exporting lob calls

2020-10-29 Thread Berry, Charles
Just on a whim, I changed `org-babel-exp-results' by deleting (let (org-confirm-babel-evaluate-NOT) and the matching right parenthesis. Now I get a single prompt to confirm evaluation using Ruiyang's ECM. HTH, Chuck > On Oct 28, 2020, at 8:16 PM, Kyle Meyer wrote: > > 吴锐扬 writes: > >>

Re: Confusion about org-confirm-babel-evaluate's behavior while exporting lob calls

2020-10-28 Thread Berry, Charles
FWIW, it doesn't seem like an accident. You might ping the author of this commit: $ git log -S "(let (org-confirm-babel-evaluate)" commit 56bf3d789146fcd3c9f82d875de28c394fe593a0 Author: Achim Gratz Date: Wed Apr 10 20:28:31 2013 +0200 Babel: avoid superfluous confirmation for internal

Re: Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)]

2020-09-29 Thread Berry, Charles
See below. > On Sep 29, 2020, at 11:53 AM, Richard Lawrence wrote: > > "Berry, Charles" writes: > >> The case Gutin describes conforms to the documentation, viz. `$x\beta$-` >> should produce math mode LaTeX as I read the next paragraph. >&g

Re: Bug: Math mode doesn't work if followed by a dash [9.4 (nil @ /home/gutin/.emacs.d/.local/straight/build/org-mode/)]

2020-09-29 Thread Berry, Charles
See below. > On Sep 28, 2020, at 11:42 AM, Richard Lawrence wrote: > > Hi Gutin, > > gutin writes: > >> What I meant is that if you type >> >> $*$-algebra >> >> and hit C-c C-x C-l, then the "$*$" doesn't get replaced with a >> mathematical image. A similar problem happens when you export

Re: Help debugging R source code block output problem with :session

2020-09-08 Thread Berry, Charles
Jack, Maybe I am confused here: > On Sep 8, 2020, at 7:51 AM, Jack Kamm wrote: > > Yes, if we did that then tmp-file would have a prefix like > "/scp:user@hostname:", and elisp would then know to read the result file > from the remote host. > > Before pasting tmp-file into R code, we should

Re: Help debugging R source code block output problem with :session

2020-09-07 Thread Berry, Charles
Jack, > On Sep 7, 2020, at 6:06 PM, Jack Kamm wrote: > > Hi Chuck, > >> I can confirm that this works on my setup in each of the scenarios in which >> `default-directory' got set correctly in the session buffer. >> >> At some point, my default-directory got reset to drop the tramp prefix >>

Re: Help debugging R source code block output problem with :session

2020-09-07 Thread Berry, Charles
Jack, I can confirm that this works on my setup in each of the scenarios in which `default-directory' got set correctly in the session buffer. At some point, my default-directory got reset to drop the tramp prefix "/scp:/user@host:" in one session after faithfully running the src block

Re: Help debugging R source code block output problem with :session

2020-09-07 Thread Berry, Charles
Jack, This does not work for my remote session. I run from macOS locally and on a Linux host remotely. I use M-x shell RET R RET M-x ess-remote RET R RET to start the R session. The problem is that tempfiles on the remote host are like

Re: Bug: Babel+R handles spaces wrongly in tables [9.3.6 (release_9.3.6 @ /home/cassou/.emacs.d/lib/org/lisp/)]

2020-09-06 Thread Berry, Charles
> On Sep 6, 2020, at 4:32 AM, Damien Cassou wrote: > > > Hi, > > it seems that, if a cell within a table contains a space, the > corresponding value passed as parameter to a R script will be > wrong. Not exactly. Your ECM has one column, and using both columns removes the issue. Here is

Re: Bug: Source blocks before first ":tangle yes" are not tangled to file [9.4 (nil @ /Users/ezchi/.emacs.d/.local/straight/build/org-mode/)]

2020-09-03 Thread Berry, Charles
t to a file like this (with default ":tangle no"): > (org-babel-tangle nil "foo.el") > > I end up get 2 files: > foo.el: > (setq foo "hello") > > test_tangle.el: > (setq bar "world") > > Should I expect only: > foo.el: > (setq bar

Re: Bug: Source blocks before first ":tangle yes" are not tangled to file [9.4 (nil @ /Users/ezchi/.emacs.d/.local/straight/build/org-mode/)]

2020-09-03 Thread Berry, Charles
Not a bug. See inline. > On Sep 3, 2020, at 12:37 AM, Enze Chi wrote: > > > Remember to cover the basics, that is, what you expected to happen and > what in fact did happen. You don't know how to make a good report? See > > https://orgmode.org/manual/Feedback.html#Feedback > > Your

Re: Help debugging R source code block output problem with :session

2020-08-29 Thread Berry, Charles
This problem has been bugging people for years and previous attempts to solve it have always run up against creating more problems in the process of solving this one. This workaround gives the same results with or without `:session "NEW"' and same as OPs first src block: #+header: :prologue

Re: [PATCH] Add org-md-src-block for src-block formater

2020-08-27 Thread Berry, Charles
You might want to browse the ox-ravel repository[1]. It provides a collection of exporters that support reformatting src blocks and inline src blocks for a variety of output formats (including markdown). Basically, it will produce a derived backend that adds source block reformatting to

Re: Can you automatically noweb include?

2020-08-07 Thread Berry, Charles
ing C-c C-v C-b or C-c C-v C-s to evaluate and I get >> >> "Code block produced no output." in the mini-buffer. >> >> >> If I use C-c C-c directly on the code block itself I get: >> >> Traceback (most recent call last): >> File "", line 1,

Re: Can you automatically noweb include?

2020-08-07 Thread Berry, Charles
> On Aug 7, 2020, at 8:39 AM, William McCoy wrote: > > This use of :prologue appeared to me to be very useful. But for some reason > when I try it out it does not work for me. I just get a message that the > code block produced no output and that 'np' is not defined. Just to check, >

Re: Macro replacement inside +attr_latex line

2020-08-06 Thread Berry, Charles
> On Aug 4, 2020, at 6:17 AM, Vikas Rawal wrote: > > Found the answer in the mailing list archives > (https://lists.gnu.org/archive/html/emacs-orgmode/2013-09/msg00234.html). > Not allowed. > But, ... #+macro: attr_latex #+attr_latex: $1 * abc {{{attr_latex(:width 10)}}}

Re: org-sbe and code blocks in a different files

2020-07-09 Thread Berry, Charles
> On Jul 9, 2020, at 12:09 AM, Michael Welle wrote: > > Hi Douglas, > > Douglas Perrin writes: > >> Hi Michael, >> Maybe I am not understanding what you want to do but I use >> org-babel-lob-ingest/org-sbe to execute blocks from other files on >> start-up like this: >> # Local Variables:

Re: [BUG] recently commits on master branch breaks command 'org-babel-demarcate-block'

2020-05-30 Thread Berry, Charles
> On May 29, 2020, at 7:03 PM, stardiviner wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > > When I have a source block (The "|" represents the point): > > #+begin_src sh :eval no > chrome --remote-debugging-port > | > > #+end_src > > Then press =[C-c C-v d]=, it becomes

Re: Tricking org-mode into using markdown conventions

2020-05-05 Thread Berry, Charles
> On May 5, 2020, at 1:46 AM, Ihor Radchenko wrote: > >> I am assuming though, from the lack of answers back, that there appears to >> be no way to have org-mode grok markdown code blocks (triple backticks) >> when it parses as a substitute for `#+BEGIN_SRC` ? > > #+BEGIN_SRC is a part of org

Re: Self-sufficient Org file with customised export? :eval-when?

2020-05-01 Thread Berry, Charles
> On Apr 30, 2020, at 11:55 AM, akater wrote: > [deleted - discussion of html export] > - > > > If I may prematurely offer my vision: Common Lisp has special operator > eval-when which specifies when the enclosed code is to be evaluated (or > compiled). Example: > > (eval-when

Re: How to add new type of block to a derived back-end?

2020-04-10 Thread Berry, Charles
Salomon, see inline comments below. HTH, Chuck > On Apr 10, 2020, at 7:56 AM, Salomon Turgman wrote: > > Hello all, > > Thanks in advance for any hints you can provide for this. I am trying to > create a derived back-end that handles a new type of block in org-mode. I am > trying to

Re: R session and plotting in x11 window

2020-04-07 Thread Berry, Charles
ample C-c ' C-n RET C-n C-n #+end_example I end up with the same output as above in my *R* session buffer. A new graphics device is opened and the plot appears in it. Best, Chuck > On Apr 6, 2020, at 6:26 PM, Matt Price wrote: > > > > On Sun, Apr 5, 2020 at 1:19 PM Berry

Re: tangling from multiple files

2020-04-05 Thread Berry, Charles
> On Apr 4, 2020, at 11:08 AM, David Bremner wrote: > > "Berry, Charles" writes: > >> Oops. Correction below. >> >>> On Mar 18, 2020, at 7:38 PM, Berry, Charles wrote: >>> >>> >>> Right. It does not work d

Re: R session and plotting in x11 window

2020-04-05 Thread Berry, Charles
> On Apr 4, 2020, at 4:27 PM, Matt Price wrote: > > Does anyone know much about the difference between an R session opened by > typing M-x R, and the R session opened by org-babel? Short answer: almost none. Long answer: what `org-babel-R-initite-session' and friends do. > > I'm just

Re: rmarkdown-like production of multiple plots in org

2020-04-02 Thread Berry, Charles
> On Mar 31, 2020, at 12:23 PM, Matt Price wrote: > > I'm completely new to R. > > I've started working with a project that creates plots using the ggplot > package -- so by default it creates grid objects, rather than writing to > files. > > In rmarkdown/rstudio, I can write something

Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block

2020-03-30 Thread Berry, Charles
> On Mar 30, 2020, at 3:23 PM, Joost Kremers wrote: > [stuff deleted] > > If I reverse the order and add a `+` sign, like so: > > ``` > :PROPERTIES: > :header-args:python+: :session py1 :results function > :header-args:python+: :tangle out1.py > :END: > ``` > > the code does indeed get

  1   2   3   >