ratpoison-devel
[Top][All Lists]
Advanced

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

Re: [RP] libhistory-support.


From: Antoine Busque
Subject: Re: [RP] libhistory-support.
Date: Wed, 2 Aug 2017 02:14:31 -0400

On Sun, Jul 30, 2017 at 5:05 PM, Martin Hertz <address@hidden> wrote:
> After thinking about it, then as ratpoison has implemented internal history
> support itself, then maybe enabling libhistory support and adding to
> resource-usage, wouldn't be the best solution, and I only also wanted a
> single option from said lib, which was the search-in-history completion
> function(e.g. 'ch<arrow-up>' becomes 'chromium', or 'sou<arrow-up>' becomes
> 'source .ratpoisonrc' etc, which in libhistory is enabled with a preceding
> exclamation-mark), which possibly could be implemented anyway additionally
> later on, in the internal history support if deemed appropriate.

Hello Martin,

I must say I was surprised and a bit curious when I saw your first
message a few days ago, because I had never realized that ratpoison
had history expansion support via GNU readline's libhistory on top of
the built-in history.

However, when I enabled it, I too found it didn't work as expected, so
I set out to fix it. Would you mind trying to build from my branch [0]
? Just remember to `--enable-history` at compile time, and to have
`set historyexpansion 1` in your `.ratpoisonrc`.

You should find that all normal libhistory expansion tricks work. For
instance, if you have `echo foo` in your history, you can re-run it
with `!echo`, or `!?baz`, or just print the command by adding the `:p`
suffix like so `!echo:p`.

Let me know if that fixes your issues, and if so I'll submit the patch
officially to the mailing list.

The fix appears to be a one-liner: calls to `add_history` need to be
surrounded by a pair of calls to `using_history`, one of which was
missing.

As for re-enabling history expansion in default build (which you
suggest in your previous message), that's not up to me to decide, but
I'm not sure it's worth it. I don't think there's any significant
runtime overhead to having it enabled, but I imagine the intention is
probably to limit the number of dependencies for the default build
(although readline is pretty ubiquitous and probably more likely to be
already present on the system than many other libraries).

[0] https://github.com/abusque/ratpoison/tree/fix-history-expand

Best Regards,
Antoine Busque.

> Btw, i'm sorry I cannot contribute myself (yet), as a noob in C programming,
> but im doing what I can to learn it currently :)
>
> Unrelated, sorry, but I previously read about adding mouse-focus to frames,
> though not by default... I have no say in this obviously, but I would hope
> it would then be as an external compile option and external file, like
> sloppy.c, and not going into main-code. Personally I find this highly
> strange, that there's a demand for such and think it's highly misplaced, but
> of course as said, none of my business, and I respect the maintainers
> decision on this obviously.
>
> A final unrelated note, is that I would love if xft got disabled by default
> - it more than doubles memory usage and imho doesn't seem to fit into a
> small fast keyboard-centric wm, but that's just my humble opinion. though
> i've seen plenty state the same around the web - of course the only ones
> deserving a vote on this, is the actual maintainer and coding-contributors,
> I of course understand and respect.
>
> Thanks for keeping ratpoison alive everyone, it's very much appreciated!
>
> _______________________________________________
> Ratpoison-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
>



reply via email to

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