all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* showing argument list in mini-buffer of c/c++ func
@ 2004-04-25  0:25 axa
  0 siblings, 0 replies; 6+ messages in thread
From: axa @ 2004-04-25  0:25 UTC (permalink / raw)


Hi,

Ive switched from Win32 programming environment to Linux, and Ive had no
problems writing small programs in either emacs or vim (preferably
emacs) until now. But now, for a slightly bigger program, there are
some big unpleasantness regarding emacs and (as others told me) CEDET
(particularly semantic) package.
Im new in working with emacs, however I think that, things Im
trying to accomplish are not "so advanced and beyond new users need", and
really hope, that with you'll help me to solve these problems easily,
since I really don't feel like learning one programming language
(elisp) so I could do programming in c/c++, using one well featured tool
like emacs. So, to start.
First, Ive been trying to _somehow_ make emacs show automatically (or at
least one-shortcut_away) in mini-buffer, argument list of c/c++ function,
when I type name of function (in .c file) and open first brace, or
when cursor is over some c/c++ function name (but primarily first thing).
For example, if in one .c file I type:
printf(
/* then emacs would show in mini-buffer, its (printf) argument list,
   something like the following: */
printf(char*, ...)

Yes, maybe I get used to this feature in MSVC back when I was programming
in Win32 environment, but anyway this is really big convenience for me,
when writing more that 200 lines of code. I think many would agree to
this.
The second problem I have, which is slightly less important than first
problem, to me) is to somehow get list of structure members. For example,
if I have
something like this in one .c file:
struct timeval tv;
/* and I type */
tv.
/* then emacs in mini-buffer shows, something like the following
   comlpetition list */
time_t tv_sec;
suseconds_t tv_usec;

First I tried to solve this with with tags, but solution is not very
efficient and not automatic. Then, someone, recommended me to
download and install CEDET and ECB packages. Which I did but with no
expected result. I installed these packages (cedet-1.0beta2a and ecb-2.23)
just like INSTALL file suggests, that is, make (compile) and add some
lines in my ~/.emacs file. The packages resides in my home tree
(both cedet and ecb).
So my ~/.emacs file looks like the following (its short):
(setq-default transient-mark-mode t)
(setq-default case-fold-search t)
(setq c-default-style
      '((c-mode . "stroustrup") (c++-mode . "stroustrup") (other .
"gnu")))

setq c-indent-level 3)
(setq c-tab-always-indent nil)
(global-font-lock-mode t)
(setq font-lock-maximum-decoration
      '((c-mode . 2) (c++-mode . 2)))
(setq tags-table-list
      '("~/TAGS"))

(require 'eldoc)

;; Configuration variables here:
(setq semantic-load-turn-useful-things-on t)
;; Load CEDET
(load-file "~/test/emacs-tools/cedet-1.0beta2a/common/cedet.el")
(add-to-list 'load-path
             "~/test/emacs-tools/ecb-2.23")
(load-file "~/test/emacs-tools/cedet-1.0beta2a/semantic/semantic-load.el")
(require 'ecb)
(require 'semantic-sb)
#--- EOF ---

Ive also created TAGS file with the following command:
find /usr/include -name "*.[chCH]" -print | etags -

And later in emacs loaded it with 'M-x visit-tags-table', but after
all this done, when I position cursor over (for example) 'printf'
function name in some .c file, emacs doesn't show anything in
mini-buffer. And when I type:
printf

I get the following message:
Update Tag Table: main

And, again, when I open first brace after function name, like:
printf(

I get, message in mini-buffer, saying:
Buffer not currently parsable.


I really hope that you will help me to solve these problem(s), with
not too much effort from you.

Henceforth, thank you
Best regards, axa

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: showing argument list in mini-buffer of c/c++ func
@ 2004-04-25 20:28 axa
  0 siblings, 0 replies; 6+ messages in thread
From: axa @ 2004-04-25 20:28 UTC (permalink / raw)


On Sun, 25 Apr 2004, axa wrote:

>
> Henceforth, thank you
> Best regards, axa
>

Ok, since none respond to this question, and by the respond Ive got from
other people about this particular question, I guess it is hard to to this
(or even impossible) in emacs. So I created one script, which collected all
C prototypes and putted them in one file. The idea is, when open some .C
file in emacs, and when cursor is over some functions name, when I type
(some) short-cut, then emacs would _take_ that function name (under the
cursor), give it to the script, and then display result (from script,
which would be func prototype) in mini-buffer. But since, I do not know
"elisp" (I guess it is needed to write such function), can someone help me
with this, by writing me how to do this?
So, again that function in emacs, would take C function name under the
cursor (or in worst case, provide input in mini-buffer in which  C
function name would be explicitly given), then call some bash script
with that C func name (or even, itself calls grep for one file, with C
function name), and then finally display result back in mini-buffer.

Thanks.


Best regards, axa
---
The law will never make men free; it is men who have got to make the
law free.
		-- Henry David Thoreau

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: showing argument list in mini-buffer of c/c++ func
       [not found] <mailman.1567.1082924943.1061.help-gnu-emacs@gnu.org>
@ 2004-04-25 22:57 ` Stefan Monnier
  2004-04-25 23:21   ` axa
       [not found]   ` <mailman.1579.1082935352.1061.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2004-04-25 22:57 UTC (permalink / raw)


> (or even impossible) in emacs. So I created one script, which collected all
> C prototypes and putted them in one file.

You should be able to use etags for that.


        Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: showing argument list in mini-buffer of c/c++ func
  2004-04-25 22:57 ` showing argument list in mini-buffer of c/c++ func Stefan Monnier
@ 2004-04-25 23:21   ` axa
       [not found]   ` <mailman.1579.1082935352.1061.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: axa @ 2004-04-25 23:21 UTC (permalink / raw)


On Sun, 25 Apr 2004, Stefan Monnier wrote:

> > (or even impossible) in emacs. So I created one script, which collected all
> > C prototypes and putted them in one file.
>
> You should be able to use etags for that.
>
 Yes, I know about etags, and tried to acomplish this using them, but I
dont want to browse for single function prototype through many defiitions
and search for them, when in this way it is a lot quicker, simply there is
(in file) already single correct function prototype, and I only need to
insert it in the mini-buffer.

I found, one (I think) old package for emacs, that may do, exactly what Im
trying to accomplish, the name is "c-mode-addons", but have a litle
problems getting it to work, Ive already post a new message regarding it,
in hope that maybe someone else is using it.


Best regards, axa
---
"I don't know anything about music.  In my line you don't have to."
                -- Elvis Presley

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: showing argument list in mini-buffer of c/c++ func
       [not found] <mailman.1464.1082852746.1061.help-gnu-emacs@gnu.org>
@ 2004-04-29  7:08 ` Kai Grossjohann
  0 siblings, 0 replies; 6+ messages in thread
From: Kai Grossjohann @ 2004-04-29  7:08 UTC (permalink / raw)


I wonder if M-x eldoc-mode RET does something useful for you?

Kai

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: showing argument list in mini-buffer of c/c++ func
       [not found]   ` <mailman.1579.1082935352.1061.help-gnu-emacs@gnu.org>
@ 2004-04-29  7:38     ` Thorsten Bonow
  0 siblings, 0 replies; 6+ messages in thread
From: Thorsten Bonow @ 2004-04-29  7:38 UTC (permalink / raw)


>>>>> "axa" == axa  <axa@sendmail.ru> writes:

    axa> I found, one (I think) old package for emacs, that may do, exactly what
    axa> Im trying to accomplish, the name is "c-mode-addons", but have a litle
    axa> problems getting it to work, Ive already post a new message regarding
    axa> it, in hope that maybe someone else is using it.

Hi,

I'm still using "c-mode-addons" happily and already answered your posting
concerning it. If it is still not working for you, please let me know what went
wrong. I'll try to help...

Toto

-- 
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow

[Featured Creature]

NAME: Sam Eagle (The American Eagle)

BIO/STATS: A divorced father of two children (one of whom disgraced
           his father by becoming a taxidermist), Sam is the Muppets'
           self-appointed guardian of moral standards and dignified
           behavior.

APPEARANCES: Sam made his first appearance in The Muppet Show: Sex and
             Violence, an early pilot for The Muppet Show

SPECIAL TALENTS: Censoring Lewd Behavior

FAVORITE PERFORMANCE MOMENT: Sam delivers a heartfelt editorial
                             against nudity - until he realizes that
                             he himself is usually naked

FAMOUS FOR: Patriotism, Patriotism, and Patriotism

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-04-29  7:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1567.1082924943.1061.help-gnu-emacs@gnu.org>
2004-04-25 22:57 ` showing argument list in mini-buffer of c/c++ func Stefan Monnier
2004-04-25 23:21   ` axa
     [not found]   ` <mailman.1579.1082935352.1061.help-gnu-emacs@gnu.org>
2004-04-29  7:38     ` Thorsten Bonow
     [not found] <mailman.1464.1082852746.1061.help-gnu-emacs@gnu.org>
2004-04-29  7:08 ` Kai Grossjohann
2004-04-25 20:28 axa
  -- strict thread matches above, loose matches on Subject: below --
2004-04-25  0:25 axa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.