mhayashi1120 / Emacs-imagex

Emacs image extensions
52 stars 6 forks source link

Considering contributing these improvements to Emacs #6

Closed phil-s closed 9 years ago

phil-s commented 9 years ago

This is nice, and it would be even nicer if it were in Emacs by default.

image-mode already has bindings n and p to move between images. Having additional direct bindings l, r, +, -, and m for your functionality would be a natural enhancement.

ReneFroger commented 9 years ago

I agree with this.

I tried it with

 (eval-after-load 'image+ (lambda () (local-set-key (kbd "=") 'image-sticky-zoom-in)))  
 (eval-after-load 'image+ (lambda () (local-set-key (kbd "C-=") 'image-sticky-zoom-in)))  
 (eval-after-load 'image+ (lambda () (local-set-key (kbd "-") 'image-sticky-zoom-out)))  
 (eval-after-load 'image+ (lambda () (local-set-key (kbd "m") 'image-sticky-maximize)))  
 (eval-after-load 'image+ (lambda () (local-set-key (kbd "o") 'imagex-sticky-restore-original)))

Without any succes. Another suggestion?

phil-s commented 9 years ago

Well your code defines a bunch of functions and does nothing with them. I think you wanted this:

(eval-after-load 'image+
  '(progn
     (define-key image-mode-map (kbd "=") 'image-sticky-zoom-in)
     (define-key image-mode-map (kbd "C-=") 'image-sticky-zoom-in)
     (define-key image-mode-map (kbd "-") 'image-sticky-zoom-out)
     (define-key image-mode-map (kbd "m") 'image-sticky-maximize)
     (define-key image-mode-map (kbd "o") 'imagex-sticky-restore-original)))
ReneFroger commented 9 years ago

Well, thanks for your addition but it didn't worked either. :frowning:.

phil-s commented 9 years ago

Sorry, I wasn't paying enough attention to what was in your functions. I've changed my code to use define-key with the appropriate keymap.

mhayashi1120 commented 9 years ago

It's my pleasure for your such request. But image-mode already has the similar functions (e.g. image-transform-set-rotation, image-transform-set-scale), if Emacs was compiled with imagemagick option. In addition, I don't want this implementation as a default.

MELPA is a great idea to install miscellaneous handy elisp package. :smiley:

@ReneFroger If you still have problem, please open a new issue.