help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-octave Digest, Vol 45, Issue 40


From: aditya
Subject: Re: Help-octave Digest, Vol 45, Issue 40
Date: Fri, 18 Dec 2009 16:44:20 +0100 (CET)
User-agent: SquirrelMail/1.4.9a

> Message: 1
> Date: Fri, 18 Dec 2009 09:05:42 -0500
> From: Rob Mahurin <address@hidden>
> Subject: Re: can "edit filename" open the new file in emacs itself?
> To: address@hidden
> Cc: address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=us-ascii
>
> On Fri, Dec 18, 2009 at 01:51:40PM +0100, address@hidden wrote:
>> I am using octave from within emacs. The command "edit filename" at the
>> octave shell promp opens notepad editor in windows and some other editor
>> in ubuntu. But I want that it is opened in my emacs itself. Is this
>> possible?
>
> Yes.  Within emacs (possibly in an init file), say
>       M-x server-start
> Then from octave,
>       edit('editor','emacsclient %s')
> or
>       edit('editor','emacsclient -n %s')
>
> Cheers,
> Rob

Thx Rob, this is exactly what I was looking for! Let me give everyone else
 some more details on how I modified .emacs and .octaverc to make it work,
following Rob's advice. Maybe this can be added in the octave manual,
section on emacs as I believe this is a customization that every
emacs/octave user could benefit from!

.emacs
------
;; Start emacs server
(server-start)

.octaverc
----------
# "edit" should open new buffer within current emacs process
# -n: closing this buffer shouldn't give  warning from emacs server
edit('editor','emacsclient -n %s')

# octave shell shouldn't wait for the editing to be finished
edit('mode','async')


Greetz,

Adi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]