[O] Suggestion about org-babel: executing source block asynchronously

2015-10-06 Thread kuangdash
Sometime I will run source block (such as python) which take a long time before 
I  get the final result.

Then I thought about whether or not the source block can be executed 
asynchronously, and the answer is ‘YES’.

But it seems to be difficult for me to hack the code, so I just talk about the 
process of it:

1) When execute source block, cover it up with the “executing” overlay.
2) When get the final result, get the “executing” overlay position.
3) Add the result below the “executing” overlay position, and then remove the 
overly.

It can be done!  How about it? 

Regards


[O] Suggestion about org-babel: executing source block asynchronously

2015-10-07 Thread kuangdash
Sometime I will run source block (such as python) which take a long time before 
I  get the final result.
Then I thought about whether or not the source block can be executed 
asynchronously, and the answer is ‘YES’.
But it seems to be difficult for me to hack the code, so I just talk about the 
process of it:

1)  When execute source block, cover it up with the “executing” overlay.
2)  When get the final result, get the “executing” overlay position.
3)  Add the result below the “executing” overlay position, and then remove 
the overly.

It can be done!  How about it? 

Regards



[O] Bug: #+begin_html.. #+end_html export bugs [8.3beta (release_8.3beta-1038-gcd7cbd @ d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)]

2016-01-05 Thread kuangdash


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


The content between #+begin_html and #+end_html is exported as "it is",
so I see the original html code in my browser. help...

regards

Emacs  : GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)
 of 2015-12-25
Package: Org-mode version 8.3beta (release_8.3beta-1038-gcd7cbd @ 
d:/ZballInstall/EZWinSoft/msys64/mingw64/home/github/org-mode/lisp/)

current state:
==
(setq
 org-src-lang-modes '(("ipython" . python) ("ocaml" . tuareg)
  ("elisp" . emacs-lisp) ("ditaa" . artist)
  ("asymptote" . asy) ("dot" . fundamental)
  ("sqlite" . sql) ("calc" . fundamental) ("C" . c)
  ("cpp" . c++) ("C++" . c++) ("screen" . shell-script)
  ("shell" . sh) ("bash" . sh))
 org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename
 org-export-babel-evaluate nil
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
 org-latex-classes '(("beamer"
  "\\documentclass{beamer}\n   
\\usepackage[fontset=none,UTF8,a4paper,zihao=-4]{ctex}" org-beamer-sectioning)
 ("ctexbook"
  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexbook}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("ctexrep"
  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexrep}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("ctexart"
  
"\\documentclass[fontset=none,UTF8,a4paper,zihao=-4]{ctexart}"
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
  ("\\paragraph{%s}" . "\\paragraph*{%s}")
  ("\\subparagraph{%s}" . "\\subparagraph*{%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}"))
 )
 org-latex-default-packages-alist '(("AUTO" "inputenc" t ("pdflatex"))
("T1" "fontenc" t ("pdflatex"))
("" "graphicx" t) ("" "grffile" t)
("" "longtable" nil) ("" "wrapfig" nil)
("" "rotating" nil) ("" "amsmath" t)
("" "textcomp" t) ("" "amssymb" t)
("" "capt-of" nil) ("" "hyperref" nil))
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-ref-pdf-directory "~/orgpapers/papers/"
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-format-latex-options '(:foreground default :background default :scale
1.5 :html-foreground "Black" :html-background
"T

[O] Here is a patch I want to add to org.el……

2015-02-24 Thread kuangdash




But how to do it?


Besides, I‘m glad to view your opinions,so here comes the codes:


The place:(defun org-ctrl-c-ctrl-c   the first  (cond


add:

 (cond
   ((overlayp (car (overlays-at (point (let ((overlay (car (overlays-at 
(point)
  (if (overlayp overlay)
  (delete-overlay overlay)
  )))


so that I won’t make all overlays disappear at only once “C-c C-c”




Sent from Windows Mail

Re: [O] Here is a patch I want to add to org.el……

2015-02-26 Thread kuangdash
Here comes the reason: 


“C-c C-c” always removes all overlays in org files (such as formulas, images 
.etc ),but sometimes I only want to edit one and leave the others as it is 
(overlay). 


so, I modified the org.el .(maybe I should use “advice”……)




Do you think it is deserved to patch it? 

 


Sent from Windows Mail





From: Nicolas Goaziou
Sent: ‎Wednesday‎, ‎February‎ ‎25‎, ‎2015 ‎9‎:‎03‎ ‎PM
To: kuangd...@163.com
Cc: emacs-orgmode@gnu.org





Hello,

 writes:

> But how to do it?

Just send it to the list, using "git format-patch" and a proper commit
message. See http://orgmode.org/worg/org-contribute.html for more
information.
> Besides, I‘m glad to view your opinions,so here comes the codes:
>
> The place:(defun org-ctrl-c-ctrl-c   the first  (cond
>
> add:
>
>  (cond
>((overlayp (car (overlays-at (point (let ((overlay (car (overlays-at 
> (point)
>   (if (overlayp overlay)
>   (delete-overlay overlay)
>   )))
>
>
> so that I won’t make all overlays disappear at only once “C-c C-c”

Would you mind explaining what problem you want to solve?


Regards,

-- 
Nicolas Goaziou

Re: [O] Here is a patch I want to add to org.el……

2015-02-27 Thread kuangdash
Actually, I’m just talking about ‘org-toggle-latex-fragment’……


I'm not sure if the patch proposed may cause any other problems, but I think 
this feature should be added by someone.


Thank you for your guide.






Sent from Windows Mail





From: Nicolas Goaziou
Sent: ‎Friday‎, ‎February‎ ‎27‎, ‎2015 ‎5‎:‎49‎ ‎PM
To: Andreas Leha
Cc: emacs-orgmode@gnu.org





Hello,

Andreas Leha  writes:

> I haven't looked at the patch and I do not understand how the patch
> achieves the removal of single overlays.  But I am in the same boat.  I
> also would (usually) like to remove only the rendered formula at the
> point.  I think that this should even be the default.

What Org version do you use? In development branch, C-c C-c doesn't
remove overlays related to images and formulas.

If you're talking about `org-toggle-latex-fragment', I don't think this
is an issue because images are cached, so showing them again is very
fast.


Regards,

-- 
Nicolas Goaziou

Re: [O] Here is a patch I want to add to org.el……

2015-02-27 Thread kuangdash
what if search for ‘org-remove-latex-fragment-image-overlays’ in org.el ?  I 
see it in the function ‘org-ctrl-c-ctrl-c’ (org 8.2.10)






Sent from Windows Mail





From: Nicolas Goaziou
Sent: ‎Saturday‎, ‎February‎ ‎28‎, ‎2015 ‎1‎:‎32‎ ‎AM
To: kuangd...@163.com
Cc: Andreas Leha, emacs-orgmode@gnu.org





 writes:

> I'm not sure if the patch proposed may cause any other problems, but
> I think this feature should be added by someone.

Your patch is about C-c C-c, which is no longer related to
`org-toggle-latex-fragment'. So, it cannot be applied.

Regards,

Re: [O] Here is a patch I want to add to org.el……

2015-02-28 Thread kuangdash
Hi, buddies: 

a little change has been made……






Sent from Windows Mail





From: kuangd...@163.com
Sent: ‎Saturday‎, ‎February‎ ‎28‎, ‎2015 ‎4‎:‎05‎ ‎AM
To: Nicolas Goaziou
Cc: Andreas Leha, emacs-orgmode@gnu.org





I have seen the newest org.el. The request below can be done by the patch:

when the cursor on the overlay


C-c C-c


delete the overlay


If you want to recover it , just ‘toggle all latex fragment’, which use the 
cache too(with little delay).




Is there any problem I left out?




Sent from Windows Mail





From: kuangd...@163.com
Sent: ‎Saturday‎, ‎February‎ ‎28‎, ‎2015 ‎3‎:‎38‎ ‎AM
To: Nicolas Goaziou
Cc: Andreas Leha, emacs-orgmode@gnu.org





what if search for ‘org-remove-latex-fragment-image-overlays’ in org.el ?  I 
see it in the function ‘org-ctrl-c-ctrl-c’ (org 8.2.10)






Sent from Windows Mail





From: Nicolas Goaziou
Sent: ‎Saturday‎, ‎February‎ ‎28‎, ‎2015 ‎1‎:‎32‎ ‎AM
To: kuangd...@163.com
Cc: Andreas Leha, emacs-orgmode@gnu.org





 writes:

> I'm not sure if the patch proposed may cause any other problems, but
> I think this feature should be added by someone.

Your patch is about C-c C-c, which is no longer related to
`org-toggle-latex-fragment'. So, it cannot be applied.

Regards,

0001-again.patch
Description: 0001-again.patch


Re: [O] Here is a patch I want to add to org.el……

2015-02-28 Thread kuangdash
you can open the patch file, see it manually……a little change I think it's 
useful.

as to “trailing whitespace”, I’m sorry about this format problem……






Sent from Windows Mail





From: Nick Dokos
Sent: ‎Saturday‎, ‎February‎ ‎28‎, ‎2015 ‎11‎:‎43‎ ‎PM
To: emacs-orgmode@gnu.org





 writes:

> Hi, buddies:
> a little change has been made……
>

Trying to apply your patch on top of current master, I get:

,
| $ git apply ~/Desktop/0001-again.patch 
| /home/nick/Desktop/0001-again.patch:18: trailing whitespace.
| - If the cursor is on the overlay(latex fragment .etc), delete it.
| /home/nick/Desktop/0001-again.patch:19: trailing whitespace.
| 
| /home/nick/Desktop/0001-again.patch:27: trailing whitespace.
|((overlayp (car (overlays-at (point (let ((overlay (car (overlays-at 
(point)
| /home/nick/Desktop/0001-again.patch:28: trailing whitespace.
|  (if (overlayp overlay)
| /home/nick/Desktop/0001-again.patch:29: trailing whitespace.
|  (delete-overlay overlay)
| error: patch failed: lisp/org.el:20757
| error: lisp/org.el: patch does not apply
`

-- 
Nick

[O] Bug of "org-export radio targets" with utf-8 characters

2015-04-11 Thread kuangdash

<<中文字符>> and <<<片仮名>>> can’t be exported correctly whether in latex or html. 

It seems to be the problem of function “org-export-solidify-link-text”……


So, I change the function “org-export-solidify-link-text”  in ox.el with the 
codes below


(defun org-export-solidify-link-text (s)
  "Take link text S and make a safe target out of it."
  (save-match-data
(mapconcat 'identity (org-split-string (prin1-to-string 
(encode-coding-string s 'utf-8)) "[^a-zA-Z0-9_.-:]+") "-")))


May it be help.