GNU bug report logs -
#24848
[sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?
Previous Next
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
Message #13 received at control <at> debbugs.gnu.org (full text, mbox):
retitle 24848 [sh-script] How to save "Local rules set" result from sh-learn-buffer-indent?
quit
<richard.wiseman <at> bt.com> 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.
This bug report was last modified 7 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.