Malabarba / latex-extra

A series of usability improvements for Emacs latex-mode.
GNU General Public License v3.0
71 stars 14 forks source link

C-c C-f keybinding conflicts with AUCTeX's bindings. #9

Closed ayman closed 9 years ago

ayman commented 9 years ago

This is a very nice package, however the C-c C-f binding for latex/next-section-same-level conflicts with AUCTex's formatting binding prefix C-c C-f C-b bolds a region for example. Maybe a less conflicting default?

Malabarba commented 9 years ago

Hi there, thanks for filing this, but it's actually a duplicate (and resolved). See my second comment on #3 for the solution.

ayman commented 9 years ago

Thanks! I missed that previous issue.

C-c f b does sound quite nice as a replacement for C-c C-f C-b; I'd suggest elaborating on this in the README.md as from the emacs package installer, you don't see any of that before installing the package and one is left wondering why the keybindings have died. (I'd suspect most won't go hunting in github for an answer).

Malabarba commented 9 years ago

I've been thinking of a more instructive way to do this interactively, just haven't figured something out yet. But the readme does explain it near the start.

ayman commented 9 years ago

Indeed..thanks. I'm curious if there's some way to redefine the menu item which still lists the old binding. If I can find a solution, I'll ping back if it's of interest.

Malabarba commented 9 years ago

Absolutely! Do let me know.

ayman commented 9 years ago

Most of the docs say it should automatically pull the keybindings from the map. That said one can override/change/update the menu with something like this (for submenus and menu items):

(easy-menu-change
 '("LaTeX") "Insert Font"
 `(["Emphasize"  (TeX-font nil ?\C-e)   :keys "C-c f e"]
   ["Bold"       (TeX-font nil ?\C-b)   :keys "C-c f b"]
   ["Typewriter" (TeX-font nil ?\C-t)   :keys "C-c f t"]
   ["Small Caps" (TeX-font nil ?\C-c)   :keys "C-c f c"]
   ["Sans Serif" (TeX-font nil ?\C-f)   :keys "C-c f f"]
   ["Italic"     (TeX-font nil ?\C-i)   :keys "C-c f i"]
   ["Slanted"    (TeX-font nil ?\C-s)   :keys "C-c f s"]
   ["Roman"      (TeX-font nil ?\C-r)   :keys "C-c f r"]
   ["Calligraphic" (TeX-font nil ?\C-a) :keys "C-c f a"]))
(easy-menu-add-item nil 
   '("LaTeX") 
   ["Delete Font" (TeX-font t ?\C-d)    :keys "C-c f d"])

Note: "Calligraphic" doesn't seem to be bound/work.

Malabarba commented 9 years ago

If it's supposed to updated automatically, maybe it's worth a bug report to the dev guys. I don't use the menubar, so I hadn't detected this.

Meanwhile, I'll look into adding your code as a workaround.