Subject: bug#22982: 25.0.92; Forms Mode seems to fail to open data file

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Mar 2016 12:26:48 +0200

> From: [email-masked] (N. Jackson)
> Date: Thu, 10 Mar 2016 19:46:17 -0400
> 
> I get the error "Wrong-type-argument: stringp, nil" when I try to start
> Forms Mode with
> 
>     M-x forms-find-file RET ~/Documents/test-forms.el RET
> 
> The backtrace is:
> 
>     Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>       expand-file-name(nil)
>       find-file-noselect(nil)
>       forms-mode(t)
>       forms-find-file("~/Documents/test-forms.el")
>       funcall-interactively(forms-find-file "~/Documents/test-forms.el")
>       call-interactively(forms-find-file record nil)
>       command-execute(forms-find-file record)
>       execute-extended-command(nil "forms-find-file" nil)
>       funcall-interactively(execute-extended-command nil "forms-find-file" nil)
>       call-interactively(execute-extended-command nil nil)
>       command-execute(execute-extended-command)
> 
> My forms control file (~/Documents/test-forms.el) is as follows:
> 
>     ;; This demo visits ‘/etc/passwd’.
> 
>     (setq forms-file "/etc/passwd")
>     (setq forms-number-of-fields 7)
>     (setq forms-read-only t)                 ; to make sure
>     (setq forms-field-sep ":")
>     ;; Don’t allow multi-line fields.
>     (setq forms-multi-line nil)
> 
>     (setq forms-format-list
>           (list
>            "====== /etc/passwd ======\n\n"
>            "User : "    1
>            "   Uid: "   3
>            "   Gid: "   4
>            "\n\n"
>            "Name : "    5
>            "\n\n"
>            "Home : "    6
>            "\n\n"
>            "Shell: "    7
>            "\n"))
> 
> which is copied directly from the example in the Forms manual
> (info "(forms) Format Description"). And /etc/passwd exists and is
> accessible from Emacs.
> 
> I get exactly the same error with all forms control files I've tried,
> even something as seemingly simple as:
> 
>     (setq forms-file "~/test-forms.dat")
>     (setq forms-number-of-fields 2)
>     (setq forms-format-list
>           (list
>            "Field1 : "    1
>            "Field2 : "    2
>            "\n"))
> 
> with a not yet existent data file.

I cannot reproduce this, neither with the 25.0.92 pretest nor with the
current emacs-25 branch.  I tried both control files, and they both
worked (although I needed to change the file names a bit to adapt them
to my system's directory hierarchy).

Does this happen for you in "emacs -Q"?