Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fringe indicators don't work when emacs is started in --daemon mode #2

Closed
steckerhalter opened this issue Feb 3, 2013 · 3 comments
Closed

Comments

@steckerhalter
Copy link

i'm always using the emacsclient to get my GTK emacs frame.

(when (window-system)
  (define-fringe-bitmap 'diff-hl-bmp-empty [0] 1 1 'center)
  (diff-hl-define-bitmaps))

the window-system isn't available yet when the daemon starts. it should check for that when the frame is created and not when the mode is loaded

is it supposed to work without the GUI?

I really like this mode... it's kinda great to see the what changed and to be able to revert single hunks like that

@steckerhalter
Copy link
Author

hmm, so I tried to move the above check and definition to the turn-on-diff-hl-mode:

;;;###autoload
(defun turn-on-diff-hl-mode ()
  "Turn on `diff-hl-mode' or `diff-hl-dir-mode' in a buffer if appropriate."
  (when (window-system) ;; No fringes in the console.
    (define-fringe-bitmap 'diff-hl-bmp-empty [0] 1 1 'center)
    (diff-hl-define-bitmaps)
    (cond
     (buffer-file-name
      (diff-hl-mode 1))
     ((eq major-mode 'vc-dir-mode)
      (diff-hl-dir-mode 1)))))

not sure if that is a good solution though... at least it works for me now

@dgutov dgutov closed this as completed in 691a845 Feb 3, 2013
@dgutov
Copy link
Owner

dgutov commented Feb 3, 2013

Hey, I'm glad you like it.

Thanks for the report, your solution is fine, I just added a check around it.

@steckerhalter
Copy link
Author

cool, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants