[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find-file problem when connecting from Windows box with plink

From: Jyrki Jaakkola
Subject: Re: Find-file problem when connecting from Windows box with plink
Date: Fri, 02 Feb 2007 02:25:48 +0200
User-agent: Thunderbird (Windows/20061207)

Michael Albinus wrote:
Jyrki Jaakkola <address@hidden> writes:

Thanks for the debug buffer. Unfortunately, there's nothing special,
everything looks like it should.

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  intern(nil [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0])

Hmm. nil in vc-file-clearprops means, that buffer-file-name is nil.

You've said in your first message, that opening the file from
somewhere works. But then you've opened a special buffer for showing
files, and selected the file for opening there. Could you, please,
describe exactly which steps you have performed?

my .emacs file (only parts which should matter):

;; ripped from lispbox.el
(defun lispbox-file (rest)
     (or (getenv "LISPBOX_HOME")
         (file-name-directory load-file-name))))

(setq load-path (cons (lispbox-file "slime-2.0") load-path))

(require 'slime)
(require 'tramp)

(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))

(setq lisp-indent-function 'common-lisp-indent-function
      slime-complete-symbol-function 'slime-fuzzy-complete-symbol)


(defvar *my-box-tramp-path*

(defvar *current-tramp-path* nil)
(defun connect-to-host (path)
  (setq *current-tramp-path* path)
  (setq slime-translate-from-lisp-filename-function
    (lambda (f)
      (concat *current-tramp-path* f)))
  (setq slime-translate-to-lisp-filename-function
    (lambda (f)
      (substring f (length *current-tramp-path*))))
  (slime-connect "localhost" 4005))

(defun my-box-slime ()
  (connect-to-host *my-box-tramp-path*))

(defun my-box-homedir ()
  (find-file (concat *current-tramp-path* "/home/foo/")))

starting script:

@echo off
rem Thanks to Venkat who provided this bit of COMMAND wizardry.

if NOT %OS%==Windows_NT goto checkhome
set LISPBOX_HOME=d:/lispbox-0.7
set HOME=d:/lispbox-0.7
goto start


rem if the environment variable is not defined, dereferencing
rem it produces the same string!

if %LISPBOX_HOME%==%LISPBOX_HOME% goto noenv

set EMACS=%LISPBOX_HOME%/emacs-21.3/bin/runemacs.exe
set TO_EVAL="(progn (my-box-slime))"

%EMACS% --no-init-file --load %LISPBOX_HOME%/.emacs-remote --eval=%TO_EVAL%

goto end


echo LISPBOX_HOME environment variable could not be determined
echo automatically. You shoud edit lispbox.bat to set it to the
echo directory containing lispbox.bat and then run lispbox.bat again.


The steps to produce:

1. Evaluate following form: (find-file "/plink:address@hidden:/home/foo/")
or alternatively: M-x my-box-homedir
2. Choose one of the files
3. I get an error at this moment.

If I open remote file without using find-file then the file opens without problems. Or if I'm in different buffer than the file list buffer which find-file had brought up.

Jyrki Jaakkola

reply via email to

[Prev in Thread] Current Thread [Next in Thread]