Re: Need help with function

[email protected] Wed, 14 Jul 2004 14:42:14 +0200
Newsgroups gmane.emacs.xemacs.general
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

>(defun mg-copy-position ()
>  "Copy a string of the form filename:linenumber into the clipboard"
>  (interactive)
>  (own-clipboard (format "%s:%d"
>                                                  (or 
(file-name-nondirectory buffer-file-name) "")
>                                                  (line-number))))

Many thanks for your help. This is exactly what I wanted. Seems it is 
still a long way until I have lisp running through my veins...


Mit freundlichen Grüßen

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