From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Dror Atariah <drorata@gmail.com>
Cc: Nick Dokos <ndokos@gmail.com>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
Ken Mankoff <mankoff@gmail.com>
Subject: Re: [Orgmode] Unable to capture the file name generated using matplotlib
Date: Mon, 25 May 2015 14:30:04 -0400 [thread overview]
Message-ID: <CAJ51ETr73otGnt6E9sZ7Zo-Ob2xyE6sJ3hsLmN6eviD4B2OMTw@mail.gmail.com> (raw)
In-Reply-To: <CANfRcg1nHNqH81VnCD5LVUo52eGi2CpFkOy1pY_KfOsxMpiGmA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 8395 bytes --]
With emacs -Q, and this org file:
#+BEGIN_SRC emacs-lisp
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(python . t)))
#+END_SRC
#+RESULTS:
#+BEGIN_SRC python :session with_matplotlib :results file :exports both
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fig=plt.figure(figsize=(3,2))
plt.plot([1,3,2])
plt.savefig('myfig.png')
'myfig.png'
#+END_SRC
#+RESULTS:
[[file:myfig.png]]
I get what you expect to happen. In my customized emacs, I get something
else that is more like you see.
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Mon, May 25, 2015 at 2:22 PM, Dror Atariah <drorata@gmail.com> wrote:
> On Mon, May 25, 2015 at 7:29 PM, Ken Mankoff <mankoff@gmail.com> wrote:
>
>>
>> On 2015-05-25 at 13:25, Dror Atariah <drorata@gmail.com> wrote:
>> > I am sorry for reposting, but I'm still in the dark. Am I the only one
>> who
>> > experience this kind of issue?
>>
>> Don't know.
>>
>> > Did someone managed to reproduce the problem?
>>
>> I could not reproduce it.
>>
>> > Does anyone see this message? :)
>>
>> Yes.
>>
>
> Thanks for your reply!!!! :)
>
>
>>
>> I'm on Mac too, which is where your problem is. Are you starting with
>> "emacs -Q"? I haven't seen you post a full MWE with both =init.el= and =
>> test.org=. You did provide a test Org file but it wasn't clear to me if
>> that was being used with emacs -Q.
>>
>> I tried to evaluate the problematic file using =emacs -Q= and the problem
> is the same.
>
> Following is the section of my =init.el= that deals with org-mode (if you
> need more, let me know):
>
>
> ------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; Org Mode related
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (setq org-directory "~/Dropbox/org")
>
> ;; Set a location for the list of agena files
> (setq org-agenda-files "~/.emacs.d/agenda_files")
>
> ;; Assigns org-mode to .org files
> (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
> (define-key global-map "\C-cl" 'org-store-link)
> (define-key global-map "\C-ca" 'org-agenda)
> (setq org-log-done t)
> (when window-system (require 'org-mouse))
>
> ;; Auto enable flyspell-mode
> (add-hook 'org-mode-hook 'turn-on-flyspell)
>
> ;; Auto fill minor mode in org files
> (add-hook 'org-mode-hook 'turn-on-auto-fill)
>
> ;; Enable org-indent-mode for org buffers
> (add-hook 'org-mode-hook
> (lambda ()(org-indent-mode t)) t)
>
> ;; Use text-mode abbrev table in org-mode
> (add-hook 'org-mode-hook '(lambda () (setq local-abbrev-table
> text-mode-abbrev-table)))
>
> ;; Enables selection using SHIFT, while maintaining useful actions
> ;; related to SHITF in org
> (setq org-support-shift-select 't)
>
> ;; Enable smart qoutes (http://stackoverflow.com/q/15097114/671013)
> (setq org-export-with-smart-quotes t)
>
> ;; Customize the TODO-like keywords
> (setq org-use-fast-todo-selection t)
> (setq org-todo-keywords
> '((sequence "TODO(t)" "PROCESS(p@/!)" "|" "DONE(d!)" "CANCELED(c@
> /!)")))
> (setq org-todo-keyword-faces
> (quote (("TODO" :foreground "red" :weight bold)
> ("PROCESS" :foreground "blue" :weight bold)
> ("DONE" :foreground "forest green" :weight bold)
> ("CANCELLED" :foreground "forest green" :weight bold))))
> (setq org-log-into-drawer t)
>
> ;; Capture-org
> (setq org-default-notes-file (concat org-directory "/notes.org"))
> (define-key global-map "\C-cc" 'org-capture)
>
> (setq org-capture-templates
> (quote (("t" "todo" entry (file (concat org-directory "/gtd.org"))
> "* TODO %?\n%U\n%a\n" :clock-in t :clock-resume t)
> ("n" "note" entry (file (concat org-directory "/gtd.org"))
> "* %? :NOTE:\n%U\n%a\n" :clock-in t :clock-resume t)
> ("j" "Journal" entry (file+datetree (concat org-directory "/
> diary.org"))
> "* %?\n%U\n" :clock-in t :clock-resume t)
> ("v" "Vocabulary" entry
> (file+headline (concat org-directory "/vocab.org")
> "Vocabulary")
> "* %^{The word} :drill:\n:PROPERTIES:\n:Part-of-speech:
> %^{Part of speech|verb|noun|adj|adv}\n:END:\n %t\n %^{Extended word (may be
> empty)} \n** Answer \n%^{The definition}")
> )))
>
> ;; Make use of refTeX in org-mode
> (defun org-mode-reftex-setup ()
> "Setups RefTeX to be used with a org file. Code is based on
> http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/.
>
> Once you run this, you will be asked to set a master file of the org."
> (interactive)
> (load-library "reftex")
> (and (buffer-file-name)
> (file-exists-p (buffer-file-name))
> (reftex-parse-all))
> (define-key org-mode-map (kbd "C-c )") 'reftex-citation)
> )
>
> ;; Open indirect buffer in new frame
> (setq org-indirect-buffer-display 'new-frame)
>
> ;; Set common TAGS
> ;; Check:
> http://sachachua.com/blog/2008/01/tagging-in-org-plus-bonus-code-for-timeclocks-and-tags/
> (setq org-tag-alist '(
> ("PRIVATE" . ?p)
> (:startgroup . nil)
> ("WORK" .?w)
> (:grouptags . nil)
> ("WORK@mittagseminar" . ?m)
> ("WORK@open_questions" . ?i)
> ("WORK@diss" . ?d)
> ("WORK@CV" . nil)
> (:endgroup . nil)
> (:startgroup . nil)
> ("IT" . ?I)
> (:grouptags . nil)
> ("IT@emacs" . nil)
> ("IT@git" . nil)
> ("IT@TeX" . nil)
> (:endgroup . nil)
> (:startgroup . nil)
> ("PROG" . ?p)
> (:grouptags . nil)
> ("PROG@mathematica" . nil)
> ("PROG@cgal" . nil)
> (:endgroup . nil)
> (:endgroup . nil)
> ("4freeTime" . ?4)
> ))
>
> ;; Targets include this file and any file contributing to the agenda - up
> to 9 levels deep
> (setq org-refile-targets (quote ((nil :maxlevel . 9)
> (org-agenda-files :maxlevel . 9))))
>
> ;; Add time stamp of refiling
> (setq org-log-refile 'time)
>
> ;; Use full outline paths for refile targets - we file directly with IDO
> (setq org-refile-use-outline-path t)
>
> ;; Targets complete directly with IDO
> (setq org-outline-path-complete-in-steps nil)
>
> ;; Allow refile to create parent tasks with confirmation
> (setq org-refile-allow-creating-parent-nodes (quote confirm))
>
> ;; Use IDO for both buffer and file completion and ido-everywhere to t
> (setq org-completion-use-ido t)
> (setq ido-everywhere t)
> (setq ido-max-directory-size 100000)
> (ido-mode (quote both))
>
> ;; set latexmk the default LaTeX compiler for org-mode and in general
> (setq org-latex-to-pdf-process (list "latexmk -f -pdf %f"))
>
> ;; Enable clocking across sessions
> (setq org-clock-persist 'history)
> (org-clock-persistence-insinuate)
>
> ;; Set the number of clock items before wrapping them in a LOGBOOK drawer
> (setq org-clock-into-drawer '2)
>
> ;; Set the number of clock items before wrapping them in a LOGBOOK drawer
> (setq org-clock-into-drawer '2)
>
> ;; MobileOrg
> (load "mobileorg-setup")
>
> ;; Org drill
> (require 'org-drill)
> (setq org-drill-save-buffers-after-drill-sessions-p nil)
> (setq org-drill-scope 'file-no-restriction)
>
> ;; org2blog
> (require 'metaweblog)
> (require 'org2blog-autoloads)
>
> ;; Babel
> (setq org-src-preserve-indentation t) ;;
> http://stackoverflow.com/a/20903001/671013
>
> (setq org-src-fontify-natively t)
>
> (setq org-confirm-babel-evaluate nil)
>
> (org-babel-do-load-languages
> 'org-babel-load-languages
> '((elasticsearch . t)
> (emacs-lisp . t)
> (python . t)
> (R . t)))
>
> ------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------
>
> Best,
> Dror
>
[-- Attachment #2: Type: text/html, Size: 13487 bytes --]
next prev parent reply other threads:[~2015-05-25 18:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 7:48 [Orgmode] Unable to capture the file name generated using matplotlib Dror Atariah
2015-05-02 17:09 ` Nick Dokos
2015-05-02 17:11 ` Nick Dokos
2015-05-05 20:20 ` Dror Atariah
2015-05-23 18:49 ` Dror Atariah
2015-05-25 17:25 ` Dror Atariah
2015-05-25 17:29 ` Ken Mankoff
2015-05-25 18:22 ` Dror Atariah
2015-05-25 18:30 ` John Kitchin [this message]
2015-05-26 13:11 ` Dror Atariah
2015-05-26 13:15 ` Ken Mankoff
2015-05-26 13:19 ` Dror Atariah
2015-05-26 13:26 ` Dror Atariah
2015-05-26 14:02 ` Ken Mankoff
2015-05-26 14:37 ` Dror Atariah
2015-05-26 18:39 ` Dror Atariah
2015-06-02 5:49 ` Dror Atariah
2015-06-02 12:21 ` Ken Mankoff
2015-06-02 18:01 ` Dror Atariah
2015-05-26 1:49 ` Ken Mankoff
2015-05-26 13:18 ` Dror Atariah
2015-05-26 14:05 ` Ken Mankoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ51ETr73otGnt6E9sZ7Zo-Ob2xyE6sJ3hsLmN6eviD4B2OMTw@mail.gmail.com \
--to=jkitchin@andrew.cmu.edu \
--cc=drorata@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mankoff@gmail.com \
--cc=ndokos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).