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: Stefan van der Walt
Subject: Re: getting info about diary command
Date: Mon, 27 Mar 2006 11:33:06 +0200
User-agent: Mutt/1.5.9i

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;

Cheers
Stéfan

On Mon, Mar 27, 2006 at 04:11:20AM +0000, Corbin Champion wrote:
> 
> Did anyone have any thoughts about this?  Are there environment variables 
> set up that can be checked to see if the diary is on and what file it is 
> writing to?  Is there a way to run a command, but not have it recorded into 
> diary even if it is on?
> Thanks in advance!
> Corbin
> 
> >From: "Corbin Champion" <address@hidden>
> >To: address@hidden
> >Subject: getting info about diary command
> >Date: Fri, 24 Mar 2006 16:58:29 +0000
> >
> >Is there a way to determine if diary is currently on and if so what file 
> >it is writing to?
> >Also is there a way to do a command, but not have it show up in the diary, 
> >like evalc in Matlab?
> >Thanks!
> >Corbin



-------------------------------------------------------------
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]