unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28492: 27.0.50; File mode specification error for some files during desktop-read
@ 2017-09-18 13:58 Kaushal Modi
  2017-09-18 14:36 ` Kaushal Modi
  0 siblings, 1 reply; 2+ messages in thread
From: Kaushal Modi @ 2017-09-18 13:58 UTC (permalink / raw)
  To: 28492

[-- Attachment #1: Type: text/plain, Size: 5784 bytes --]

Hello,

To start off, this issue is not specific to emacs 27. I have been noticing
this issue for maybe one or two weeks and just to formally reporting it.

Issue: When doing desktop-read, only files from a certain project root
cause these errors:

    File mode specification error: (wrong-type-argument stringp nil) [2
times]

Digging deeper, it looks like the set-auto-mode call in normal-mode is
returning nil. But it is surprising because the files for which this error
shows up does actually have an associated major mode (verilog-mode).

After the desktop loads, I am able to see the files that flagged that error
properly in the correct major mode though.

Here is the error backtrace:

(*I have replaced the actual path with /my/prj/root/some.file for the
purpose of corporate privacy. The some.file is has verilog-mode as its
major mode.)

Debugger entered--Lisp error: "File mode specification error:
(wrong-type-argument stringp nil)"
  #<subr message>("File mode specification error: %s" (wrong-type-argument
stringp nil))
  apply(#<subr message> ("File mode specification error: %s"
(wrong-type-argument stringp nil)))
  message("File mode specification error: %s" (wrong-type-argument stringp
nil))
  normal-mode(t)
  after-find-file(nil nil)
  find-file-noselect-1(#<buffer some.file> "/my/prj/root/some.file" :nowarn
nil "/my/prj/root/some.file" (96434279 175))
  find-file-noselect("/my/prj/root/some.file" :nowarn)
  desktop-restore-file-buffer("/my/prj/root/some.file" "some.file" nil)
  desktop-create-buffer(208 "/my/prj/root/some.file" "some.file"
verilog-mode (abbrev-mode override-global-mode modi-mode beacon-mode
hi-lock-mode volatile-highlights-mode hungry-delete-mode
rainbow-delimiters-mode undo-tree-mode projectile-mode hardcore-mode
ivy-mode which-key-mode flyspell-mode yas-minor-mode auto-complete-mode
mode-line-space-mode) 6362 (19911 nil) t nil ((buffer-display-time 22952
2660 236587 832000) (buffer-file-coding-system . undecided-unix))
((mark-ring (19911))))
  eval-buffer(#<buffer  *load*-734956> nil
"/home/kmodi/.emacs.d/emacs_27_0.desktop" nil t)  ; Reading at buffer
position 67828




In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.23)
 of 2017-09-16
Repository revision: 977cd6cb28a37744966ec62f70cf62659f6f302a
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6
(Santiago)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules
 --prefix=/home/kmodi/usr_local/apps/6/emacs/master
 '--program-transform-name=s/^ctags$/ctags_emacs/'
 'CPPFLAGS=-I/home/kmodi/usr_local/6/include -I/usr/include/freetype2
 -I/usr/include' 'CFLAGS=-ggdb3 -O0' 'CXXFLAGS=-ggdb3 -O0'
 'LDFLAGS=-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64
 -ggdb3'
 PKG_CONFIG_PATH=/home/kmodi/usr_local/6/lib/pkgconfig:/home/kmodi/usr_local/6/lib64/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib/pkgconfig:/cad/adi/apps/gnu/linux/x86_64/6/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig:/lib64/pkgconfig'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11 MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 97100 8003)
 (symbols 48 20813 1)
 (miscs 40 46 119)
 (strings 32 28798 1799)
 (string-bytes 1 765072)
 (vectors 16 14942)
 (vector-slots 8 508712 6478)
 (floats 8 48 68)
 (intervals 56 245 0)
 (buffers 992 11)
 (heap 1024 29158 859))

-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 7355 bytes --]

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

* bug#28492: 27.0.50; File mode specification error for some files during desktop-read
  2017-09-18 13:58 bug#28492: 27.0.50; File mode specification error for some files during desktop-read Kaushal Modi
@ 2017-09-18 14:36 ` Kaushal Modi
  0 siblings, 0 replies; 2+ messages in thread
From: Kaushal Modi @ 2017-09-18 14:36 UTC (permalink / raw)
  To: 28492-done

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

Sorry about the noise.

Turns out that a string-match-p was doing with a nil values variable in a
function I added to the verilog-mode-hook. (And that variable was
evaluating to nil only for a particular project.)

The error backtrace was confusing though.. it looked like set-auto-mode was
throwing the error.

But actually it was

set-auto-mode
  - set-auto-mode-0
    - (funcall mode)
      - run-hooks .. (running the major mode hook)
        - One of the functions in that hook

Is there a way so that an error like

    Error in one of the functions in verilog-mode-hook while running
some.file

gets printed instead of a misleading message that doesn't even mention the
file causing it:

File mode specification error: (wrong-type-argument stringp nil)
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 1319 bytes --]

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

end of thread, other threads:[~2017-09-18 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-18 13:58 bug#28492: 27.0.50; File mode specification error for some files during desktop-read Kaushal Modi
2017-09-18 14:36 ` Kaushal Modi

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).