* [BUG] bug fix with inline figure generated by org-octave [9.7-pre (release_9.6.7-662-gb89bc5)]
@ 2023-08-18 20:23 Shervin Safavi
2023-08-23 7:46 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: Shervin Safavi @ 2023-08-18 20:23 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 4115 bytes --]
Hi there,
First, thanks for maintaining this awesome tool.
In "ob-octave.el" line 94, instead of
(format "print -dpng %S\nans=%S" gfx-file gfx-file))
should be
(format "print -dpng %s" gfx-file))
otherwise, the figure is not saved (and thus an empty inline figure will
appear).
I already test it with MATLAB and can confirm it.
By the way, it is my first bug report/fix for org-mode, so apologies if
I miss something in my report.
Best wishes,
Shervin
Emacs : GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.33, cairo version 1.16.0)
of 2023-08-16
Package: Org mode version 9.7-pre (release_9.6.7-662-gb89bc5 @
/home/ssafavi/.ssemacs.d/classicemacs/straight/build/org/)
current state:
==============
(setq
org-archive-location "archive/%s_archive::"
org-noter--doc-goto-location-hook '(org-noter-djvu--goto-location
org-noter-nov--goto-location
org-noter-pdf--goto-location)
org-link-elisp-confirm-function nil
org-ref-cite-onclick-function '(closure (t) (_)
(org-ref-citation-hydra/body))
org-bibtex-headline-format-function 'org-bibtex-headline-format-default
org-export-with-sub-superscripts '{}
org-ref-insert-cite-function 'org-ref-cite-insert-ivy
org-log-done 'time
org-babel-after-execute-hook '(scimax-align-result-table
org-display-inline-images
scimax-rm-backslashes scimax-jupyter-ansi)
org-agenda-skip-scheduled-if-done t
org-persist-after-read-hook '(org-element--cache-persist-after-read)
org-ctrl-c-ctrl-c-hook '(scimax-org-image-toggle-image-CcCc
scimax-radio-CcCc)
org-link-make-description-function '(lambda (link desc)
(plist-get org-store-link-plist :description))
org-ref-open-pdf-function 'my/org-ref-open-pdf-at-point
org-export-before-parsing-hook '(org-attach-expand-links
org-babel-jupyter-strip-ansi-escapes)
org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-latex-title-command ""
org-ref-bibtex-assoc-pdf-with-entry-move-function 'rename-file
org-archive-hook '(org-attach-archive-delete-maybe)
org-speed-commands '(("Outline Navigation")
("n" org-speed-move-safe 'org-next-visible-heading)
("p" org-speed-move-safe 'org-previous-visible-heading)
("f" org-speed-move-safe 'org-forward-heading-same-level)
("b" org-speed-move-safe 'org-backward-heading-same-level)
("F" . org-next-block) ("B" . org-previous-block)
("u" org-speed-move-safe 'outline-up-heading) ("j" . org-goto)
("g" org-refile '(4)) ("Outline Visibility") ("c" . org-cycle)
("C" . org-shifttab) (" " . org-display-outline-path)
("s" . org-toggle-narrow-to-subtree) ("k" . org-cut-subtree)
("=" . org-columns) ("Outline Structure Editing") ("U" . org-metaup)
("D" . org-metadown) ("r" . org-metaright) ("l" . org-metaleft)
("R" . org-shiftmetaright) ("L" . org-shiftmetaleft)
("i" progn (forward-char 1)
(call-interactively 'org-insert-heading-respect-content))
("^" . org-sort) ("w" . org-refile)
("a" . org-archive-subtree-default-with-confirmation)
("@" . org-mark-subtree) ("#" . org-toggle-comment)
("Clock Commands") ("I" . org-clock-in) ("O" . org-clock-out)
("Meta Data Editing") ("t" . org-todo) ("," org-priority)
("0" org-priority 32) ("1" org-priority 65) ("2" org-priority 66)
("3" org-priority 67) (":" . org-set-tags-command)
("e" . org-set-effort) ("E" . org-inc-effort)
("W" lambda (m) (interactive "sMinutes before warning: ")
(org-entry-put (point) "APPT_WARNTIME" m))
("Agenda Views etc") ("v" . org-agenda) ("/" . org-sparse-tree)
("Misc") ("o" . org-open-at-point) ("?" . org-speed-command-help)
("<" org-agenda-set-restriction-lock 'subtree)
(">" org-agenda-remove-restriction-lock) ("P" . org-set-property)
("d" . org-deadline) ("m" . org-mark-subtree) ("S" . widen)
("k" . scimax-org-kill-subtree) ("q" . scimax-avy-org-headline)
("T" . org-teleport))
org-noter--pretty-print-location-for-title-hook
'(org-noter-djvu--pretty-print-location
org-noter-nov--pretty-print-location
org-noter-pdf--pretty-print-location-for-title)
[-- Attachment #2: Type: text/html, Size: 5442 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] bug fix with inline figure generated by org-octave [9.7-pre (release_9.6.7-662-gb89bc5)]
2023-08-18 20:23 [BUG] bug fix with inline figure generated by org-octave [9.7-pre (release_9.6.7-662-gb89bc5)] Shervin Safavi
@ 2023-08-23 7:46 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-08-23 7:46 UTC (permalink / raw)
To: Shervin Safavi; +Cc: emacs-orgmode
Shervin Safavi <neuroprinciplist@gmail.com> writes:
> In "ob-octave.el" line 94, instead of
>
> (format "print -dpng %S\nans=%S" gfx-file gfx-file))
>
> should be
>
> (format "print -dpng %s" gfx-file))
>
> otherwise, the figure is not saved (and thus an empty inline figure will
> appear).
Thanks for the report and for the suggestion!
May you please explain us a bit why having ans=filename is a problem?
Looking at
https://docs.octave.org/v5.2.0/Printing-and-Saving-Plots.html, it should
be enough to call print.
> I already test it with MATLAB and can confirm it.
>
> By the way, it is my first bug report/fix for org-mode, so apologies if
> I miss something in my report.
It would be nice to provide an example demonstrating the problem.
Sometimes, what happens on your machine may not happen for other people.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-23 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 20:23 [BUG] bug fix with inline figure generated by org-octave [9.7-pre (release_9.6.7-662-gb89bc5)] Shervin Safavi
2023-08-23 7:46 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.