make emacs semantic auto complete tip "always on" - emacs

I have just installed cedet (CVS version) and I am now playing with in emacs and my C++ source code.
Regarding the auto complete, I can invoke the tool tip and the menu from their semantic-ia-complete-* commands.
Does anyone know how I can make the auto complete tip appear automatically without my having to invoke a command (semantic-ia-complete-tip)? Is this even possible?

From CEDET website:
Automatically starting inline completion in idle time
M-x global-semantic-idle-completions-mode
This is a minor mode which runs
semantic-complete-analyze-inline-idle
during idle time. Instead of trying to
complete the symbol immediately, it
will just display the possible
completions, and underline the current
symbol the cursor is on.
In practice this means that the possible completions will appear whenever you stop typing and the cursor is under a symbol where completions are possible.
To use it, just put
(global-semantic-idle-completions-mode)
to your .emacs after loading the CEDET.

Related

Using Emacs as external editor of Xilinx ISE, how to change the related buffer to current buffer when click a design file?

It has been like one year or so since I started to learn Emacs, and I do like its power and flexibility as a general text editor. When I had tried its Auctex mode for LaTeX/TeX, I knew I will never go back to read which TeX editor I should use. When I had tried its Pyhon mode, I knew I will never be bothered to choose a Python editor/IDE. Well, the same feeling for the VHDL mode of Emacs.
I do not intend to implement Emacs as a whole FPGA design solution (although I tried that). Instead, I prefer to use Emacs just as an external editor (Xilinx ISE in my case) and follow the design sequence according to the ventor's specific IDE. So according to this Editor Options, I set the editor options in my ISE {C:\Program Files (x86)\emacs\bin\emacsclient.exe} +$2 $1. However if I use runemacs.exe as suggested by Xilinx, everytime I clicked a file in ISE a new Emacs will be started. With the emacsclient.exe it helps a bit.
When I clicked a file in ISE now, its corresponding buffer will be opened in Emacs. But the buffer remains invisible and I have to C-x b to it by my self.
Also if I clicked the error information in ISE's console, the file containing the error will be opened in the background of Emacs with the cursor in the error position.
While it is not a big deal if I compare the benefits and drawbacks brought by Emacs VHDL mode, I do like Emacs can change the file I opened in ISE to the current buffer. So the question is how to set Emacs or Xilinx ISE to change Emacs's current buffer to the one I opened or clicked in ISE?
I suppose it should be some configuration related to Emacs rather than settings in ISE (obvious there is not too much choice in ISE's options). It maybe a simple question but it's beyond my current knowledge of Emacs configuration. I really appreciate if someone here could help me on this issue. Thank you guys in advance:)
P.S. Sorry for my poor English expression. Hopefully you can understand my quesition.
With some configuration it's possible to tell Emacs to switch to the related buffer. However, you might want to consider opening a new window (frame in Emacs term) when you call the editor in ISE.
The command line parameter -c tells Emacs client to open a new frame
{C:\Program Files (x86)\emacs\bin\emacsclient.exe} -c +$2 $1

show value of variable when mouse hovers over in Emacs/gdb?

I am using GDB with emacs and sometimes use GDB with DDD.
Starting version 22 (???) Emacs provides a tool-bar-mode, where you can do
the most important commands like run, next, step, up/down of stack frames in the emacs UI.
As such , I have moved away from DDD, since anyways I run most commands through command line and the sometime through the limited UI given in the tool-bar-mode.
However, the ability to hover your mouse over a variable and make the value to pop-up still seems to be missing. Does anyone know about some mode in emacs or some .el file that would allow Emacs to do the same.
This kinda goes against emacs not being a gui-ide. I can still use watchpoints/local variable buffer; but I really would like the ability to hover my mouse over some variable and see the value. Any help would be much appreciated.
gud-tooltip-mode is supposed to give you just that, I think.

Context-insensitive completion popup in Emacs?

I'm experimenting with the transition from Vim to Emacs, and one of Vim's features that I really miss is the context-insensitve completion popup (CTRL-n and CTRL-p). For example, in the buffer below, if I were to type he then CTRL-n, I would get a popup:
How can I get a similar context-insensitive completion menu in Emacs?
Note: I specifically want context-insensitive because it's often helpful to make references across different contexts (for example, reference a Python class from Restructured Text documentation) — something context-sensitive "omnicomplete" doesn't do.
Additionally, I know that M-/ will trigger auto-completion, but it only cycles through matches; I want a popup list showing matches.
Auto Complete Mode should do what you're looking for.
It's generally not triggered by a hotkey, but something like:
(setq ac-auto-start nil)
(global-set-key "\M-/" 'auto-complete)
should do what you want.
Auto Complete Mode shows a dropdown menu with matches: http://cx4a.org/software/auto-complete/manual.html#Basic_Usage
You can install it via the Marmalade repository: http://marmalade-repo.org/, follow the instructions to setup Marmalade, then M-x package-install auto-complete. You'll have to activate auto-complete-mode, then while typing anything it will show you matches (you can also force it by pressing TAB, by default).

emacs delete-selection-mode disables itself

In my .emacs file I have (delete-selection-mode t) to enable the delete-selection-mode globally. Currently I'm working on a TeX file with AUXTeX, so it might be related to AUCTeX, but I don't know.
At first, after visiting a file foo.tex everything works fine, and typing over a marked text replaces the marked text with the one I type. However, after some time, during which I compile the document, add TeX macros, etc. the functionality of the delete-selection-mode doesn't work any more.
I don't know which action of mine is the one which causes the problem - it would be hard to trace it.
Note that although the functionality of the delete-selection-mode fails, when I try to enable it (M-x delete-selection-mode) I get a message that the mode was disabled! That is it was not disabled before - it just didn't work... I I then enable it (M-x delete-selection-mode again), then it is enabled and working again. Till the next fail...
Under the hood, the mode use pre-command-hook, which allows commands to run things right before every command. Emacs is known to clear this variable in the event of an error (just to make sure that Emacs don't hang). This mean that the function used by delete-selection-mode, or any other mode that use this hook, triggered an error.
How to fix it? Find what caused the error, wrap the function in a ignore-errors block, or run a timer re-adding the function every ten seconds or so.

emacs gud window use

How do I customize which window GUD will use when i issue commands - 'up', 'down', etc ? It seems to use an arbitrary window, sometimes even the window with gdb in it - I want to be able to specify a specific window to be used.
Have you considered borrowing the key bindings mentioned in the following question?
Emacs, switch to previous window
This question implies that GUD steps on some things if you don't add a parameter. Maybe your command bindings are being affected similiarly.
Using gdb in Emacs 23
I asked a buddy of mine about this issue and here is what he said.
Well, we used xemacs and so it's not exactly apples to apples here. I
do have gnu-emacs installed on cygwin and I can't replicate his
problem. I think he definitely needs to list a version # for emacs
and the version # for all his installed packages.
When you press up/down it calls 'previous-line' and 'next-line'
respectively which both move the cursor in the default buffer. The
only thing I can think is that he has something running that switches
buffers (lisp 'set-buffer') temporarily and maybe doesn't set it back
or errors b/f restoring the buffer? Better to use
'with-current-buffer' (or one of the other with-* forms) that saves
the current state of the ui runs your lisp code and restores the ui
state.