Re: Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-21 Thread TEC


Nick Dokos  writes: 

TEC  writes: 
:results raw drawer 


You mean `:results drawer'? There is no reason to include `raw'. 


Ah yes, I mean instead of "raw" use ":results drawer" 

Timothy.


Re: Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-21 Thread Nick Dokos
TEC  writes:

> Julius Dittmar  writes:  
>> as far as I know this is no bug. Reason: How could org tell where
>> the old results end? There's no end marker. Thus instead of removing
>> everything that follows, it refrains from removing anything. 
>
> This is my understanding. It's also why I tend to use
>
> :results raw drawer
>

You mean `:results drawer'? There is no reason to include `raw'.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-21 Thread TEC


Julius Dittmar  writes: 

as far as I know this is no bug. Reason: How could org tell 
where the old results end? There's no end marker. Thus instead 
of removing everything that follows, it refrains from removing 
anything. 


This is my understanding. It's also why I tend to use

:results raw drawer

Hope that helps.

Timothy.



Re: Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-21 Thread Julius Dittmar
Hi Sergey,

Am 18.08.20 um 00:36 schrieb Sergey Koshelev:
> When a source block (I have tested with python, see below) has `raw`
> header arg it ignores `replace` argument. The result instead is prepended.
>
> Example:
>
> #+begin_src python :results output raw replace
>   print('This line will be added every time this code runs')
> #+end_src
>
> #+RESULTS:
> This line will be added every time this code runs
> This line will be added every time this code runs

as far as I know this is no bug. Reason: How could org tell where the
old results end? There's no end marker. Thus instead of removing
everything that follows, it refrains from removing anything.

HTH,
Julius Dittmar




Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-20 Thread Sergey Koshelev
Hi all!


When a source block (I have tested with python, see below) has `raw`
header arg it ignores `replace` argument. The result instead is prepended.

Example:

#+begin_src python :results output raw replace
  print('This line will be added every time this code runs')
#+end_src

#+RESULTS:
This line will be added every time this code runs
This line will be added every time this code runs
This line will be added every time this code runs
This line will be added every time this code runs

Below is the spacemacs config.

Thank you,
Sergey.

Emacs  : GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 
Version 10.14.3 (Build 18D109))
of 2019-04-12
Package: Org mode version 9.3.7 (9.3.7-18-g093b47-elpaplus @ 
/Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)

current state:
==
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
org-latex-listings 'minted
org-link-shell-confirm-function 'yes-or-no-p
org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-refile-targets '((org-agenda-files :maxlevel . 3))
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-enforce-todo-dependencies t
org-src-tab-acts-natively t
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode 
-output-directory %o %f"
 "pdflatex -shell-escape -interaction nonstopmode 
-output-directory %o %f")
org-imenu-depth 8
org-download-annotate-function 'org-download-annotate-default
org-agenda-files '("~/org/gcal.org" "~/org/Projects.org" "~/org/brain/Brain.org"
"~/org/todo list.org")
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-latex-to-mathml-convert-command "latexmlmath \"%i\" --presentationmathml=%o"
org-reveal-start-hook '(org-decrypt-entry)
org-modules '(org-habit ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info 
ol-irc ol-mhe ol-rmail
   ol-eww)
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent 
org-edna-blocker-function)
org-archive-location "Archived projects.org::"
org-mode-hook '(org-tempo-setup flyspell-mode spacemacs/org-setup-evil-surround
 spacemacs/load-yasnippet toc-org-enable org-superstar-mode
 #[0 "\301\211\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[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-download-enable
 dotspacemacs//prettify-spacemacs-docs 
spacemacs//org-babel-do-load-languages
 spacemacs//evil-org-mode org-eldoc-load 
spacemacs//init-company-org-mode
 company-mode)
org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-outline-path-complete-in-steps nil
org-archive-hook '(org-attach-archive-delete-maybe)
org-agenda-restore-windows-after-quit t
org-confirm-elisp-link-function 'yes-or-no-p
org-startup-indented t
org-gcal-fetch-file-alist 
'(("srg.koshe...@gmail.com" . "~/org/gcal.org")
 
("lifg1dsiqjkpd3ms7sq3sct...@group.calendar.google.com"
 .
  "~/org/work.org")
 )
org-brain-visualize-sort-function 'org-brain-title<
org-download-file-format-function 'org-download-file-format-default
org-journal-mode-hook '(#[0 "\301\302\303\304$\207"
   [org-journal-encrypt-on add-hook 
org-journal-encryption-hook nil t] 5]
 (lambda nil
  (add-hook org-journal-encrypt-on (quote 
org-journal-encryption-hook) nil t))
 )
org-projectile-per-project-filepath "TODOs.org"
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-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
org-babel-pre-tangle-hook '(save-buffer)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
org-babel-load-languages '((python . t) (calc . t) (shell . t) (gnuplot . t))
org-log-done 'time
org-journal-date-format "%A, %B %d %Y"
org-brain-visualize-mode-hook '((lambda nil
  (define-key org-brain-visualize-mode-map (kbd 
"o")
   (quote brain-open-narrow))