octave-maintainers
[Top][All Lists]
Advanced

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

Re: Interest in selectively deleting history entries.


From: Philip Nienhuis
Subject: Re: Interest in selectively deleting history entries.
Date: Sun, 21 Sep 2014 10:50:12 -0700 (PDT)

Daniel Sebald wrote
> I'm curious what people's thoughts are on the ability to selectively 
> delete individual lines of history.  What I see it used for, in 
> particular, is removing a password the user accidentally types and hits 
> return.  That could happen if the user thinks the account is locked but 
> it is actually the monitor's screen saver.

Yep - recognized, but maybe not so urgent as -I suppose- it rarely happens.
And it doesn't only hold for Octave but also for shells etc. Octave's
history file is an editable text file so there is a way out.

While we are at history, another nice thing would be the ability to delete
multiple identical history entries and only retain the last one - ideally as
a configurable setting. At times I have countless "dbstep"/"dbnext" entries
that just clobber up the history.
If the relevant code is in .m-shape (rather than C++) I could have a look
myself.


> I think I saw that the internal list code has the ability to delete 
> individual lines.  So that part is straightforward.  The question is 
> what to do with the numbering.  If a line is deleted, should there just 
> be a hole in the numbering sequence where the line used to be?  I think 
> it is probably preferred to not change the number of a line in history 
> once it is assigned.  So that would make an extra level of mapping the 
> list number to a command-line number.
> 
> Is there a use for numbered history if there is nothing in the history 
> command that can act on the line number?

I suppose the history "memory" is limited?
How does the numbering work? Does it start counting from the very first item
in the history list (after having read <history_file>) or just at the first
command of the newly started Octave session?
In case of the former, what happens when two or more Octave sessions run
simultaneously on the same box (happens regularly here) and write their
history to file (same file!) when closed down?

All of this makes me assume that the history entry number makes most sense
as a per-session counter. But that's just me.

Thinking about it, relying on a history entries' number, while without doubt
potentially useful, sounds quite fragile to me.

Philip 




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Interest-in-selectively-deleting-history-entries-tp4666612p4666615.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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