[5/6] Write up some possible stuff to talk about during Emacs Chat 2015-10-14

SCHEDULED: <2015-10-10 Sat>

[2015-10-10 Sat 08:13]

The raw source for this file is here: https://github.com/eludom/.emacs.d/blob/master/project/emacs-project.org

What
Possible stuff to talk about during Emacs Chat 2015-10-14, mostly things I’ve done in/to my configs recently
Why
I think some of it might be interesting to others, I’m pretty sure I’ll get useful feedback, I’m not very good at talking extemporaneously, sometimes sharing things live creates problems (things you did not mean to share), org mode (and git) work pretty well to organize and share config snippits.
How
Mostly links to git commit/diffs of my emacs configs
When
Posted online now <2015-10-10 Sat>, possible fodder for discussion at 2015-10-14 emacs chat https://plus.google.com/u/0/events/cav8n9cv887nfjdtog483flar2c
Who
Anybody that shows up to the chat or cares to read this info.
Caveat
After ~36 years of using various emacsen I’m still a piker…

1 DONE org-babel-git-utils.org

What
Move all the things into .git. The actions listed below will currently do the following:

  • find all repos under BASEDIR
  • list the remotes (or lack of them) for each repo
  • Add .dir-locals.el to each repo for use with https://github.com/ryuslash/git-auto-commit-mode
  • Find recently modified files (last RECENT days) that are not in a git repo or not in a directory listed to be ignored (IGNOREDIRS)
  • List the need to push or pull repos (after git fetch --all)
Why
I’m moving my existence into git. I have hap-hazard repos of some of my stuff spread across github, aws code commit, bare repos on shared hosting, local backup drives and a lot of stuff that’s not in git that needs to be there). This will give me visibility and let me make decisions about where to commit stuff, what’s in now, what needs to be added, etc.
How
Org babel stuff calling git: https://github.com/eludom/org-babel-git-utils
When
Code on github now. Gitificatation of all the things in progress.
Who
Me.

2 DONE gmjShell function

What
function to start a shell on remote system when remote file open (tramp)
Why
I work on a lot of remote systems and need shells there quickly.
How
https://github.com/eludom/.emacs.d/commit/37139219b0e85dd6f157b3e0564b4166279cc58f#diff-6a73c0e841a9f9a9040d37f2f832b710
When
Done.
Who
Me.

3 DONE Move custom-set-variables out of ~/.emacs.d/init.el

what
Move custom-set-variables out of ~/.emacs.d/init.el
why
I want to share most of my emacs config, but custom-set-variables keeps saving things I don’t want in public git repos.
How

Put this in ~/.emacs.d/init.el (or wherever):

; because junk I don't want to share in git keeps showing up here
(setq custom-file "~/secrets/emacs-custom.el")
(load custom-file)
When
Now.
Who
Me.

4 DONE building Emacs from src with org babel

What
Build emacs from source using org babel
Why
Things are fixed in the latest source release.
How
Org babel version https://github.com/eludom/HOWTO/blob/master/emacsFromSrc.org of of Xah Lee’s http://ergoemacs.org/emacs/building_emacs_from_git_repository.html
When
As needed.
Who
Me.

5 IN-PROGRESS Pulling/installing latest org mode with babel

What
Install latest org mode from source.
Why
Because stuff is getting fixed and added all the time.
How
For now, this: https://github.com/eludom/HOWTO/blob/master/getLatestOrg.sh. In the future, an org babel version.
When
See “How”
Who
Me.

6 DONE git-autocommit

What
Make every save a git commit because, really, what changes should NOT be saved?
Why
Lightning talk from SF Emacs conference mentioned it. Thought it sounded like a good idea.
How
Do this:

  • Install git-auto-commit-mode
  • Add .dir-locals.el with this ((nil . ((eval git-auto-commit-mode 1)))) in it to directories you want to autocommit
  • Consider adding the following or similar to your .init.el (or org startup):

    (setq gac-automatically-push-p t)
    (setq gac-ask-for-summary-p t)
    (add-hook 'certain-hook 'git-auto-commit-mode)
    (setq enable-remote-dir-locals t)
    

    See How to Write a Git Commit Message for great advice on writing commit messages.

    In truth, after several days of using it, I’m not sure. I save far to often for trivial reasons (like 30 years of muscle memory and paranoia telling me I must hit ^X^S every few seconds).

    The git commit/log model seems to be geared around each commit being a minimally useful improvement that can be described briefly and thoughtfully. Autosave does not play into that model.

    The source is here https://github.com/ryuslash/git-auto-commit-mode and, tellingly, the commit history looks like it was done thoughtfully.

When
Every save.
Who
Me.