Re: keyfreq-show spews output into minibuffer

17 views
Skip to first unread message

Xah Lee

unread,
Jul 24, 2016, 2:16:57 AM7/24/16
to ErgoEmacs
I do M-x keyfreq-show, and it shows in a buffer named *frequencies*.

what do you mean?

On Sat, Jul 23, 2016 at 8:26 PM, Kevin J <kevinw...@gmail.com> wrote:
Currently keyfreq spews its huge output into the minibuffer, showing me the bottom of the output, not the top (which is the useful part).

Also it produces very wide (120+ column output) in the *frequencies* buffer, so the text wraps around and looks "not optimal" (ie, ugly, and hard to read).

I tried to capture the output of keyfreq-show in code with "(setq string (keyfreq-show))", but that didn't work. The function really seems to want to print to the minibuffer directly.

None of this is user friendly. For my two bits, the default output should be:

- returned as a string from the function
- be less than 80 columns (maybe 72 or so)
- be easy to read
- and give only the top page of results (40 lines? 50 lines?) 

Longer outputs (everything down to 0.05% or whatever), and wider columns should be configuration options, settable in code. Or so I think.

Right now the output is barely usable, it's so unfriendly.

Is there anything I can do (other than hacking the code myself) in the way of configuration options to make the output prettier?

Thanks

--
You received this message because you are subscribed to the Google Groups "ErgoEmacs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ergoemacs+...@googlegroups.com.
To post to this group, send email to ergo...@googlegroups.com.
Visit this group at https://groups.google.com/group/ergoemacs.
For more options, visit https://groups.google.com/d/optout.

Kevin J

unread,
Jul 26, 2016, 10:42:29 AM7/26/16
to ErgoEmacs, xah...@gmail.com
Hi Xah,

Thank you for your interest. I confirm that the *frequencies* buffer is created on my machine too. (Windows 10, emacs 24.4).

But in addition, M-x keyfreq-show on my machine puts the whole buffer of output into the minibuffer too. Since I have allowed my minibuffer to expand vertically as required, to take up all but the top 3 lines of my screen, each time I run keyfreq-show, that's what happens. keyfreq-show dumps a pile of output into the minibuffer, and it takes over my entire screen (except for the top 3 lines). 

What's even worse is that only the bottom (mostly useless) part of the keyfreq output shows in the minibuffer. It would be less irritating if the good top 20 or 30 lines of the output showed, because that's the part that is interesting.

I have attached a screen shot. 

BTW, thank you for all your work on ergo keybindings. I found keyfreq through your site, and your writings. I'm on level2 ergo bindings right now, learning as I go.

Kevin J

unread,
Jul 26, 2016, 10:43:35 AM7/26/16
to ErgoEmacs, xah...@gmail.com


On Saturday, July 23, 2016 at 11:16:57 PM UTC-7, Xah Lee wrote:
junk.jpg

Kevin J

unread,
Jul 26, 2016, 10:45:20 AM7/26/16
to ErgoEmacs, xah...@gmail.com
Sorry I missed the screenshot. Here it is again.
junk.jpg

Xah Lee

unread,
Jul 26, 2016, 4:36:56 PM7/26/16
to Kevin J, ErgoEmacs
Kevin,

it's not doing that to me. After you call keyfreq-show, if you call view-echo-area-messages, do you see the output there?

or, perhaps a newer version is doing that.
I'm using
 ~/.emacs.d/elpa/keyfreq-20150924.2005

I just saw you put a bug report on the author github. 
Good thing, cause i was just going to say that.

in conclusion, i think maybe only the new version is doing that, or, perhaps it's just on your machine.
I'm thinking, it's not likely it'll spew out whole thing into minibuffer...

i'll try update today... 

Thanks for reading my site. 😁

Xah Lee

unread,
Jul 26, 2016, 4:38:11 PM7/26/16
to Kevin J, ErgoEmacs
Kevin,

i installed the latest keyfreq,
 Package-Version: 20160516.716
and calling keyfreq-show does not output to *messages* buffer.

 Xah

Kevin J

unread,
Jul 26, 2016, 5:31:22 PM7/26/16
to ErgoEmacs, kevinw...@gmail.com, xah...@gmail.com
Hi Xah, 

Thank you again for your interest. I'm having some small issues with both keyfreq and ergoemacs, both right up your alley! 

But I can already feel the difference in using your level 2 ergo keybindings - thanks for that.

I am running keyfreq 2016-05-16.716, same as you.
I use a modern Windows 10 machine, running Emacs 24.4.1.

I did as you asked, and yes, the entire output appears in the *Messages* buffer. Go figure.
I have attached a screenshot of the Messages buffer.

Booting emacs, then running keyfreq the first time, output shows in *frequencies* buffer correctly.
Change windows to the buffer, kill the Messages buffer (don't know if that is significant), 
run keyfreq a second time, and it spews output to the minibuffer and takes over my screen,
as a previous screenshot showed.

Why twice? I do not know.
ErgoEmacs seems to mess with my local buffer keybindings on the second round as well.
So either it's my setup, or maybe it's both Ergo and Keyfreq... :-) Interesting problem.

junk.jpg

Kevin J

unread,
Jul 26, 2016, 5:41:23 PM7/26/16
to ErgoEmacs, kevinw...@gmail.com, xah...@gmail.com
Looking at the code, I would guess the problem is the call to `display-message-or-buffer`.

The doc for that function talks about spewing the output to the minibuffer preferentially, if the minibuffer is resizeable and large enough. (Apparently mine is.)

Otherwise use a pop-up buffer. Is a pop-up buffer any different than a normal buffer? 
The *frequencies* buffer seems like a normal buffer to me.

Reply all
Reply to author
Forward
0 new messages