函数 运行 错误 "Symbol's value as variable is void: ftp_site_connect"
Error "Symbol's value as variable is void: ftp_site_connect" on function running
我在函数 运行 上收到错误 "Symbol's value as variable is void: ftp_site_connect"。我一直在检查 Whosebug 上具有类似错误 "Symbol's value as variable is void" 的其他问题,但其中 none 似乎解决了问题。
(defun ftp_site_connect()
(interactive)
( ange-ftp-set-passwd "ftp.site.com" "username" "password" )
( find-file "/username@ftp.site.com:/" )
)
(eval 'ftp_site_connect)
任何帮助将不胜感激。
感谢@npostavs,我似乎找到了问题。
按照@npostavs 给我的 link 上的信息修改代码后(代码中的“函数”是错误的,“格式是针对列表而不是函数的”)以下更改后的代码似乎有效,但是它产生了另一个错误。
(defun ftp_site_connect()
(interactive)
( ange-ftp-set-passwd "ftp.site.com" "username" "password" )
( find-file "/username@ftp.site.com:/" )
)
(ftp_site_connect)
因此,我发现 ange-ftp-set-passwd 函数在我的服务器上不存在,我必须通过 .netrc 文件而不是内联设置密码。再次更改代码后,现在似乎可以完美运行。
;; Add first the user and password to the .netrc file like this:
;; machine HOST login NAME password PASSWD
;; and change the permissions on that file to chmod 600
;; -------------------------------------------------------------
(defun ftp_site_connect()
(interactive)
( find-file "/username@ftp.site.com:/" )
)
(ftp_site_connect)
谢谢大家的帮助。
我在函数 运行 上收到错误 "Symbol's value as variable is void: ftp_site_connect"。我一直在检查 Whosebug 上具有类似错误 "Symbol's value as variable is void" 的其他问题,但其中 none 似乎解决了问题。
(defun ftp_site_connect()
(interactive)
( ange-ftp-set-passwd "ftp.site.com" "username" "password" )
( find-file "/username@ftp.site.com:/" )
)
(eval 'ftp_site_connect)
任何帮助将不胜感激。
感谢@npostavs,我似乎找到了问题。
按照@npostavs 给我的 link 上的信息修改代码后(代码中的“函数”是错误的,“格式是针对列表而不是函数的”)以下更改后的代码似乎有效,但是它产生了另一个错误。
(defun ftp_site_connect()
(interactive)
( ange-ftp-set-passwd "ftp.site.com" "username" "password" )
( find-file "/username@ftp.site.com:/" )
)
(ftp_site_connect)
因此,我发现 ange-ftp-set-passwd 函数在我的服务器上不存在,我必须通过 .netrc 文件而不是内联设置密码。再次更改代码后,现在似乎可以完美运行。
;; Add first the user and password to the .netrc file like this:
;; machine HOST login NAME password PASSWD
;; and change the permissions on that file to chmod 600
;; -------------------------------------------------------------
(defun ftp_site_connect()
(interactive)
( find-file "/username@ftp.site.com:/" )
)
(ftp_site_connect)
谢谢大家的帮助。