<commit_before>emacs = node.emacs
home = emacs.config_dir || File.expand_path("~/.") + "/.emacs.d"
font = emacs.font
packages = emacs.packages

git "#{home}" do
  action :sync
  repository "https://github.com/katsyoshi/dot.emacs.d"
  not_if "test -d #{home}"
end

template "#{home}/settings/font.el" do
  action :create
  source "templates/dot.emacs.d/settings/font.el.erb"
  variables(family: font.family, height: font.height, os: node.platform)
end

template "#{home}/settings/package.el" do
  action :create
  source "templates/dot.emacs.d/settings/package.el.erb"
end

template "#{home}/init.el" do
  action :create
  source "templates/dot.emacs.d/settings/init.el.erb"
  variables(home: home, packages: packages)
end<commit_msg>migrate old package list to setting list<commit_after>emacs = node.emacs
home = emacs.config_dir || File.expand_path("~/.") + "/.emacs.d"
font = emacs.font
packages = emacs.packages
settings = emacs.settings

git "#{home}" do
  action :sync
  repository "https://github.com/katsyoshi/dot.emacs.d"
  not_if "test -d #{home}"
end

template "#{home}/settings/font.el" do
  action :create
  source "templates/dot.emacs.d/settings/font.el.erb"
  variables(family: font.family, height: font.height, os: node.platform)
end

template "#{home}/settings/package.el" do
  action :create
  source "templates/dot.emacs.d/settings/package.el.erb"
  variables(packages: packages)
end

template "#{home}/init.el" do
  action :create
  source "templates/dot.emacs.d/settings/init.el.erb"
  variables(home: home, packages: settings)
end
{'fraction_non_alphanumeric': 0.15409413281753706, 'fraction_numerical': 0.0, 'mean_word_length': 4.370242214532872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6166562', 'n_tokens_mistral': 555, 'n_tokens_neox': 553, 'n_words': 121}