all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Invalid Function while using setq
@ 2008-01-12 17:58 sapsi
  2008-01-12 21:12 ` Lennart Borgman (gmail)
  2008-01-14 17:16 ` Joel J. Adamson
  0 siblings, 2 replies; 3+ messages in thread
From: sapsi @ 2008-01-12 17:58 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,
I have the following function in my .emacs (or rather Preferences.el
on Aquamacs)

 (defun send-to-R-app ()
        (interactive)
  "Sends the selection to R.App"
  (let ( (myStr2 nil) (mystr nil))(
		(setq mystr (buffer-substring-no-properties (mark) (point)))
		(setq myStr2 (replace-regexp-in-string "\"" "'" mystr ) )
		(do-applescript (concat "tell application \"R\" \r"
		       "cmd "
		        "\"" myStr2 "\""
 		       "\r"
		       "end tell"
		       ))
		) ))
  (global-set-key (kbd "A-r")
                   'send-to-R-app)

When i start emacs, i get this error
 `(setq mystr (buffer-substring-no-properties (mark) (point)))' is a
malformed function.

I have no idea why, also if select the code fragement and type M-x
eval-region and then select some code and type M-x send-to-R-app, i
get a similar error
Invalid function setq mystr (buffer-substring-no-properties (mark)
(point)))

Could someone help me out on this?
Thank you
Saptarshi

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

end of thread, other threads:[~2008-01-14 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 17:58 Invalid Function while using setq sapsi
2008-01-12 21:12 ` Lennart Borgman (gmail)
2008-01-14 17:16 ` Joel J. Adamson

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.