unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25597: 25.1; SMIE: error in smie-indent--rule
@ 2017-02-01  9:40 Reiner Steib
  2019-07-26 14:34 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Reiner Steib @ 2017-02-01  9:40 UTC (permalink / raw)
  To: 25597

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.





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

* bug#25597: 25.1; SMIE: error in smie-indent--rule
  2017-02-01  9:40 bug#25597: 25.1; SMIE: error in smie-indent--rule Reiner Steib
@ 2019-07-26 14:34 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-26 14:34 UTC (permalink / raw)
  To: Reiner Steib; +Cc: 25597

Reiner Steib <Reiner.Steib@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





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

end of thread, other threads:[~2019-07-26 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-01  9:40 bug#25597: 25.1; SMIE: error in smie-indent--rule Reiner Steib
2019-07-26 14:34 ` Lars Ingebrigtsen

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).