Re: Need help with function
"Stephen J. Turnbull" <[email protected]> Thu, 15 Jul 2004 11:12:15 +0900
| Newsgroups | gmane.emacs.xemacs.general |
|---|---|
| Organization | The XEmacs Project |
| Message-ID | <[email protected]> |
Hello,
Perhaps you could help me with this function: I need a function that puts
a string with the actual filename, a colon and the line of point into the
X Clipboard. It should look like this:
CPTClassname.cpp:42
I want to paste this to DDD ...
I came up with this so far, but emacs complains:
"Invalid function: (own-clipboard (file-name-nondirectory
buffer-file-name))"
(defun mg-copy-position()
"Copy a string of the form filename:linenumber into the clipboard"
(interactive)
( (own-clipboard (file-name-nondirectory buffer-file-name) ) )
)
As you see, It also completely lacks the combination of filename, ":" and
line...
Any help will be welcome,
Markus Grunwald
Softwareentwicklung
PRÜFTECHNIK Condition Monitoring GmbH
Oskar-Messter-Straße 19-21
85737 Ismaning
www.pruftechnik.com
Tel: +49 (0)89 99616177
Fax: +49 (0)89 99616200
--
Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.