[IPython-User] history, erratum

Benoit Zuber bzuber@mrc-lmb.cam.ac...
Mon Mar 14 04:18:35 CDT 2011

Hi Fernando and Robert,

Thanks for your replies! I also support the idea of having the history 
by block as an option.

On 13/03/2011 01:59, Fernando Perez wrote:
> On Fri, Mar 11, 2011 at 11:18 AM, Robert Kern<robert.kern@gmail.com>  wrote:
>> Not in the 0.10 series. That branch's history only records by line, not by
>> block, so that information is simply lost. In 0.11, we do record history by
>> block, but we currently add it back to readline by line. I'm not sure why we do
>> this; it may be unintentional. I would agree that I would prefer it to be by
>> block. Perhaps that could be configurable.
> I think I wrote that code... I decided to make it line-by-line because
> I find editing multiline blocks in readline so incredibly annoying as
> to be more or less useless.  But I can see others preferring the
> alternative, so making it configurable would probably be a good idea.
> The alternative implementation isn't particularly difficult, pull
> requests welcome :)  It's just a matter of:
> - feeding the blocks instead of the individual lines in
> populate_readline_history():
> https://github.com/ipython/ipython/blob/221c7c68700927d5704a9584424c3c6e76ad5305/IPython/core/history.py#L130
> - making the above choice based on a configuration flag, that needs to
> be added to the config system (that's actually more work than the
> functional change above).
> Cheers,
> f
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

Benoît Zuber
MRC Laboratory of Molecular Biology
Hills Road
United Kingdom
+44 1223 402209

More information about the IPython-User mailing list