Disable auto-complete's pop-up menu in emacs - emacs

How to disable auto-complete's pop-up menu from showing up? I would simply like one simple suggestion much like in googles' suggestions (and also implemented in auto-complete itself).
Strangely it shows this in grey right before the pop up menu, how to make it stay like that?

Adding the following line to your init file should do the trick.
(setq ac-auto-show-menu nil)

Related

Emacs: How to enable toolbar mode and menubar mode only under a certain mode?

I use Emacs. However, I am not familiar with Lisp although I do know some functional programming, and hence I never really understood how to customize the init.el.
So basically, I want to be able to enable the toolbar mode and menubar mode only if I am in R-mode.
I know that to enable these mode simply requires:
(tool-bar-mode 1) and (menu-bar-mode 1)
but what if I want to do this locally, i.e. enable them only if I am in R-mode.
What should I put in the init.el ?
It's possible with this advice:
(defadvice select-window (after select-window-change-menubar activate)
(let ((yes-or-no
(if (memq major-mode '(r-mode lisp-interaction-mode))
1 -1)))
(menu-bar-mode yes-or-no)
(tool-bar-mode yes-or-no)))
I added two modes to the list for now, lisp-interaction-mode is the
mode of the *scratch* buffer, so that it's easy to test if the
advice works.
It's super-annoying, but kind of cool at the same time. I hope it's
what you want.
The features I describe here are close to what you are asking, but not an exact match. If your real need is to not have the tool bar around all the time when you don't need it, then they might help.
Library Tool-Bar+ provides two possibilities that limit when a tool bar is shown:
tool-bar-here-mode:
Enable the tool bar for specific frames only. Presences or absence of the tool bar is a frame thing, not a window or buffer/mode thing. When present, the actual contents of the tool bar (its icons) are specific to the selected window and its buffer. But whether or not the tool bar is shown has to do with the frame.
You enable showing the tool bar for the selected frame with command tool-bar-here-mode. You can add this to a mode hook, so that when a given mode is enabled so is the tool bar:
(add-hook 'info-mode (lambda () (tool-bar-here-mode 1)))
But that does not turn the mode off when the same frame no longer shows a buffer with that mode. In this regard it does not answer your question exactly.
tool-bar-popup-mode:
Hide the tool bar, and just put a Buttons entry in the menu-bar. When you click it the tool bar pops up for a single tool-bar action. So:
a. Click Buttons - the tool-bar pops up.
b. Click a tool-bar icon to effect its action - then the tool bar is hidden again.
For the toolbar, you can bind it to one of your mouse buttons or a key-sequence. For example, try this in your .emacs file:
(global-set-key [mouse-8] 'tool-bar-here-mode)
(tool-bar-pop-up-mode 1)
Depending on your mouse, you'll need to change 'mouse-8' to reflect the mouse button you wish to bind to. (Hint, click your desired mouse button while Emacs has the focus and you will see a message at the bottom like:
is undefined
Alternatively, you can bind to a key on your keyboard, like for instance:
(global-set-key (kbd "C-.") 'tool-bar-here-mode)
which will bind it to the CTRL-.

how to get rid of text beside emacs toolbar buttons

Running under ubuntu, emacs has a text description of buttons in the toolbar, even have something like
|(separator)
which is really annoying.
Look at the variable tool-bar-style. You can do this with C-h v. You can then either click the "customize" button at the bottom of the help buffer, or you can just evaluate
(setq tool-bar-style 'image)

emacs artist-mode bind right click to menu

I'd realy like to use emacs-artist mode to document my code as seen here: http://www.cinsk.org/emacs/emacs-artist.html
But I can't access the menu like in the screen cast. It seems that the menu is boud to the 3rd (middle) mouse button. But my mouse has only 2 buttons.
How can I reconfigure my emacs key binding for emacs artist-mode that it uses the 2nd (right) mouse button for the menu?
I'd like to set the binding only for artist-mode of course.
Thank you for your help!
This is what I put in my .emacs.el
(eval-after-load "artist"
'(define-key artist-mode-map [(down-mouse-3)] 'artist-mouse-choose-operation)
)
Thanks for the right hints!
FWIW, the right button is the one Emacs calls mouse-3 and the middle buttong is the one Emacs calls mouse-2. You should report this problem via M-x report-emacs-bug because I think it's a bug.
You can fix this problem with something like:
(define-key artist-mode-map [down-mouse-3] 'artist-mouse-choose-operation)

How to disable the hints from autocomplete in Eclim?

When I use the autocomplete of Eclim in vim, it shows a hint window at the top of my vim.
How can I disable it, or better, make it disappear automatically?
I think you mean the preview window showing details about the current completion item. Use
:set completeopt-=preview
to turn this off.

how to autoload the menu bar in emacs

I have installed YaSnippet in my emacs. Every time I start emacs, I have to turn on the menu bar manually by M-x menu-bar-mode, how do I load it by default ?
Also strangely the YaSnippet menu shows up the first time the menu bar comes up, however after I move to another buffer and back, I cant see the menu anymore ! How do I get it back without restarting emacs?
The menu bar is loaded by default in emacs. Therefore if you have to turn in on in every buffer it means that you have disabled it in your init file. Remove a line that would say something like (menu-bar-mode 0).
To start menu-bar-mode automatically, just put (menu-bar-mode 1) in your ~/.emacs
I'm afraid your yasnippet problem is outside of my realm of lore :(