help-octave
[Top][All Lists]
Advanced

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

Re: getting info about diary command


From: Keith Goodman
Subject: Re: getting info about diary command
Date: Mon, 27 Mar 2006 06:37:38 -0800

On 3/27/06, Stefan van der Walt <address@hidden> wrote:
> It should be trivial to modify the diary command to allow a query,
> with something like
>
> octave:1> diary("status")
>
> The gist of it would be something like this (from the top of my head,
> not compiled or tested):
>
> --- pager.cc.old        2006-03-27 11:26:26.000000000 +0200
> +++ pager.cc    2006-03-27 11:28:57.000000000 +0200
> @@ -445,6 +445,12 @@
>             close_diary_file ();
>             write_to_diary_file = false;
>           }
> +       else if (arg == "status")
> +          {
> +             octave_stdout << "Diary is " << (write_to_diary file ? "on" : 
> "off") << std::endl;
> +             if (write_to_diary_file)
> +               octave_stdout << "Diary output is sent to " << diary_file << 
> std::endl;
> +          }
>         else
>           {
>             diary_file = arg;

That would be a nice feature. But if you don't know how to compile
Octave you can try

system('lsof | grep octave')

Or if you know the diary file name

system('lsof | grep octave.*diaryfile')



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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