vermiculus / sx.el

Stack Exchange for Emacs
http://stackapps.com/q/3950
709 stars 40 forks source link

Completely disable header in sx buffers? #334

Closed sandric closed 6 years ago

sandric commented 6 years ago

I wish to completely disable header in sx, for all modes, how can I do that? I found that header text generated by sx--key-definitions-to-header-line function, so I rewrited it in my init.el like that:

(defun sx--key-definitions-to-header-line (definitions)
  "")

But it has no effect, what am I missing?

vermiculus commented 6 years ago

I'm not at a computer so I can't search for you, but grep the sources for header format and that'll point you in the right direction.

vermiculus commented 6 years ago

Here are the definitions you want to override:

-*- mode: ag; default-directory: "~/github/vermiculus/sx.el/" -*-
Ag started at Sun Nov 19 07:23:56

ag --ignore \*\~ --literal --group --line-number --column --color --color-match 30\;43 --color-path 1\;32 --smart-case --stats -- header-line-format .
File: sx-compose.el
124:9:  (setq header-line-format sx-compose--header-line)

File: sx-inbox.el
131:9:  (setq header-line-format sx-inbox--header-line))

File: sx-question-list.el
412:9:  (setq header-line-format sx-question-list--header-line))

File: sx-question-mode.el
244:9:  (setq header-line-format sx-question-mode--header-line)

File: sx.el
432:14:  "Return a `header-line-format' from DEFINITIONS.
5 matches
5 files contained matches
49 files searched
1041604 bytes searched
0.001688 seconds

Ag finished at Sun Nov 19 07:23:56

I'm pretty sure if you set the *--header-line variables to nil, the header line will go away. See also the definition of sx-question-mode et al.

vermiculus commented 6 years ago

Does that work for you?

sandric commented 6 years ago

@vermiculus thanks, I was able to disable header redefining sx-question-list--header-line and sx-question--header-line - once per each mode I want to disable, for some reason redefining sx--key-definitions-to-header-line once for all had no effect for me, thats was the question. But thats ok, ended up with two lines instead of one. I think issue can be closed though.