Emacs ECB Method window not showing all methods - emacs

I cannot understand why I only see a few methods in ECB method window and if I click on half of shown methods, I get:
ECB 2.40 - Warning: The tag-visit-function `ecb-tag-visit-smart-tag-start' moves point outside of tag - ignored!
and cursor jump to this function:
void MyClass::writeLine(const char buf[]) {
send(sk,buf,strlen(buf),MSG_NOSIGNAL);
}
Emacs is: GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4)
Any help?

If you are using ECB using imenu to derive your methods, then behavior will be erratic at best. If you are using ECB with CEDET/Semantic for symbol tags, then there are many possible reasons for the missing methods. It could be related to pre-processor symbols, or just some syntax that Semantic doesn't support yet.
Your best bet is to try the development version of CEDET to see if it fixes the issue, and if it doesn't, post an example to the mailing list and perhaps we can figure out what is broken. The CEDET dev version is at http://cedet.sf.net.

Related

Emacs hide/show (hs-minor-mode) for imports/includes

hs-minor-mode in Emacs makes it possible to hide the cumbersome initial comment block so that one can get quickly to the code.
Is there a way to duplicate in Emacs what Eclipse (and other) IDEs do to the initial import blocks? A solution that works for C++ includes as well as for Java imports would be nice.
Have a look at the various folding modes and HideShow mode in Emacs. The original Emacs folding-mode has the downside that it requires you to add some additional markers to the code, which I find cumbersome and they don't really help with readability IMHO.
CEDET has a semantic folding mode that will probably be able to do what you want (I haven't looked at it for a while but CEDET/semantic is pretty good at this sort of functionality).

See functions, classes, or methods in Emacs console mode

I use emacs in the console mode. Is there a mode that is like speedbar for browsing functions, classes, or methods?
Thanks
There is SrSpeedbar, which is a
mode [to] make SpeedBar show in [the] Current Frame
(source: emacswiki.org)
SrSpeedbar can be installed via MELPA, or manually using the elisp on EmacsWiki.

Text Zoom in putty emacs

I'm currently using Emacs 23.1 on a remote server through putty. I would like to be able to zoom out (so I can view all my code when needed). I've tried several methods and none of them have worked.
Text-scale-decrease and text-scale-increase give no errors but don't change the text size
The zoom-frm plugin tells me that "symbol's function definition is void: query-fontset" when I attempt to use any of its methods (all dependencies listed are installed)
The doremi-frm plugin either gives no errors and does nothing, or complains about face-remap (depending on what function is used)
I'm wondering at this point if zoom is possible within putty, and if so how do I get it to work properly.
P.S. Opening a remote X11 session with the Emacs GUI is not an option.
Thanks.
You need to config putty instead.
Open putty, then right click > Change Settings > Window > Fonts on the left panel to change font size.
What Emacs are you using? You say Emacs 23.1, but that has `query-fontset' (as do also older and more recent Emacs versions, from GNU Emacs 20 to the latest GNU Emacs 24 dev build).
Likewise, GNU Emacs 23.1 has face-remap' and all of its relatives,face-remap-*'.
I can't answer the putty questions, but can you check in some other way whether Emacs at the remote end actually zooms OK using any of the methods you describe? IOW, try to remove putty from the equation, to see what happens.

Emacs outline view possible in CC mode?

I'm an Eclipse addict trying to get more comfortable with Emacs for C code. Is there a way to get an outline view of a C file, similar to the view on the right of the image below, in Emacs in CC mode?
(source: eclipse.org)
Check out ECB, the Emacs Code Browser.
Definitely check out Speedbar. That will make a new Emacs frame that can be used as an outline. If you want something in the same frame, check out Sr Speedbar.
ECB is an integration tool that uses Speedbar anyways. It offers a lot more functionality though - the file browser with VC integration is particularly nice IMO. All in all I think that if one needs to make Emacs look more like Eclipse he needs ECB.
Take a look at Speedbar, which will provide this kind of functionality in any mode that has imenu support (including C).

Mac OS X Emacs Does Not Highlight Comments Correctly

I'm pretty old school sometimes and I like working with Emacs in my terminal. (I work with IDEs all the time. But sometimes, when in the privacy of my own home, I just like a text editor a terminal and a beer)
However, the default Emacs that comes with OS X does not seem to highlight the comments in font-lock-mode. I've seen this behavior in both Python and C mode.
I've already searched some forums and I found one post where the person was having the same problem as me:
http://forums.macosxhints.com/showthread.php?p=512361
Is is there any way to fix this problem?
I had this exact same problem. The solution is to change the color used for the comment face as follows:
(set-face-foreground 'font-lock-comment-face "red")
Or, if you only want to do this for certain modes:
;;; Only do this for the common C mode (C, C++, Objective-C)
(add-hook 'c-mode-common-hook #'(lambda () (set-face-foreground 'font-lock-comment-face "red")))
For more information on faces, see http://www.gnu.org/software/emacs/manual/html_node/emacs/Faces.html.
I'm not sure exactly how to fix it, but I'm fairly certain there's something you can put in the .emacs file. In fact, I think I've done that before. I'll look for my file and let you know what I can find.
I'll try and get you my .emacs file when I get home from work tonight.
[edit] I've looked and looked, and can't find a .emacs file on either system that I use, and on my OS X install (Leopard default), it looks like it does it correctly by default. I did some research here, and it looks like the default installations no longer use .emacs files, because there's folks like me that mess around with them and break things, and they got tired of having to help us fix it. But, there is a set of menus that will let you tweak things. Start by typing "M-x customize RET", where M is the meta character (on my OSX install, this is the esc key. Don't hold it down, just type it like a regular character. That'll get you into a menu of stuff you can change. I didn't poke around too much, so I'm not sure where in the menu you'll find what you're looking for. Sorry I couldn't be more help.
In my experience this is usually related to a unpaired quote (single-, double-, or otherwise) somewhere in an existing comment.
Hunt those occurences down and eradicate them in your source code (or if you are more ambitious, see if you can update the fontlock code in your major modes' emacs source code)
When I have encountered this in editting Perl in emacs, I often switch major modes to cperl-mode as it typically handles parsing the perl better than the default perl-mode.