From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: 24.5; "Local rules set" Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Nov 2016 15:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24848@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.14780145889670 (code B ref -1); Tue, 01 Nov 2016 15:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Nov 2016 15:36:28 +0000 Received: from localhost ([127.0.0.1]:39112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1b6x-0002Vs-DF for submit@debbugs.gnu.org; Tue, 01 Nov 2016 11:36:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c1aeq-00006K-EC for submit@debbugs.gnu.org; Tue, 01 Nov 2016 11:07:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1aej-0005yU-Cz for submit@debbugs.gnu.org; Tue, 01 Nov 2016 11:07:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1aej-0005yK-9U for submit@debbugs.gnu.org; Tue, 01 Nov 2016 11:07:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1aeh-0003PP-8g for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 11:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1aed-0005x6-6j for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 11:07:15 -0400 Received: from smtpb1.bt.com ([62.7.242.138]:28687) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1aec-0005we-S2 for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2016 11:07:11 -0400 Received: from E07HT03-UKBR.domain1.systemhost.net (193.113.197.161) by EVMED04-UKBR.bt.com (10.216.161.34) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 1 Nov 2016 15:07:06 +0000 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by E07HT03-UKBR.domain1.systemhost.net (193.113.197.161) with Microsoft SMTP Server (TLS) id 8.3.342.0; Tue, 1 Nov 2016 15:07:07 +0000 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12e.domain1.systemhost.net (10.9.212.12) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 1 Nov 2016 15:07:07 +0000 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1210.000; Tue, 1 Nov 2016 15:07:07 +0000 From: Thread-Topic: 24.5; "Local rules set" Thread-Index: AQHSNE2wcaFy/P+rT06rx4YWh1KdDQ== Date: Tue, 1 Nov 2016 15:07:07 +0000 Message-ID: <1478012827020.47948@bt.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.40] Content-Type: multipart/alternative; boundary="_000_147801282702047948btcom_" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Tue, 01 Nov 2016 11:36:26 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --_000_147801282702047948btcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable --text follows this line-- I tried to send this earlier but I think it failed. I got no confirmation = of it sending anyway, so here's essentially the same thing again... I've been using sh-mode to edit bash scripts, but I noticed that the indent= after a "then" was twice what it should be (and twice what it is after an = "else"). I googled and discovered that I can run "sh-learn-buffer-indent" = to learn the indentation that I want; this prompted me of a shortcut "C-c >= " which I've then been using. It works perfectly! But it only applies to the current session and all the "C-c >" command says= when complete is "Local rules set". It doesn't say what those rules are o= r how to make them permanent. It doesn't even say what it means by "rules"= actually. I put a question on StackOverflow and was recommended to submit= a bug report, hence this email. So could the "Local rules set" message be changed to include instructions o= n how to make the changes permanent please? Thanks, Richard In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11803000 System Description: Linux Mint 18 Sarah Configured using: `configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-li= sp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-li= sp:/usr/share/emacs/site-lisp --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro'' Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Shell-script Minor modes in effect: sh-electric-here-document-mode: t delete-selection-mode: t show-paren-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-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 Recent messages: C-x M-i is undefined byte-code: End of buffer [4 times] byte-code: Beginning of buffer [16 times] Load-path shadows: /usr/share/emacs/24.5/site-lisp/sgml-mode hides /usr/share/emacs/site-lisp/= sgml-mode /usr/share/emacs/24.5/site-lisp/php-mode hides /usr/share/emacs/site-lisp/p= hp-mode /usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-= lisp/debian-startup /usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/s= ite-lisp/cmake-mode /usr/share/emacs/24.5/site-lisp/sgml-mode hides /usr/share/emacs/24.5/lisp/= textmodes/sgml-mode /usr/share/emacs/24.5/site-lisp/sh-script hides /usr/share/emacs/24.5/lisp/= progmodes/sh-script Features: (mailalias mailclient browse-url shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils pp apropos cus-theme eieio-custom eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core wid-browse tree-widget cus-edit wid-edit help-mode easymenu tabify sh-script smie executable web-mode advice help-fns disp-table edmacro kmacro cl-loaddefs cl-lib sgml-mode delsel paren cus-start cus-load time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 138222 26012) (symbols 48 23067 0) (miscs 40 111 525) (strings 32 27088 5121) (string-bytes 1 727532) (vectors 16 15338) (vector-slots 8 465085 10423) (floats 8 90 790) (intervals 56 1256 253) (buffers 960 17) (heap 1024 34477 1884)) --_000_147801282702047948btcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
--text follows this line--

I tried to send this earlier but I think it failed.  I got no con= firmation of it sending anyway, so here's essentially the same thing again.= ..

I've been using sh-mode to edit bash scripts, but I noticed that the i= ndent after a "then" was twice what it should be (and twice what = it is after an "else").  I googled and discovered that I can= run "sh-learn-buffer-indent" to learn the indentation that I want; this prompted me of a shortcut "C-c >" which I've the= n been using.

It works perfectly!

But it only applies to the current session and all the "C-c >&= quot; command says when complete is "Local rules set".  It d= oesn't say what those rules are or how to make them permanent.  It doe= sn't even say what it means by "rules" actually.  I put a qu= estion on StackOverflow and was recommended to submit a bug report, hence this em= ail.

So could the "Local rules set" message be changed to include= instructions on how to make the changes permanent please?

Thanks,

Richard




In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-17 on lgw01-04, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.1180= 3000
System Description: Linux Mint 18 Sarah

Configured using:
 `configure --build x86_64-linux-gnu --prefix=3D/usr
 --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib
 --localstatedir=3D/var/lib --infodir=3D/usr/share/info
 --mandir=3D/usr/share/man --with-pop=3Dyes
 --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/shar= e/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24= .5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var= /lib
 --libexecdir=3D/usr/lib --localstatedir=3D/var/lib
 --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop= =3Dyes
 --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/shar= e/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24= .5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bar= s
 'CFLAGS=3D-g -O2 -fstack-protector-strong -Wformat
 -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time
 -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-= z,relro''

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Shell-script

Minor modes in effect:
  sh-electric-here-document-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-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

Recent messages:

C-x M-i is undefined
byte-code: End of buffer [4 times]
byte-code: Beginning of buffer [16 times]

Load-path shadows:
/usr/share/emacs/24.5/site-lisp/sgml-mode hides /usr/share/emacs/site-= lisp/sgml-mode
/usr/share/emacs/24.5/site-lisp/php-mode hides /usr/share/emacs/site-l= isp/php-mode
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/= site-lisp/debian-startup
/usr/share/emacs24/site-lisp/cmake-data/cmake-mode hides /usr/share/em= acs/site-lisp/cmake-mode
/usr/share/emacs/24.5/site-lisp/sgml-mode hides /usr/share/emacs/24.5/= lisp/textmodes/sgml-mode
/usr/share/emacs/24.5/site-lisp/sh-script hides /usr/share/emacs/24.5/= lisp/progmodes/sh-script

Features:
(mailalias mailclient browse-url shadow sort gnus-util mail-extr
emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail<= /div>
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils pp apropos
cus-theme eieio-custom eieio byte-opt bytecomp byte-compile cl-extra
cconv eieio-core wid-browse tree-widget cus-edit wid-edit help-mode
easymenu tabify sh-script smie executable web-mode advice help-fns
disp-table edmacro kmacro cl-loaddefs cl-lib sgml-mode delsel paren
cus-start cus-load time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image=
regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode regist= er
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew<= /div>
greek romanian slovak czech european ethiopic indian cyrillic chinese<= /div>
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvic= e
loaddefs button faces cus-face macroexp files text-properties overlay<= /div>
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 138222 26012)
 (symbols 48 23067 0)
 (miscs 40 111 525)
 (strings 32 27088 5121)
 (string-bytes 1 727532)
 (vectors 16 15338)
 (vector-slots 8 465085 10423)
 (floats 8 90 790)
 (intervals 56 1256 253)
 (buffers 960 17)
 (heap 1024 34477 1884))



--_000_147801282702047948btcom_-- From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: Any progress? References: <1478012827020.47948@bt.com> In-Reply-To: <1478012827020.47948@bt.com> Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2017 11:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150357478115739 (code B ref 24848); Thu, 24 Aug 2017 11:40:02 +0000 Received: (at 24848) by debbugs.gnu.org; 24 Aug 2017 11:39:41 +0000 Received: from localhost ([127.0.0.1]:52225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkqU8-00045n-P0 for submit@debbugs.gnu.org; Thu, 24 Aug 2017 07:39:40 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:48151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkqU7-00045X-Bk for 24848@debbugs.gnu.org; Thu, 24 Aug 2017 07:39:39 -0400 Received: from EVHUB05-UKBR.domain1.systemhost.net (193.113.108.173) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 24 Aug 2017 12:39:31 +0100 Received: from tpw09926dag12f.domain1.systemhost.net (10.9.212.20) by EVHUB05-UKBR.domain1.systemhost.net (193.113.108.173) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 24 Aug 2017 12:39:32 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12f.domain1.systemhost.net (10.9.212.20) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 24 Aug 2017 12:39:30 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Thu, 24 Aug 2017 12:39:30 +0100 From: Thread-Topic: Any progress? Thread-Index: AQHTHM04SogQAh8R4EWG5MxCLLe09A== Date: Thu, 24 Aug 2017 11:39:30 +0000 Message-ID: <1503574770199.95054@bt.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: multipart/alternative; boundary="_000_150357477019995054btcom_" MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --_000_150357477019995054btcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I've looked at the bug online and all I can see is my own report, which was= submitted 295 days ago. Once I've done sh-learn-buffer-indent, all I really need to know is how to = save the "local rules". Perhaps it isn't a bug ... but if it isn't, how co= me when I do M-x customize-unsaved it responds "No user options are set but= unsaved"? Perhaps it is not stored as an option, I don't know, but this i= s why I submitted the bug: nobody seems to know where this "local config" i= s saved or how to make it permanent! Regards, Richard --_000_150357477019995054btcom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,


I've looked at the bug online and all I can see is my own report, which = was submitted 295 days ago.


Once I've done sh-learn-= buffer-indent, all I really need to know is how to save th= e "local rules".  Perhaps it isn't a bug ... but if it isn't, how come when I do M-x customize-unsaved it responds "No= user options are set but unsaved"?  Perhaps it is not store= d as an option, I don't know, but this is why I submitted the bug: nobody s= eems to know where this "local config" is saved or how to make it permanent!


Regards,


Richard

--_000_150357477019995054btcom_-- From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2017 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150357841921273 (code B ref 24848); Thu, 24 Aug 2017 12:41:01 +0000 Received: (at 24848) by debbugs.gnu.org; 24 Aug 2017 12:40:19 +0000 Received: from localhost ([127.0.0.1]:52272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkrQp-0005Wx-9n for submit@debbugs.gnu.org; Thu, 24 Aug 2017 08:40:19 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:36401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkrQn-0005Wd-Cl; Thu, 24 Aug 2017 08:40:17 -0400 Received: by mail-it0-f49.google.com with SMTP id j62so2285371ith.1; Thu, 24 Aug 2017 05:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=sIznALQmLlQkCgv1xK2DwLlYxmhrpkZUZYSLNJei8/8=; b=UoQ12oAyZzD3BkgRe/p8Vpsux8EcLltLBNX/2pqrWbma1guCeXpxpTN4wIP4LphxIW ul9Z5EJY0ucgnZu1GTizRXyWET/TDzP2g/8Xz4JGf9VNSD+tZ+FgXfrhjfltgL7Q7UPa Sjf1zcyUB9xK9qp2s+cRDyN/FHXsbsosMy/826UOvyZujEWuRhpYxdoEU4lMoniUt/cO JJ5fv1BDa3/bkmZPnBBIsbsbr5Do3HKeDo2QK9njyoiZbKPD48qXSmXHWjRaEOag50+2 zVLv/Lr39ZX9whbAwdWkujBoqLa8iLn5guQmKvLtqfBcjx8rEzRqwlLKyqry+jJtp0fz xoyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=sIznALQmLlQkCgv1xK2DwLlYxmhrpkZUZYSLNJei8/8=; b=IU8lK4lkuHXyvQMDq8JHfD3UZ9HohzTn4stB9II9+/xZQar2wyjD3p1CW7zhUH3JwT 7874H6C3CwA/4vRzVI52qb7gm0IpUJ6AP+vGZZYaORwu5utst83EDewaPBJ7IjiF/uU4 wki1y5QffW7+Q1GjLXLTuxhltXz8hkrszsi7N32N6q7QK2oYEIZ3LjaC0C+xL5bK0DEA Yq29XCa04KF6Qv+BiRD7J3BNVDJ22HJWQF21Tl6NbQhXg2W0d+GDgra1gOQseHumNLrH QId/xZAfpGkUiuhk2L59AbbToZo2YN7Wl4eNTyiCTCspv+9t6ymmfFvz49dtqGeoFnsM kNEA== X-Gm-Message-State: AHYfb5jz75fJd27aLb3Qwee0PIks8UlPwo3PNFwBoD9wes+gH7EHNkAI 18++za6yWU0Bdl7t X-Received: by 10.36.250.3 with SMTP id v3mr6635771ith.132.1503578411467; Thu, 24 Aug 2017 05:40:11 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id h187sm2131265ita.1.2017.08.24.05.40.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 05:40:10 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> Date: Thu, 24 Aug 2017 08:41:50 -0400 In-Reply-To: <1503574770199.95054@bt.com> (richard wiseman's message of "Thu, 24 Aug 2017 11:39:30 +0000") Message-ID: <87o9r59lyp.fsf_-_@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) retitle 24848 [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? quit writes: > I've looked at the bug online and all I can see is my own report, > which was submitted 295 days ago. Hi, sorry nobody responded earlier. Actually I would generally recommend that you send a followup message after a week or two if there hasn't been any response. By that time it's probably fallen off the radar from "current" bugs and become one of thousands of "open" bugs. (Also, your title could be a bit more descriptive, it's so vague that I would probably skip over it without noticing if I saw it in a list.) > Once I've done sh-learn-buffer-indent, all I really need to know is > how to save the "local rules". Perhaps it isn't a bug ... but if it > isn't, how come when I do M-x customize-unsaved it responds "No user > options are set but unsaved"? Perhaps it is not stored as an option, > I don't know, but this is why I submitted the bug: nobody seems to > know where this "local config" is saved or how to make it permanent! Does this commentary from sh-script.el help? (not that info hidden away in comments is a substitute for actual docs; I'm just trying to make sure we understand the problem.) ;; Saving indentation values ;; ------------------------- ;; After you've learned the values in a buffer, how to you remember ;; them? Originally I had hoped that `sh-learn-buffer-indent' ;; would make this unnecessary; simply learn the values when you visit ;; the buffer. ;; You can do this automatically like this: ;; (add-hook 'sh-set-shell-hook 'sh-learn-buffer-indent) ;; ;; However... `sh-learn-buffer-indent' is extremely slow, ;; especially on large-ish buffer. Also, if there are conflicts the ;; "last one wins" which may not produce the desired setting. ;; ;; So...There is a minimal way of being able to save indentation values and ;; to reload them in another buffer or at another point in time. ;; ;; Use `sh-name-style' to give a name to the indentation settings of ;; the current buffer. ;; Use `sh-load-style' to load indentation settings for the current ;; buffer from a specific style. ;; Use `sh-save-styles-to-buffer' to write all the styles to a buffer ;; in lisp code. You can then store it in a file and later use ;; `load-file' to load it. From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Aug 2017 13:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15035822691878 (code B ref 24848); Thu, 24 Aug 2017 13:45:01 +0000 Received: (at 24848) by debbugs.gnu.org; 24 Aug 2017 13:44:29 +0000 Received: from localhost ([127.0.0.1]:52325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dksQv-0000UD-9O for submit@debbugs.gnu.org; Thu, 24 Aug 2017 09:44:29 -0400 Received: from smtpb1.bt.com ([62.7.242.138]:23735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dksQs-0000Tz-Od for 24848@debbugs.gnu.org; Thu, 24 Aug 2017 09:44:27 -0400 Received: from EPDAG01D-UKBR.domain1.systemhost.net (193.113.197.205) by EVMED04-UKBR.bt.com (10.216.161.34) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 24 Aug 2017 14:44:19 +0100 Received: from tpw09926dag12f.domain1.systemhost.net (10.9.212.20) by EPDAG01D-UKBR.domain1.systemhost.net (193.113.197.205) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 24 Aug 2017 14:44:19 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12f.domain1.systemhost.net (10.9.212.20) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 24 Aug 2017 14:44:17 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Thu, 24 Aug 2017 14:44:17 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gu Date: Thu, 24 Aug 2017 13:44:17 +0000 Message-ID: <1503582257373.58386@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com>,<87o9r59lyp.fsf_-_@users.sourceforge.net> In-Reply-To: <87o9r59lyp.fsf_-_@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Noam,=0A= =0A= Thanks for such a quick response!=0A= =0A= I've had a try with the commands in the comment. Here's what I did:=0A= =0A= 1. Load a correctly-formatted bash script.=0A= =0A= 2. Move to a line that I know will be problematic -- it always wants to ind= ent 4 characters after a "then" -- and press tab. Sure enough, the indenta= tion changes to how I don't like.=0A= =0A= 3. Undo that to restore the correctly-formatted bash script.=0A= =0A= 4. Run sh-learn-buffer-indent.=0A= =0A= 5. Press tab on that problematic line; this time, correctly, the indentatio= n doesn't change.=0A= =0A= 6. Run sh-name-style and call it "bash".=0A= =0A= 7. Run sh-save-styles-to-buffer and let it use *scratch*.=0A= =0A= 8. Copy the output in *scratch* into my .emacs file.=0A= =0A= 9. Quit emacs.=0A= =0A= 10. Start emacs.=0A= =0A= 11. Load the same bash script.=0A= =0A= 12. Load the style, "bash".=0A= =0A= 13. Press tab on that problematic line. It still indents incorrectly, so a= lthough sh-save-styles-to-buffer saved styles (see below), it evidently did= n't include the modification. :-(=0A= =0A= Sadly, even the following doesn't work:=0A= =0A= 1. Load a correctly-formatted bash script.=0A= =0A= 2. Move to a line that I know will be problematic -- it always wants to ind= ent 4 characters after a "then" -- and press tab. Sure enough, the indenta= tion changes to how I don't like.=0A= =0A= 3. Undo that to restore the correctly-formatted bash script.=0A= =0A= 4. Run sh-learn-buffer-indent.=0A= =0A= 5. Press tab on that problematic line; this time, correctly, the indentatio= n doesn't change.=0A= =0A= 6. Run sh-name-style and call it "bash".=0A= =0A= 7. Load a different bash script without quitting emacs first.=0A= =0A= 8. Run sh-load-style and press tab so it auto-completes to "bash".=0A= =0A= 9. Press tab on a problematic line -- indentation is still incorrect.=0A= =0A= So the above seem to demonstrate that sh-name-buffer and sh-save-styles-to-= buffer don't save all indentation information.=0A= =0A= Here's what sh-save-styles-to-buffer puts in my *scratch* buffer:=0A= =0A= (setq sh-styles-alist=0A= '(("bash"=0A= (sh-basic-offset . 2)=0A= (sh-first-lines-indent . 0)=0A= (sh-indent-after-case . +)=0A= (sh-indent-after-do . +)=0A= (sh-indent-after-done . 0)=0A= (sh-indent-after-else . +)=0A= (sh-indent-after-if . +)=0A= (sh-indent-after-loop-construct . +)=0A= (sh-indent-after-open . +)=0A= (sh-indent-comment . t)=0A= (sh-indent-for-case-alt . ++)=0A= (sh-indent-for-case-label . +)=0A= (sh-indent-for-continuation . +)=0A= (sh-indent-for-do . 0)=0A= (sh-indent-for-done . 0)=0A= (sh-indent-for-else . 0)=0A= (sh-indent-for-fi . 0)=0A= (sh-indent-for-then . 0))))=0A= =0A= Please let me know if you'd like any further information.=0A= =0A= Thanks again for the message,=0A= =0A= Richard=0A= =0A= PS - I guess (add-hook 'sh-set-shell-hook 'sh-learn-buffer-indent) will hel= p me if my file is already properly formatted, but I would like to know how= to save ALL the indent rules established by sh-learn-buffer-indent if at a= ll possible!= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 01:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150362345228040 (code B ref 24848); Fri, 25 Aug 2017 01:11:01 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 01:10:52 +0000 Received: from localhost ([127.0.0.1]:53383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl399-0007IC-Qd for submit@debbugs.gnu.org; Thu, 24 Aug 2017 21:10:51 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:38415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl397-0007Hy-FZ for 24848@debbugs.gnu.org; Thu, 24 Aug 2017 21:10:49 -0400 Received: by mail-it0-f43.google.com with SMTP id n5so1534846itb.1 for <24848@debbugs.gnu.org>; Thu, 24 Aug 2017 18:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iBNgmSlnqQTJcvVj+aqsDAv/GYst5jOtRRXq7gXaeBw=; b=l/5mcz6jlZ5+3nNl4uZm07uqJu/+NXF6Ea1XrtRBPkfHMt2GDeHWyTXssttbO9/j3Z HlkAmC3Nveg4UFlbtYst7naF6IDTewdXiSpRIAbsPMJOKD7Cp5By8d6/qlcNVKlSoM9A RZb4tw/Ce9cG7BRlnXih/SW3Z2pMzoUICIomUKM/OMpb6rhF44IErjFDDTEuRBhcX8ZA ze9qNPZ+nXI1Z+FUjrw+9jLMZI3APCRixpcUgb8TGrOI/gCFzwSLqbhEBtN+4Gx0s+3g lBz3r0jysKUdV+2+JpqunELrfA0nwi3kcwvMF0+nxAwE6zA8udAq7Ij7AiKtoyIB7kpz 2yYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=iBNgmSlnqQTJcvVj+aqsDAv/GYst5jOtRRXq7gXaeBw=; b=Zq8PefpgfeWN0aywbmtKuA+KCIvkJ5Z009/WmogXvY9LihQyrWb79lcNeQ0vgAOT6q vkeLc1h7NWboaVoUHLhTxlXBEAsvrZUeed1pRg8et99mVyN3ykEdt3oHkf2tGXDqiUXr u+zzAeSe3dAUJLi9QmjpqJPyeqWbzqrlGwkvWvhI63KQgHxuSWpqmvsYFvlJaKRjC/sx J85x3fG/JvPXCTMW8Y/jHJfkiVfhZE3vhOYEdCvf2ItsAFeAIya9G9d0cfgGS4sMRbUW l9OuwLVVGFj2FgEfbVxdF1AFdbEzDeByl+8dC017nHhm/K+UbgNRzdu81kYbuSt5GmH/ OtVQ== X-Gm-Message-State: AHYfb5iUDE2TKXc6K57X8c8uz227dmVTQ/LJvGu5QoMQ2ipSN8ur4muP lWc7rWc+9mF2ABoP X-Received: by 10.36.107.141 with SMTP id v135mr642764itc.33.1503623443674; Thu, 24 Aug 2017 18:10:43 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id 193sm2589017ioo.84.2017.08.24.18.10.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2017 18:10:43 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> Date: Thu, 24 Aug 2017 21:12:22 -0400 In-Reply-To: <1503582257373.58386@bt.com> (richard wiseman's message of "Thu, 24 Aug 2017 13:44:17 +0000") Message-ID: <87inhca1s9.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) writes: > So the above seem to demonstrate that sh-name-buffer and > sh-save-styles-to-buffer don't save all indentation information. Oh, I think the commentary I found is actually for the old sh-script specific indentation. If 'sh-use-smie' is set (the default) you should rather use M-x smie-save-config. And then it seems an extra step is needed to activate it in the current session, evalute this expression: (customize-set-variable 'smie-config ;; This value is set by `smie-save-config'. '((sh-mode (-2 :before "then" 0)))) I'm not sure if this is because I'm testing with 'emacs -Q', or something is missing from 'smie-save-config'. I think normally the value would saved with the other customized options and work without any extra effort. > Please let me know if you'd like any further information. Could you also please post a script which gives the bad indentation? This could be another bug in itself. From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 08:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15036487091054 (code B ref 24848); Fri, 25 Aug 2017 08:12:01 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 08:11:49 +0000 Received: from localhost ([127.0.0.1]:53513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl9iX-0000Gw-3O for submit@debbugs.gnu.org; Fri, 25 Aug 2017 04:11:49 -0400 Received: from smtpb1.bt.com ([62.7.242.142]:15592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dl9iU-0000Gi-P1 for 24848@debbugs.gnu.org; Fri, 25 Aug 2017 04:11:47 -0400 Received: from EVHUB03-UKBR.domain1.systemhost.net (193.113.108.185) by EVMED06-UKBR.bt.com (10.216.161.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 09:11:38 +0100 Received: from tpw09926dag12h.domain1.systemhost.net (10.9.212.36) by EVHUB03-UKBR.domain1.systemhost.net (193.113.108.185) with Microsoft SMTP Server (TLS) id 14.3.158.1; Fri, 25 Aug 2017 09:11:40 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12h.domain1.systemhost.net (10.9.212.36) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 25 Aug 2017 09:11:38 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Fri, 25 Aug 2017 09:11:38 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIjw== Date: Fri, 25 Aug 2017 08:11:38 +0000 Message-ID: <1503648698123.80907@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com>,<87inhca1s9.fsf@users.sourceforge.net> In-Reply-To: <87inhca1s9.fsf@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Hi Noam,=0A= =0A= Thanks for the suggestions.=0A= =0A= I don't know whether my Emacs uses smie for sh-mode but there's apparently = no sh-use-smie variable set by default.=0A= =0A= However, running smie-config-guess seems to have the same effect as sm-lear= n-buffer-indent so perhaps it does. Unfortunately, I've still not managed = to save the config.=0A= =0A= Here's what I did:=0A= =0A= 1. I ran smie-config-guess on a correctly-indented bash script (see below) = and confirmed that it now indents as I would expect when I hit tab on any l= ine).=0A= =0A= 2. I then ran smie-save-config and it said it saved it to smie-config.=0A= =0A= 3. I ran customize-variable on smie-config and its value is now ((2 :elem b= asic 4)) which doesn't make any mention of indenting after "then" which is = weird, because as I said, it does now indent correctly in this buffer.=0A= =0A= 4. I then clicked Apply and Save to add the setting to my ~/.emacs file.=0A= =0A= 5. I confirmed that it now appears in the (custom-set-variables ... ) secti= on.=0A= =0A= 6. I restarted Emacs and loaded the bash script.=0A= =0A= 7. As feared, indentation is back to the way I don't like.=0A= =0A= 8. I then modified the smie-config entry in (custom-set-variables ... ) to = correspond with your expression (that mentions "then").=0A= =0A= 9. I restarted Emacs and loaded the bash script.=0A= =0A= 10. Sadly, indentation is still unaffected.=0A= =0A= The bash script I've used as a test here is:=0A= =0A= #!/usr/bin/env bash=0A= =0A= if [ "$1" ]=0A= then=0A= echo "First argument is: $1"=0A= else=0A= echo "No arguments"=0A= fi=0A= =0A= In case there's a problem with formatting by the time this email reaches yo= u, only the two echo lines are indented, and each by two spaces. Hitting t= ab on the first of these changes the indent to four spaces; on the second, = indentation remains at two.=0A= =0A= Regards,=0A= =0A= Richard= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15036502863351 (code B ref 24848); Fri, 25 Aug 2017 08:39:02 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 08:38:06 +0000 Received: from localhost ([127.0.0.1]:53525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlA7y-0000ry-96 for submit@debbugs.gnu.org; Fri, 25 Aug 2017 04:38:06 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:9622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlA7v-0000rT-UK for 24848@debbugs.gnu.org; Fri, 25 Aug 2017 04:38:04 -0400 Received: from EVMHT01-UKBR.domain1.systemhost.net (193.113.108.42) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 09:37:54 +0100 Received: from tpw09926dag12f.domain1.systemhost.net (10.9.212.20) by EVMHT01-UKBR.domain1.systemhost.net (193.113.108.42) with Microsoft SMTP Server (TLS) id 8.3.342.0; Fri, 25 Aug 2017 09:37:57 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12f.domain1.systemhost.net (10.9.212.20) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 25 Aug 2017 09:37:56 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Fri, 25 Aug 2017 09:37:56 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AACCKw Date: Fri, 25 Aug 2017 08:37:56 +0000 Message-ID: <1503650276173.14201@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com>, <87inhca1s9.fsf@users.sourceforge.net>, <1503648698123.80907@bt.com> In-Reply-To: <1503648698123.80907@bt.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) PS When I first load the bash script, if I run smie-config-show-indent on t= he line after "then", I get:=0A= =0A= Rules used: :elem basic -> 4, :after "then" -> nil=0A= =0A= If I then run smie-config-guess followed by smie-config-show-indent on the = same line, I now get:=0A= =0A= Rules used: :elem basic -> 2(via 4), :after "then" -> nil=0A= =0A= If I run smie-config-save (response: "Mode rules replaced in `smie-config'"= ) followed by customize-variable smie-config the value is simply:=0A= =0A= ((2 :elem basic 4))= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 12:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150366277428815 (code B ref 24848); Fri, 25 Aug 2017 12:07:01 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 12:06:14 +0000 Received: from localhost ([127.0.0.1]:53753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlDNN-0007Uh-NT for submit@debbugs.gnu.org; Fri, 25 Aug 2017 08:06:13 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:38428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlDNL-0007UU-KH for 24848@debbugs.gnu.org; Fri, 25 Aug 2017 08:06:11 -0400 Received: by mail-io0-f182.google.com with SMTP id 81so6921096ioj.5 for <24848@debbugs.gnu.org>; Fri, 25 Aug 2017 05:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ObLtjHKuyo3QbElJvDSrAo+toUwpw2tHFZzaCG8mTBw=; b=NacCRYeZ4qnLy9ewDARCzJt5Vnt9lxZnpIz/V8ucQ+Qqw0o6gUqD0OfVFN8WXbdFcM PmVID0+l7RoOgplAs0yp8iuPyhTHqg+xmphXVJKFSJggrX7cmq1C2G6HLQzCcuMAk2x6 zBK5qGBoljxq/wNoahPzVC+/VC+j34BHNpvjVABI8xuyEO/Swc71JwOwy2KNPgu8CyeU yIXmUeNXqxmAQzgmSAH2Y5eFpiOMd5uSwP0+WIozAJthxkeh/6KlGc7yTW9rn8065Z4O 7bXcqy7isI8KIZ+NFPYAnDMnufaBHy9hIdnFoBAtivyK/XCJ11WGgJtyrSqemU0LG+T7 YlHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ObLtjHKuyo3QbElJvDSrAo+toUwpw2tHFZzaCG8mTBw=; b=QWENv498SWyX5HXgOZQDyA1wzkIHQqi9OvyG+7f+iI904+fy2rm2YNw1+mHzdDxu2s VmP/87aX8DrLLNhA+LsRy1S24aaRp7i8tbEni3tP3PRHc8Fk3N3MUYWkocNw05sITEYs emBJ1jAikv6SSrakbM6Ij34/+otycb8uUSorJiWvOAW55K3fBrIttCToBuvv7s+fD+NP JA/516sNXWgxmUhshXkP38bKRWQ+0O7jbLiQ0Y6mmkln3K2wpb6I55nXMVX3Obw1vlGs wH1w9+zLU95sb14bk/DaopZ5zexOmHLqRhHad4B0PIzdgZOGLRxNGYNRQXbKSxBhEQDq kE5Q== X-Gm-Message-State: AHYfb5jzXZANpXqB9QKuOSx5ECwOdrhsvKUGaeobnUz1UWzOsrEILqZy GuaUMy93j0YnUP4i X-Received: by 10.107.5.66 with SMTP id 63mr7590457iof.184.1503662765490; Fri, 25 Aug 2017 05:06:05 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id 67sm2910489iob.7.2017.08.25.05.06.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Aug 2017 05:06:04 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> Date: Fri, 25 Aug 2017 08:07:43 -0400 In-Reply-To: <1503648698123.80907@bt.com> (richard wiseman's message of "Fri, 25 Aug 2017 08:11:38 +0000") Message-ID: <87d17jam0g.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) writes: > I don't know whether my Emacs uses smie for sh-mode but there's > apparently no sh-use-smie variable set by default. What Emacs version do you have? (Based on what you said below, it sounds like smie is being used.) > The bash script I've used as a test here is: > > #!/usr/bin/env bash > > if [ "$1" ] > then > echo "First argument is: $1" > else > echo "No arguments" > fi Ah, so you've set sh-basic-offset to 2, right? That's Bug#21751. Hmm, it looks like the smie code is following sh-indentation instead of sh-basic-offset. It's not clear to me why both of those variables exist... > 3. I ran customize-variable on smie-config and its value is now ((2 > :elem basic 4)) which doesn't make any mention of indenting after > "then" which is weird, because as I said, it does now indent correctly > in this buffer. When I set sh-basic-offset to 2, I get that value for smie-config as well. > 7. As feared, indentation is back to the way I don't like. > > However, running smie-config-guess seems to have the same effect as > sm-learn-buffer-indent so perhaps it does. Unfortunately, I've still > not managed to save the config. I followed your steps and got similar results. The problem is actually that the config doesn't get loaded properly. It works if I then do 8. M-x customize-option RET smie-config RET 9. Modify the text of the value field, e.g., by adding a space at the end, so that the "State" turns to EDITED. 10. Click the "Apply" button (this is equivalent to the (customize-set-variable 'smie-config ...) expression I mentioned before). 11. Go to the bash script buffer and run M-x normal-mode RET so that the mode hooks are run again. 12. Indentation is correct. From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15036686585237 (code B ref 24848); Fri, 25 Aug 2017 13:45:02 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 13:44:18 +0000 Received: from localhost ([127.0.0.1]:53860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlEuI-0001MO-C9 for submit@debbugs.gnu.org; Fri, 25 Aug 2017 09:44:18 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:18657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlEuF-0001MB-S0 for 24848@debbugs.gnu.org; Fri, 25 Aug 2017 09:44:16 -0400 Received: from EVMHT01-UKBR.domain1.systemhost.net (193.113.108.42) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 14:44:05 +0100 Received: from tpw09926dag12g.domain1.systemhost.net (10.9.212.28) by EVMHT01-UKBR.domain1.systemhost.net (193.113.108.42) with Microsoft SMTP Server (TLS) id 8.3.342.0; Fri, 25 Aug 2017 14:44:09 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12g.domain1.systemhost.net (10.9.212.28) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 25 Aug 2017 14:44:07 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Fri, 25 Aug 2017 14:44:07 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AARNOCgAAXHmE= Date: Fri, 25 Aug 2017 13:44:07 +0000 Message-ID: <1503668647564.74012@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com>,<87d17jam0g.fsf@users.sourceforge.net> In-Reply-To: <87d17jam0g.fsf@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I'm using Emacs v24.5.1 and yes, I've a basic offset of 2 set...=0A= =0A= (custom-set-variables=0A= ;; lots of stuff=0A= '(sh-basic-offset 2)=0A= ;; lots of stuff=0A= )=0A= =0A= I was interested that you mentioned sh-indentation as an alternative to sh-= basic-offset so I added that too, and that resulted in the indentation that= I want!=0A= =0A= So that solves the problem that I was trying to solve by saving learned ind= entation. :-)=0A= =0A= Anyway, to help get to the bottom of this, I disabled sh-indentation and tr= ied your steps around editing smie-config and M-x normal-mode and I got the= same result as you: it worked.=0A= =0A= So as you indicated, it appears to be that smie-config isn't being loaded (= properly) when Emacs starts.=0A= =0A= I await your next inspiration! :-)=0A= =0A= Thanks,=0A= =0A= Richard= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2017 14:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15036714819979 (code B ref 24848); Fri, 25 Aug 2017 14:32:01 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Aug 2017 14:31:21 +0000 Received: from localhost ([127.0.0.1]:54529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlFdp-0002at-6V for submit@debbugs.gnu.org; Fri, 25 Aug 2017 10:31:21 -0400 Received: from smtpb1.bt.com ([62.7.242.141]:15402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlFdn-0002af-Cp for 24848@debbugs.gnu.org; Fri, 25 Aug 2017 10:31:19 -0400 Received: from EVMHT04-UKBR.domain1.systemhost.net (193.113.108.57) by EVMED05-UKBR.bt.com (10.216.161.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 15:31:10 +0100 Received: from tpw09926dag12g.domain1.systemhost.net (10.9.212.28) by EVMHT04-UKBR.domain1.systemhost.net (193.113.108.57) with Microsoft SMTP Server (TLS) id 8.3.342.0; Fri, 25 Aug 2017 15:31:12 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12g.domain1.systemhost.net (10.9.212.28) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Fri, 25 Aug 2017 15:31:10 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Fri, 25 Aug 2017 15:31:11 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AARNOCgAAXHmGAAA+YfQ== Date: Fri, 25 Aug 2017 14:31:10 +0000 Message-ID: <1503671470795.83992@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com>, <87d17jam0g.fsf@users.sourceforge.net>, <1503668647564.74012@bt.com> In-Reply-To: <1503668647564.74012@bt.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) A little extra information that will possibly muddy the waters...=0A= =0A= I've the same version of Emacs on a Windows machine (I use Linux Mint norma= lly) and I've essentially the same ~/.emacs file on both machines, but for = some reason the Windows one behaves differently for bash scripts! Perhaps = the sh-mode comes from somewhere else or is a different version, I don't kn= ow. On Windows, though, when I go to a correctly indented line in a functi= on and press tab, it indents incorrectly! :-(=0A= =0A= So for example,=0A= =0A= #!/usr/bin/env bash=0A= =0A= function f {=0A= echo Hello from the function=0A= }=0A= =0A= f=0A= =0A= On Windows, when I'm on the "echo" line and press tab, it indents to 4 spac= es; on Linux it doesn't.= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Aug 2017 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: richard.wiseman@bt.com Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150377809214176 (code B ref 24848); Sat, 26 Aug 2017 20:09:01 +0000 Received: (at 24848) by debbugs.gnu.org; 26 Aug 2017 20:08:12 +0000 Received: from localhost ([127.0.0.1]:56836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlhNM-0003gZ-9O for submit@debbugs.gnu.org; Sat, 26 Aug 2017 16:08:12 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:33265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlhNL-0003gO-79 for 24848@debbugs.gnu.org; Sat, 26 Aug 2017 16:08:11 -0400 Received: by mail-oi0-f41.google.com with SMTP id r203so17747030oih.0 for <24848@debbugs.gnu.org>; Sat, 26 Aug 2017 13:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2J/awu4BRvJXz1lwWLOZG09JY1cwC+oWmR5XJDhgH/o=; b=I6p6WD/w0w+QeVXD0by5iYv9ph9/hdodfbqHO8F4huWIxbqGXnNGofrdzeO0ru5Chu qeQdOd7y7TiGP+qxRA9sqNiCXCsSsNHN6FR+83RYErhv4XBHh5keX0yJLrtcWg02YJSW H7P7Sj1DCaK4cotdKcM9hX0PyMrhBb49VqGZEQH9rBPRfzwvLFZW4npLCbxSxyp9b+uF iIc4motT61/FTQx5C1OdyCIC/hVj8h6LgE3Gn+OshRw2vMhuKewvsEhTc8/CFrfzJxxU 1kOFWIo79fsGtmkGASww4P/pjUE8sh7yXonRTMFAqK/Aj/1WHMjwJL5zrmRGlB55m0QW PrEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2J/awu4BRvJXz1lwWLOZG09JY1cwC+oWmR5XJDhgH/o=; b=dR+Z7AEPtCGihlJ/6I+GcMi0GnyZj+ttPTNbiM8HwB28wzsxB3WLpD8A3ZUG0dLD8P bAjYM/osEOGVEe+ss7o69r/GfwAvZcPORdWvFWGNMXdFIMh1DH17aZsoiuWPMaVGH1uV yPf+CfCQK9OuuJvt66pYlnMS6bZwX18TfzKb33jfT2V1vrh8dIPDbzfxvOc8pFkIrEjN TxPCV2iAcz/VskXRx8KHDx9np4ZWx7/Am6WZKFKZs+4LXNywDvWZVmAAnvNlntAmh2ue shs3+yD/HGnGNUzzWgg6ocadhVqm5Z0GNeOdS9Wqr8PFJ+yFAUZy7bUIL12CGLcBIZOi UZtg== X-Gm-Message-State: AHYfb5idmM2EemyGZ8REPBKY9htStjUCA90Lw1W8VhBo45RTORgPNR7g 3pw6myBmlMNCRefsmhtAXhR+eJsp7Q== X-Received: by 10.202.181.130 with SMTP id e124mr2873097oif.96.1503778085411; Sat, 26 Aug 2017 13:08:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.18.129 with HTTP; Sat, 26 Aug 2017 13:08:04 -0700 (PDT) In-Reply-To: <1503671470795.83992@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <1503671470795.83992@bt.com> From: Noam Postavsky Date: Sat, 26 Aug 2017 16:08:04 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Fri, Aug 25, 2017 at 10:31 AM, wrote: > A little extra information that will possibly muddy the waters... > > I've the same version of Emacs on a Windows machine (I use Linux Mint nor= mally) and I've essentially the same ~/.emacs file on both machines, but fo= r some reason the Windows one behaves differently for bash scripts! Perhap= s the sh-mode comes from somewhere else or is a different version, I don't = know. On Windows, though, when I go to a correctly indented line in a func= tion and press tab, it indents incorrectly! :-( > > So for example, > > #!/usr/bin/env bash > > function f { > echo Hello from the function > } > > f > > On Windows, when I'm on the "echo" line and press tab, it indents to 4 sp= aces; on Linux it doesn't. Can you narrow down the relevant .emacs settings? If I do emacs -Q --eval "(setq sh-basic-offset 2)" hello-function.sh on Windows Emacs 24.5, I get 2 space indentation. From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Aug 2017 07:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150399262315940 (code B ref 24848); Tue, 29 Aug 2017 07:44:01 +0000 Received: (at 24848) by debbugs.gnu.org; 29 Aug 2017 07:43:43 +0000 Received: from localhost ([127.0.0.1]:60085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmbBX-000492-5E for submit@debbugs.gnu.org; Tue, 29 Aug 2017 03:43:43 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:54301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmbBV-00048S-12 for 24848@debbugs.gnu.org; Tue, 29 Aug 2017 03:43:41 -0400 Received: from EVMHT01-UKBR.domain1.systemhost.net (193.113.108.42) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 29 Aug 2017 08:43:33 +0100 Received: from tpw09926dag12h.domain1.systemhost.net (10.9.212.36) by EVMHT01-UKBR.domain1.systemhost.net (193.113.108.42) with Microsoft SMTP Server (TLS) id 8.3.342.0; Tue, 29 Aug 2017 08:43:34 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12h.domain1.systemhost.net (10.9.212.36) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 29 Aug 2017 08:43:32 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Tue, 29 Aug 2017 08:43:32 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AARNOCgAAXHmGAAA+YfYAB4YAAgAP2lNs= Date: Tue, 29 Aug 2017 07:43:32 +0000 Message-ID: <1503992612627.48610@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <1503671470795.83992@bt.com>, In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.36] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Apologies Noam, I can't seem to reproduce the Windows Emacs anomaly now. I= 've tried what you suggested and got the same results as you on both Linux = and Windows, so there must have been something different though I can't wor= k out what that would have been!= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Aug 2017 23:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150413686422203 (code B ref 24848); Wed, 30 Aug 2017 23:48:02 +0000 Received: (at 24848) by debbugs.gnu.org; 30 Aug 2017 23:47:44 +0000 Received: from localhost ([127.0.0.1]:35416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnChx-0005m1-SC for submit@debbugs.gnu.org; Wed, 30 Aug 2017 19:47:43 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:38888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnCht-0005lY-UD; Wed, 30 Aug 2017 19:47:38 -0400 Received: by mail-io0-f193.google.com with SMTP id m40so2467252ioi.5; Wed, 30 Aug 2017 16:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KW/2OSUTKeWblnZw7jeJbivtlDCloDNWbsm8jFX4zOQ=; b=WyArNV10s5XdBI4r7MklVFxbH5Qvs3U6oGfgNpuznFapBmnQjN3o3wvypARxjZT+1p OklzYuX7JrHjseXBBJYNOIRmWr7S4NnOmM2xVCRiXr/1E2Khq3lEwT6s5+wB/HEdv9z9 O893+XCCsRELzjY6gy+jq1XSMLlCt0IEKLTGlpcVmvvQt2WfOGabdq/K3lP23te5swGz lYnGtnYa4ILjWyh/IexeKRnNzpmr88/eIKrSX/JHWk/YZtCKcvTDfpTm/TeJvvqvVTy1 6Hirhv1eehPtk895NxcgFBHF3bJ8vcthmNFjIWe4VcDeYot+3hW6EJABXHKwYHEdJZCY MO3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=KW/2OSUTKeWblnZw7jeJbivtlDCloDNWbsm8jFX4zOQ=; b=XBH0fnHiLF747uMZYBRew1IA/Nqiie8qGpgUswDGj2YRwRtwhLX/rx9mJ+WMOkjp6a z7H+vavHNsFPRG4qSvB9sf1KEIikNMA4AlPuSu5IyQAuTGu9u8fYrKLqlEXAWj7eNHaB 6u4EsxgRuZbPCu6LuqMziioEaIbnJIpI+BPkQ6q1mO1iRyCksb73m27wFdkWhgtN1qCi QdsqLaJ5dIDJPff01FYXz4n+x/V3a5Ra4CFt03/4YpFi9Pb5uq4bjBhVX32y4QAlvE7N BgtGYiBtvxrT9c9Uk28D9I+UkjY/kJeUW90pLt8yD7T83nKAhpBiyi7Eork3dlcqqvP1 YkuA== X-Gm-Message-State: AHYfb5jKfEJEtbbztRkkcsZxnrLehSqa62H7lcOVPoq+DJImd2gdY4M4 CvTrMoClwnNXcyOE X-Received: by 10.36.206.69 with SMTP id v66mr3988455itg.161.1504136852163; Wed, 30 Aug 2017 16:47:32 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id j127sm8398itj.0.2017.08.30.16.47.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Aug 2017 16:47:30 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> Date: Wed, 30 Aug 2017 19:49:11 -0400 In-Reply-To: <1503668647564.74012@bt.com> (richard wiseman's message of "Fri, 25 Aug 2017 13:44:07 +0000") Message-ID: <871sns8vm0.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain tags 24848 + patch quit writes: > Anyway, to help get to the bottom of this, I disabled sh-indentation > and tried your steps around editing smie-config and M-x normal-mode > and I got the same result as you: it worked. > > So as you indicated, it appears to be that smie-config isn't being loaded (properly) when Emacs starts. > > I await your next inspiration! :-) Okay, the patch below fixes the loading for me. I also added a mention of `smie-config-guess' in `sh-learn-buffer-indent's docstring so that it should be possible to figure how to save config rules by reading docstrings rather than hunting in the source code. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Fix-loading-of-smie-config-rules-Bug-24848.patch Content-Description: patch >From 69365325783e5f980cd0e1460465b8562a5180ef Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 30 Aug 2017 19:31:48 -0400 Subject: [PATCH v1] Fix loading of smie-config rules (Bug#24848) * lisp/emacs-lisp/smie.el (smie-config--setter): Use `set-default' instead of `setq-default'. (smie-config): Use `custom-initialize-set' instead of `custom-initialize-default' as the :initialize argument. * lisp/progmodes/sh-script.el (sh-learn-buffer-indent): Mention that we call `smie-config-guess' so that the user will have a chance to find the correct docstring to consult. Remove hedging comments regarding use of abnormal hooks. --- lisp/emacs-lisp/smie.el | 4 ++-- lisp/progmodes/sh-script.el | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 7baccbc752..9afbfe4446 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1956,7 +1956,7 @@ smie-config--mode-hook (defvar smie-config--modefuns nil) (defun smie-config--setter (var value) - (setq-default var value) + (set-default var value) (let ((old-modefuns smie-config--modefuns)) (setq smie-config--modefuns nil) (pcase-dolist (`(,mode . ,rules) value) @@ -1982,7 +1982,7 @@ smie-config ;; FIXME improve value-type. :type '(choice (const nil) (alist :key-type symbol)) - :initialize 'custom-initialize-default + :initialize 'custom-initialize-set :set #'smie-config--setter) (defun smie-config-local (rules) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 07604ad665..ca31635dbc 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -3600,6 +3600,10 @@ sh-learned-buffer-hook (defun sh-learn-buffer-indent (&optional arg) "Learn how to indent the buffer the way it currently is. +If `sh-use-smie' is non-nil, call `smie-config-guess'. +Otherwise, run the sh-script specific indent learning command, as +decribed below. + Output in buffer \"*indent*\" shows any lines which have conflicting values of a variable, and the final value of all variables learned. When called interactively, pop to this buffer automatically if @@ -3616,8 +3620,7 @@ sh-learn-buffer-indent Abnormal hook `sh-learned-buffer-hook' if non-nil is called when the function completes. The function is abnormal because it is called -with an alist of variables learned. This feature may be changed or -removed in the future. +with an alist of variables learned. This command can often take a long time to run." (interactive "P") @@ -3815,7 +3818,6 @@ sh-learn-buffer-indent " has" "s have") (if (zerop num-diffs) "." ":")))))) - ;; Are abnormal hooks considered bad form? (run-hook-with-args 'sh-learned-buffer-hook learned-var-list) (and (called-interactively-p 'any) (or sh-popup-occur-buffer (> num-diffs 0)) -- 2.14.1 --=-=-=-- From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Sep 2017 08:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150451382326273 (code B ref 24848); Mon, 04 Sep 2017 08:31:01 +0000 Received: (at 24848) by debbugs.gnu.org; 4 Sep 2017 08:30:23 +0000 Received: from localhost ([127.0.0.1]:47633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1domly-0006pg-M9 for submit@debbugs.gnu.org; Mon, 04 Sep 2017 04:30:22 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:42890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1domlx-0006pQ-KR for 24848@debbugs.gnu.org; Mon, 04 Sep 2017 04:30:22 -0400 Received: from EVMHT04-UKBR.domain1.systemhost.net (193.113.108.57) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 09:30:11 +0100 Received: from tpw09926dag12f.domain1.systemhost.net (10.9.212.20) by EVMHT04-UKBR.domain1.systemhost.net (193.113.108.57) with Microsoft SMTP Server (TLS) id 8.3.342.0; Mon, 4 Sep 2017 09:30:13 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12f.domain1.systemhost.net (10.9.212.20) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 4 Sep 2017 09:30:10 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Mon, 4 Sep 2017 09:30:10 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AARNOCgAAXHmGACIiFj4AG2m5o Date: Mon, 4 Sep 2017 08:30:10 +0000 Message-ID: <1504513809301.60282@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com>,<871sns8vm0.fsf@users.sourceforge.net> In-Reply-To: <871sns8vm0.fsf@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.39] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Thanks Noam. I'm not sure I've got any way to test this patch, though... = I don't seem to have an smie.el file anywhere. I've installed the emacs24-= el package expecting that to contain it but it doesn't -- at least, I've se= arched my entire hard drive for it (using sudo, just in case) and it wasn't= found.=0A= =0A= ________________________________________=0A= From: Noam Postavsky on behalf of npostavs@users.sourc= eforge.net =0A= Sent: 31 August 2017 00:49=0A= To: Wiseman,R,Richard,TUK2 R=0A= Cc: 24848@debbugs.gnu.org=0A= Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result fr= om sh-learn-buffer-indent?=0A= =0A= tags 24848 + patch=0A= quit=0A= =0A= writes:=0A= =0A= > Anyway, to help get to the bottom of this, I disabled sh-indentation=0A= > and tried your steps around editing smie-config and M-x normal-mode=0A= > and I got the same result as you: it worked.=0A= >=0A= > So as you indicated, it appears to be that smie-config isn't being loaded= (properly) when Emacs starts.=0A= >=0A= > I await your next inspiration! :-)=0A= =0A= Okay, the patch below fixes the loading for me. I also added a mention=0A= of `smie-config-guess' in `sh-learn-buffer-indent's docstring so that it=0A= should be possible to figure how to save config rules by reading=0A= docstrings rather than hunting in the source code.=0A= =0A= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Sep 2017 23:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150491259427038 (code B ref 24848); Fri, 08 Sep 2017 23:17:02 +0000 Received: (at 24848) by debbugs.gnu.org; 8 Sep 2017 23:16:34 +0000 Received: from localhost ([127.0.0.1]:56540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqSVm-000722-9w for submit@debbugs.gnu.org; Fri, 08 Sep 2017 19:16:34 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:44722) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dqSVk-00071m-FP for 24848@debbugs.gnu.org; Fri, 08 Sep 2017 19:16:32 -0400 Received: by mail-wm0-f43.google.com with SMTP id 137so9177722wmj.1 for <24848@debbugs.gnu.org>; Fri, 08 Sep 2017 16:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=CeKMqQunZwO0RFOIJCl79NIw4Pi9eoPia1abYMYdZWI=; b=n2OP8lpc11u8t2xO4BGovQhOTSsaqB9yGMEhkoNS6TOEu5swwKVdJ0v6wyyz+K2uPv xSsyrIKpnEVKs0q6qdE0rimO1nkp1hCM/r6nnZQ0QZVEYaxW/2bwIIJS511rWUQfaFwn 0ZmReNBFBcPSmkXtaZKt/54NADfe4U1/B6NpXZHGerNb5s9TbTFo1+QurlI7EMreil8S iY2Och6jk3WJxe/qNdOFpeTJo2JnIBLO6/Bzjr1u5nWbiYxZeFqN44nCNHjSQa/zGq6i PiSQXY/RyjSdJoaKNaT18fSULshAzdxM/jUTHws61hfdP7lu5WJN0pIxyR1fPClArRc6 Ln3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=CeKMqQunZwO0RFOIJCl79NIw4Pi9eoPia1abYMYdZWI=; b=qBZB76DXnyRVbxSz//bPyrK/TbzSiN8W3Vvct6Lh1uFurmDqsFNE8kQGYNIqvcZEQi bhLjRdYScPUxAogpLiQCQ1VZpKyGLeIi+LtO+5Arg6ZeKkQMU1ioRcX9RPO3pkom2yNM Mp6GbrQRyZb9bBIKafNO2DMFtN2iSbUKkulTlGw4HukEagtccp2e+MUIZ1sDYPSa0e76 v+DobPzuc/EAXX4QtRTp4TqhWuvw7mdbt5jaae/5EJOG5bDdbeO4wwfgcjwULnht/dgG rzEsaNcXrWXAgpLJ8cqiYT3sOt2CI2u41apEuXfUT08g33+sUTmzh43x74w+RICa0HkE K1iw== X-Gm-Message-State: AHPjjUgMSMjmc80x0wv6NaV7kH0rAHWlF+NwyVnoMYMqNcjNnhIj2xvq 4i6ETasP84oLYS7y4LDD3sQiGQ== X-Google-Smtp-Source: AOwi7QBZz6hf51k7ikfjeptW7zITGc+ydIG8vCg9f0545vU4zFmNiMBYbXO9/6ZwEsYpeYMwOEJv6w== X-Received: by 10.28.52.140 with SMTP id b134mr2627413wma.111.1504912586444; Fri, 08 Sep 2017 16:16:26 -0700 (PDT) Received: from whitebox ([88.211.85.106]) by smtp.googlemail.com with ESMTPSA id a39sm5407908wrc.48.2017.09.08.16.16.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Sep 2017 16:16:25 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> Date: Fri, 08 Sep 2017 19:15:32 -0400 In-Reply-To: <1504513809301.60282@bt.com> (richard wiseman's message of "Mon, 4 Sep 2017 08:30:10 +0000") Message-ID: <87o9qkg4tn.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) writes: > Thanks Noam. I'm not sure I've got any way to test this patch, > though... I don't seem to have an smie.el file anywhere. I've > installed the emacs24-el package expecting that to contain it but it > doesn't -- at least, I've searched my entire hard drive for it (using > sudo, just in case) and it wasn't found. What does M-x find-library RET smie RET give you? I see /usr/share/emacs/24.5/lisp/emacs-lisp/smie.el.gz listed in https://packages.ubuntu.com/zesty/all/emacs24-el/filelist. If you have the gzipped version, you might have to unzip before you can apply the patch. Alternatively, I'm fairly sure if you just drop the patched definitions of smie-config--setter and smie-config into your .emacs it will have the same effect: (defun smie-config--setter (var value) (set-default var value) (let ((old-modefuns smie-config--modefuns)) (setq smie-config--modefuns nil) (pcase-dolist (`(,mode . ,rules) value) (let ((modefunname (intern (format "smie-config--modefun-%s" mode)))) (fset modefunname (lambda () (smie-config--mode-hook rules))) (push modefunname smie-config--modefuns) (add-hook (intern (format "%s-hook" mode)) modefunname))) ;; Neuter any left-over previously installed hook. (dolist (modefun old-modefuns) (unless (memq modefun smie-config--modefuns) (fset modefun #'ignore))))) (defcustom smie-config nil ;; FIXME: there should be a file-local equivalent. "User configuration of SMIE indentation. This is a list of elements (MODE . RULES), where RULES is a list of elements describing when and how to change the indentation rules. Each RULE element should be of the form (NEW KIND TOKEN NORMAL), where KIND and TOKEN are the elements passed to `smie-rules-function', NORMAL is the value returned by `smie-rules-function' and NEW is the value with which to replace it." :version "24.4" ;; FIXME improve value-type. :type '(choice (const nil) (alist :key-type symbol)) :initialize 'custom-initialize-set :set #'smie-config--setter) From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2017 07:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15051158975342 (code B ref 24848); Mon, 11 Sep 2017 07:45:02 +0000 Received: (at 24848) by debbugs.gnu.org; 11 Sep 2017 07:44:57 +0000 Received: from localhost ([127.0.0.1]:60394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drJOr-0001O6-1F for submit@debbugs.gnu.org; Mon, 11 Sep 2017 03:44:57 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:7230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drJOp-0001Nt-4S for 24848@debbugs.gnu.org; Mon, 11 Sep 2017 03:44:55 -0400 Received: from E07HT05-UKBR.domain1.systemhost.net (193.113.197.167) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Sep 2017 08:44:45 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by E07HT05-UKBR.domain1.systemhost.net (193.113.197.167) with Microsoft SMTP Server (TLS) id 8.3.342.0; Mon, 11 Sep 2017 08:44:48 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12e.domain1.systemhost.net (10.9.212.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 11 Sep 2017 08:44:41 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Mon, 11 Sep 2017 08:44:41 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AARNOCgAAXHmGACIiFj4AG2m5ogAdB3CGAA7Hozw== Date: Mon, 11 Sep 2017 07:44:41 +0000 Message-ID: <1505115881331.63387@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com>,<87o9qkg4tn.fsf@users.sourceforge.net> In-Reply-To: <87o9qkg4tn.fsf@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.39] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) You're quite right: my smie library is gzipped. I had no idea that might b= e the case!=0A= =0A= I tried your suggestion of putting the code into my .emacs file but it didn= 't seem to like that...=0A= =0A= =0A= Warning (initialization): An error occurred while loading `/home/richard/.e= macs':=0A= =0A= Symbol's value as variable is void: smie-config--modefuns=0A= =0A= To ensure normal operation, you should investigate and remove the=0A= cause of the error in your initialization file. Start Emacs with=0A= the `--debug-init' option to view a complete error backtrace.=0A= =0A= =0A= (I put it right at the end: I assumed that was safest.)=0A= =0A= I'll try and apply the patch to an unzipped version of smie.el.gz instead, = and let you know how that goes.=0A= =0A= Regards,=0A= =0A= Richard=0A= =0A= =0A= ________________________________________=0A= From: Noam Postavsky on behalf of npostavs@users.sourc= eforge.net =0A= Sent: 09 September 2017 00:15=0A= To: Wiseman,R,Richard,TUK2 R=0A= Cc: 24848@debbugs.gnu.org=0A= Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result fr= om sh-learn-buffer-indent?=0A= =0A= writes:=0A= =0A= > Thanks Noam. I'm not sure I've got any way to test this patch,=0A= > though... I don't seem to have an smie.el file anywhere. I've=0A= > installed the emacs24-el package expecting that to contain it but it=0A= > doesn't -- at least, I've searched my entire hard drive for it (using=0A= > sudo, just in case) and it wasn't found.=0A= =0A= What does M-x find-library RET smie RET give you?=0A= =0A= I see /usr/share/emacs/24.5/lisp/emacs-lisp/smie.el.gz listed in=0A= https://packages.ubuntu.com/zesty/all/emacs24-el/filelist. If you have=0A= the gzipped version, you might have to unzip before you can apply the=0A= patch.=0A= =0A= Alternatively, I'm fairly sure if you just drop the patched definitions=0A= of smie-config--setter and smie-config into your .emacs it will have the=0A= same effect:=0A= =0A= (defun smie-config--setter (var value)=0A= (set-default var value)=0A= (let ((old-modefuns smie-config--modefuns))=0A= (setq smie-config--modefuns nil)=0A= (pcase-dolist (`(,mode . ,rules) value)=0A= (let ((modefunname (intern (format "smie-config--modefun-%s" mode= ))))=0A= (fset modefunname (lambda () (smie-config--mode-hook rules)))= =0A= (push modefunname smie-config--modefuns)=0A= (add-hook (intern (format "%s-hook" mode)) modefunname)))=0A= ;; Neuter any left-over previously installed hook.=0A= (dolist (modefun old-modefuns)=0A= (unless (memq modefun smie-config--modefuns)=0A= (fset modefun #'ignore)))))=0A= =0A= (defcustom smie-config nil=0A= ;; FIXME: there should be a file-local equivalent.=0A= "User configuration of SMIE indentation.=0A= This is a list of elements (MODE . RULES), where RULES is a list=0A= of elements describing when and how to change the indentation rules.=0A= Each RULE element should be of the form (NEW KIND TOKEN NORMAL),=0A= where KIND and TOKEN are the elements passed to `smie-rules-function',= =0A= NORMAL is the value returned by `smie-rules-function' and NEW is the=0A= value with which to replace it."=0A= :version "24.4"=0A= ;; FIXME improve value-type.=0A= :type '(choice (const nil)=0A= (alist :key-type symbol))=0A= :initialize 'custom-initialize-set=0A= :set #'smie-config--setter)=0A= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2017 09:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150512363917369 (code B ref 24848); Mon, 11 Sep 2017 09:54:02 +0000 Received: (at 24848) by debbugs.gnu.org; 11 Sep 2017 09:53:59 +0000 Received: from localhost ([127.0.0.1]:60525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drLPj-0004W5-Br for submit@debbugs.gnu.org; Mon, 11 Sep 2017 05:53:59 -0400 Received: from smtpb1.bt.com ([62.7.242.141]:14544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drLPh-0004Vr-Rj for 24848@debbugs.gnu.org; Mon, 11 Sep 2017 05:53:58 -0400 Received: from EVMHT05-UKBR.domain1.systemhost.net (193.113.108.58) by EVMED05-UKBR.bt.com (10.216.161.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Sep 2017 10:53:48 +0100 Received: from tpw09926dag12h.domain1.systemhost.net (10.9.212.36) by EVMHT05-UKBR.domain1.systemhost.net (193.113.108.58) with Microsoft SMTP Server (TLS) id 8.3.342.0; Mon, 11 Sep 2017 10:53:51 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12h.domain1.systemhost.net (10.9.212.36) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 11 Sep 2017 10:53:50 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Mon, 11 Sep 2017 10:53:50 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTHNYjY9CjYqE9/kGSEHgspxmKaqKTf0gugADFBOaAAHJIj4AARNOCgAAXHmGACIiFj4AG2m5ogAdB3CGAA7Hoz4AAI83z Date: Mon, 11 Sep 2017 09:53:50 +0000 Message-ID: <1505123630318.10795@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com>, <87o9qkg4tn.fsf@users.sourceforge.net>, <1505115881331.63387@bt.com> In-Reply-To: <1505115881331.63387@bt.com> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.39] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) I've added the code to an unzipped version of smie.el and to sh-script.el a= nd byte-compiled both. Emacs loads without errors now, but to be honest, I= 'm unsure how to check that it now loads smie-config properly! I load a sc= ript file and check the value of smie-config and it says it's set for the c= urrent session only but its value is nil.=0A= =0A= ________________________________________=0A= From: Wiseman,R,Richard,TUK2 R=0A= Sent: 11 September 2017 08:44=0A= To: npostavs@users.sourceforge.net; 24848@debbugs.gnu.org=0A= Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result fr= om sh-learn-buffer-indent?=0A= =0A= You're quite right: my smie library is gzipped. I had no idea that might b= e the case!=0A= =0A= I tried your suggestion of putting the code into my .emacs file but it didn= 't seem to like that...=0A= =0A= =0A= Warning (initialization): An error occurred while loading `/home/richard/.e= macs':=0A= =0A= Symbol's value as variable is void: smie-config--modefuns=0A= =0A= To ensure normal operation, you should investigate and remove the=0A= cause of the error in your initialization file. Start Emacs with=0A= the `--debug-init' option to view a complete error backtrace.=0A= =0A= =0A= (I put it right at the end: I assumed that was safest.)=0A= =0A= I'll try and apply the patch to an unzipped version of smie.el.gz instead, = and let you know how that goes.=0A= =0A= Regards,=0A= =0A= Richard=0A= =0A= =0A= ________________________________________=0A= From: Noam Postavsky on behalf of npostavs@users.sourc= eforge.net =0A= Sent: 09 September 2017 00:15=0A= To: Wiseman,R,Richard,TUK2 R=0A= Cc: 24848@debbugs.gnu.org=0A= Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result fr= om sh-learn-buffer-indent?=0A= =0A= writes:=0A= =0A= > Thanks Noam. I'm not sure I've got any way to test this patch,=0A= > though... I don't seem to have an smie.el file anywhere. I've=0A= > installed the emacs24-el package expecting that to contain it but it=0A= > doesn't -- at least, I've searched my entire hard drive for it (using=0A= > sudo, just in case) and it wasn't found.=0A= =0A= What does M-x find-library RET smie RET give you?=0A= =0A= I see /usr/share/emacs/24.5/lisp/emacs-lisp/smie.el.gz listed in=0A= https://packages.ubuntu.com/zesty/all/emacs24-el/filelist. If you have=0A= the gzipped version, you might have to unzip before you can apply the=0A= patch.=0A= =0A= Alternatively, I'm fairly sure if you just drop the patched definitions=0A= of smie-config--setter and smie-config into your .emacs it will have the=0A= same effect:=0A= =0A= (defun smie-config--setter (var value)=0A= (set-default var value)=0A= (let ((old-modefuns smie-config--modefuns))=0A= (setq smie-config--modefuns nil)=0A= (pcase-dolist (`(,mode . ,rules) value)=0A= (let ((modefunname (intern (format "smie-config--modefun-%s" mode= ))))=0A= (fset modefunname (lambda () (smie-config--mode-hook rules)))= =0A= (push modefunname smie-config--modefuns)=0A= (add-hook (intern (format "%s-hook" mode)) modefunname)))=0A= ;; Neuter any left-over previously installed hook.=0A= (dolist (modefun old-modefuns)=0A= (unless (memq modefun smie-config--modefuns)=0A= (fset modefun #'ignore)))))=0A= =0A= (defcustom smie-config nil=0A= ;; FIXME: there should be a file-local equivalent.=0A= "User configuration of SMIE indentation.=0A= This is a list of elements (MODE . RULES), where RULES is a list=0A= of elements describing when and how to change the indentation rules.=0A= Each RULE element should be of the form (NEW KIND TOKEN NORMAL),=0A= where KIND and TOKEN are the elements passed to `smie-rules-function',= =0A= NORMAL is the value returned by `smie-rules-function' and NEW is the=0A= value with which to replace it."=0A= :version "24.4"=0A= ;; FIXME improve value-type.=0A= :type '(choice (const nil)=0A= (alist :key-type symbol))=0A= :initialize 'custom-initialize-set=0A= :set #'smie-config--setter)=0A= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2017 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150515570210489 (code B ref 24848); Mon, 11 Sep 2017 18:49:02 +0000 Received: (at 24848) by debbugs.gnu.org; 11 Sep 2017 18:48:22 +0000 Received: from localhost ([127.0.0.1]:33981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drTks-0002j7-5R for submit@debbugs.gnu.org; Mon, 11 Sep 2017 14:48:22 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:34332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drTkq-0002is-Ge for 24848@debbugs.gnu.org; Mon, 11 Sep 2017 14:48:21 -0400 Received: by mail-wr0-f174.google.com with SMTP id v109so16485352wrc.1 for <24848@debbugs.gnu.org>; Mon, 11 Sep 2017 11:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=9NmovgL8zT/wAPzaf2sHLWIR+Y2+Ctdt8y24rrxfP20=; b=lQWCDuQnlFr0EkatG/RyVjbUrt9d/66R0LgAw6S5/GqT+uuncPd6FeD+bxlWulQaQw ldeSC3EM0f/rRnjohMlv801AA9HdxostZLd6QcHaPIlLHaoGDoTaAD21GyscLSyPdchG 8Spa+vt3gZ9w5tt6xjgWmfaBAcQWIcIoFEfc8HkH7xgrGuzLiba/rcDKZ6mkKy/YuWLV ieMww2m7u4CRNUnqEWbsr1Hx+GdC9l3Pdydcyw9KF8dwV/2TdFd62ihVjlfuw1Eo66BS ULfISeqvESC4k9VZPHFDfIRmced8U0tifLm643QgFwJ/mOBK6jEPaYhIFIRQkuSnaI1o YAjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=9NmovgL8zT/wAPzaf2sHLWIR+Y2+Ctdt8y24rrxfP20=; b=k7TZxucKqYwOoDQ7FbCumP8NqyMsLk6n4CjqOYe/ST1T3za0rQq7BXKCVVmTtkhD3u WNOgaQn7tIWIWLkfAcUNOsNoq0czfbWpAOa6Lbh41jXdoFMMiAht7ksyPrysiY8+P/EO t0I8+icbRS/r6NAkx53zwX2jEzAIcDUK9dug5b7PU9ocXaOE18OBIM0peoznERlXaEdQ CSNQ/uXvvq5jPM634kqh8yc3bHm9RloEFl7CKBBLWO6AOaZ7LFFwf7odxBNaiqx8OCjq cchAAgNGOaWaYcN3f8y2mzQyyeeIIZk4cG31qMeOeQUs3FaRB+IhF/znYTsTM07uFzVw DVPg== X-Gm-Message-State: AHPjjUgtyyRVTj/Gpfvel3pXmK067LWSV+Wfj0e3kBeYN0C/BPX4iap0 0KSxqJ1Q3F1BG771pL4= X-Google-Smtp-Source: ADKCNb5wgVWFJsQQLSohgu0b9+4Rtd/FMkL84OrY+2ozR2o6g+fpLZlmafpJjTXlQ+TaEE1N4aqmoA== X-Received: by 10.223.148.6 with SMTP id 6mr9181485wrq.15.1505155694423; Mon, 11 Sep 2017 11:48:14 -0700 (PDT) Received: from whitebox (212-29-218-62.barak.net.il. [212.29.218.62]) by smtp.googlemail.com with ESMTPSA id u186sm3710479wmd.19.2017.09.11.11.48.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2017 11:48:13 -0700 (PDT) From: npostavs@users.sourceforge.net References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com> Date: Mon, 11 Sep 2017 14:48:10 -0400 In-Reply-To: <1505123630318.10795@bt.com> (richard wiseman's message of "Mon, 11 Sep 2017 09:53:50 +0000") Message-ID: <87h8w9kr6d.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) writes: > I've added the code to an unzipped version of smie.el and to > sh-script.el and byte-compiled both. Actually, sh-script.el isn't strictly needed because it's just a documentation patch. > Emacs loads without errors now, > but to be honest, I'm unsure how to check that it now loads > smie-config properly! I load a script file and check the value of > smie-config and it says it's set for the current session only but its > value is nil. Do you have something like this in your .emacs? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(sh-basic-offset 2) '(smie-config (quote ((sh-mode (-2 :before "then" 0)))))) If not, note that `smie-config-save' doesn't save the rules in a persistent way, you have to save the `smie-config' variable via the customize interface for that (this is another thing that should probably be clarified in the docstring). > From: Wiseman,R,Richard,TUK2 R > Sent: 11 September 2017 08:44 > To: npostavs@users.sourceforge.net; 24848@debbugs.gnu.org > =, 24848@debbugs.gnu.org > Subject: Re: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? > > You're quite right: my smie library is gzipped. I had no idea that might be the case! > > I tried your suggestion of putting the code into my .emacs file but it didn't seem to like that... > > > Warning (initialization): An error occurred while loading `/home/richard/.emacs': > > Symbol's value as variable is void: smie-config--modefuns Oh right, I forgot about all the dependencies. Well, I guess patching directly like you've tried above is the most straightforward way. From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Sep 2017 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: , <24848@debbugs.gnu.org> Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150520019921609 (code B ref 24848); Tue, 12 Sep 2017 07:10:02 +0000 Received: (at 24848) by debbugs.gnu.org; 12 Sep 2017 07:09:59 +0000 Received: from localhost ([127.0.0.1]:34648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drfKZ-0005cT-7i for submit@debbugs.gnu.org; Tue, 12 Sep 2017 03:09:59 -0400 Received: from smtpb1.bt.com ([62.7.242.135]:48063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drfKX-0005cE-F8 for 24848@debbugs.gnu.org; Tue, 12 Sep 2017 03:09:57 -0400 Received: from E07HT02-UKBR.domain1.systemhost.net (193.113.197.160) by EVMED01-UKBR.bt.com (10.216.161.31) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 12 Sep 2017 08:09:50 +0100 Received: from tpw09926dag12h.domain1.systemhost.net (10.9.212.36) by E07HT02-UKBR.domain1.systemhost.net (193.113.197.160) with Microsoft SMTP Server (TLS) id 8.3.342.0; Tue, 12 Sep 2017 08:09:51 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12h.domain1.systemhost.net (10.9.212.36) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 12 Sep 2017 08:09:49 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Tue, 12 Sep 2017 08:09:49 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTKy6DY9CjYqE9/kGSEHgspxmKaqKw1Smf Date: Tue, 12 Sep 2017 07:09:49 +0000 Message-ID: <1505200189182.10505@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com>,<87h8w9kr6d.fsf@users.sourceforge.net> In-Reply-To: <87h8w9kr6d.fsf@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.39] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) My ~/.emacs contains, amongst many other things:=0A= =0A= (custom-set-variables=0A= ;; custom-set-variables was added by Custom.=0A= ;; If you edit it by hand, you could mess it up, so be careful.=0A= ;; Your init file should contain only one such instance.=0A= ;; If there is more than one, they won't work right.=0A= '(sh-basic-offset 2)=0A= '(sh-indentation 2)=0A= '(smie-config (quote ((sh-mode (2 :elem basic 4)))))=0A= '(tab-width 2))=0A= =0A= Thanks again for the help and for your patience.= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Sep 2017 22:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15061203901703 (code B ref 24848); Fri, 22 Sep 2017 22:47:02 +0000 Received: (at 24848) by debbugs.gnu.org; 22 Sep 2017 22:46:30 +0000 Received: from localhost ([127.0.0.1]:53323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvWiM-0000RP-Er for submit@debbugs.gnu.org; Fri, 22 Sep 2017 18:46:30 -0400 Received: from mail-io0-f169.google.com ([209.85.223.169]:48067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvWiK-0000RD-H7 for 24848@debbugs.gnu.org; Fri, 22 Sep 2017 18:46:29 -0400 Received: by mail-io0-f169.google.com with SMTP id e189so5797481ioa.4 for <24848@debbugs.gnu.org>; Fri, 22 Sep 2017 15:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=adX5UrmumsPfSpiLvLzfcKMRboyEePIau8/Ns8DKUt4=; b=kZ/MfuxIlox0hEdSzmB7vxpC0mrhRTr2LgDhlxAe+M6jtLy5pLQ/Ue5ZYvKiFJyu/z PRTCJSUEjKsW5D0Qh0OQZ3LxWFzRD3qflJGPBqH8C3IN2ry7mNd53rHUc1zMBDnilaHU Wnm81fbfR0vct6XV/mnftylOnND/Dt1q/OT0YBDQ4odzoDX0du9Zmrra2n8JN6pfisT8 he4IrAI1H45i8zhGWeKOyo1fHxf9oIaAOpY8i6Ze+iS9NnSAVu5sjJMJiDbBlYVb65NF w2fUVJa870Phu+suxuTRkrmWAox/N5h34QrBdNuIYPfHw8uMyQ4fSDSMOc+xTpNfkCmE bDKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=adX5UrmumsPfSpiLvLzfcKMRboyEePIau8/Ns8DKUt4=; b=k7ryQjzf5PK3nv2kUyjTjgJSIcVxVgNOyM6POjse3pEKE4ONvf1F1oBoaZj03bmcC6 thY5JZIb7HGvw0NgYKBBbs3LAWK2pCsaXHGgqw3Heo/JNVSwkvCZLYh+JIpv+pVdaDne fb72GHJlTD+0v+yS+ZT6bdTRImLP4zmW79kU6aGlOaKrRvytumVW4SlgKijlTdYp9nnH 8Fs/D9rfnEkJR13r9+KLO/rnqulsI0bPNQp76f3Uz5c5OjpByKpdO+cQ1rwRTBv9HfZG 7Y4WeQ62bupkSwE54ugllov/0p72wLlF4GGfIhOq40WczeiE8WDlfp+PpKe06NiuMel5 0VcQ== X-Gm-Message-State: AHPjjUiKsKf+CxCVuEm8/VvosCkcDS8JFhQqGl8fxGWZ8zrI4li4Ngod pgD4y34gQck/fhNqeiU5aXfosw== X-Google-Smtp-Source: AOwi7QDTFWF1EjUIP5OfdmsTuURhUxmJ8d2wHQLIreMEw5xsWfjR1GbFlVBCxgkM6c533Uq9/5P2uQ== X-Received: by 10.107.7.159 with SMTP id g31mr996967ioi.250.1506120382546; Fri, 22 Sep 2017 15:46:22 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id e95sm442993iod.30.2017.09.22.15.46.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Sep 2017 15:46:21 -0700 (PDT) From: Noam Postavsky In-Reply-To: <1505123630318.10795@bt.com> (richard wiseman's message of "Mon, 11 Sep 2017 09:53:50 +0000") References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Date: Fri, 22 Sep 2017 18:46:19 -0400 Message-ID: <87h8vunyh0.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) writes: > I've added the code to an unzipped version of smie.el and to > sh-script.el and byte-compiled both. Emacs loads without errors now, > but to be honest, I'm unsure how to check that it now loads > smie-config properly! I load a script file and check the value of > smie-config and it says it's set for the current session only but its > value is nil. Well, the best way to check would to remove the setting of sh-indentation and make sure you still get the indentation you want. However, since you're saying smie-config is nil, it seems something went wrong. Do you have the patched smie.elc on your load-path (i.e., does M-x locate-library RET smie RET point to the patched version)? > My ~/.emacs contains, amongst many other things: > > (custom-set-variables > ;; custom-set-variables was added by Custom. > ;; If you edit it by hand, you could mess it up, so be careful. > ;; Your init file should contain only one such instance. > ;; If there is more than one, they won't work right. > '(sh-basic-offset 2) > '(sh-indentation 2) > '(smie-config (quote ((sh-mode (2 :elem basic 4))))) > '(tab-width 2)) Since you have the smie-config set in your custom variable block, I can't quite see how it ended up as nil. Is it possible something else in your config is resetting it? From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2017 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150633781326312 (code B ref 24848); Mon, 25 Sep 2017 11:11:02 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Sep 2017 11:10:13 +0000 Received: from localhost ([127.0.0.1]:57354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwRHB-0006qK-7H for submit@debbugs.gnu.org; Mon, 25 Sep 2017 07:10:13 -0400 Received: from smtpb1.bt.com ([62.7.242.136]:55405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwRH9-0006q4-C2 for 24848@debbugs.gnu.org; Mon, 25 Sep 2017 07:10:11 -0400 Received: from EVHUB04-UKBR.domain1.systemhost.net (193.113.108.172) by EVMED02-UKBR.bt.com (10.216.161.32) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Sep 2017 12:10:05 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by EVHUB04-UKBR.domain1.systemhost.net (193.113.108.172) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 25 Sep 2017 12:10:04 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12e.domain1.systemhost.net (10.9.212.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 25 Sep 2017 12:10:04 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Mon, 25 Sep 2017 12:10:04 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTM/Sfwj7AY48+6kml8z9Fdxp43aLFdKq1 Date: Mon, 25 Sep 2017 11:10:04 +0000 Message-ID: <1506337804260.61286@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com>,<87h8vunyh0.fsf@users.sourceforge.net> In-Reply-To: <87h8vunyh0.fsf@users.sourceforge.net> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.39] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) I've no idea what's going on now!=0A= =0A= I've ensured that the patched version is being used. (I had to compile aga= in and copy across, but it's there now.)=0A= =0A= But if I use M-x describe-variable RET smie-config RET it complains "[No ma= tch]". I can see it in my ~/.emacs file and if I use describe-variable on= any of the other things inside custom-set-variables they are all known and= have the correct value! I commented out sh-indentation too, just to be sa= fe.=0A= =0A= There are no messages when I start Emacs, no errors or anything.=0A= =0A= Very confused now!= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2017 12:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: richard.wiseman@bt.com Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15063419697187 (code B ref 24848); Mon, 25 Sep 2017 12:20:02 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Sep 2017 12:19:29 +0000 Received: from localhost ([127.0.0.1]:57416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwSMD-0001rq-DW for submit@debbugs.gnu.org; Mon, 25 Sep 2017 08:19:29 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:46537) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwSMB-0001rb-Ra for 24848@debbugs.gnu.org; Mon, 25 Sep 2017 08:19:28 -0400 Received: by mail-oi0-f45.google.com with SMTP id a74so6542707oib.3 for <24848@debbugs.gnu.org>; Mon, 25 Sep 2017 05:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=Jea0BMu0Tsp+oKN3cchOzwU3k+LAb5XjOSzP3bLar6g=; b=Ab3I7jPa42xtJb/ID8pgYriUrhR1XijhP7AdyKPJOjDNwAt6c/r5O0WOgNbzsLlkiH hSqFjKybkcdw7MRNbuWww7z66guQUwlntbfbOZzPlz4TyDrKRpk/KnHYLLRDj0q1+gvy vB3FEyI941UDV1IaMjQOdnlmLMwufYMdtCvgC3aYZevQtB97yqtdLcTUGAWqbirkdVFF uCkmOUk4APzWW7Iz1vsI+sPBR0NDX/IM4ZZzbiL9SM3I/rvbW8eknm9nzQoMhvCoivX9 oFO3/qSNJFL3R0ebP97vo+rmMbzTtA6Aq95mDXmxK0jUIsiSOKjyr0smS88Nn5UyUD1X UXEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=Jea0BMu0Tsp+oKN3cchOzwU3k+LAb5XjOSzP3bLar6g=; b=MXrIv5d/KKcgRl7GcUEaojlqt8Ivodj65gYavd7qnpSj0XYrjkuIGZhF1o5Savwkrm ue2WKDXKpW7yrQPVg/zEef3U7ssh7mXBF8cV2FvbaPCWBJWM1Mb+s7pYulmTEZCPUAzK kE96EcRWDPgCuMEsoqyMyr5kLbnZ5AxrJ6M2by6jv1bjUfSOxYgtXtl2+ejxMoAxEYH1 U/lzUzuos17GNhXHvMQWJartS8Jcs08++5FmmcIy9XUHUws7LOl444jsCRJDo4dlK+Tu 3c64dxs7aXVe+Qy11LBXwyKUDKuC9Nxi/5FQH0ovQMmUQU8SHPzv98wLG/K4CcX1Ic2m F30Q== X-Gm-Message-State: AHPjjUhyfBWG5ISraLCzpFNSrgtlQTus3EZj1y1S1asgjxwLUXz75R6j Fbft27gFteGgmPBznooIjKLhcMwZLod5ZjlKB5I= X-Google-Smtp-Source: AOwi7QBkVj3XRZYjpPxSwzooA7tFU9xFUMm99t4WZS6eeVuF6TR67AVgZMRnZxHB1ZGvr6BAKXdIOUNj7dl/7SksPP4= X-Received: by 10.157.64.131 with SMTP id n3mr197342ote.101.1506341962165; Mon, 25 Sep 2017 05:19:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.87.196 with HTTP; Mon, 25 Sep 2017 05:19:21 -0700 (PDT) In-Reply-To: <1506337804260.61286@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com> <87h8vunyh0.fsf@users.sourceforge.net> <1506337804260.61286@bt.com> From: Noam Postavsky Date: Mon, 25 Sep 2017 08:19:21 -0400 X-Google-Sender-Auth: -JkvRRHvz1RMNzWKNrbhK4WRy6o Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Mon, Sep 25, 2017 at 7:10 AM, wrote: > I've no idea what's going on now! > > I've ensured that the patched version is being used. (I had to compile a= gain and copy across, but it's there now.) > > But if I use M-x describe-variable RET smie-config RET it complains "[No = match]". I can see it in my ~/.emacs file and if I use describe-variable = on any of the other things inside custom-set-variables they are all known a= nd have the correct value! I commented out sh-indentation too, just to be = safe. > > There are no messages when I start Emacs, no errors or anything. Oh, I think that is the normal behaviour when you haven't loaded smie yet. If you then open the bash script file, do things work as expected? From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2017 13:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150634478411629 (code B ref 24848); Mon, 25 Sep 2017 13:07:02 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Sep 2017 13:06:24 +0000 Received: from localhost ([127.0.0.1]:57480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwT5b-00031V-Of for submit@debbugs.gnu.org; Mon, 25 Sep 2017 09:06:23 -0400 Received: from smtpb1.bt.com ([62.7.242.136]:21803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwT5Z-00031I-K5 for 24848@debbugs.gnu.org; Mon, 25 Sep 2017 09:06:22 -0400 Received: from EVMHT04-UKBR.domain1.systemhost.net (193.113.108.57) by EVMED02-UKBR.bt.com (10.216.161.32) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Sep 2017 14:06:15 +0100 Received: from tpw09926dag12h.domain1.systemhost.net (10.9.212.36) by EVMHT04-UKBR.domain1.systemhost.net (193.113.108.57) with Microsoft SMTP Server (TLS) id 8.3.342.0; Mon, 25 Sep 2017 14:06:15 +0100 Received: from tpw09926dag12e.domain1.systemhost.net (10.9.212.12) by tpw09926dag12h.domain1.systemhost.net (10.9.212.36) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 25 Sep 2017 14:06:14 +0100 Received: from tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898]) by tpw09926dag12e.domain1.systemhost.net ([fe80::b8c9:c264:c4b3:b898%12]) with mapi id 15.00.1293.002; Mon, 25 Sep 2017 14:06:14 +0100 From: Thread-Topic: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Thread-Index: AQHTM/Sfwj7AY48+6kml8z9Fdxp43aLFdKq1gAADsYCAAB1rBA== Date: Mon, 25 Sep 2017 13:06:14 +0000 Message-ID: <1506344773673.91007@bt.com> References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com> <87h8vunyh0.fsf@users.sourceforge.net> <1506337804260.61286@bt.com>, In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.187.101.39] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -3.5 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) Thanks Noam. I think I knew that at some point...! Loading a bash script = and checking the value of smie-config shows that it has indeed been read in= correctly. And my files still indent as expected (and desired!) now that = I've removed the sh-indentation from my custom-set-variables section.=0A= =0A= Looks like it's all working as it should now! :-)=0A= =0A= Thanks again,=0A= =0A= Richard= From unknown Sun Jun 15 08:46:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2017 23:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24848 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Cc: 24848@debbugs.gnu.org Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.15063828966240 (code B ref 24848); Mon, 25 Sep 2017 23:42:02 +0000 Received: (at 24848) by debbugs.gnu.org; 25 Sep 2017 23:41:36 +0000 Received: from localhost ([127.0.0.1]:59198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwd0K-0001cU-B7 for submit@debbugs.gnu.org; Mon, 25 Sep 2017 19:41:36 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:52663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwd0J-0001cC-3r; Mon, 25 Sep 2017 19:41:35 -0400 Received: by mail-io0-f170.google.com with SMTP id i197so11249894ioe.9; Mon, 25 Sep 2017 16:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=bNejH4Gcb8+gcaeXsKAfcXsKBUjGikPZKi3PdlaRJpg=; b=PLa6qLgwS6wiIcGeCD5RNaYvnnzHzx2xxYCXxIUFgG8sPu26m07rvWJXd2Pjid/bb1 7KC2059HMY15fvPxW/q7Wjxl6eU+bqvSJAlEep+6t6T1/ifCQXFBN+I4av8FtCtGTa8k rNKaaQ5Dmc0TEJcfvHcRnSxBsAwI3u59nyUsTEUTW2R2PYA8i+XtuDoovmCqmTuZutvX GtwPXFmb+gn5S1QYGx/KJppK5gs8PXU0cGdtfV4afdsaxOWOmyqDvZ4llFOIHVbXE565 NaSFzHc7aMGIpPhnmTe7rv3520AEcT+e52q3UXsoLmhVFnegfv/ydm3QbQ9Y5hydBe1q HSJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=bNejH4Gcb8+gcaeXsKAfcXsKBUjGikPZKi3PdlaRJpg=; b=s2M3s9P2zC+U5R5vvbUoqV2SH5n88hXFwrM6MZUL7CeWqXuniOo9M6TC7WbbMoMKXM KnOCKthXVawBDdtMdgCO34IlQLqvPkj3kG4VjfSajpHRQ89dMlQv9sWixiAs6sfUMKNl nIpXH38q0EtQ8AfwFE3ritOtoBMHmrm6C7QmMm9dcgx8R3f58CWPWGoAakaf1fUjqHnE FjB36OLmQYGA9RL+YxsTAJOIK7eBbAz0Tp3byFbJ/jN1oPW7jdwnzntMORDhx8NN6dP+ BzM6LSPy2N+05YpgLOHHwW+f9UopHgbpuxookpk4i3+T3cqAL6T5a5iFSX2QvnrNjoeP Pj3g== X-Gm-Message-State: AHPjjUggdNWQnqIqEofvMD/2yNLMZPukcOlW5ESyOhByfrR6jvGcNW+Z zEzMwW5qEgCDj4wiJnu9Gom4LA== X-Google-Smtp-Source: AOwi7QAT0KvnaXQ+x5AluGEkW1F8aAxQQgGXOoC84ZWg7kzzoGCVja4ykROGvuhCnWEASazV0oEwuA== X-Received: by 10.107.2.17 with SMTP id 17mr12351771ioc.133.1506382889075; Mon, 25 Sep 2017 16:41:29 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id u2sm3436140iou.81.2017.09.25.16.41.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Sep 2017 16:41:28 -0700 (PDT) From: Noam Postavsky References: <1478012827020.47948@bt.com> <1503574770199.95054@bt.com> <87o9r59lyp.fsf_-_@users.sourceforge.net> <1503582257373.58386@bt.com> <87inhca1s9.fsf@users.sourceforge.net> <1503648698123.80907@bt.com> <87d17jam0g.fsf@users.sourceforge.net> <1503668647564.74012@bt.com> <871sns8vm0.fsf@users.sourceforge.net> <1504513809301.60282@bt.com> <87o9qkg4tn.fsf@users.sourceforge.net> <1505115881331.63387@bt.com> <1505123630318.10795@bt.com> <87h8vunyh0.fsf@users.sourceforge.net> <1506337804260.61286@bt.com> <1506344773673.91007@bt.com> Date: Mon, 25 Sep 2017 19:41:22 -0400 In-Reply-To: <1506344773673.91007@bt.com> (richard wiseman's message of "Mon, 25 Sep 2017 13:06:14 +0000") Message-ID: <87h8vqgxct.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) tags 24848 fixed close 24848 26.1 quit writes: > Looks like it's all working as it should now! :-) Hooray! :) I pushed the patch to emacs-26. [1: a58d0c590a]: 2017-09-25 19:39:19 -0400 Fix loading of smie-config rules (Bug#24848) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a58d0c590a777be98e58cd8c92ee1381e07e9b2d From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 14:59:49 2017 Received: (at control) by debbugs.gnu.org; 23 Nov 2017 19:59:49 +0000 Received: from localhost ([127.0.0.1]:54163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHxf3-0007ih-63 for submit@debbugs.gnu.org; Thu, 23 Nov 2017 14:59:49 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHxf1-0007iX-Es for control@debbugs.gnu.org; Thu, 23 Nov 2017 14:59:48 -0500 Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vANJxkSB025516; Thu, 23 Nov 2017 14:59:46 -0500 Received: by lechazo.home (Postfix, from userid 20848) id BDD7A602DF; Thu, 23 Nov 2017 15:01:33 -0500 (EST) From: Stefan Monnier To: control@debbugs.gnu.org (GNU bug tracker automated control server) Subject: Re: Processed: Re: bug#29414: 24.5; failure to configure a particular Ocaml indentation parameter (via SMIE) Message-ID: References: Date: Thu, 23 Nov 2017 15:01:33 -0500 In-Reply-To: (GNU bug tracker automated control server's message of "Thu, 23 Nov 2017 14:26:03 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6165=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6165> : inlines <6185> : streams <1771130> : uri <2538939> X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) unarchive 24848 forcemerge 24848 29414 thanks