nschum / highlight-symbol.el

Emacs: automatic and manual symbol highlighting
http://nschum.de/src/emacs/highlight-symbol/
274 stars 41 forks source link

Don't swamp users with "x occurrences in buffer" messages #31

Closed tsdh closed 9 years ago

tsdh commented 9 years ago

This adds the new defcustom highlight-symbol-print-occurrence-count which can be used to control when "x occurrences in buffer" messages are emitted. Possible values are:

  t         => always (like its in the current HEAD)
  nil       => never
  explicit  => only when highlight-symbol is explicitly called (that's
               the default now)
  temporary => only when the current symbol under point is highlighted
               by highlight-symbol-mode

I've chosen a new default behavior because the current behavior with highlight-symbol-mode enabled is really annoying. Its constant messaging makes important messages (like eldoc) immediately disappear.

tsdh commented 9 years ago

What, the build fails because the byte-compiled highlight-symbol.elc has lines longer than 80 characters? I don't see how that's a sensible test.

tsdh commented 9 years ago

Nope, the elc file has even much longer lines (and of course that's ok). So it seems it's really complaining about highlight-symbol.el but its longest line is exactly 79 characters long.

Seems like a bug in your https://github.com/nschum/elisp-lint.

nschum commented 9 years ago

Thank you.

Sorry if it's confusing. The line above is just output from the compiler. But looking at your code, line 183 actually is 82 characters long. :)

tsdh commented 9 years ago

Ah, that's how I have to read it. :-)

nschum commented 9 years ago

FYI: I've just replaced this variable with highlight-symbol-occurrence-message, which is a list instead of a single value and covers the new message, which doesn't show just the count.

tsdh commented 9 years ago

OK, great.