politza / pdf-tools

Emacs support library for PDF files.
GNU General Public License v3.0
1.57k stars 162 forks source link

remove boundary/outline/selection surrounding pdf in pdf-view-mode #543

Closed nhmacuk closed 4 years ago

nhmacuk commented 4 years ago

Could there be a feautre added to remove/change the color of the bar and/or the outline surrounding the pdf in pdf-view?
When clicking next to a document in pdf-view-mode, a (here yellow) bar is shown on the right of the document: image When clicking the pdf, the bar dissapears but an outline (here gray) appears around the pdf: image I haven't been able to find the option to remove it, or to find out if these features are part of pdf-tools or not, but it would be very pleasing to be able to control them (e.g. make same colour as background).

politza commented 4 years ago

This looks like the cursor which should be deactivated (cursor-type should be nil). Check your configuration.

nhmacuk commented 4 years ago

Sadly, it doesn't seem to change the behavior. I tried changing it through easy-customization by setting it to "none" in the value menu, and (setq default-cursor-type 'nil) and (setq-default cursor-type 'nil) separately within my .init.

politza commented 4 years ago

Try with setq-local in the pdf buffer.

nhmacuk commented 4 years ago

I don't think I correclty understand you by doing: image Evaluating (setq-local cursor-type 'nil) and (setq-local default-cursor-type 'nil) doesn't seem to change it so far. Thanks for the lightning fast replies (and this fantastic package), I'll try to read about setq-local. Shouldn't setq-local not work if setq-default already doesn't work?

nhmacuk commented 4 years ago

I tried to set the following hooks of pdf-view with (setq-local cursor-type nil) with no result: Show Value Pdf View After Change Page Hook Show Value Pdf View Before Change Page Hook Show Value Pdf View Change Page Hook

nhmacuk commented 4 years ago

Do you have an alternative suggestion to solve my issue? It seems it is not easy to change the cursor type in evil/spacemacs: https://github.com/syl20bnr/spacemacs/issues/1543

I tried also:

(just for info: my variable values for cursor-type and evil cursor-type and spacemacs cursor are: "cursor-type is a variable defined in ‘C source code’. Its value is ‘box’ Original value was t Local in buffer ex2.pdf; global value is nil"

"evil-emacs-state-cursor is a variable defined in ‘evil-states.el’. Its value is (nil box)"

"spacemacs-evil-cursors is a variable defined in ‘config.el’. Its value is shown below. Value: (("normal" "DarkGoldenrod2" box) ("insert" "chartreuse3" (bar . 2)) ("emacs" "SkyBlue2" box) ("hybrid" "SkyBlue2" (bar . 2)) ("replace" "chocolate" (hbar . 2)) ("evilified" "LightGoldenrod3" box) ("visual" "gray" (hbar . 2)) ("motion" "plum3" box) ("lisp" "HotPink1" box) ("iedit" "firebrick1" box) ("iedit-insert" "firebrick1" (bar . 2)))" )

nhmacuk commented 4 years ago

As it seems to be related to spacemacs/evil, I made a new issue to ask the help of the spacemacs community: https://github.com/syl20bnr/spacemacs/issues/13393. Thank you for your help so far. Shall I leave this issue open or close it?

politza commented 4 years ago

Please close it.  You may reopen it if necessary.

nhmacuk commented 4 years ago

Thanks for the help!