From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#24848: [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent? Date: Sat, 26 Aug 2017 16:08:04 -0400 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1503778152 11104 195.159.176.226 (26 Aug 2017 20:09:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 26 Aug 2017 20:09:12 +0000 (UTC) Cc: 24848@debbugs.gnu.org To: richard.wiseman@bt.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 26 22:09:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlhOB-0002RQ-ED for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Aug 2017 22:09:03 +0200 Original-Received: from localhost ([::1]:58548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlhOI-0008Rf-9n for geb-bug-gnu-emacs@m.gmane.org; Sat, 26 Aug 2017 16:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dlhOD-0008RP-FZ for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2017 16:09:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dlhOA-0004dX-Aa for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2017 16:09:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48155) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dlhOA-0004dL-5N for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2017 16:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dlhO9-0003hY-To for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2017 16:09:01 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 24848-submit@debbugs.gnu.org id=B24848.150377809214176 (code B ref 24848); Sat, 26 Aug 2017 20:09:01 +0000 Original-Received: (at 24848) by debbugs.gnu.org; 26 Aug 2017 20:08:12 +0000 Original-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 Original-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 Original-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) Original-Received: by 10.74.18.129 with HTTP; Sat, 26 Aug 2017 13:08:04 -0700 (PDT) In-Reply-To: <1503671470795.83992@bt.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136235 Archived-At: 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.