GNU bug report logs - #25597
25.1; SMIE: error in smie-indent--rule

Previous Next

Package: emacs;

Reported by: Reiner Steib <Reiner.Steib <at> gmx.de>

Date: Wed, 1 Feb 2017 09:41:02 UTC

Severity: normal

Found in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25597 in the body.
You can then email your comments to 25597 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#25597; Package emacs. (Wed, 01 Feb 2017 09:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Reiner Steib <Reiner.Steib <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 01 Feb 2017 09:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Reiner Steib <Reiner.Steib <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; SMIE: error in smie-indent--rule
Date: Wed, 01 Feb 2017 10:40:36 +0100
Recipe:
(I don't see this bug in GNU Emacs 24.3.1., but in GNU Emacs 25.1.1.)

$ emacs -Q --eval "(progn
    (add-hook 'sh-set-shell-hook 'sh-learn-buffer-indent)
    (setq debug-on-error t))" smie-bug.sh

%%% test-file: smie-bug.sh
#! /bin/bash

awk -F\; '\
{ if ($5 ~ "^[0-9]{1,3}" &&
      ( ($16 ~ "l7" && $4 ~ "O" ) ||	       \
	($16 ~ "b" && $4 ~ "c" ) ||	       \
	($16 ~ "s|c|l" ) ) )		       \
    { print $5 "\r" } }' \
    a.csv > r.csv
#

# awk -F\; -v q=\' '{
#   printf("update foo bar");
# }' < s1.csv > s2.sql
%%%

%%% Backtrace
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
noindent)
  smie-indent--rule(:after "{" 242 nil 239)
  smie-indent-after-keyword()
  run-hook-with-args-until-success(smie-indent-after-keyword)
  smie-indent-calculate()
  smie-config--get-trace()
  smie-config--guess(1 295)
  smie-config-guess()
  sh-learn-buffer-indent()
  run-hooks(sh-set-shell-hook)
  sh-set-shell("/bin/bash" nil nil)
  sh-mode()
  set-auto-mode-0(sh-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer smie-bug.sh> ".../tmp/smie-bug.sh" nil
nil ".../tmp/smie-bug.sh" (0 (31798 . 32572)))
  find-file-noselect(".../tmp/smie-bug.sh")
  #[1285 "[bytecode]" [file-name-absolute-p message "Ignoring
relative file name (%s) due to nil default-directory" expand-file-name
command-line-normalize-file-name find-file-noselect 0 1
move-to-column] 10 "\n\n(fn DISPLAYABLE-BUFFERS DIR LINE COLUMN
NAME)"]((nil) ".../tmp/" (0) (0) "smie-bug.sh")
  command-line-1(("--eval" "(progn (add-hook 'sh-set-shell-hook
sh-learn-buffer-indent) (setq debug-on-error t))" "smie-bug.sh"))
  command-line()
  normal-top-level()
%%%

In GNU Emacs 25.1.1 (i686-w64-mingw32)
 of 2016-09-17 built on LAPHROAIG
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --host=i686-w64-mingw32 --without-dbus
 --without-compress-install CFLAGS=-static'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS

Important settings:
  value of $LANG: C.ISO-8859-1
  locale-coding-system: cp1252

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  global-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Setting up indent for shell type bash
Indentation variables are now local.
Indentation setup for shell type bash
Analyzing the buffer...
Entering debugger...
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils
help-mode easymenu cl-loaddefs pcase cl-lib debug sh-script smie
executable time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core 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 charscript case-table epa-hook
jka-cmpr-hook help simple abbrev 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 w32notify w32 multi-tty
make-network-process emacs)

Memory information:
((conses 8 98151 5364)
 (symbols 32 20410 0)
 (miscs 32 83 223)
 (strings 16 19000 4247)
 (string-bytes 1 500915)
 (vectors 8 13312)
 (vector-slots 4 460032 5782)
 (floats 8 174 129)
 (intervals 28 322 53)
 (buffers 520 24))

Bye, Reiner.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25597; Package emacs. (Fri, 26 Jul 2019 14:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 25597 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Reiner Steib <Reiner.Steib <at> gmx.de>
Cc: 25597 <at> debbugs.gnu.org
Subject: Re: bug#25597: 25.1; SMIE: error in smie-indent--rule
Date: Fri, 26 Jul 2019 16:34:26 +0200
Reiner Steib <Reiner.Steib <at> gmx.de> writes:

> Recipe:
> (I don't see this bug in GNU Emacs 24.3.1., but in GNU Emacs 25.1.1.)
>
> $ emacs -Q --eval "(progn
>     (add-hook 'sh-set-shell-hook 'sh-learn-buffer-indent)
>     (setq debug-on-error t))" smie-bug.sh
>
> %%% test-file: smie-bug.sh
> #! /bin/bash
>
> awk -F\; '\
> { if ($5 ~ "^[0-9]{1,3}" &&
>       ( ($16 ~ "l7" && $4 ~ "O" ) ||	       \
> 	($16 ~ "b" && $4 ~ "c" ) ||	       \
> 	($16 ~ "s|c|l" ) ) )		       \
>     { print $5 "\r" } }' \
>     a.csv > r.csv
> #
>
> # awk -F\; -v q=\' '{
> #   printf("update foo bar");
> # }' < s1.csv > s2.sql
> %%%

I tried this recipe in Emacs 24.5, and I got the same backtrace as you:

> %%% Backtrace
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p
> noindent)
>   smie-indent--rule(:after "{" 242 nil 239)
>   smie-indent-after-keyword()
>   run-hook-with-args-until-success(smie-indent-after-keyword)

But on the trunk, I just get a message saying "Nothing to change", so it
looks like this has been fixed by now, and I'm closing this bug report.
If you're still seeing this in Emacs 27, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 25597 <at> debbugs.gnu.org and Reiner Steib <Reiner.Steib <at> gmx.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 26 Jul 2019 14:35:06 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Aug 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.