Re: [O] Ruby or Python or Something

2017-07-17 Thread Adam Jackson
Hi Byung-Hee,



org-mode itself uses emacs lisp as the programming language for development and 
extension and you may need to use a little lisp to access some of the features.



However, if you are interested in learning Python and/or Ruby I highly 
recommend you look at the org-babel features: 
http://orgmode.org/worg/org-contrib/babel/ .

This allows you to mix up code blocks with your notes and links for an 
interactive "notebook" similar to Jupyter. (If you haven't tried Jupyter, you 
really should look at that too!)

These blocks will appear as formatted code blocks in your output HTML or LaTeX. 
I use it as a lab notebook.



All the best,

Adam






Message: 2 

Date: Sun, 16 Jul 2017 21:19:23 +0900 

From: "Byung-Hee HWANG (???, =?utf-8?B?6buD54Kz54aZKQ==?=" 

soyeo...@doraji.xyz 

To: emacs-orgmode@gnu.org 

Subject: [O] Ruby or Python or Something 

Message-ID: yw.87lgno8th0.fsf@alex.chromebook 

Content-Type: text/plain; charset=utf-8 

 

Somewaht it is foolish question. Suddenly i get interested in other 

languages such as Ruby, Python, ... By the way these computing languages 

help to understand of org mode? 

 

My position is a writer, not programmer. To make HTML/LaTeX documents 

with Emacs is my goal. Any comments welcome!!! 

 

-- 

^? __ ?_^))// 

 

 







Re: [O] Bug: reftex breaking after org-mode export [8.2.10 (8.2.10-35-g19a7d6-elpa @ /Users/adamjackson/.emacs.d/elpa/org-20150323/)]

2015-03-25 Thread Adam Jackson
Thanks, John.

org-ref looks quite handy, although I would like to try and get basic 
functionality working without adding another package. Does it implement 
cross-references independently of reftex? Perhaps I need to abandon reftex, but 
this seems like it should be a trivial problem.

Commenting out the org-ref block, this setup seems to work in that I am able to 
insert citations with M-x reftex-citation after exporting to LaTeX. This 
suggests that (reftex-parse-all) is somewhat to blame. However, attempting to 
insert an equation reference with M-x reftex-reference still fails after 
exporting and works before the first export. I suspect TeX-master is indeed 
involved, as the backtrace suggests.

Returning to my original setup and commenting out the (reftex-parse-all) gives 
a similar result to your block; working citations, but cross-references that 
break after LaTeX export. One of the most baffling aspects is that killing and 
re-opening the buffer and re-starting Reftex does not eliminate the problem; I 
have to actually quit and re-open emacs.

Regards,
Adam

-- 
Adam Jackson
a.j.jack...@bath.ac.uk
Doctoral student: Integrated PhD Sustainable Chemical Technologies
University of Bath

On 25 Mar 2015, at 13:29, John Kitchin jkitc...@andrew.cmu.edu wrote:

 If it is helpful, here is my setup in org-ref:
 
 (require 'reftex)
 (defun org-mode-reftex-setup ()
  Setup `org-mode' and reftex for org-ref.
(and (buffer-file-name)
 (file-exists-p (buffer-file-name))
 (global-auto-revert-mode t))
(make-local-variable 'reftex-cite-format)
(setq reftex-cite-format 'org))
 
 ;; define key for inserting citations
 (define-key org-mode-map
  (kbd org-ref-insert-cite-key)
  org-ref-insert-cite-function)
 
 (add-hook 'org-mode-hook 'org-mode-reftex-setup)
 
 (eval-after-load 'reftex-vars
  '(progn
  (add-to-list 'reftex-cite-format-builtin
   '(org Org-mode citation
 ((?\C-m . cite:%l) ; default
  (?d . ,%l); for appending
  (?a . autocite:%l)
  (?t . citet:%l)
  (?T . citet*:%l)
  (?p . citep:%l)
  (?P . citep*:%l)
  (?h . citeauthor:%l)
  (?H . citeauthor*:%l)
  (?y . citeyear:%l)
  (?x . citetext:%l)
  (?n . nocite:%l)
  )
 
 I think you might be seeing something like a TeX-master problem. Did you try
 this without revtex-parse-all?
 
 Adam Jackson writes:
 
 Hi,
 
 I've been struggling with Reftex in org-mode. Initially things are fine,
 then after exporting the document to LaTeX and continuing to work with
 org-mode, using most of the reftex features (e.g. reftex-toc or trying to
 insert a reference) produces a Wrong type argument: stringp, nil error
 message.
 
 The code in my init file to set up reftex:
 
;; Reftex
(require 'reftex)
(defun org-mode-reftex-setup ()
  (load-library reftex)
  (and (buffer-file-name) (file-exists-p (buffer-file-name))
 ;enable auto-revert-mode to update reftex when bibtex file changes 
 on disk
 (global-auto-revert-mode t)
 (reftex-parse-all)
  (define-key org-mode-map (kbd C-c [) 'reftex-citation)
 ;add a custom reftex cite format to insert links
 ;; (reftex-set-cite-format ** [[papers:%l][%l]]: %t \n)
 )
)
 
(add-hook 'org-mode-hook 'org-mode-reftex-setup)
 
 At the moment I still enter reftex-mode on demand with M-x reftex-mode.
 Here is the backtrace for the error:
 
 Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  re-search-forward(nil 10001 t)
  tex-main-file()
  reftex-TeX-master-file()
  reftex-insert-docstruct(#buffer paper.org t e nil nil t nil nil 
 (SEC:lagrange_gibbs_proof s We define the molar Gibbs free energy in a 
 molecular gas mixture as \\begin{align} \\h /my/path/to/the/paper.org 
 nil)  nil)
  byte-code(\306 \307\216\310 \210   \311 \f\203
 
 --
 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



[O] Bug: reftex breaking after org-mode export [8.2.10 (8.2.10-35-g19a7d6-elpa @ /Users/adamjackson/.emacs.d/elpa/org-20150323/)]

2015-03-23 Thread Adam Jackson
Hi,

I've been struggling with Reftex in org-mode. Initially things are fine,
then after exporting the document to LaTeX and continuing to work with
org-mode, using most of the reftex features (e.g. reftex-toc or trying to
insert a reference) produces a Wrong type argument: stringp, nil error
message.

The code in my init file to set up reftex:

;; Reftex
(require 'reftex)
(defun org-mode-reftex-setup ()
  (load-library reftex)
  (and (buffer-file-name) (file-exists-p (buffer-file-name))
 ;enable auto-revert-mode to update reftex when bibtex file changes on 
disk
 (global-auto-revert-mode t)
 (reftex-parse-all)
  (define-key org-mode-map (kbd C-c [) 'reftex-citation)
 ;add a custom reftex cite format to insert links
 ;; (reftex-set-cite-format ** [[papers:%l][%l]]: %t \n)
 )
) 

(add-hook 'org-mode-hook 'org-mode-reftex-setup) 

At the moment I still enter reftex-mode on demand with M-x reftex-mode.
Here is the backtrace for the error:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  re-search-forward(nil 10001 t)
  tex-main-file()
  reftex-TeX-master-file()
  reftex-insert-docstruct(#buffer paper.org t e nil nil t nil nil 
(SEC:lagrange_gibbs_proof s We define the molar Gibbs free energy in a 
molecular gas mixture as \\begin{align} \\h /my/path/to/the/paper.org nil) 
 nil)
  byte-code(\306 \307\216\310 \210\311 \f\203\312rq\210\313
!)!\210\202\312\314!\210\315 \210@\316=\2040\316 
\210\317\320p\\210\321A\322\323\324\325\326B\327\330\331\332\333\257C\334 
\335U\203v\336D\337\340!\210\341  E
\336FGHIJ\206kKL\336K)\202\211J\203\206\342   J
#K\202\211\321K\321DK\206\222\321K\336J\343MNOK\344P\211Q@RQA@S\345Q8T\321KR\204\304\346\347\336\\210R\350=\203\321\315
 \210\202 R\351=\204\337R\352=\203\365U\203\347\352R\315 \210\353 
TR#\210\202 R\354=\203\315 \210G?G\202 R\355=\203VJ\356 \202 
R\357=\2038\315 \210U\2030\360U!W\202 E?E\202 R\361=\203J\315 
\210F?F\202 R\362=\203\\\315 \210H?H\202 R\363=\203n\315 
\210I?I\202 R\364=\203\201XY\346\347\321\\210\202 
R\365=\203\264\366Z[\[\367[Z8A!\206\236\370\371![Z8@\206\251\372L
q\210\373 \210\202 R;\203\324\374R\\J\\206\310R
DCCY\346\347\321\\210\202 
R\375\203]\203\350]\237Y\202\371S\203\366SCCY\202\371\336YY\203R\376\232\203\377YBYYX
 q\210\346\347\321\\210\202 \370\201^!\210*\202 [wconfig buf 
reftex-call-back-to-this-buffer reftex-latex-syntax-table 
reftex-use-multiple-selection-buffers typekey current-window-configuration 
((set-window-configuration wconfig)) delete-other-windows syntax-table 
switch-to-buffer-other-window reftex-make-selection-buffer-name *RefTeX 
Select* reftex-erase-buffer reftex-select-label-mode add-to-list 
selection-buffers t    mode-line-buffer-identification
global-mode-string( )   S reftex-refstyle   -%- buffer-size 0 
nil message Creating Selection Buffer... reftex-insert-docstruct 
reftex-get-offset reftex-select-item reftex-show-label-location 2 throw exit 
103 114 82 reftex-reparse-document 99 115 reftex-query-label-type 116 
prefix-numeric-value 70 ...] 13)
  reftex-offer-label-menu(e)
  reftex-reference()
  call-interactively(reftex-reference nil nil)

Many thanks,
Adam



Emacs  : GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
 of 2013-03-13 on bob.porkrind.org
Package: Org-mode version 8.2.10 (8.2.10-35-g19a7d6-elpa @ 
/Users/adamjackson/.emacs.d/elpa/org-20150323/)

current state:
==
(setq
 org-export-backends '(latex md ascii html icalendar beamer)
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
 org-latex-classes '((beamer \\documentclass[presentation]{beamer} 
(\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s}) 
(\\subsubsection{%s} . \\subsubsection*{%s}))
 (article \\documentclass[11pt]{article} 
(\\section{%s} . \\section*{%s})
  (\\subsection{%s} . \\subsection*{%s}) 
(\\subsubsection{%s} . \\subsubsection*{%s})
  (\\paragraph{%s} . \\paragraph*{%s}) 
(\\subparagraph{%s} . \\subparagraph*{%s}))
 (report \\documentclass[11pt]{report} (\\part{%s} . 
\\part*{%s})
  (\\chapter{%s} . \\chapter*{%s}) (\\section{%s} . 
\\section*{%s})
  (\\subsection{%s} . \\subsection*{%s}) 
(\\subsubsection{%s} . \\subsubsection*{%s}))
 (book \\documentclass[11pt]{book} (\\part{%s} . 
\\part*{%s})
  (\\chapter{%s} . \\chapter*{%s}) (\\section{%s} . 
\\section*{%s})
  (\\subsection{%s} . \\subsection*{%s}) 
(\\subsubsection{%s} . \\subsubsection*{%s}))
 )