[O] Generate and display image
Hi all! What I want to do is to generate image (better to say a path to an image) in the org-file and then see it posted in my blog. For example, I have such block: #+BEGIN_SRC text2image :exports results Foo Bar Baz #+END_SRC There is text2image command line utility which takes a text and converts it to the image, then returns a path to the image. When I execute that block by means of `org-babel-execute-src-block' that block executes correctly and returns a path: #+RESULTS: : [[/home/demi/images/2014-03-21-024756.png]] The issue is that that after execution of `org2blog/wp-post-buffer-and-publish' I'm expecting to see in the blog post the image but I see this path literally (instead of image): [[/home/demi/images/2014-03-21-024756.png]] How to fix that issue? Please help. I tried to change text2image program to return a path with a prefix file: and file:/// but that didn't help. Andrey
[O] Custom babel execute command with existing syntax highlighting
Hi all! I have such block: #+BEGIN_SRC my-python import sys sys.platform #+END_SRC I want it to be with syntax highlighting, so it will looks like (in a org-file) exactly as: #+BEGIN_SRC python import sys sys.platform #+END_SRC (of course the value of org-src-fontify-natively is t). but in the same time I would like that that block will be executed by means of custom org-babel-execute:my-python command. How can I achieve that? Andrey
[O] org-html-do-format-code: End of buffer
When I export org-file to the HTML by means of C-c C-e h H (as HTML buffer) I get the following error: org-html-do-format-code: End of buffer and exporting doesn't finish (buffer with the result doesn't appear). Mentioned org-file is pretty simple: #+name: basic-python #+begin_src python :results silent 'hello world' #+end_src In the same time for Emacs Lisp it does work, for example: #+name: basic-elisp #+begin_src emacs-lisp (defun test () (interactive) (message Test)) #+end_src Also I tried such commands as `org-html-export-to-html' and `org-html-export-as-html' and got the following in the *Messages* buffer: org-babel-exp process python at line 2... Here is not Git work tree org-html-do-format-code: End of buffer What is the problem? Why mentioned error occurs? How can I fix it? Please help. (org-version) 8.2.5h $ emacs --version GNU Emacs 24.3.1 I removed built in `org' package and installed it by means of el-get. Thank you, Andrey
Re: [O] org-html-do-format-code: End of buffer
Hi Bastien! Bastien b...@gnu.org writes: Hi Andrey, Andrey Tykhonov atykho...@gmail.com writes: What is the problem? Why mentioned error occurs? How can I fix it? Please help. Can you reproduce the error with (setq debug-on-error t) and send us the backtrace? If you can do this from an uncompiled version of Org, that's even better. I've tried to reproduce with (toggle-debug-on-error) and now (setq debug-on-error t) but buffer with the backtrace doesn't appear. I can see just the same messages in the *Messages* buffer that's all.
Re: [O] Connect to the ssh and execute any command
On Tue, Sep 17, 2013 at 08:54:51AM +0200, Michael Albinus wrote: Andrey Tykhonov atykho...@gmail.com writes: Hi Andrey, Hi Michael! Tramp does not use FUSE for ssh connections. Please show an example connection to the remote host, and how it fails. Here I try to ls -la and get the following error: Couldn't find a POSIX `id' command Your remote host does not find a proper id command. What happens, if you call the following commands in a shell on that remote host: # id -u id: Command not found. # id --version id: Command not found. # which id id: Command not found. # whereis id whereis: Command not found. I also didn't find 'id' by means of find / -name id As I understand TRAMP is not able to work without 'id'. Therefore TRAMP is not suitable for me... # uname -a FreeBSD {hostname} 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Sep 13 21:22:42 PDT 2013 auto-build@{hostname}:{some/path/} amd64 Here I replaced real hostname by {hostname}. Best regards, Andrey Best regards, Andrey. Best regards, Michael.
Re: [O] Connect to the ssh and execute any command
On Fri, Sep 13, 2013 at 08:45:02AM +0200, Michael Albinus wrote: Andrey Tykhonov atykho...@gmail.com writes: [Cc to tramp-de...@gnu.org, because I want to help with Tramp config] Hi all! Hi Andrey, During last several days I was trying to implement quite simple script which: 1. Creates new buffer with the shell (M-x shell) 2. Executes there ssh usern...@domain.com. As result -- the password prompt appears in the minibuffer. I manually input password. 3. Then script executes any command in the recently created buffer (shell), for example: ls -la. So I expect to see directory listing on the domain.com. but, for sorry, I cannot to do so that ls -la will be executed! I googled, I have tried many different approaches but without any luck :-( Here I should mention quite important thing: I cannot use TRAMP because it does not work with the server to which the script connects and then on which executes ls -la. (I suppose that TRAMP uses FUSE, but for sorry FUSE does not work with mine server). So TRAMP is not available for me. Tramp does not use FUSE for ssh connections. Please show an example connection to the remote host, and how it fails. First of all I added (setq tramp-verbose 6) to the ~/.emacs Then M-x eshell, and then cd /ssh:username@hostname:/some/existing/dir I get password prompt, I put correct password, then get such prompt: /ssh:username@hostname:/some/existing/dir $ Here I try to ls -la and get the following error: Couldn't find a POSIX `id' command Best regards, Andrey. Prior to the test, you should apply (setq tramp-verbose 6) This will create a Tramp debug buffer, which shall show the problem. Regards, Andrey Best regards, Michael.
[O] Connect to the ssh and execute any command
Hi all! During last several days I was trying to implement quite simple script which: 1. Creates new buffer with the shell (M-x shell) 2. Executes there ssh usern...@domain.com. As result -- the password prompt appears in the minibuffer. I manually input password. 3. Then script executes any command in the recently created buffer (shell), for example: ls -la. So I expect to see directory listing on the domain.com. but, for sorry, I cannot to do so that ls -la will be executed! I googled, I have tried many different approaches but without any luck :-( Here I should mention quite important thing: I cannot use TRAMP because it does not work with the server to which the script connects and then on which executes ls -la. (I suppose that TRAMP uses FUSE, but for sorry FUSE does not work with mine server). So TRAMP is not available for me. For example I tried: (progn (make-comint-in-buffer ssh *ssh* ssh nil usern...@domain.com) (make-comint-in-buffer ls *ssh* ls nil -la) ) ls -la does not executes. (progn (make-comint-in-buffer ssh *ssh* ssh nil usern...@domain.com) ; instead of ls -la here is pwd (start-file-process pwd *ssh* pwd) ) In *scratch* outputs just Process pwd finished (progn (start-process-shell-command ssh *ssh* ssh userna...@domain.com) (process-send-string (get-buffer-process *ssh*) pwd\n) ) Seems this one -- is overall wrong approach because start-process-shell-command does not want to show shell after I put the password in the prompt. Also I tried call-process instead of start-process-shell-command: (call-process ssh nil *ssh* t usern...@domain.com) I got Pseudo-terminal will not be allocated because stdin is not a terminal. Then... (progn (setq buffer (get-buffer-create *ssh*)) ; switch to buffer (switch-to-buffer-other-window buffer) ; execute there a shell (shell buffer) ; then executes there mine commands (process-send-string (get-buffer-process *ssh*) ssh usern...@domain.com) (comint-send-input) ; and (process-send-string (get-buffer-process *ssh*) ls -la) (comint-send-input) ) Last process-send-string does not execute in time because it is not synchronous. Last process-send-string does not wait for previous... Also I tried set-process-filter but filter just eats password prompt so I could not input password How my task could be implemented without TRAMP? Please help! Regards, Andrey
[O] different font sizes for headings
Hi all! I have installed emacs two days ago and org-mode yesterday. I'm new in it. And currently configuring everything in it. And I just recently found such screenshot: https://raw.github.com/juba/color-theme-tangotango/0a501959707b7637c72aba779651ea94cec96963/screenshots/tangotango_org.png And I'm searching via google how to configure emacs/org-mode so it can display headings (Level 1 Heading, Level 2 Heading) with different font sizes... How such thing could be done? Could you help me please? Thank you in advance! Regards, Andrey.