[O] Org release_9.0 hangs

2017-01-17 Thread Shiyuan
Hi all,
I am using emacs 24.5 (shipped with Ubuntu 16.04 LTS). When I try to
switch to org release 9.0 from git repos, emacs hangs when starting up,

This is what I did for switching to release_9.0

git clone git://orgmode.org/org-mode.git
cd org-mode
git checkout release_9.0
make autoloads

My .emacs is only two lines as follows, and I remove .emacs.d completely to
rule out any possible interactions with other packages,

(add-to-list 'load-path "~/org-mode/lisp")
(add-to-list 'load-path "~/org-mode/contrib/lisp" t)

By searching this list, I've found other people experiencing hanging
problems. My case is more dramatic, it always happen, even when I try to
open  an empty org file. Everything seems good for release_8.3.6. The
changes introducing in  release_9.0 seems to cause the hanging problem. Any
suggesting in how to track down the problem?

Shiyuan


Re: [O] xml-rpc-request error for wordpress

2015-01-22 Thread Shiyuan
Changing the blog's url  to https solves the problem.  Thank you Puneeth.

Shiyuan

On Wed, Jan 21, 2015 at 10:33 PM, Puneeth Chaganti 
wrote:

> Shiyuan,
>
> Wordpress has moved all the blogs to https.  You will need to change
> your blog's url to "https://myname.wordpress.com/xmlrpc.php"; instead
> of using http://.
>
> See: https://github.com/punchagan/org2blog/issues/177
>
> Best,
> Puneeth
>


[O] xml-rpc-request error for wordpress

2015-01-17 Thread Shiyuan
Hi all,
I have been using org2blog/wp package to manage my wordpress blog. It had
been woking very well until last week when things started to fail.
 org2blog/wp uses xml-rpc-request to connect to wordpress.com which returns
the 301 Error.  I haven't changed my emacs config for quite a long time. So
I guess something might have happened on the wordpress side or some emacs
packages break something.  I have googled around but cannot find any
relevant info.  I don't have too much experience about xml-rpc. Any help
about debugging this issue would be appreciated. The traceback is attached.
I can login wordpress and maintain my blog through the browser and web
interface.  Thanks.


 signal(error ("Error during request: 301"))
  error("Error during request: %s" 301)
  (progn (error "Error during request: %s" url-http-response-status))
  (if (> url-http-response-status 299) (progn (error "Error during request:
%s" url-http-response-status)))
  (save-current-buffer (set-buffer buffer) (if (not (numberp
url-http-response-status)) (progn (error "Why? url-http-response-status is
%s" url-http-response-status))) (if (> url-http-response-status 299) (progn
(error "Error during request: %s" url-http-response-status
  (let ((buffer (url-retrieve-synchronously server-url)))
(save-current-buffer (set-buffer buffer) (if (not (numberp
url-http-response-status)) (progn (error "Why? url-http-response-status is
%s" url-http-response-status))) (if (> url-http-response-status 299) (progn
(error "Error during request: %s" url-http-response-status
(xml-rpc-request-process-buffer buffer))
  (if async-callback-function (url-retrieve server-url
async-callback-function) (let ((buffer (url-retrieve-synchronously
server-url))) (save-current-buffer (set-buffer buffer) (if (not (numberp
url-http-response-status)) (progn (error "Why? url-http-response-status is
%s" url-http-response-status))) (if (> url-http-response-status 299) (progn
(error "Error during request: %s" url-http-response-status
(xml-rpc-request-process-buffer buffer)))
  (cond ((boundp (quote url-be-asynchronous)) (if async-callback-function
(setq url-be-asynchronous t url-current-callback-data (list
async-callback-function (current-buffer)) url-current-callback-func (quote
xml-rpc-request-callback-handler)) (setq url-be-asynchronous nil))
(url-retrieve server-url t) (if (not url-be-asynchronous) (progn (let
((result (xml-rpc-request-process-buffer ...))) (if (> xml-rpc-debug 1)
(progn (print result ...))) result (t (if async-callback-function
(url-retrieve server-url async-callback-function) (let ((buffer
(url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer
buffer) (if (not (numberp url-http-response-status)) (progn (error "Why?
url-http-response-status is %s" url-http-response-status))) (if (>
url-http-response-status 299) (progn (error "Error during request: %s"
url-http-response-status (xml-rpc-request-process-buffer buffer)
  (let ((url-request-method "POST") (url-package-name "xml-rpc.el")
(url-package-version xml-rpc-version) (url-request-data (concat "\n" (let ((temp-buffer
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer
temp-buffer) (unwind-protect (progn ... ... ...) (and ... ... "\n"))
(url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5")
(url-request-coding-system xml-rpc-use-coding-system)
(url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons
"Connection" "close") (cons "Content-Type" "text/xml; charset=utf-8"
(if (> xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer
"request-data" (cond ((boundp (quote url-be-asynchronous)) (if
async-callback-function (setq url-be-asynchronous t
url-current-callback-data (list async-callback-function (current-buffer))
url-current-callback-func (quote xml-rpc-request-callback-handler)) (setq
url-be-asynchronous nil)) (url-retrieve server-url t) (if (not
url-be-asynchronous) (progn (let ((result ...)) (if (> xml-rpc-debug 1)
(progn ...)) result (t (if async-callback-function (url-retrieve
server-url async-callback-function) (let ((buffer
(url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer
buffer) (if (not ...) (progn ...)) (if (> url-http-response-status 299)
(progn ...))) (xml-rpc-request-process-buffer buffer))
  (save-excursion (let ((url-request-method "POST") (url-package-name
"xml-rpc.el") (url-package-version xml-rpc-version) (url-request-data
(concat "\n" (let
((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer)
(unwind-protect ... ...))) "\n")) (url-mime-charset-string "utf-8;q=1,
iso-8859-1;q=0.5") (url-request-coding-system xml-rpc-use-coding-system)
(url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons
"Connection" "close") (cons "Content-Type" "text/xml; charset=utf-8"
(if (> xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer
"request-data" (cond ((boundp (quote url-be-asynchronous))

Re: [O] Babel-R TBLFM example

2014-08-25 Thread Shiyuan
Yes, it works. Thanks, Sebastien.

Shiyuan


On Mon, Aug 25, 2014 at 12:51 AM, Sebastien Vauban 
wrote:

> Shiyuan wrote:
> > I am looking at a simpler example, the pie-chart example as in this link:
> >
> http://orgmode.org/worg/org-contrib/babel/intro.html#literate-programming
> >
> > This example(src code attached in the end) first generates a table by a
> > shell command and then run a R one-liner which uses the table.  However,
> > when the R code is evaluated, I got an error about the object dirs not
> > found.  This is what I got in the buffer running R:
> > ---
> > options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient',
> > show.error.locations=TRUE)
> >>
> > Error in pie(dirs[, 1], labels = dirs[, 2]) (from
> > test-org-babe-meta-programming.org@24170fIx#1) : object 'dirs' not found
> > ---
> >
> > It looks like that the conversion is wrong.  When I run
> > `org-babel-expand-src-block`
> > on the R source code, I don't see the R object dirs is expanded to
> > anything. I don't understand how the conversion works, and how Babel
> passes
> > the table to R. Any explanation is appreciated. Which function/file
> should
> > I look at? Are there working examples for passing a table to R? Thanks.
> >
> > #+name: directories
> > #+begin_src shell :results replace
> >   cd ~ && du -sc * |grep -v total
> > #+end_src
> >
> > #+RESULTS: directories
> > |   8 | #*message*-20140319-231047# |
> > | 1168376 | Documents   |
> > | 9952288 | Downloads   |
> > |   8 | xmodmap2~   |
> >
> > #+name: directory-pie-chart(dirs = directories)
> > #+begin_src R :session R-pie-example :file ~/tmp/dirs.png
> >   pie(dirs[,1], labels = dirs[,2])
> > #+end_src
>
> AFAICT, the arguments to code blocks may not be defined and set in the
> `name' line anymore: this must be done on the `begin_src' line.
>
> So, the following should work:
>
>   #+name: directory-pie-chart
>   #+begin_src R :var dirs=directories :session R-pie-example :file
> ~/tmp/dirs.png
> pie(dirs[,1], labels = dirs[,2])
>   #+end_src
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>


Re: [O] Babel-R TBLFM example

2014-08-24 Thread Shiyuan
I am looking at a simpler example, the pie-chart example as in this link:
http://orgmode.org/worg/org-contrib/babel/intro.html#literate-programming

This example(src code attached in the end) first generates a table by a
shell command and then run a R one-liner which uses the table.  However,
when the R code is evaluated, I got an error about the object dirs not
found.  This is what I got in the buffer running R:
---
options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient',
show.error.locations=TRUE)
>
Error in pie(dirs[, 1], labels = dirs[, 2]) (from
test-org-babe-meta-programming.org@24170fIx#1) : object 'dirs' not found
---

It looks like that the conversion is wrong.  When I run
`org-babel-expand-src-block`
on the R source code, I don't see the R object dirs is expanded to
anything. I don't understand how the conversion works, and how Babel passes
the table to R. Any explanation is appreciated. Which function/file should
I look at? Are there working examples for passing a table to R? Thanks.

Shiyuan


--
#+name: directories
#+begin_src shell :results replace
  cd ~ && du -sc * |grep -v total
#+end_src

#+RESULTS: directories
|   8 | #*message*-20140319-231047# |
| 1168376 | Documents   |
| 9952288 | Downloads   |
|   8 | xmodmap2~   |

#+name: directory-pie-chart(dirs = directories)
#+begin_src R :session R-pie-example :file ~/tmp/dirs.png
  pie(dirs[,1], labels = dirs[,2])
#+end_src


On Tue, Jul 29, 2014 at 6:20 AM, Bastien  wrote:

> Hi Shiyuan,
>
> Shiyuan  writes:
>
> > Thanks Bastien. I see ob-R.el from org-mode repos has been updated.
> > So is the org-R from git-repos ready to use? Could you suggest  a
> > good place to start learning the new org-R? The source file ob-R.el?
>
> The recent committers to ob-R.el we be more in a position to help here
> but yes, reading the source is certainly a good start.
>
> I hope we will have a clear picture of what changed in ob-R.el in 8.3,
> together with updated tutorials.
>
> Best,
>
> --
>  Bastien
>


[O] Mobile-Org Issues

2014-08-17 Thread Shiyuan
Hi,
I am on iOS 7.06 and using the Orgmode from git repos(commit 381ad4b on Aug
3).  I installed the MobileOrg from AppStore and noticed the following
issues. The problems don't seriously hurt the functionality but are a bit
annoying. Any advice on fixing them is appreciated.

1. `org-mobile-push` tries to write ~/.emacs.d/.org-id-locations and
produces an error which seems to due to the permission. I guess a change of
permission would fix the problem. But my question is why org-mobile want to
generate this file? What's this file for? Can I customize the location?

2. When sync on iOS after adding a capture note, the screen is frozen.

Thanks.
Shiyuan.


Re: [O] org-table: missing vertical boundary when exported

2014-08-12 Thread Shiyuan
Rick,
   Do you mean that   and 
don't mean the same thing? Their names suggest they do the same things.
That's a terrible naming. Changing the former to the latter does fix the
problem though. Why is that?

Using the #+HTML_HEAD_EXTRA options as you suggest can also fix the
problem. But could you explain why using the HTML_HEAD_EXTRA is more
advisable than setting the  directly as table
attributes? What would you suggest if we want some tables have orders and
others don't have borders in the same html webpage?

Thank you.

Shiyuan


>Org mode generated this line in the html for table but the border is
> not
> >displayed,Â
> > >frame="hsides">
>
> The "border" attribute has nothing to do with it. It's the "frame"
> attribute
> which sets the default top and bottom borders.
>


> >If we use css style to specify the border, Â the table border would
> show
> >up:Â
> > rules="groups"
> >frame="hsides">
>
> No. The CSS should be in the header, not an attribute of the tag. Have you
> tried setting the 'HTML_HEAD_EXTRA' option?  somehting like:
> #+HTML_HEAD_EXTRA: 
> #+HTML_HEAD_EXTRA: table {border-left: 1px solid black; border-right: 1px
> solid black;}
> #+HTML_HEAD_EXTRA: 
>
>
> rick
>


Re: [O] org-table: missing vertical boundary when exported

2014-08-09 Thread Shiyuan
Hi,
I learned a bit a about html/css and took another look the issue. It
turns out that org-mode uses the border attribute which is not respected by
my browser(Google Chrome version 36.0.1985.125 on Mac 10.9.4) .

Org mode generated this line in the html for table but the border is not
displayed,


If we use css style to specify the border,  the table border would show up:


Don't know why it is that. But is there any org keywords/properties I can
specify so that  Org would not use the border  attribute but use the style
attribute instead when exporting to html? Thanks.

Shiyuan



On Tue, Jun 10, 2014 at 10:34 PM, Shiyuan  wrote:

> Yes, it seems to be related to the browser or css style stuff.  In fact,
> for the attached html in  Thorsten's previous email, the two boundaries
> vertical lines are also missing in my Google Chrome or Firefox.  Thanks.
>
> This is the example directed from copy-paste.
>
> |   |  N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
> |---++-+-+-+-+|
> | / | <> |   < | |   > |   < |  > |
> | # |  1 |   1 |   1 |   1 |   1 |  1 |
> | # |  2 |   4 |   8 |  16 |  1.4142 | 1.1892 |
> | # |  3 |   9 |  27 |  81 |  1.7321 | 1.3161 |
> |---++-+-+-+-+|
> This is my minimal config, Emacs start with '-Q  -l "~/myorg.el" which is
>
> (package-initialize)
> (org-babel-do-load-languages
>  'org-babel-load-languages
>  '((python . t)
>(emacs-lisp . t)
>(latex . t)))
>
>
>
> On Tue, Jun 10, 2014 at 6:23 AM, Rick Frankel  wrote:
>
>> On 2014-06-07 17:15, Shiyuan wrote:
>>
>>> I am following the manual
>>> example http://orgmode.org/worg/org-tutorials/tables.html [1]. But the
>>>
>>> two vertical boundary line on the very left and right
>>> is not showing up when exported to html.  Anything I am missing? Thanks.
>>>
>>
>> My guess is that it is related to the css being used to style the table
>> in your setup.
>>
>> Could you post a minimal example with the html output?
>>
>> rick
>>
>
>


Re: [O] define a new export backend

2014-07-31 Thread Shiyuan
Oops,  I've asked the dumpest question ever in the mailing list :) That's
what happens when working late.

Thanks for reply.


On Thu, Jul 31, 2014 at 4:41 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Nicolas Richard  writes:
>
> > Oops, I forgot to remove the verbosity (initially I had wrote it as a
> > (warn ...)). Here's an updated patch.
>
> Applied. Thank you.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
>


[O] define a new export backend

2014-07-31 Thread Shiyuan
Hi,
I try to define a new export backend in the new export framework. My
export backend should behaves like the html except that it transcodes
*bold* differently.  I try to following the Worg tutorial
http://orgmode.org/worg/dev/org-export-reference.html , ox-html.el and use
org-export-define-derived-backend. I can see the new backend showing up in
the export menu(C-c C-e), but my transcoder for bold is not used.  Any help
or reference pointer is appreciated.

Shiyuan


-
(org-export-define-derived-backend 'my-html-enlish 'html
  :traslate-alist '((bold . my-org-html-english-bold))
   :menu-entry
  '(?E "Export to HTML-ENGLISH"
   ((?H "As HTML buffer" my-org-html-english-export-as-html)
)))
--
(defun my-org-html-english-export-as-html
  (&optional async subtreep visible-only body-only ext-plist)
 "This is almost copied from org-html-export-as-html except using my newly
defined backend"
  (interactive)
  (org-export-to-buffer 'my-html-enlish "*Org HTML-ENG Export*"
async subtreep visible-only body-only ext-plist
(lambda () (set-auto-mode t
---
(defun my-org-html-english-bold (bold contents info)
  "Transcode BOLD from Org to HTML. Intead of using ordinary bold, we use
color to highlight the
CONTENTS is the text with bold markup.  INFO is a plist holding
contextual information."
  (format " %s "
  contents))


[O] org-latex filters

2014-07-30 Thread Shiyuan
Hi,
I try to understand what the filter system is for and why the
transcoders itself doesn't suffice. So I take an example and want to see
how the filters are used in real exporter.  I look at ox-latex.el and try
to make sense of the filters

1. There are only two filters are used:

 :filters-alist '((:filter-options . org-latex-math-block-options-filter)
   (:filter-parse-tree . org-latex-math-block-tree-filter))

The purpose of org-latex-math-block-options-filter seems to be converting
whatever in the property list of :author, :date, :title  to strings of
latex commands(please correct me if I am wrong).  But what is the purpose
of org-latex-math-block-tree-filter? The org-latex--wrap-latex-math-block
is quite sophisticate and I don't get what it's doing.

-
(defun org-latex-math-block-options-filter (info backend)
  (dolist (prop '(:author :date :title) info)
(plist-put info prop
   (org-latex--wrap-latex-math-block (plist-get info prop) info

(defun org-latex-math-block-tree-filter (tree backend info)
  (org-latex--wrap-latex-math-block tree info))


2. For the filters of the form :filter-TYPE, there is also a transcoder for
processing the same TYPE. For example, for bold, there are :filter-bold,
but bold is also processed in the transcoder specified in the transcoder
alist when the backend is defined(by org-export-define-backend). When shall
we use a transcode and when shall we use a filter?

Thank you.

Shiyuan


Re: [O] Babel-R TBLFM example

2014-07-28 Thread Shiyuan
Thanks Bastien. I see ob-R.el from org-mode repos has been updated. So is
the org-R from git-repos ready to use? Could you suggest  a good place to
start learning the new org-R? The source file ob-R.el?

Shiyuan


On Mon, Jul 28, 2014 at 6:21 AM, Bastien  wrote:

> Hi Shiyuan,
>
> Shiyuan  writes:
>
> > Also, I found this tutorial for org-R http://orgmode.org/worg/
> > org-tutorials/org-R/org-R.html, however, the org-R-apply function
> > seems no longer available in my org mode 8.2.6. Is org-R supposed to
> > be deprecated?
>
> No, but it's moving.  Since ob-R.el is perhaps one of the most useful
> Babel library out there, we need to document the changes carefully in
> etc/ORG-NEWS.
>
> --
>  Bastien
>


[O] How to show the complete syntax tree

2014-07-13 Thread Shiyuan
Hi,
The command I can find in the manual to show the syntax tree is
(org-element-parse-buffer). However, when the structure is output to the
buffer, by using the commands C-u M-: (org-element-parse-buffer), it seems
that only the part up to a certain depth is printed.

For example, if the current org buffer has the following content:

#+TITLE: Hello World
Hello World!
* HEADLINE 1
** Sub-topic
+ ItemA
+ ItemB
- Item1
- Item2
*** Sub-Sub-topic
\begin{equation}
\label{eq:test}
Bx=b
\end{equation}

When apply C-u M-: (org-element-parse-buffer),  the sub-sub-topic level is
completely omitted in the printout:

(org-data nil (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35
:post-blank 0 :parent #0) (keyword (:key "TITLE" :value "Hello World"
:begin 1 :end 22 :post-blank 0 :post-affiliated 1 ...)) (paragraph (:begin
22 :end 35 :contents-begin 22 :contents-end 35 :post-blank 0
:post-affiliated 22 ...) #("Hello World!
" 0 13 ...))) (headline (:raw-value "HEADLINE 1" :begin 35 :end 174
:pre-blank 0 :contents-begin 48 :contents-end 173 ...) (headline
(:raw-value "Sub-topic" :begin 48 :end 173 :pre-blank 0 :contents-begin 62
:contents-end 173 ...) (section ... ...) (headline ... ...

What's the recommended way to show the syntax tree? Thanks.

Shiyuan


[O] key collision for auto completion

2014-07-13 Thread Shiyuan
Hi all,
 According to  the manual :
 http://orgmode.org/manual/Special-symbols.html
<http://orgmode.org/manual/Special-symbols.html> , M-tab would perform auto
complete in org mode for special symbols. However, it looks like that the
key is shadowed by flyspell-auto-correct-word on my emacs and I need to
rebind the key.  I digged into the org.el file but failed to locate the
code for key binding.  Any pointer or hints are appreciated. In particular,
what command is M-tab supposed to be bound to for auto completion for the
special symbols? Thanks.

Shiyuan


Re: [O] Change font size temporarily for pdf export

2014-06-28 Thread Shiyuan
I found one solution which surrounds the src block by
#+LATEX: \scriptsize
#+BEGIN_SRC R
print("This block is in scriptsize")
#+END_SRC R
#+LATEX: \normalize




On Sat, Jun 28, 2014 at 11:09 PM, Shiyuan  wrote:

> Hi,
>When a src code block is exported to latex-pdf, the src lines sometimes
> are too long to fit in a pdf line. One easy way to handle this problem I
> can think of is to temporarily change font size. What is the best way to do
> that in org model?  Say that if I have two src blocks, I want the first
> code block to be typeset in scriptsize but the second block typeset in
> normalsize .
>
> #+BEGIN_SRC R
> print("This block in scriptsize")
> ..
> #+END
>
> #+BEGIN_SRC R
> print("This block back to normalsize")
> ..
> #+END
>
> Thanks.
>


[O] Change font size temporarily for pdf export

2014-06-28 Thread Shiyuan
Hi,
   When a src code block is exported to latex-pdf, the src lines sometimes
are too long to fit in a pdf line. One easy way to handle this problem I
can think of is to temporarily change font size. What is the best way to do
that in org model?  Say that if I have two src blocks, I want the first
code block to be typeset in scriptsize but the second block typeset in
normalsize .

#+BEGIN_SRC R
print("This block in scriptsize")
..
#+END

#+BEGIN_SRC R
print("This block back to normalsize")
..
#+END

Thanks.


Re: [O] R src block not highlighted in pdf

2014-06-28 Thread Shiyuan
Thank you for the pointers. I got minted-pygments working using the
following setup:
(setq org-latex-listings 'minted)
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-pdf-process
  '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f"  "pdflatex -shell-escape -interaction nonstopmode -output-directory %o
%f"))



On Fri, Jun 27, 2014 at 3:37 PM, Nick Dokos  wrote:

> Shiyuan  writes:
>
> > I use the following setting. The keywords are correctly recognized and
> are in bold face, but not in color. Are there any other
> > steps for colors.
> >
> > (require 'ox-latex)
> >   (add-to-list 'org-latex-packages-alist '("" "listings"))
> >   (add-to-list 'org-latex-packages-alist '("" "color"))
> >
>
> Not sure what version of listings I have, but I get the same behaviour:
> bold face but no color. You have to modify the settings. For example:
>
> \lstset{ %
>   ...
>   commentstyle=\color{green},  % comment style
>   ...}
>
> will colour comments green. See the listings manual for more details:
>
>http://mirror.hmc.edu/ctan/macros/latex/contrib/listings/listings.pdf
>
> You might want to try pygments and minted instead. It's a bit fiddly
> to set up but does give you colour out of the  box.
>
> Nick
>
>
>


Re: [O] R src block not highlighted in pdf

2014-06-27 Thread Shiyuan
I use the following setting. The keywords are correctly recognized and are
in bold face, but not in color. Are there any other steps for colors.

(require 'ox-latex)
  (add-to-list 'org-latex-packages-alist '("" "listings"))
  (add-to-list 'org-latex-packages-alist '("" "color"))

Also, thank you for reminding me of the `apropos`.


On Fri, Jun 27, 2014 at 11:38 AM, Grant Rettke 
wrote:

> Just ran apropos and it looks like org-latex-listings might be the one.
> Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
> g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
>
> On Fri, Jun 27, 2014 at 12:23 PM, Shiyuan  wrote:
> > Hi,
> > I have a R code src block in a org file. When exported to html, the R
> > code is correctly syntax highlighted. But when exported to pdf(latex),
> the R
> > code is not highlighted. I found this thread
> > https://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg00379.html
> > which suggests setting the variable org-export-latex-listings. This
> variable
> > seems no longer exist in Org 8.2.6.  What variables shall I set so that
> the
> > R code is syntax highlighted when exported to pdf in Org mode 8.2.6?
> Thanks.
> >
> > Shiyuan
>


[O] R src block not highlighted in pdf

2014-06-27 Thread Shiyuan
Hi,
I have a R code src block in a org file. When exported to html, the R
code is correctly syntax highlighted. But when exported to pdf(latex), the
R code is not highlighted. I found this thread
https://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg00379.html
<https://lists.gnu.org/archive/html/emacs-orgmode/2010-07/msg00379.html> which
suggests setting the variable org-export-latex-listings. This variable
seems no longer exist in Org 8.2.6.  What variables shall I set so that the
R code is syntax highlighted when exported to pdf in Org mode 8.2.6?
Thanks.

Shiyuan


[O] Babel-R vs. ESS

2014-06-25 Thread Shiyuan
Hi all,
I am learning R and  use Emacs to work with R. I googled around and I
found two options: ESS and Org-R/Org-Babel.
Babel speaks multiple languages( Any languages?-if we write some sort of
parser, which I assume is not terribly difficult under Babel?).

But if R is the primary language I would use, which option (Babel-R vs ESS)
is more advisable? I do want a nice integration of graphics/source code
into a paper/slides.

Any suggestions/options are appreciated.

Shiyuan


[O] Babel-R TBLFM example

2014-06-24 Thread Shiyuan
Hi all,
I am looking at the Babel R example in
http://orgmode.org/worg/org-tutorials/org-R/org-R.html

This short example show how to use code block in Org Tables.
The example first makes an org-mode table, which I can follow and reproduce
the result:

#+name: tbl-example-data()
#+begin_src R
runif(n=5, min=0, max=1)
#+end_src

#+RESULTS: tbl-example-data
|  0.118510485393927 |
|  0.742342338664457 |
|  0.438421099446714 |
| 0.0867570964619517 |
|  0.604204315226525 |

Then it defines r source code block and use TBLFM

#+name: R-mean(x)
#+begin_src R
mean(x)
#+end_src

#+RESULTS: R-mean

#+tblname: summaries
| mean   |
||
| #ERROR |
#+TBLFM: @2$1='(sbe "R-mean" (x "tbl-example-data()"))

When I export to html(C-c C-e h o), the  #+TBLFM seems to be ignored and
shows  no effect. When I place my cursor in the table and recalculate the
table formula using C-u C-c C-c in the table. I got an error as shown
above.   In the *Message* buffer, I can see the following messages.
byte-code: Beginning of buffer [8 times]
Re-applying formulas to full table...
Re-applying formula to field: @2$1
Re-applying formulas to full table...(line 1)
Re-applying formula to field: @2$1
Re-applying formulas to 1 lines...done
Re-applying formulas...done [2 times]

Any steps I missed? I am using org mode 8.2.6

Also, I found this tutorial for org-R
http://orgmode.org/worg/org-tutorials/org-R/org-R.html, however, the
org-R-apply function seems no longer available in my org mode 8.2.6. Is
org-R supposed to be deprecated?

Thanks.

Shiyuan


Re: [O] LaTex best practice in org-mode

2014-06-23 Thread Shiyuan
Hi Thorsten,
Thank you very much for the detailed step-by-step instructions. I will try
it out.
BTW: your email is very well-structured . Do you write your email in
org-mode or some other emacs mode which can recognize  [C-h f function-name
RET] and insert the results into the email?

Shiyuan


On Sun, Jun 22, 2014 at 1:20 AM, Thorsten Jolitz  wrote:

> Shiyuan  writes:
>
> Hi,
>
> > We can write LaTex directly in org-mode without put it in a SRC block.
> > When the code is exported, the latex syntax will be handled correctly
> > to html or pdf. That's very nice part of org mode. However, if we don't
> > put the latex code into a SRC block, the latex syntax is not correctly
> > highlighted (in the code attached below, the first equation is not
> > highlighted). Another benefit of putting the latex code into SRC block
> > is that we can easily switch to the latex mode to edit the code
> > snippet using C-c ' and in the latex mode, we can use some full-fleged
> > latex package like auctex. However, the latex code in the SRC block is
> > ignored when exported to html. For example, when I exported the
> > following to html, the first equation shows up in the html but the
> > second seconed does not. Any way to make the html exporter to
> > generated the second equation too without taking away the
> > BEGIN_SRC/END_SRC? What's the best practice to write latex in
> > org-mode. Thanks.
> >
> > \begin{equation}
> > \label{eq:test}
> > Bx=b
> > \end{equation}
> >
> > #+BEGIN_SRC latex
> >
> > \begin{equation}
> > \label{eq:test}
> > Ax=b
> > \end{equation}
> > #+END_SRC
>
> When you know how to write Emacs Lisp, you should probably define a
> derived export backend from ox-html:
>
> ,[ C-h f org-export-define-derived-backend RET ]
> | org-export-define-derived-backend is a compiled Lisp function in
> | `ox.el'.
> |
> | (org-export-define-derived-backend CHILD PARENT &rest BODY)
> |
> | Create a new back-end as a variant of an existing one.
> |
> | CHILD is the name of the derived back-end.  PARENT is the name of
> | the parent back-end.
> |
> | BODY can start with pre-defined keyword arguments.  The following
> | keywords are understood:
> |
> |   :export-block
> |
> | String, or list of strings, representing block names that
> | will not be parsed.  This is used to specify blocks that will
> | contain raw code specific to the back-end.  These blocks
> | still have to be handled by the relative `export-block' type
> | translator.
> |
> |   :filters-alist
> |
> | Alist of filters that will overwrite or complete filters
> | defined in PARENT back-end.  See `org-export-filters-alist'
> | for a list of allowed filters.
> |
> |   :menu-entry
> |
> | Menu entry for the export dispatcher.  See
> | `org-export-define-backend' for more information about the
> | expected value.
> |
> |   :options-alist
> |
> | Alist of back-end specific properties that will overwrite or
> | complete those defined in PARENT back-end.  Refer to
> | `org-export-options-alist' for more information about
> | structure of the values.
> |
> |   :translate-alist
> |
> | Alist of element and object types and transcoders that will
> | overwrite or complete transcode table from PARENT back-end.
> | Refer to `org-export-define-backend' for detailed information
> | about transcoders.
> |
> | As an example, here is how one could define "my-latex" back-end
> | as a variant of `latex' back-end with a custom template function:
> |
> |   (org-export-define-derived-backend 'my-latex 'latex
> |  :translate-alist '((template . my-latex-template-fun)))
> |
> | The back-end could then be called with, for example:
> |
> |   (org-export-to-buffer 'my-latex "*Test my-latex*")
> |
> | [back]
> `
>
> and in that backend do only one thing, define a new transcode function
> for element `src-block'
>
> ,[ C-h v org-element-all-elements RET ]
> | org-element-all-elements is a variable defined in `org-element.el'.
> | Its value is (babel-call center-block clock comment comment-block
> | diary-sexp drawer dynamic-block example-block export-block fixed-width
> | footnote-definition headline horizontal-rule inlinetask item keyword
> | latex-environment node-property paragraph plain-list planning
> | property-drawer quote-block section special-block src-block table
> | table-row verse-block)
> |
> |
> |   This variable may be risky if used as a file-local variable.
>

[O] LaTex best practice in org-mode

2014-06-21 Thread Shiyuan
Hi all,
Hi all,
   We can write LaTex directly in org-mode without put it in a SRC block.
When the code is exported, the latex syntax will be handled correctly to
html or pdf. That's very nice part of org mode. However, if we don't put
the latex code into a SRC block, the latex syntax is not correctly
highlighted (in the code attached below, the first equation is not
highlighted). Another benefit of putting the latex code into SRC block is
that we can easily switch to the latex mode to edit the code snippet using
C-c ' and in the latex mode, we can use some full-fleged latex package like
auctex. However, the latex code in the SRC block is ignored when exported
to html. For example, when I exported the following to html, the first
equation shows up in the html but the second seconed does not.  Any way to
make the html exporter to generated the second equation too without taking
away the BEGIN_SRC/END_SRC? What's the best practice to write latex in
org-mode. Thanks.

\begin{equation}
\label{eq:test}
Bx=b
\end{equation}

#+BEGIN_SRC latex

  \begin{equation}
\label{eq:test}
Ax=b
  \end{equation}
#+END_SRC


Re: [O] babel python example not reproducible

2014-06-16 Thread Shiyuan
Hi all,
  I found a solution to fix the echo problem of the emacs python shell:
http://stackoverflow.com/questions/8060609/python-interpreter-in-emacs-repeats-lines

That is, in the Interior Python buffer, do
M-: (setq comint-process-echoes t) ;; or nil

Now, if I enter command directly in the interior python buffer, the command
is not echoed and this is what I want.

However, When I evaluate the python src code block in org-mode(by `C-c
C-c`), the problem persists. I notice every time I evaluate the block, I
see 'org_babel_python_eoe' in the interior python buffer.

I  stumbled on a very strange emacs behavior. When I fiddled around, at
some point, I produced the correct answer as the manual. I thought I got
the right setup, but when I saved everything and restarted emacs, problem
persists. Will it be a sign of anything wrong?

What's even stranger is that: the evaluation for the first time gives
different results from the evaluation for the second time,  on exactly the
same src_block:

This is what I got when I evaluation the code block for the first time:
-
#+BEGIN_SRC python :results output :session foo
x=100
print "hello"
2
print "bye"
#+END_SRC

#+RESULTS:
#+begin_example

x=100
>>> print "hello"
>>> hello
2
2
print "bye"
bye


#+end_example
---
---

The following is what I got when I evaluate the same block again:
#+BEGIN_SRC python :results output :session foo
x=100
print "hello"
2
print "bye"
#+END_SRC

#+RESULTS:
: x=100
: print "hello"
: hello
: 2
: 2
: print "bye"
: bye
:
:

Notice that the prompt symbol ">>>" is in the result for the first
evaluation but not in the second evaluation.  Also the result is not
embedded in the #+being_example/#+end_example for the second evaluation.

I want to hunt down the problem. Any hints/helps is greatly appreciated.

Shiyuan




On Mon, Jun 16, 2014 at 9:12 AM, Doyley, Marvin 
wrote:

> Hi Eric,
>
> Thanks for showing me the smart way of doing this.
>
> cheers,
> M
> --
>
>
>
>


Re: [O] babel python example not reproducible

2014-06-15 Thread Shiyuan
The two setting doesn't seem to have effect.
(setq python-shell-interpreter "ipython")
(setq python-shell-interpreter-args "--pylab")
When I did `C-c C-c` on the SRC block to execute the code, emacs created a
buffer with the interior python process. When I switched to the process, I
saw it is python 2.5.3, not ipython.

Also, it looks like the problem is with the shell interpreter. If I enter
command directly in the shell buffer, the shell buffer will echo command
itself and then the result.

>>> print "Hello"
print "Hello"
Hello.

Is there any setting to control this shell behavior? Can I make the python
shell not echo the command? Thanks.


On Wed, Jun 11, 2014 at 12:48 AM, Doyley, Marvin 
wrote:

> Works for me, see example below
> #+BEGIN_SRC python :results output :session foo
>
> x=100
> print "hello"
> 2
> print "bye"
> #+END_SRC
>
> #+RESULTS:
> :
> : >>> hello
> : 2
> : bye
>
> #+BEGIN_SRC python :results output :session foo
>
> print "hello good bye"
> print "Printing value from previous session", x
> #+END_SRC
>
> #+RESULTS:
> :
> : hello good bye
> : Printing value from previous session 100
>
> The only difference is that I like to give my session a name and for
> what it is worth I am using ipython (don't think this will make a
> difference). You can do this including the
> following statement in your .emacs file
>
> (setq python-shell-interpreter "ipython")
> (setq python-shell-interpreter-args "--pylab")
>
> Hope this help.
> Cheers,
> M
>
>
>


Re: [O] Remove the build-in orgmode

2014-06-10 Thread Shiyuan
Thanks for the reply and the tips.

Just add another small tip to this thread:
`-Q`/`-q` skips ELPA load path. So we need to manually add the ELPA load
path to the debugorg.el. It looks like that by default the ELPA org-mode
load path is ~/.emacs.d/org/$DATE


On Fri, Jun 6, 2014 at 10:57 PM, Thorsten Jolitz  wrote:

> Achim Gratz  writes:
>
> > Nick Dokos writes:
> >> I did that in the past (presumably for reasons similar to Thorsten's)
> >> and I don't bother any longer (overriding is simple enough as you point
> >> out), but the question  still bugs me: what's so bad about it?
> >
> > The reason it is bad is that parts of the code have already leaked out
> > from the org/ directory via custom-load and autoloads and that's going
> > to break things in the least convenient moment – for instance when you
> > try to hunt down bugs via "-Q".  There simply is no way to remove the
> > builtin Org from Emacs other than at build time and it's best not to
> > pretend otherwise.  Some day Emacs might actually treat its built-in
> > packages as actual packages so that you can de-activate or replace them,
> > but I wouldn't hold my breath.
>
> That sounds reasonable enough, but somehow that least convenient moment
> never happens, while I remember *many* such moments when I still had more
> than one Org on my machine ... but maybe I just don't huntdown bugs via
> -Q often enough.
>
> --
> cheers,
> Thorsten
>
>
>


Re: [O] org-table: missing vertical boundary when exported

2014-06-10 Thread Shiyuan
Yes, it seems to be related to the browser or css style stuff.  In fact,
for the attached html in  Thorsten's previous email, the two boundaries
vertical lines are also missing in my Google Chrome or Firefox.  Thanks.

This is the example directed from copy-paste.

|   |  N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
|---++-+-+-+-+|
| / | <> |   < | |   > |   < |  > |
| # |  1 |   1 |   1 |   1 |   1 |  1 |
| # |  2 |   4 |   8 |  16 |  1.4142 | 1.1892 |
| # |  3 |   9 |  27 |  81 |  1.7321 | 1.3161 |
|---++-+-+-+-+|
This is my minimal config, Emacs start with '-Q  -l "~/myorg.el" which is

(package-initialize)
(org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)
   (emacs-lisp . t)
   (latex . t)))



On Tue, Jun 10, 2014 at 6:23 AM, Rick Frankel  wrote:

> On 2014-06-07 17:15, Shiyuan wrote:
>
>> I am following the manual
>> example http://orgmode.org/worg/org-tutorials/tables.html [1]. But the
>>
>> two vertical boundary line on the very left and right
>> is not showing up when exported to html.  Anything I am missing? Thanks.
>>
>
> My guess is that it is related to the css being used to style the table
> in your setup.
>
> Could you post a minimal example with the html output?
>
> rick
>


[O] babel python example not reproducible

2014-06-10 Thread Shiyuan
Hi,
 I try to understand the difference of "session" and "non-session" as
in
 http://orgmode.org/manual/Results-of-evaluation.html#Results-of-evaluation


However, I copy-paste the example but have different result. It looks like
that the result contains whatever sent to the interactive shell too. Any
option I need to set to reproduce the same result as in the manual?  I am
using python 2.7.5 + emacs 24.3.9 + orgmode 8.2.6.

#+BEGIN_SRC python :results output :session
 print "hello"
 2
 print "bye"
#+END_SRC

#+RESULTS:
: print "hello"
: hello
: 2
: 2
: print "bye"
: bye
:
:


Re: [O] babel setup

2014-06-09 Thread Shiyuan
For me, without the setup step, python/latex doesn't work by default. `C-c
C-c`  gives me the error :
org-babel-execute-src-block: No org-babel-execute function for latex!

But with the setup step, `C-c C-c` works now.


On Mon, Jun 9, 2014 at 8:03 AM, psycho_punch 
wrote:

> Yes, I had the same problem earlier (see the thread on required
> 'ox-publish). Here's what I did:
>
> First, I noticed that the packages get loaded only after initialization,
> so I put my org-related initialization script in the after-init-hook. Then
> after other people here told me about (package-initialize), I just placed
> it somewhere in the beginning of my emacs initialization script, and it
> worked as well.
>
> I also removed a similar script for setting up babel since I noticed my
> installation works without it anyway. I think those languages are supported
> by default.
>
>
>
> On Mon, Jun 9, 2014 at 10:54 PM, Jorge A. Alfaro-Murillo <
> jorge.a.alf...@gmail.com> wrote:
>
>> Shiyuan  writes:
>>
>> > Hi all,
>> > I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
>> > I followed this instruction
>> > http://orgmode.org/worg/org-contrib/babel/languages.html#configure
>> >
>> > and added the following to my .emacs file.
>> >
>> > (org-babel-do-load-languages
>> > 'org-babel-load-languages
>> > '((python . t)
>> > (emacs-lisp . t)))
>> >
>> > After that, org-mode mysteriously switched back to the old version
>> > 7.9. Another problem is that export command C-c C-e no longer works
>> > and generates error: Symbol's function definition is void:
>> > org-defvaralias. Is there any step I missed? Thanks.
>> >
>> > Shiyuan
>>
>> Hi Shiyuan,
>>
>> Have you tried to put (package-initialize) early (say first line) in
>> your .emacs?
>>
>> Best,
>>
>> Jorge.
>>
>>
>>
>


Re: [O] babel setup

2014-06-09 Thread Shiyuan
Yes. Putting (package-initialize) immediately before the
(org-babel-do-load-languages
...) solves the problem.



On Mon, Jun 9, 2014 at 7:54 AM, Jorge A. Alfaro-Murillo <
jorge.a.alf...@gmail.com> wrote:

> Shiyuan  writes:
>
> > Hi all,
> > I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
> > I followed this instruction
> > http://orgmode.org/worg/org-contrib/babel/languages.html#configure
> >
> > and added the following to my .emacs file.
> >
> > (org-babel-do-load-languages
> > 'org-babel-load-languages
> > '((python . t)
> > (emacs-lisp . t)))
> >
> > After that, org-mode mysteriously switched back to the old version
> > 7.9. Another problem is that export command C-c C-e no longer works
> > and generates error: Symbol's function definition is void:
> > org-defvaralias. Is there any step I missed? Thanks.
> >
> > Shiyuan
>
> Hi Shiyuan,
>
> Have you tried to put (package-initialize) early (say first line) in
> your .emacs?
>
> Best,
>
> Jorge.
>
>
>


Re: [O] babel setup

2014-06-09 Thread Shiyuan
No, I don't have anything else in my .emacs.

Thanks for the suggestion for subject line. Next time, I will write more
meaningful(and longer) subject line.




On Mon, Jun 9, 2014 at 6:48 AM, Omid  wrote:

> What else do you have in your .emacs related to Org?
>
> (BTW, it would be much better if you could write a more detailed
> subject line than "babel setup" like "Using
> org-babel-do-load-languages causes Org mode to switch to older
> version" so that the right people on the list can more easily
> prioritize answering to your email based on how urgent it is.)
>
> On 06/09/2014 01:18 AM, Shiyuan wrote:
> > Hi all,
> >   I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
> >   I followed this
> > instruction
> http://orgmode.org/worg/org-contrib/babel/languages.html#configure
> >
> > and added the following to my .emacs file.
> >
> > (org-babel-do-load-languages
> >   'org-babel-load-languages
> >   '((python . t)
> > (emacs-lisp . t)))
> >
> > After that, org-mode mysteriously switched back to the old version 7.9.
> >  Another problem is that export command C-c C-e no longer works and
> > generates error: Symbol's function definition is void: org-defvaralias.
> > Is there any step I missed? Thanks.
> >
> > Shiyuan
> >
> >
> >
>
> --
> Omid
>
> Sent from my Emacs
> GPG: 0x371DC12B (see https://u.fsf.org/yw)
>
>


[O] babel setup

2014-06-08 Thread Shiyuan
Hi all,
  I am using Emacs 24.3.9 + org-mode 8.2.6(from ELPA)
  I followed this instruction
http://orgmode.org/worg/org-contrib/babel/languages.html#configure

and added the following to my .emacs file.

(org-babel-do-load-languages
  'org-babel-load-languages
  '((python . t)
(emacs-lisp . t)))

After that, org-mode mysteriously switched back to the old version 7.9.
 Another problem is that export command C-c C-e no longer works and
generates error: Symbol's function definition is void: org-defvaralias. Is
there any step I missed? Thanks.

Shiyuan


Re: [O] org-table: missing vertical boundary when exported

2014-06-07 Thread Shiyuan
I use Emacs 24.3.9, org 8.2.6. I viewed the html on Chrome/Firebox. I don't
use emacs-w3m.  But could it be the problem of browsers? Thanks.


On Sat, Jun 7, 2014 at 2:40 PM, Thorsten Jolitz  wrote:

> Shiyuan  writes:
>
> > Hi,
> > I am following the manual example
> > http://orgmode.org/worg/org-tutorials/tables.html. But the two
> > vertical boundary line on the very left and right
> > is not showing up when exported to html. Anything I am missing?
> > Thanks.
> >
> > | | N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
> > |---++-+-+-+-+|
> > | / | <> | < | | > | < | > |
> > | # | 1 | 1 | 1 | 1 | 1 | 1 |
> > | # | 2 | 4 | 8 | 16 | 1.4142 | 1.1892 |
> > | # | 3 | 9 | 27 | 81 | 1.7321 | 1.3161 |
> > |---++-+-+-+-+|
>
>
> Looks alright for me as html in emacs-w3m:
>
> +---+
> |N|N^2|N^3|N^4|sqrt(n)|sqrt^1(N)|
> |-+---+---+---+---+-|
> |1|1  |1  |1  |1  |1|
> |-+---+---+---+---+-|
> |2|4  |8  |16 |1.4142 |1.1892   |
> |-+---+---+---+---+-|
> |3|9  |27 |81 |1.7321 |1.3161   |
> +---+
>
> Footnotes:
>
> ^1
>
> DEFINITION NOT FOUND.
>
> Author: Thorsten Jolitz
>
> Created: 2014-06-07 Sa 23:38
>
> Emacs 24.3.1 (Org mode 8.2.6)
>
> Validate
>
>
> --
> cheers,
> Thorsten
>
>
>


[O] org-table: missing vertical boundary when exported

2014-06-07 Thread Shiyuan
Hi,
I am following the manual example
http://orgmode.org/worg/org-tutorials/tables.html. But the two vertical
boundary line on the very left and right
is not showing up when exported to html.  Anything I am missing? Thanks.


|   |  N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
|---++-+-+-+-+|
| / | <> |   < | |   > |   < |  > |
| # |  1 |   1 |   1 |   1 |   1 |  1 |
| # |  2 |   4 |   8 |  16 |  1.4142 | 1.1892 |
| # |  3 |   9 |  27 |  81 |  1.7321 | 1.3161 |
|---++-+-+-+-+|


Re: [O] export org-table to wiki code

2014-06-06 Thread Shiyuan
I mean the "pipe syntax" as in http://en.wikipedia.org/wiki/Help:Table


On Fri, Jun 6, 2014 at 1:31 AM, Loris Bennett 
wrote:

> Hi,
>
> Shiyuan  writes:
>
> > Hi,
> > Is there a way to export a org-table to wiki code? Thanks.
> >
> > Shiyuan
>
> I don't think there is such a thing as "wiki code" - different wikis use
> different markup.
>
> Cheers,
>
> Loris
>
> --
> This signature is currently under construction.
>
>
>


[O] export org-table to wiki code

2014-06-06 Thread Shiyuan
Hi,
Is there a way to export a org-table to wiki code? Thanks.

Shiyuan


Re: [O] src blocks not fontified

2014-06-05 Thread Shiyuan
What ELPA repos you are using? Could you show me the value of C-h
v package-archives? Thanks.


On Thu, Jun 5, 2014 at 6:13 AM, Sebastien Vauban 
wrote:

> Shiyuan wrote:
> > I need to download the htmlize.el from the org-mode git repos separately.
> >  After that, htmlize works magically and highlights the syntax in the
> > resulting html without any extra markup. Thanks for the help.
> >
> > On Tue, Jun 3, 2014 at 11:53 AM, Nick Dokos  wrote:
> >
> >> Shiyuan  writes:
> >>
> >> > I can only find htmlfontify in ELPA, but not htmlize. Which ELPA
> >> > repository will have htmlize?  Or I need to install the .el file
> >> > manually. I can find the htmlize.el in the following link, but not
> >> > sure it's up to date.
> >> > http://www.emacswiki.org/emacs-ja/htmlize.el.
> >> >
> >>
> >> htmlize.el is included in the contrib/lisp directory of org (but I'm not
> >> sure if contrib is part of the ELPA org distribution - it is available
> >> if you get org from the git repo or from the tarball). The one I have
> >> says:
> >>
> >> ,
> >> | ;;; htmlize.el --- Convert buffer text and decorations to HTML.
> >> |
> >> | ;; Copyright (C) 1997-2013 Hrvoje Niksic
> >> |
> >> | ;; Author: Hrvoje Niksic 
> >> | ;; Keywords: hypermedia, extensions
> >> | ;; Version: 1.43
> >> `
>
> You can find it in ELPA. Mine:
>
>   ╭
>   │ ;;; htmlize.el --- Convert buffer text and decorations to HTML.
>   │
>   │ ;; Copyright (C) 1997-2003,2005,2006,2009,2011,2012 Hrvoje Niksic
>   │
>   │ ;; Author: Hrvoje Niksic 
>   │ ;; Keywords: hypermedia, extensions
>   │ ;; Version: 20130207.1202
>   │ ;; X-Original-Version: 1.47
>   ╰
>
> Best regards,
>   Seb
>
> --
> Sebastien Vauban
>
>
>


Re: [O] src blocks not fontified

2014-06-04 Thread Shiyuan
I need to download the htmlize.el from the org-mode git repos separately.
 After that, htmlize works magically and highlights the syntax in the
resulting html without any extra markup. Thanks for the help.




On Tue, Jun 3, 2014 at 11:53 AM, Nick Dokos  wrote:

> Shiyuan  writes:
>
> > I can only find htmlfontify in ELPA, but not htmlize. Which ELPA
> > repository will have htmlize?  Or I need to install the .el file
> > manually. I can find the htmlize.el in the following link, but not
> > sure it's up to date.
> > http://www.emacswiki.org/emacs-ja/htmlize.el.
> >
>
> htmlize.el is included in the contrib/lisp directory of org (but I'm not
> sure if contrib is part of the ELPA org distribution - it is available
> if you get org from the git repo or from the tarball). The one I have
> says:
>
> ,
> | ;;; htmlize.el --- Convert buffer text and decorations to HTML.
> |
> | ;; Copyright (C) 1997-2013 Hrvoje Niksic
> |
> | ;; Author: Hrvoje Niksic 
> | ;; Keywords: hypermedia, extensions
> | ;; Version: 1.43
> `
>
> Nick
>
>
>


Re: [O] src blocks not fontified

2014-06-03 Thread Shiyuan
I can only find htmlfontify in ELPA, but not htmlize. Which ELPA repository
will have htmlize?  Or I need to install the .el file manually. I can find
the htmlize.el in the following link, but not sure it's up to date.
http://www.emacswiki.org/emacs-ja/htmlize.el.

Thank you.


On Sun, Jun 1, 2014 at 3:46 PM, Omid  wrote:

> One way is to use the package htmlize, which you can install from ELPA
> using M-x package-install RET htmlize
>
> http://www.emacswiki.org/emacs/Htmlize
>
> Omid
>
> Sent from my Emacs
>
> On 06/01/2014 06:40 PM, Shiyuan wrote:
> > That solves the problem. Thanks Omid.
> > Should this be the default setup? It seems more nature to fontify the
> > src block than not.
> >
> > Also, when I export the org file to html, the src block is not fontified
> > in the resulting html webpage. Is there another option to turn this
> > function on? Thanks.
> >
> >
> > On Sun, Jun 1, 2014 at 3:17 PM, Omid  > <mailto:omidl...@gmail.com>> wrote:
> >
> > Hi Shiyuan,
> >
> > Add
> >
> > (setq org-src-fontify-natively t)
> >
> > to your .emacs.
> >
> > Omid
> >
> > Sent from my Emacs
> >
> > On 06/01/2014 06:13 PM, Shiyuan wrote:
> > > Hi,
> > > I am using Emacs 24.3 with the built-in org mode(7.9.3). The
> src
> > > code block is not fontified (Emacs is started with -Q option)
> > > #+BEGIN_SRC emacs-lisp
> > > (defun org-xor (a b)
> > >   "Exclusive or."
> > > (if a (not b) b))
> > > #+END_SRC
> > >
> > > This is my first time to use org-mode, so I could miss some setup
> > > steps.Do I need to do any setup in my .emacs if I just use the
> > built-in
> > > org?
> > >
> > > Thanks.
> > >
> > > Shiyuan
> >
> >
>


Re: [O] src blocks not fontified

2014-06-01 Thread Shiyuan
That solves the problem. Thanks Omid.
Should this be the default setup? It seems more nature to fontify the src
block than not.

Also, when I export the org file to html, the src block is not fontified in
the resulting html webpage. Is there another option to turn this function
on? Thanks.


On Sun, Jun 1, 2014 at 3:17 PM, Omid  wrote:

> Hi Shiyuan,
>
> Add
>
> (setq org-src-fontify-natively t)
>
> to your .emacs.
>
> Omid
>
> Sent from my Emacs
>
> On 06/01/2014 06:13 PM, Shiyuan wrote:
> > Hi,
> > I am using Emacs 24.3 with the built-in org mode(7.9.3). The src
> > code block is not fontified (Emacs is started with -Q option)
> > #+BEGIN_SRC emacs-lisp
> > (defun org-xor (a b)
> >   "Exclusive or."
> > (if a (not b) b))
> > #+END_SRC
> >
> > This is my first time to use org-mode, so I could miss some setup
> > steps.Do I need to do any setup in my .emacs if I just use the built-in
> > org?
> >
> > Thanks.
> >
> > Shiyuan
>
>


[O] Remove the build-in orgmode

2014-06-01 Thread Shiyuan
Hi,
I updated Org-mode from ELPA. If I start emacs normally, M-x
org-version does show the new version(8.2.6). But if I start emacs  with
-Q, emacs will still run the built-in version(7.9.3). This is not
convenient for debugging purpose. Is there anyway to remove the built-in
version 7.9.3 completely so that even if I start emacs with -Q, emacs still
use the new version 8.2.6 from ELPA.  Thanks.

Shiyuan


[O] src blocks not fontified

2014-06-01 Thread Shiyuan
Hi,
I am using Emacs 24.3 with the built-in org mode(7.9.3). The src code
block is not fontified (Emacs is started with -Q option)
#+BEGIN_SRC emacs-lisp
(defun org-xor (a b)
  "Exclusive or."
(if a (not b) b))
#+END_SRC

This is my first time to use org-mode, so I could miss some setup steps.Do
I need to do any setup in my .emacs if I just use the built-in org?

Thanks.

Shiyuan