emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: [babel] keep source code buffer open
  2012-04-11 14:58 [babel] keep source code buffer open Torsten Wagner
@ 2012-04-11 14:06 ` Eric Schulte
  2012-04-11 16:10 ` Christopher Witte
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Schulte @ 2012-04-11 14:06 UTC (permalink / raw)
  To: Torsten Wagner; +Cc: Org Mode Mailing List

Hi Torsten,

You could keep the buffer open but just save it with C-x C-s which will
propagate changes back to the original Org-mode buffer.

If you want to wrap the save->switch-to-org->export actions into a
single keystroke then I think an Emacs Macro or writing a simple
personal elisp function would be the best approach.

Best,

Torsten Wagner <torsten.wagner@gmail.com> writes:

> Hi,
> yep me again.
> I find myself hitting C-' all the day long today and was wondering is
> there a way to keep the source code buffer open instead of closing it
> after pressing again C-'.
> Now I need to do
> * C-' open the source code buffer
> * do my changed
> * C-' close the buffer take over the changes
> * C-c C-e d export as PDF after evaluation of all code blocks
> * check the PDF
> * start over again
> All this comes with window splits and most of the time I hit C-s in
> the wrong buffer because I am so used to it to save my changes to
> files.
>
> I would like to make changes in the code buffer and start e.g.
> evaluation or exporting from within the source code buffer.
>
> That is
> * Press once C-'
> * make my changes
> * press C-c ?? to move all changes over into the org-mode buffer and
> evaluate the source code block
> or
> * press C-c ?? to move all changes over into the org-mode buffer and
> export the org-buffer
> repeat
>
> Is there any way to do this?
>
> That's it for today... promise
>
> Thanks
> Torsten
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [babel] keep source code buffer open
@ 2012-04-11 14:58 Torsten Wagner
  2012-04-11 14:06 ` Eric Schulte
  2012-04-11 16:10 ` Christopher Witte
  0 siblings, 2 replies; 3+ messages in thread
From: Torsten Wagner @ 2012-04-11 14:58 UTC (permalink / raw)
  To: Org Mode Mailing List

Hi,
yep me again.
I find myself hitting C-' all the day long today and was wondering is
there a way to keep the source code buffer open instead of closing it
after pressing again C-'.
Now I need to do
* C-' open the source code buffer
* do my changed
* C-' close the buffer take over the changes
* C-c C-e d export as PDF after evaluation of all code blocks
* check the PDF
* start over again
All this comes with window splits and most of the time I hit C-s in
the wrong buffer because I am so used to it to save my changes to
files.

I would like to make changes in the code buffer and start e.g.
evaluation or exporting from within the source code buffer.

That is
* Press once C-'
* make my changes
* press C-c ?? to move all changes over into the org-mode buffer and
evaluate the source code block
or
* press C-c ?? to move all changes over into the org-mode buffer and
export the org-buffer
repeat

Is there any way to do this?

That's it for today... promise

Thanks
Torsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] keep source code buffer open
  2012-04-11 14:58 [babel] keep source code buffer open Torsten Wagner
  2012-04-11 14:06 ` Eric Schulte
@ 2012-04-11 16:10 ` Christopher Witte
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Witte @ 2012-04-11 16:10 UTC (permalink / raw)
  To: Torsten Wagner; +Cc: Org Mode Mailing List

Here is a keyboard macro I used with some success

(fset 'org-execute-from-indirect
  (lambda (&optional arg) "Keyboard macro." (interactive "p")
(kmacro-exec-ring-item (quote ("C-c ' C-c C-c C-'" 0 "%d")) arg)))

basically it just exits the source code buffer, compiles and then
reopens the source code buffer

On 11 April 2012 16:58, Torsten Wagner <torsten.wagner@gmail.com> wrote:
> Hi,
> yep me again.
> I find myself hitting C-' all the day long today and was wondering is
> there a way to keep the source code buffer open instead of closing it
> after pressing again C-'.
> Now I need to do
> * C-' open the source code buffer
> * do my changed
> * C-' close the buffer take over the changes
> * C-c C-e d export as PDF after evaluation of all code blocks
> * check the PDF
> * start over again
> All this comes with window splits and most of the time I hit C-s in
> the wrong buffer because I am so used to it to save my changes to
> files.
>
> I would like to make changes in the code buffer and start e.g.
> evaluation or exporting from within the source code buffer.
>
> That is
> * Press once C-'
> * make my changes
> * press C-c ?? to move all changes over into the org-mode buffer and
> evaluate the source code block
> or
> * press C-c ?? to move all changes over into the org-mode buffer and
> export the org-buffer
> repeat
>
> Is there any way to do this?
>
> That's it for today... promise
>
> Thanks
> Torsten
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-11 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 14:58 [babel] keep source code buffer open Torsten Wagner
2012-04-11 14:06 ` Eric Schulte
2012-04-11 16:10 ` Christopher Witte

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).