[PATCH] ob-plantuml: Allow setting PlantUML args for jar file
Dejan Josifović writes: > Using PlantUML from jar (org-plantuml-jar-path variable) and latest > org-mode, I wanted to render a diagram containing some Unicode > characters (such as '⊥' and '∀'), but the end image had some gibberish > instead. However, > trying this from a standalone file using plantuml-mode[1], the end image > rendered correctly. Here is some sample code which can reproduce the issue: > > #+BEGIN_SRC plantuml :file ./test.png > A -> B: ∀ characters display correctly is ⊥ > #+END_SRC FYI, I am unable to reproduce it on my system. > Comparing ob-plantuml.el and plantuml-mode.el files I found what is the > problem. plantuml-mode has a customizable variable for specifying > arguments when using PlantUML from jar (plantuml-jar-args (list > "-charset" "UTF-8" ). The charset arguments is what is needed for > the images to render correctly (I confirmed it by implementing it locally). > > I was wondering why such variable doesn't exist in ob-plantuml. I have > searched the mailing list archives, confirmed bugs and help page and > couldn't find anything related. Even though I was unable to reproduce your problem (most likely because my system is different), it sounds like a good idea to allow users to customise jar args as well. Then, users might do something like (setq org-plantuml-jar-path "/usr/share/plantuml/lib/plantuml.jar") (setq org-plantuml-args (list "-headless" "-theme" "aws-orange")) and set a global PlantUML theme. See the attached patch. It appears that we can simply carry over the executable args to jar (but please test it on other systems!) Best, Ihor >From 87accd87fa189198e69632da6081f60bc247ad94 Mon Sep 17 00:00:00 2001 Message-Id: <87accd87fa189198e69632da6081f60bc247ad94.1642227388.git.yanta...@gmail.com> From: Ihor Radchenko Date: Sat, 15 Jan 2022 14:14:36 +0800 Subject: [PATCH] ob-plantuml: Allow setting PlantUML args for jar file * lisp/ob-plantuml.el (org-plantuml-args): Rename `org-plantuml-executable-args' to `org-plantuml-args'. (org-babel-execute:plantuml): Use `org-plantuml-args' when calling jar. * lisp/org-compat.el (org-plantuml-executable-args): Obsolete old variable name. * etc/ORG-NEWS (=org-plantump-executable-args= is renamed and applies to jar as well): Document change. --- etc/ORG-NEWS| 6 ++ lisp/ob-plantuml.el | 15 --- lisp/org-compat.el | 3 +++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 335db4139..d311d495c 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -98,6 +98,12 @@ argument. ~org-get-tags~ now accepts Org element or buffer position as first argument. +** Removed or renamed functions and variables +*** =org-plantump-executable-args= is renamed and applies to jar as well + +The new variable name is =org-plantump-args=. It now applies to both +jar PlantUML file and executable. + ** Miscellaneous *** Styles are customizable in ~biblatex~ citation processor diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el index d237b0fe3..ddc2ff3dc 100644 --- a/lisp/ob-plantuml.el +++ b/lisp/ob-plantuml.el @@ -65,8 +65,8 @@ (defcustom org-plantuml-executable-path "plantuml" :package-version '(Org . "9.4") :type 'string) -(defcustom org-plantuml-executable-args (list "-headless") - "The arguments passed to plantuml executable when executing PlantUML." +(defcustom org-plantuml-args (list "-headless") + "The arguments passed to plantuml when executing PlantUML." :group 'org-babel :package-version '(Org . "9.4") :type '(repeat string)) @@ -116,15 +116,16 @@ (defun org-babel-execute:plantuml (body params) (java (or (cdr (assq :java params)) "")) (executable (cond ((eq org-plantuml-exec-mode 'plantuml) org-plantuml-executable-path) (t "java"))) - (executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) org-plantuml-executable-args) + (executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) org-plantuml-args) ((string= "" org-plantuml-jar-path) (error "`org-plantuml-jar-path' is not set")) ((not (file-exists-p org-plantuml-jar-path)) (error "Could not find plantuml.jar at %s" org-plantuml-jar-path)) -(t (list java - "-Djava.awt.headless=true" - "-jar" - (shell-quote-argument (expand-file-name org-plantuml-jar-path)) +(t `(,java + "-Djava.awt.headless=true" + "-jar" + ,(shell-quote-argument (expand-file-name org-plantuml-jar-path)) + ,@org-plantuml-args (full-body (org-babel-plantuml-make-body body params)) (cmd (mapconcat #'identity (append diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 14f6bc8dc..1d6c35e9a 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -351,6 +351,9 @@ (make-obsolete 'org-attach-expand-link "No longer used" "9.4") (define-obsolete-function-alias 'org-file-url-p 'org-url-p "9.5") +(define-obsolete-variable-alias 'org-plantuml-executable-args 'org-plantuml
Re: [PATCH v2 0/3] ox-texinfo: Define definition commands using description lists
Hello Nicolas, Could you please have another look? Cheers, Jonas Jonas Bernoulli writes: > I think I have addressed all you feedback. > > The only difference when exporting org-manual.org is: > > -When typing text into a field, Org treats @kbd{DEL}, > +When typing text into a field, Org treats @kbd{@key{DEL}}, > > Jonas Bernoulli (3): > ox-texinfo: Add function for use by kbd macro > ox-texinfo: Optionally use @itemx for certain description list items > ox-texinfo: Define definition commands using description lists > > doc/doc-setup.org | 2 +- > doc/org-manual.org | 135 ++--- > lisp/ox-texinfo.el | 207 +++-- > 3 files changed, 327 insertions(+), 17 deletions(-) > > -- > 2.34.1
Re: Playing down the text in org-mode
fatiparty--- via "General discussions about Org-mode." writes: > Doing describe-face on the footnote I have "Background: unspecified" So org-footnote does not have a defined background, which is usual. You don't need to remove any background color. You should be seeing in your notes the background for 'default' face in that theme.
Playing down the text in org-mode
Jan 15, 2022, 10:23 by maciasch...@posteo.net: > fatiparty--- via "General discussions about Org-mode." writes: > >> It is much better now. In Emacs, footnotes have a background color. I >> still >> can see the footnote background colour with ":background 'nil". >> > > What theme are you using? Usually, org-footnote does not have a defined > background. > I am using modus-themes dark theme > In any case, you can evaluate (describe-face default), and add the value > > of background in default to org-footnote. > Doing describe-face on the footnote I have "Background: unspecified"
Re: Playing down the text in org-mode
fatiparty--- via "General discussions about Org-mode." writes: > It is much better now. In Emacs, footnotes have a background color. I > still > can see the footnote background colour with ":background 'nil". What theme are you using? Usually, org-footnote does not have a defined background. In any case, you can evaluate (describe-face default), and add the value of background in default to org-footnote.
Playing down the text in org-mode
Jan 15, 2022, 09:16 by maciasch...@posteo.net: > fatipa...@tutanota.com writes: > >> That works well. But although I am atttempting to remove the >> background and change the foreground colour, the old colours remain. >> >> (with-eval-after-load 'org >> (set-face-attribute 'org-footnote nil >> :foreground "d2691e" :background 'nil :underline 'nil >> :weight 'normal :slant 'italic :height 0.8)) >> > > You are missing a "#" symbol in the color name: > > :foreground "#d2691e" > It is much better now. In Emacs, footnotes have a background color. I still can see the footnote background colour with ":background 'nil".
Re: Playing down the text in org-mode
fatiparty--- via "General discussions about Org-mode." writes: > Jan 15, 2022, 02:13 by e.fr...@ucl.ac.uk: > >> On Friday, 14 Jan 2022 at 14:44, fatipa...@tutanota.com wrote: >> >>> I would like to include the customisation using elisp code >>> >> >> Have a look at, for instance, >> >> ,[ C-h f set-face-foreground RET ] >> | set-face-foreground is an interactive native compiled Lisp function in >> | ‘faces.el’. >> | >> | (set-face-foreground FACE COLOR &optional FRAME) >> | >> | Change the foreground color of face FACE to COLOR (a string). >> | FRAME nil or not specified means change face on all frames. >> | COLOR can be a system-defined color name (see ‘list-colors-display’) >> | or a hex spec of the form #RRGGBB. >> | When called interactively, prompts for the face and color. >> | >> ` >> > What is the face name associated with inline footnotes? > You might find the command M-x list-faces-display useful as it will show you a list of the known faces with sample text using the attributes of each face. You can also use the interface to inspect the current values for a face and modify the face (via custom). For setting attributes using elisp, you might find the function set-face-attributes useful.
Re: Playing down the text in org-mode
fatipa...@tutanota.com writes: > That works well. But although I am atttempting to remove the > background and change the foreground colour, the old colours remain. > > (with-eval-after-load 'org > (set-face-attribute 'org-footnote nil > :foreground "d2691e" :background 'nil :underline 'nil > :weight 'normal :slant 'italic :height 0.8)) You are missing a "#" symbol in the color name: :foreground "#d2691e"
Playing down the text in org-mode
Jan 15, 2022, 08:41 by maciasch...@posteo.net: > fatipa...@tutanota.com writes: > >> But this is giving "error: Invalid face, org-footnote" >> > > Try this (I forgot to mention this, sorry): > > (with-eval-after-load 'org > (set-face-attribute 'org-footnote nil :foreground "d2691e" :height 0.8 > :extend t :underline "red")) > That works well. But although I am atttempting to remove the background and change the foreground colour, the old colours remain. (with-eval-after-load 'org (set-face-attribute 'org-footnote nil :foreground "d2691e" :background 'nil :underline 'nil :weight 'normal :slant 'italic :height 0.8))
Re: Playing down the text in org-mode
fatiparty--- via "General discussions about Org-mode." writes: > Is this requirement just associated with org-footnote, as it is not usual to > use "with-eval-after-load" > to apply customisations. It's a face defined by org, and org must be loaded before. You can also put before, simply, (require 'org) or (require 'org-faces).
Playing down the text in org-mode
Jan 15, 2022, 08:41 by maciasch...@posteo.net: > fatipa...@tutanota.com writes: > >> But this is giving "error: Invalid face, org-footnote" >> > > Try this (I forgot to mention this, sorry): > > (with-eval-after-load 'org > (set-face-attribute 'org-footnote nil :foreground "d2691e" :height 0.8 > :extend t :underline "red")) > Is this requirement just associated with org-footnote, as it is not usual to use "with-eval-after-load" to apply customisations.
Re: Playing down the text in org-mode
fatipa...@tutanota.com writes: > But this is giving "error: Invalid face, org-footnote" Try this (I forgot to mention this, sorry): (with-eval-after-load 'org (set-face-attribute 'org-footnote nil :foreground "d2691e" :height 0.8 :extend t :underline "red"))
Playing down the text in org-mode
Jan 15, 2022, 08:00 by maciasch...@posteo.net: > fatiparty--- via "General discussions about Org-mode." writes: > >> What is the face name associated with inline footnotes? >> > > M-x describe-face RET Is your friend. Place the cursor on any inline > note, run this command and you will see that the face you need to modify > is called `org-footnote'. > Very useful thing. > M-: (info "(elisp)faces") RET > > With this you have at your disposal all the information about faces, how > to manipulate them, etc. > > I use a lot the `set-face-attribute' function in my init, to modify some > things of the theme that I have loaded. For example, if you want to > change the color of your notes and make them a little smaller in size: > > (set-face-attribute 'org-footnote nil :foreground "DimGray" :height 0.9) > Have done (set-face-attribute 'org-footnote nil :foreground "d2691e" :height 0.8 :width :extended :weight :normal :underline "red") But this is giving "error: Invalid face, org-footnote" > Best regards, > > Juan Manuel >
Re: Playing down the text in org-mode
fatiparty--- via "General discussions about Org-mode." writes: > What is the face name associated with inline footnotes? M-x describe-face RET Is your friend. Place the cursor on any inline note, run this command and you will see that the face you need to modify is called `org-footnote'. M-: (info "(elisp)faces") RET With this you have at your disposal all the information about faces, how to manipulate them, etc. I use a lot the `set-face-attribute' function in my init, to modify some things of the theme that I have loaded. For example, if you want to change the color of your notes and make them a little smaller in size: (set-face-attribute 'org-footnote nil :foreground "DimGray" :height 0.9) Best regards, Juan Manuel
Re: Question Regarding Creating Workflow For Automatic Formulas For Finance Based Org Spreadsheet
El 2022-01-09 22:42, Samuel Banya escribió: > Ah, Ledger is way too complicated for what it's worth. I've seen > videos on YouTube about it, and every person who's praised it is > pretty much too smart enough to be able to explain it in simple terms. It is very easy. I made a video for EmacsConf 2019 https://emacsconf.org/2019/talks/12/ . I wish someone had showed me examples like these when I started with it. My fiancee is a preschool teacher (programming is not her area of expertize). But she quickly learned how to use it. She keeps about 3700 per year with 4500 lines. It takes her about 10 minutes per day. With that investment, she can even tell how much we have spent on apples or on all fruits (as detailed or general as she wants). On these two years, she has saved us about half our budget and has us living much better thanks to the knowledge of what we want to invest on. (We now do not think of how to spend money, but how to invest it. That changes the point view completely.) There are complicated reports as well as very simple ones that can be generated. And you can always customize them to the last bit. There is also a website http://plaintextaccounting.org . There is plenty of information there. You can also use org-babel to include formulas for Ledger reports. Just ask away! :-)
Playing down the text in org-mode
Jan 15, 2022, 02:13 by e.fr...@ucl.ac.uk: > On Friday, 14 Jan 2022 at 14:44, fatipa...@tutanota.com wrote: > >> I would like to include the customisation using elisp code >> > > Have a look at, for instance, > > ,[ C-h f set-face-foreground RET ] > | set-face-foreground is an interactive native compiled Lisp function in > | ‘faces.el’. > | > | (set-face-foreground FACE COLOR &optional FRAME) > | > | Change the foreground color of face FACE to COLOR (a string). > | FRAME nil or not specified means change face on all frames. > | COLOR can be a system-defined color name (see ‘list-colors-display’) > | or a hex spec of the form #RRGGBB. > | When called interactively, prompts for the face and color. > | > ` > What is the face name associated with inline footnotes? > and equivalent for background. I think there's a more general way of > setting all the properties but I don't know enough as I use the > customisation interface for these. > > -- > : Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50 >
Re: Playing down the text in org-mode
Dear all, I skimmed through most of the answers, so forgive me if the following has already been said. The question triggers an old LaTeX reflex; If the layout tweak or typography tune turns out to be very difficult to accomplish with LaTeX (including all the mainstream add-ons), then the reason could be that you ask for something which most typographers consider to be a really bad idea. Maybe I use these options incorrectly, but aren't plain parentheses, '()', and footnotes, the traditional means for adding stuff which the reader can skip? The usual recommendation is to avoid using these tools too much, since they distract. This said, I would like to mention some old-fashioned typography used in (a reprint of) the sixth edition of "Hydrodynamics" by sir Horace Lamb. Some stretches of the text in it are printed with smaller font size than the bulk. First I thought these stretches contained background information, elaborations on nitty gritty details, or something of this kind. As this theory wasn't supported by the contents of these harder to read sections, I struggled to come up with a good explanation. My current guess is that this book was produced so long ago that the publisher and author could not afford the luxury of producing new page breaks for the later editions of the book. In order to fit longer explanations into the narrative, the text just had to shrink a bit. The first edition was published 1879, the sixth 1932, and Knuth was born 5 years later. Another unusual feature is that the book makes do without figure and table numbers and captions. Each table and figure has been placed "in context", and you will just have to read the text to learn about them. Cheers Rasmus
Re: What determines if R source block output is wrapped in begin_example or not?
Eric S Fraga writes: > One technique I do use is "Info-index" in the manual (bound to i in > Info-mode by default) although not everything is indexed. Another technique is M-x customize-group org Also, helm-info is often more handy - it provides full text search through the manual. Best, Ihor
Re: [bug] serious problem retrieving data from table for gnuplot
On Friday, 14 Jan 2022 at 22:01, Ihor Radchenko wrote: > Ouch. Sorry for this. This was introduced by fixing another bug. > Should be fixed on main now. Thank you for such a quick response and no worries! Yes, it seems to work now. -- : Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50
Re: Feedback on Emacs-Jupyter
Nathaniel Nicandro writes: > I would be happy to contribute the Org related parts of emacs-jupyter to > Org core. I think that would mainly mean the ob-jupyter.el file that is > similar to the other ob-*.el files. How would I go about contributing > ob-jupyter.el in this specific situation? You can prepare a patch adding ob-jupyter.el file to Org and send it to this ML. You will also need an FSF copyright assignment (see https://orgmode.org/worg/org-contribute.html#devs). Best, Ihor
Re: [bug] serious problem retrieving data from table for gnuplot
Eric S Fraga writes: > By the way, adding an empty column to front of the table fixes the > problem so at least I am not panicking (I have a presentation to give > with the data in a table etc.). There must be a problem with a regex > looking for dividing lines maybe? Sorry for causing this issue. The problem was very obscure. It was related to table conversion during export. When using ox-ascii to export Org table to Gnuplot-readable text file, ox-ascii sometimes threw an error because of wrong calculation of cell width. So, I tried to use ox-org instead. Apparently, ox-org cannot be used in that context (no idea what went wrong though). Now, I just put a quick (and incomplete) fix to ox-ascii and reverted back to the old export approach. Best, Ihor
Re: What determines if R source block output is wrapped in begin_example or not?
On Friday, 14 Jan 2022 at 07:13, John Hendy wrote: > is there a heuristic on when to look at the manual vs. when to M-x > help RET v RET [guess-and-check-randomly]? Pretty much the heuristic I use. ;-) This is one of the problems with org: way too many variables. However, it is the presence of these variables that makes it so powerful and gives it the capability to adapt to your own needs so I wouldn't want less variables. One technique I do use is "Info-index" in the manual (bound to i in Info-mode by default) although not everything is indexed. -- : Eric S Fraga, with org release_9.5.2-304-g1537bb in Emacs 29.0.50
Re: [bug] serious problem retrieving data from table for gnuplot
Eric S Fraga writes: > Hello all, > > as I recently updated org, I seem to have run into a bug with ob-gnuplot > (or ob more generally) where data from a table are not interpreted > correctly. Specifically, if the first column entry in a row is a > negative number, the data file created for use by gnuplot consists of > only - signs, not the actual numbers. > ... > looks like this: > > , > | -- > | -- > | -- > | -- > | 0 0 > | 1 1 > | 2 4 > | 3 9 > | 4 16 > ` Ouch. Sorry for this. This was introduced by fixing another bug. Should be fixed on main now. Best, Ihor
Re: Playing down the text in org-mode
On Friday, 14 Jan 2022 at 14:44, fatipa...@tutanota.com wrote: > I would like to include the customisation using elisp code Have a look at, for instance, ,[ C-h f set-face-foreground RET ] | set-face-foreground is an interactive native compiled Lisp function in | ‘faces.el’. | | (set-face-foreground FACE COLOR &optional FRAME) | | Change the foreground color of face FACE to COLOR (a string). | FRAME nil or not specified means change face on all frames. | COLOR can be a system-defined color name (see ‘list-colors-display’) | or a hex spec of the form #RRGGBB. | When called interactively, prompts for the face and color. | ` and equivalent for background. I think there's a more general way of setting all the properties but I don't know enough as I use the customisation interface for these. -- : Eric S Fraga, with org release_9.5.2-306-g9623da in Emacs 29.0.50
Playing down the text in org-mode
Jan 15, 2022, 01:30 by e.fr...@ucl.ac.uk: > On Friday, 14 Jan 2022 at 14:03, fatipa...@tutanota.com wrote: > >> How can I remove the background and underline for footnotes, and change >> foreground colour. >> > > M-x customize-face RET org-footnote RET > > and adapt as you see fit? > I would like to include the customisation using elisp code > -- > : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50 >
Re: [bug] serious problem retrieving data from table for gnuplot
By the way, adding an empty column to front of the table fixes the problem so at least I am not panicking (I have a presentation to give with the data in a table etc.). There must be a problem with a regex looking for dividing lines maybe? -- : Eric S Fraga, with org release_9.5.2-304-g1537bb in Emacs 29.0.50
Re: Playing down the text in org-mode
On Friday, 14 Jan 2022 at 14:03, fatipa...@tutanota.com wrote: > How can I remove the background and underline for footnotes, and change > foreground colour. M-x customize-face RET org-footnote RET and adapt as you see fit? -- : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
Re: What determines if R source block output is wrapped in begin_example or not?
On Fri, Jan 14, 2022 at 3:48 AM Eric S Fraga wrote: > > Have a look at > > ,[ C-h v org-babel-min-lines-for-block-output RET ] > | org-babel-min-lines-for-block-output is a variable defined in ‘ob-core.el’. > | > | Its value is 10 > | > | The minimum number of lines for block output. > | If number of lines of output is equal to or exceeds this > | value, the output is placed in a #+begin_example...#+end_example > | block. Otherwise the output is marked as literal by inserting > | colons at the starts of the lines. This variable only takes > | effect if the :results output option is in effect. > | > ` Well, indeed, that's definitely it! Out of curiosity, despite being an org-mode user for... 10(?) yrs now, is there a heuristic on when to look at the manual vs. when to M-x help RET v RET [guess-and-check-randomly]? I don't feel familiar enough with org internals to have known where to look... despite this being 100% exactly what I experienced, so much so it's comedic how accurately it's written vs. what I I would have described. Thanks so much! John > -- > : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
Playing down the text in org-mode
Jan 14, 2022, 21:41 by e.fr...@ucl.ac.uk: > On Thursday, 13 Jan 2022 at 21:39, Juan Manuel Macías wrote: > >> I think a custom link would suffice for text within the paragraph. A >> quick example: >> > > Very nice example. Thank you. > > Custom links are excellent for this kind of behaviour tuning while being > portable if the link definition is included in the org file. I use this > approach in lieu of inline tasks for creating margin notes (in the > export), for instance. > How can I remove the background and underline for footnotes, and change foreground colour. > -- > : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50 >
[bug] serious problem retrieving data from table for gnuplot
Hello all, as I recently updated org, I seem to have run into a bug with ob-gnuplot (or ob more generally) where data from a table are not interpreted correctly. Specifically, if the first column entry in a row is a negative number, the data file created for use by gnuplot consists of only - signs, not the actual numbers. This table, for instance, #+begin_src org ,#+name: data | x | y | |+| | -4 | 16 | | -3 | 9 | | -2 | 4 | | -1 | 1 | | 0 | 0 | | 1 | 1 | | 2 | 4 | | 3 | 9 | | 4 | 16 | ,#+TBLFM: $2=$1^2 #+end_src when converted into a file for use by gnuplot for the following script #+begin_src org ,#+begin_src gnuplot :var d=data :file t.png :results file plot d ,#+end_src #+end_src looks like this: , | -- | -- | -- | -- | 0 0 | 1 1 | 2 4 | 3 9 | 4 16 ` I've not yet had a chance to track down why this might be. Thank you, eric -- : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
Re: [PATCH] lisp/oc-basic.el: Fix author style
Hello, Hans Donner writes: > Subject: [PATCH] lisp/oc-basic.el: Fix author style > > * lisp/oc-basic.el (org-cite-basic-export-citation): Add missing parameter > --- > lisp/oc-basic.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el > index 3b97bc1cc..41b9f647a 100644 > --- a/lisp/oc-basic.el > +++ b/lisp/oc-basic.el > @@ -599,7 +599,7 @@ export communication channel, as a property list." > (org-export-data >(mapconcat > (lambda (key) > - (let ((author (org-cite-basic--get-field 'author key info))) > + (let ((author (org-cite-basic--get-field 'author key info > 'raw))) Why do you think the optional argument is needed here? Regards, -- Nicolas Goaziou
Re: [BUG] ob-tangle overrides user customization of org-id-link-to-org-use-id [9.5.2 (9.5.2-gfbff08 @ /home/ionasal/.emacs.d/elpa/org-9.5.2/)]
Ihor Radchenko writes: > Allen Li writes: > >>> I agree. The question is whether changing to >>> (defvar org-id-link-to-org-use-id) >>> solves your problem. >> >> Thanks for your concern. By editing ob-tangle.el, I can confirm that >> changing this does solve my problem. >> >> If I must, I could provide a reproducible example, but I feel like >> that costs unnecessary effort on the part of everyone involved if we >> agree on the above point. > > Let me clarify what I am worrying about. > We have 132 occurrences of (defvar foo nil) in the code. > I am genuinely surprised that changing defvar fixed the problem for you > and at the same time nobody reported similar issues with the other 131 > defvars. That's why I really want to get a reproducer and understand > what is going on there. So far, I don't understand how defvar can break > anything except in case of some strange compilation/mixed installation > problems. I see. In my opinion those occurrences should be fixed even if no one is reporting issues because it is bad/improper code, and it is not especially surprising that no one has reported it yet; there is always a first person who reports a bug, and there are always more old bugs to be found in a big project like Emacs/Org mode. This is annoying to reproduce because it relies on the normal Emacs startup process, which loads packages. Anyway, I have found a reproduction. This is using the Emacs install on Arch Linux. GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4) of 2021-03-26 Have the packages org-9.5.2 and org-contrib-0.3 installed in ~/.emacs.d/elpa. I have these installed from https://elpa.gnu.org/packages/ and https://elpa.nongnu.org/nongnu/ respectively. Start emacs by loading a tmp.el file with the contents provided below. 1. emacs -Q --load tmp.el 2. C-h v org-id-link-to-org-use-id Note that the value is nil instead of the expected 'create-if-interactive 3. Press RET on the customize link. Note that the Customize UI says "CHANGED outside Customize." Expected behavior: User sees org-id-link-to-org-use-id set to the value they saved in Customize. Personal aside: It is easy to get subtle bugs in between autoloading, package activation and Customize when some bit of code is not following all of the right conventions. I suspect most Emacs users are adding setqs to their init file until things work. Meanwhile I foolishly read and follow all of the conventions and thus I make the above claim ("It is easy to get subtle bugs...") from my experience running into other bugs like this one. Hence my stance on fixing the aforementioned 132 occurrences, lest they cause yet another subtle bug later on. ;; tmp.el starts here. ;; This is usually called by Emacs before loading init.el. ;; It is skipped when using -Q so we call it manually. ;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html (package-activate-all) ;; This is added to init.el and is the standard way user ;; customizations are saved/loaded. (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(org-id-link-to-org-use-id 'create-if-interactive) '(org-babel-load-languages '((emacs-lisp . t) (python . t) (shell . t ;; tmp.el ends here.
Re: What determines if R source block output is wrapped in begin_example or not?
Have a look at ,[ C-h v org-babel-min-lines-for-block-output RET ] | org-babel-min-lines-for-block-output is a variable defined in ‘ob-core.el’. | | Its value is 10 | | The minimum number of lines for block output. | If number of lines of output is equal to or exceeds this | value, the output is placed in a #+begin_example...#+end_example | block. Otherwise the output is marked as literal by inserting | colons at the starts of the lines. This variable only takes | effect if the :results output option is in effect. | ` -- : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
Re: Playing down the text in org-mode
On Thursday, 13 Jan 2022 at 21:39, Juan Manuel Macías wrote: > I think a custom link would suffice for text within the paragraph. A > quick example: Very nice example. Thank you. Custom links are excellent for this kind of behaviour tuning while being portable if the link definition is included in the org file. I use this approach in lieu of inline tasks for creating margin notes (in the export), for instance. -- : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50