Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block
> 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 tangled, but the `:results` header arg isn't picked > up, because the code block doesn't produce any output. Not so. `org-babel-view-src-block-info' (C-c C-v C-i with point in the src block below) reports , | Lang: python | Properties: | :header-argsnil | :header-args:python :session py1 :results function :tangle out1.py | Header Arguments: | :cache no | :exportscode | :hlines no | :noweb no | :resultsfunction replace | :sessionpy1 | :tangle out1.py ` > > For reference, this is my test file: > > ``` > * Header 1 > :PROPERTIES: > :header-args:python+: :session py1 :results function > :header-args:python+: :tangle out1.py > :END: > > #+begin_src python > a=1 > b=2 > c=a+b > return c > #+end_src > > #+RESULTS: > ```
Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block
Aloha Joost, This link reflects my understanding of how properties accumulate, rather than overwrite: https://org-babel.readthedocs.io/en/latest/header-args/ hth, Tom -- Thomas S. Dye https://tsdye.online/tsdye
Re: Bug: org-table-insert-column edits formulas wrongly [9.3 (release_9.3 @ /usr/local/Cellar/emacs-plus/HEAD-9d38564/share/emacs/28.0.50/lisp/org/)]
Marco Wahl writes: > I find it slightly suspicious that the documentation says > > #v+ > ‘M-S-’ (‘org-table-insert-column’) > Insert a new column to the left of point position. > #v- > > But actually the new column goes to the right and this is also fused by > the tests. Has there been a stealth shift to the right? It looks like the documentation became stale with b8d473a04 (org-table: Insert new column to the right instead of the left, 2017-11-19). Thanks for updating it.
Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block
On Mon, Mar 30 2020, Ken Mankoff wrote: Header args overwrite. Change python to python+ to append header args. Are you sure? That's not documented anywhere I can find and it seems to be belied by the fact that if I put the headers in the order: ``` :PROPERTIES: :header-args:python: :tangle out1.py :header-args:python: :session py1 :results function :END: ``` everything works as I would expect (the code blocks are tangled to a file `out1.py` *and* they are evaluated in a python session `py1`), meaning that *all* header args are picked up. 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 tangled, but the `:results` header arg isn't picked up, because the code block doesn't produce any output. For reference, this is my test file: ``` * Header 1 :PROPERTIES: :header-args:python+: :session py1 :results function :header-args:python+: :tangle out1.py :END: #+begin_src python a=1 b=2 c=a+b return c #+end_src #+RESULTS: ``` -- Joost Kremers Life has its moments
Re: Bug: org-table-insert-column edits formulas wrongly [9.3 (release_9.3 @ /usr/local/Cellar/emacs-plus/HEAD-9d38564/share/emacs/28.0.50/lisp/org/)]
Yu Han Quek writes: > Calling org-table-insert-column in a table with formulas wrongly increments > the column number left of the newly inserted column. > > Minimal example: > > | 1 | 2 | 3 | > > #+TBLFM: $3=$1+$2 > > With cursor in the `1` cell, call `M-x org-table-insert-column`. > > Expected output: > > | 1 | | 2 | 3 | > > #+TBLFM: $4=$1+$3 > > Actual output ($1 wrongly changed to $2): > > | 1 | | 2 | 3 | > > #+TBLFM: $4=$2+$3 > > The bug seems to be in the last 2 lines of the > function org-table-insert-column: > > (org-table-fix-formulas "$" nil (1- col) 1) > (org-table-fix-formulas "$LR" nil (1- col) 1) > > Changing `(1- col)` to `col` solves the issue. Thanks. I committed your fix with the TINYCHANGE marker. I find it slightly suspicious that the documentation says #v+ ‘M-S-’ (‘org-table-insert-column’) Insert a new column to the left of point position. #v- But actually the new column goes to the right and this is also fused by the tests. Has there been a stealth shift to the right? Anyway, I guess the documentation text should be updated as well. Any objections or comments about this? Ciao, -- Marco
Sugesstion for a more fexible org-bbdb-anniversary-description
I think it would be nice if this function would have some (customizable) variables. Here (in Germany) e.g. I like this: (defun org-bbdb-anniversary-description (agenda-date anniv-date) (let ((delta (- (calendar-absolute-from-gregorian anniv-date) (calendar-absolute-from-gregorian agenda-date (cond ((= delta 0) "\\&") ((= delta 1) " (morgen)\\&") ((< delta org-bbdb-general-anniversary-description-after) (format " (in %d Tagen)\\&" delta)) ((pcase-let ((`(,month ,day ,year) anniv-date)) (format " (am %d.%d.)\\&" day month))) ) ) ) And I think others would have other preferences. Just an idea. I'm sorry but I can't program lisp good enough to implement my idea (without the shown hack).
Re: default units for graphics in R code blocks
Yes, org info is spread wide and thin, and it's hard to tell which source is the most recent/accurate. I think it might be useful to consolidate and delete as much as possible, but that's going to be a lot of work. The existence of a page called "Library of Babel", https://orgmode.org/worg/library-of-babel.html that doesn't actually refer to org-babel seems especially misleading! In any case, I updated ob-doc-R with the correct info. Best, Tyler John Hendy writes: > Bummer, that does indeed read pretty straightforwardly about inches. > Sorry about that. > > Thanks for your efforts. I find org documentation challenging at > times, and am still not clear on worg vs. org. I believe I've asked on > this list before why those pages exist, as this seems like it should > be in the org official docs vs. in a sort of tutorial site. It makes > it tough as you can't find certain header args in the org docs; you > have to kind of know what you're looking for, or at least that the > header arg is *only* for, say, R, and not for anything else. > > Anyway, thanks for contributing! > > Best, > John > > On Mon, Mar 30, 2020 at 11:58 AM Tyler Smith wrote: >> >> John Hendy writes: >> >> > >> > Best to cite exactly which article you're referring to. Trying to look >> > myself, for example, found me this as the only worg hit from googling >> > "worg R plotting": >> > - https://orgmode.org/worg/org-tutorials/org-R/org-R.html >> > """ >> > Output options >> > height:1000set height of graphical output in (pixels for png, jpeg, >> > bmp, tiff; default 480) / (inches for pdf, ps; default 7) >> > width:1000set width of graphical output in pixels (default 480 for png) >> > """ >> > >> The article I was referring to is: >> >> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html >> >> The tutorial you found suggests the corrections needed in the one I >> found; I can do that now! >> >> Tyler >> >> >> > It seems that aligns with my recollection, but may very well differ >> > from the article you found. Thanks for any edits/corrections you make! >> > >> > Best regards, >> > John >> > >> >> >> >> Best, >> >> >> >> Tyler >> >> >> >> >> >> >> >> -- >> >> Tyler Smith >> >> http://plantarum.ca >> >> >> >> >> -- >> Tyler Smith >> http://plantarum.ca -- Tyler Smith http://plantarum.ca
Re: default units for graphics in R code blocks
Bummer, that does indeed read pretty straightforwardly about inches. Sorry about that. Thanks for your efforts. I find org documentation challenging at times, and am still not clear on worg vs. org. I believe I've asked on this list before why those pages exist, as this seems like it should be in the org official docs vs. in a sort of tutorial site. It makes it tough as you can't find certain header args in the org docs; you have to kind of know what you're looking for, or at least that the header arg is *only* for, say, R, and not for anything else. Anyway, thanks for contributing! Best, John On Mon, Mar 30, 2020 at 11:58 AM Tyler Smith wrote: > > John Hendy writes: > > > > > Best to cite exactly which article you're referring to. Trying to look > > myself, for example, found me this as the only worg hit from googling > > "worg R plotting": > > - https://orgmode.org/worg/org-tutorials/org-R/org-R.html > > """ > > Output options > > height:1000set height of graphical output in (pixels for png, jpeg, > > bmp, tiff; default 480) / (inches for pdf, ps; default 7) > > width:1000set width of graphical output in pixels (default 480 for png) > > """ > > > The article I was referring to is: > > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html > > The tutorial you found suggests the corrections needed in the one I > found; I can do that now! > > Tyler > > > > It seems that aligns with my recollection, but may very well differ > > from the article you found. Thanks for any edits/corrections you make! > > > > Best regards, > > John > > > >> > >> Best, > >> > >> Tyler > >> > >> > >> > >> -- > >> Tyler Smith > >> http://plantarum.ca > >> > > > -- > Tyler Smith > http://plantarum.ca
Re: default units for graphics in R code blocks
John Hendy writes: > > Best to cite exactly which article you're referring to. Trying to look > myself, for example, found me this as the only worg hit from googling > "worg R plotting": > - https://orgmode.org/worg/org-tutorials/org-R/org-R.html > """ > Output options > height:1000set height of graphical output in (pixels for png, jpeg, > bmp, tiff; default 480) / (inches for pdf, ps; default 7) > width:1000set width of graphical output in pixels (default 480 for png) > """ > The article I was referring to is: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html The tutorial you found suggests the corrections needed in the one I found; I can do that now! Tyler > It seems that aligns with my recollection, but may very well differ > from the article you found. Thanks for any edits/corrections you make! > > Best regards, > John > >> >> Best, >> >> Tyler >> >> >> >> -- >> Tyler Smith >> http://plantarum.ca >> -- Tyler Smith http://plantarum.ca
Bug: org-table-insert-column edits formulas wrongly [9.3 (release_9.3 @ /usr/local/Cellar/emacs-plus/HEAD-9d38564/share/emacs/28.0.50/lisp/org/)]
Calling org-table-insert-column in a table with formulas wrongly increments the column number left of the newly inserted column. Minimal example: | 1 | 2 | 3 | #+TBLFM: $3=$1+$2 With cursor in the `1` cell, call `M-x org-table-insert-column`. Expected output: | 1 | | 2 | 3 | #+TBLFM: $4=$1+$3 Actual output ($1 wrongly changed to $2): | 1 | | 2 | 3 | #+TBLFM: $4=$2+$3 The bug seems to be in the last 2 lines of the function org-table-insert-column: (org-table-fix-formulas "$" nil (1- col) 1) (org-table-fix-formulas "$LR" nil (1- col) 1) Changing `(1- col)` to `col` solves the issue. Emacs : GNU Emacs 28.0.50 (build 2, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G1012)) of 2020-01-05 Package: Org mode version 9.3 (release_9.3 @ /usr/local/Cellar/emacs-plus/HEAD-9d38564/share/emacs/28.0.50/lisp/org/) current state: == (setq org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-link-shell-confirm-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-before-write-hook '(org-agenda-add-entry-text) org-metaup-hook '(org-babel-load-in-session-maybe) org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-babel-pre-tangle-hook '(save-buffer) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-occur-hook '(org-first-headline-recenter) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-confirm-shell-link-function 'yes-or-no-p org-link-parameters '(("attachment" :follow org-attach-open-link :export org-attach-export-link :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow eww :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5 "\n\n(fn URL)"] ) ("mailto" :follow #[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"] 5 "\n\n(fn URL)"] ) ("https" :follow #[257 "\301\300\302 Q!\207" ["https" browse-url ":"] 5 "\n\n(fn URL)"] ) ("http" :follow #[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5 "\n\n(fn URL)"] ) ("ftp" :follow #[257 "\301\300\302 Q!\207" ["ftp" browse-url ":"] 5 "\n\n(fn URL)"] ) ("help" :follow org-link--open-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp) ("doi" :follow org-link--open-doi)) org-link-elisp-confirm-function 'yes-or-no-p )
Re: default units for graphics in R code blocks
On Mon, Mar 30, 2020 at 10:45 AM Tyler Smith wrote: > > Hi, > > The worg documentation for R code indicates the default units for > graphics output is 'in', inches. However, when I try the following: > > #+begin_src R :results file graphics :file ca.jpg :width 8 :height 11 > plot(1:10) > #+end_src > > I get an error noting the margins are too large. If I change the width > and height arguments to 800, it works just fine, and the resulting image > is pretty small. When you examine the properties of this "pretty small" resulting image, is the size equal to 800 x 800px? > I can also get a working image by specifying units as in and res as 100. > > I conclude from this that the default units are actually pixels? Is that > correct? If so I can update the docs. I'd have to look deeper/test to confirm, but believe the units are according to the output device. I'm near certain, for example, that PDF output is in inches. I think png and jpg may both be px. It may not be consistent/universal is my point! Edit before sending: Best to cite exactly which article you're referring to. Trying to look myself, for example, found me this as the only worg hit from googling "worg R plotting": - https://orgmode.org/worg/org-tutorials/org-R/org-R.html """ Output options height:1000set height of graphical output in (pixels for png, jpeg, bmp, tiff; default 480) / (inches for pdf, ps; default 7) width:1000set width of graphical output in pixels (default 480 for png) """ It seems that aligns with my recollection, but may very well differ from the article you found. Thanks for any edits/corrections you make! Best regards, John > > Best, > > Tyler > > > > -- > Tyler Smith > http://plantarum.ca >
default units for graphics in R code blocks
Hi, The worg documentation for R code indicates the default units for graphics output is 'in', inches. However, when I try the following: #+begin_src R :results file graphics :file ca.jpg :width 8 :height 11 plot(1:10) #+end_src I get an error noting the margins are too large. If I change the width and height arguments to 800, it works just fine, and the resulting image is pretty small. I can also get a working image by specifying units as in and res as 100. I conclude from this that the default units are actually pixels? Is that correct? If so I can update the docs. Best, Tyler -- Tyler Smith http://plantarum.ca
Re: Bug: :completion-function no longer takes a lambda [9.3.6 (9.3.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/)]
Hi Marco, Marco Wahl writes: > Arne Babenhauserheide writes: >> (setq org-publish-project-alist >> '(("guile-basics" >> :base-directory "~/eigenes/py2guile" >> :publishing-directory (concat private-publish-ftp-proj >> "guile-basics/") >> :base-extension "org" >> :publishing-function org-html-publish-to-html >> :completion-function (lambda () (private-publish-rename-to-index >>(concat private-publish-ftp-proj >> "guile-basics/") >>"guile-basics.html")) >> :section-numbers nil >> :with-toc t >> :html-preamble t >> :exclude ".*" >> :include ["guile-basics.org"]))) >> >> >> This used to work, but now it breaks with >> >> org-publish-projects: Invalid function: lambda > > An additional pair of parens should help as workaround. Concretely try > > :completion-function ((lambda () (private-publish-rename-to-index > (concat private-publish-ftp-proj > "guile-basics/") > "guile-basics.html"))) > > This works since it's possible to use a list of functions also. > > I'll commit a fix against master in a second to be able to use a lambda > instead of a list containing one lambda. That’s awesome — thank you! ♡ Also thank you for the workaround! Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken
Re: Bug: :completion-function no longer takes a lambda [9.3.6 (9.3.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/)]
Arne Babenhauserheide writes: > Hi, > > I set up my publishing workflow with org-project using lambdas in the > :completion-function, but I now receive errors when I try to publish. > > Example Setup: > > (setq org-publish-project-alist > '(("guile-basics" > :base-directory "~/eigenes/py2guile" > :publishing-directory (concat private-publish-ftp-proj > "guile-basics/") > :base-extension "org" > :publishing-function org-html-publish-to-html > :completion-function (lambda () (private-publish-rename-to-index >(concat private-publish-ftp-proj > "guile-basics/") >"guile-basics.html")) > :section-numbers nil > :with-toc t > :html-preamble t > :exclude ".*" > :include ["guile-basics.org"]))) > > > This used to work, but now it breaks with > > org-publish-projects: Invalid function: lambda An additional pair of parens should help as workaround. Concretely try :completion-function ((lambda () (private-publish-rename-to-index (concat private-publish-ftp-proj "guile-basics/") "guile-basics.html"))) This works since it's possible to use a list of functions also. I'll commit a fix against master in a second to be able to use a lambda instead of a list containing one lambda. Thanks, -- Marco
Re: Automatic formatting of the table as you type
On Sunday, 29 Mar 2020 at 01:18, Adam Porter wrote: > Pressing TAB (or any other key that moves to the next field) to realign > a table is not a significant burden. A feature like this should > probably remain an add-on package, or at least disabled by default. I tend to work with large tables and performance is already slow so I agree completely with this. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-438-g5b9698
Bug: :completion-function no longer takes a lambda [9.3.6 (9.3.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/)]
Hi, I set up my publishing workflow with org-project using lambdas in the :completion-function, but I now receive errors when I try to publish. Example Setup: (setq org-publish-project-alist '(("guile-basics" :base-directory "~/eigenes/py2guile" :publishing-directory (concat private-publish-ftp-proj "guile-basics/") :base-extension "org" :publishing-function org-html-publish-to-html :completion-function (lambda () (private-publish-rename-to-index (concat private-publish-ftp-proj "guile-basics/") "guile-basics.html")) :section-numbers nil :with-toc t :html-preamble t :exclude ".*" :include ["guile-basics.org"]))) This used to work, but now it breaks with org-publish-projects: Invalid function: lambda Best wishes, Arne 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 bug report will be posted to the Org mailing list. Emacs : GNU Emacs 26.1 (build 1, x86_64-unknown-linux-gnu, GTK+ Version 3.24.0) of 2019-01-22 Package: Org mode version 9.3.6 (9.3.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/) -- Unpolitisch sein heißt politisch sein ohne es zu merken