FAQ
I enjoy the puppet mode that comes with emacs by default.
However... people in our organization prefer a slightly different formating
standard.

Would anyone be able to tell me what tweaks I could put in my .emacs file,
to make it so that code gets autoformatted as


class foo {
TAB line here
TAB line here
}


So, one to change the tabstops thing, and one to make the closing brace
outdent?




--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/v823D_7QWRIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Steven VanDevender at Dec 17, 2012 at 9:02 pm

    Philip Brown writes:
    I enjoy the puppet mode that comes with emacs by default.
    However... people in our organization prefer a slightly different formating
    standard. >
    Would anyone be able to tell me what tweaks I could put in my .emacs file,
    to make it so that code gets autoformatted as
    >
    >
    class foo {
    TAB line here
    TAB line here
    } >
    So, one to change the tabstops thing, and one to make the closing brace
    outdent?
    You might look at the customization group for "puppet", since that
    should list all the variables intended for controlling its behavior (and
    let you automatically change and save settings in your .emacs). I find
    puppet-mode doesn't always auto-indent the closing brace the way you
    (and I also) want, but if I move the closing brace back to where I want
    it, puppet-mode will leave it there.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Philip Brown at Dec 17, 2012 at 9:41 pm

    On Monday, December 17, 2012 1:02:20 PM UTC-8, Steven VanDevender wrote:
    Philip Brown writes:
    ...
    So, one to change the tabstops thing, and one to make the closing brace
    outdent?
    You might look at the customization group for "puppet", since that
    should list all the variables intended for controlling its behavior (and
    let you automatically change and save settings in your .emacs). I find
    puppet-mode doesn't always auto-indent the closing brace the way you
    (and I also) want, but if I move the closing brace back to where I want
    it, puppet-mode will leave it there.

    Thanks for the reply. I'm not actually an emacs expert.. so I dont
    understand what "customization group" is.
    I did notice that if I move the brace, it stays.. but reformatting Every
    Single Closing Brace manually, is really annoying.


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/8JCiU7Px6PoJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Steven VanDevender at Dec 17, 2012 at 9:50 pm
    Philip Brown writes:
    >
    >
    On Monday, December 17, 2012 1:02:20 PM UTC-8, Steven VanDevender wrote:
    > >
    Philip Brown writes:
    ...
    So, one to change the tabstops thing, and one to make the closing brace
    outdent?
    > >
    You might look at the customization group for "puppet", since that
    should list all the variables intended for controlling its behavior (and
    let you automatically change and save settings in your .emacs). I find
    puppet-mode doesn't always auto-indent the closing brace the way you
    (and I also) want, but if I move the closing brace back to where I want
    it, puppet-mode will leave it there.
    >
    Thanks for the reply. I'm not actually an emacs expert.. so I dont
    understand what "customization group" is.
    I did notice that if I move the brace, it stays.. but reformatting Every
    Single Closing Brace manually, is really annoying.
    Try "M-x customize-group" and answer the prompt with "puppet". Sadly
    not much is documented there and there aren't a whole lot of control
    variables. I suspect in this case you'd either have to mess with the
    Emacs Lisp source (or at least have your own modified version of the
    indentation functions). puppet-mode is kind of rudimentary but I know
    the author and he would probably be amenable to improving it, if you
    allow him some time.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Philip Brown at Dec 18, 2012 at 12:13 am

    On Monday, December 17, 2012 1:50:38 PM UTC-8, Steven VanDevender wrote:
    puppet-mode is kind of rudimentary but I know
    the author and he would probably be amenable to improving it, if you
    allow him some time.
    that would be most appreciated


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ubqP2-SgL48J.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedDec 17, '12 at 8:34p
activeDec 18, '12 at 12:13a
posts5
users2
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase