GNU bug report logs - #24848
[sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?

Previous Next

Package: emacs;

Reported by: <richard.wiseman <at> bt.com>

Date: Tue, 1 Nov 2016 15:37:01 UTC

Severity: minor

Tags: fixed, patch

Merged with 29414

Found in version 24.5

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: richard.wiseman <at> bt.com
Cc: 24848 <at> debbugs.gnu.org
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
On Fri, Aug 25, 2017 at 10:31 AM,  <richard.wiseman <at> bt.com> 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 normally) 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 know.  On Windows, though, when I go to a correctly indented line in a function 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 spaces; 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.




This bug report was last modified 7 years and 177 days ago.

Previous Next


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