* [BABEL] reload source code file after tangling?
@ 2010-07-02 7:25 Rainer M Krug
2010-07-02 12:09 ` Bernt Hansen
0 siblings, 1 reply; 6+ messages in thread
From: Rainer M Krug @ 2010-07-02 7:25 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 788 bytes --]
Hi
is it possible to open (if not open yet) or re-load the new tangled source
code after tangling?
I usually have the tangled source code open and submit the file to R for
debugging and if it would be automatically reloaded, my life would be a
little bit easier.
Cheers,
Rainer
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Cell: +27 - (0)83 9479 042
Fax: +27 - (0)86 516 2782
Fax: +49 - (0)321 2125 2244
email: Rainer@krugs.de
Skype: RMkrug
Google: R.M.Krug@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 981 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BABEL] reload source code file after tangling?
2010-07-02 7:25 [BABEL] reload source code file after tangling? Rainer M Krug
@ 2010-07-02 12:09 ` Bernt Hansen
2010-07-02 12:55 ` Rainer M Krug
0 siblings, 1 reply; 6+ messages in thread
From: Bernt Hansen @ 2010-07-02 12:09 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
Rainer M Krug <r.m.krug@gmail.com> writes:
> is it possible to open (if not open yet) or re-load the new tangled
> source code after tangling?
>
> I usually have the tangled source code open and submit the file to R
> for debugging and if it would be automatically reloaded, my life would
> be a little bit easier.
Would global-auto-revert or auto-revert-mode do what you want? I
personally use global-auto-revert mode so if any loaded file changes on
disk and my buffer contents are unmodified it gets replaced with what is
on the disk.
This of course only works if it is already open.
HTH,
Bernt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BABEL] reload source code file after tangling?
2010-07-02 12:09 ` Bernt Hansen
@ 2010-07-02 12:55 ` Rainer M Krug
2010-07-02 13:11 ` Bernt Hansen
0 siblings, 1 reply; 6+ messages in thread
From: Rainer M Krug @ 2010-07-02 12:55 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1393 bytes --]
On Fri, Jul 2, 2010 at 2:09 PM, Bernt Hansen <bernt@norang.ca> wrote:
> Rainer M Krug <r.m.krug@gmail.com> writes:
>
> > is it possible to open (if not open yet) or re-load the new tangled
> > source code after tangling?
> >
> > I usually have the tangled source code open and submit the file to R
> > for debugging and if it would be automatically reloaded, my life would
> > be a little bit easier.
>
> Would global-auto-revert or auto-revert-mode do what you want? I
> personally use global-auto-revert mode so if any loaded file changes on
> disk and my buffer contents are unmodified it gets replaced with what is
> on the disk.
>
Perfect - that is doing exactly what it should. Now I just have to remember
to activate it for the buffer.
>
> This of course only works if it is already open.
>
True - but that is only a minor annoyance.
Cheers,
Rainer
>
> HTH,
> Bernt
>
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Cell: +27 - (0)83 9479 042
Fax: +27 - (0)86 516 2782
Fax: +49 - (0)321 2125 2244
email: Rainer@krugs.de
Skype: RMkrug
Google: R.M.Krug@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 2321 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BABEL] reload source code file after tangling?
2010-07-02 12:55 ` Rainer M Krug
@ 2010-07-02 13:11 ` Bernt Hansen
2010-07-02 13:17 ` Rainer M Krug
0 siblings, 1 reply; 6+ messages in thread
From: Bernt Hansen @ 2010-07-02 13:11 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
Rainer M Krug <r.m.krug@gmail.com> writes:
> On Fri, Jul 2, 2010 at 2:09 PM, Bernt Hansen <bernt@norang.ca> wrote:
>
> Rainer M Krug <r.m.krug@gmail.com> writes:
>
> > is it possible to open (if not open yet) or re-load the new tangled
> > source code after tangling?
>
> Would global-auto-revert or auto-revert-mode do what you want? I
> personally use global-auto-revert mode so if any loaded file changes on
> disk and my buffer contents are unmodified it gets replaced with what is
> on the disk.
>
> Perfect - that is doing exactly what it should. Now I just have to
> remember to activate it for the buffer.
With global-auto-revert-mode there is nothing to remember :) since it is
active in /all/ buffers. This works great for me.
-Bernt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [BABEL] reload source code file after tangling?
2010-07-02 13:11 ` Bernt Hansen
@ 2010-07-02 13:17 ` Rainer M Krug
2010-07-02 13:27 ` Bernt Hansen
0 siblings, 1 reply; 6+ messages in thread
From: Rainer M Krug @ 2010-07-02 13:17 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1894 bytes --]
On Fri, Jul 2, 2010 at 3:11 PM, Bernt Hansen <bernt@norang.ca> wrote:
> Rainer M Krug <r.m.krug@gmail.com> writes:
>
> > On Fri, Jul 2, 2010 at 2:09 PM, Bernt Hansen <bernt@norang.ca> wrote:
> >
> > Rainer M Krug <r.m.krug@gmail.com> writes:
> >
> > > is it possible to open (if not open yet) or re-load the new tangled
> > > source code after tangling?
> >
> > Would global-auto-revert or auto-revert-mode do what you want? I
> > personally use global-auto-revert mode so if any loaded file changes
> on
> > disk and my buffer contents are unmodified it gets replaced with what
> is
> > on the disk.
> >
> > Perfect - that is doing exactly what it should. Now I just have to
> > remember to activate it for the buffer.
>
> With global-auto-revert-mode there is nothing to remember :) since it is
> active in /all/ buffers. This works great for me.
>
That is definitely true - I am just a little bit (too?) vary about
global-auto-revert-mode for files I am editing in. So they are only
reverted, if the files on the drive have changed irrespective of the state
of the buffer? Well - I should possibly try it.
Cheers,
Rainer
>
> -Bernt
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
NEW GERMAN FAX NUMBER!!!
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa
Cell: +27 - (0)83 9479 042
Fax: +27 - (0)86 516 2782
Fax: +49 - (0)321 2125 2244
email: Rainer@krugs.de
Skype: RMkrug
Google: R.M.Krug@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 2924 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [BABEL] reload source code file after tangling?
2010-07-02 13:17 ` Rainer M Krug
@ 2010-07-02 13:27 ` Bernt Hansen
0 siblings, 0 replies; 6+ messages in thread
From: Bernt Hansen @ 2010-07-02 13:27 UTC (permalink / raw)
To: Rainer M Krug; +Cc: emacs-orgmode
Rainer M Krug <r.m.krug@gmail.com> writes:
> On Fri, Jul 2, 2010 at 3:11 PM, Bernt Hansen <bernt@norang.ca> wrote:
>
> Rainer M Krug <r.m.krug@gmail.com> writes:
>
> > On Fri, Jul 2, 2010 at 2:09 PM, Bernt Hansen <bernt@norang.ca> wrote:
> >
> > Rainer M Krug <r.m.krug@gmail.com> writes:
> >
> > > is it possible to open (if not open yet) or re-load the new tangled
> > > source code after tangling?
> >
> > Would global-auto-revert or auto-revert-mode do what you want? I
> > personally use global-auto-revert mode so if any loaded file changes on
> > disk and my buffer contents are unmodified it gets replaced with what is
> > on the disk.
> >
> > Perfect - that is doing exactly what it should. Now I just have to
> > remember to activate it for the buffer.
>
> With global-auto-revert-mode there is nothing to remember :) since it is
> active in /all/ buffers. This works great for me.
>
> That is definitely true - I am just a little bit (too?) vary about
> global-auto-revert-mode for files I am editing in. So they are only
> reverted, if the files on the drive have changed irrespective of the
> state of the buffer? Well - I should possibly try it.
If you modify the buffer it doesn't revert. Only unmodified buffers
will be replaced with the contents of disk files if those change. I use
this for org-mode files and git - save all buffers, commit changes, push
to other machine, work there, commit, fetch back to first machine, and
all my org-files automatically update without me doing anything special.
Try it on a test file or two where you modify the buffer first and don't
save then change the file on disk with another editor and see how it
works. I haven't had any problems with it yet.
I auto-save my org-mode files every hour in my workstation emacs and I
tend to just leave my workstation emacs running forever.
,----[ .emacs ]
| (run-at-time "00:59" 3600 'org-save-all-org-buffers)
`----
I use this mainly for my cron job that automatically creates git commits
on the hour.
This has a nice side effect that I can just leave the house with my
Android phone, (the files save at 59 minutes past the hour), then I can
SSH in to my workstation, fire up another emacs process on the phone and
edit my org files and save. They auto-revert on my workstation and
everything Just Works(tm).
-Bernt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-02 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-02 7:25 [BABEL] reload source code file after tangling? Rainer M Krug
2010-07-02 12:09 ` Bernt Hansen
2010-07-02 12:55 ` Rainer M Krug
2010-07-02 13:11 ` Bernt Hansen
2010-07-02 13:17 ` Rainer M Krug
2010-07-02 13:27 ` Bernt Hansen
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).