milkypostman / powerline

emacs powerline
Other
791 stars 118 forks source link

Pdf-view-mode, page numbers not shown #88

Open andersjohansson opened 9 years ago

andersjohansson commented 9 years ago

The page numbers shown in the modeline when using pdf-view-mode from the brilliant pdf-tools (https://github.com/politza/pdf-tools) are not shown with powerline: with-powerline Without powerline: without-powerline

What pdf-view-mode does is setting mode-line-position locally for the mode:

(setq-local mode-line-position
          '(" P" (:eval (number-to-string (pdf-view-current-page)))
            "/" (:eval (number-to-string (pdf-cache-number-of-pages)))))

https://github.com/politza/pdf-tools/blob/master/lisp/pdf-view.el#L260

I don't know how this relates to what powerline does and if it can be solved on powerline's side.

fm4d commented 9 years ago

In case my pull request is denied, you can check it and fix it for youself. Dont forget to disable pdf-misc-size-indication-minor-mode.

milkypostman commented 9 years ago

this is because we don't use mode-line-position, rather we just show the row and column separately. so I don't know what to do here except that to change the themes to add some visualization for the pdf-tools specifically.

fm4d commented 9 years ago

Well that exactly what I did in that pull request attached.