Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on magit.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/magit.e>
#           or at <http://angg.twu.net/e/magit.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######



# «.absolute-minimum»		(to "absolute-minimum")
# «.emacsclient»		(to "emacsclient")
# «.with-editor»		(to "with-editor")
# «.with-editor-fix»		(to "with-editor-fix")
# «.magit-deep-dive»		(to "magit-deep-dive")
# «.tkdiff»			(to "tkdiff")
# «.magit-on-eev-2020oct28»	(to "magit-on-eev-2020oct28")
# «.magit-on-eev-2023dec26»	(to "magit-on-eev-2023dec26")
# «.edrxrepl»			(to "edrxrepl")
# «.2020-merging»		(to "2020-merging")
# «.zaiste-video»		(to "zaiste-video")
# «.system-crafters-live»	(to "system-crafters-live")
# «.magit-compat-jan2023»	(to "magit-compat-jan2023")
# «.magit-merge-absorb»		(to "magit-merge-absorb")
# «.merge-dec-2023»		(to "merge-dec-2023")
# «.visual-walk-through»	(to "visual-walk-through")

# (find-angg ".emacs" "magit")





#####
#
# The episode of "Absolute Minimum" about magit
# 2020oct28
#
#####

# «absolute-minimum»  (to ".absolute-minimum")
# http://www.youtube.com/watch?v=NDP91RNgT4A Git in Spacemacs/Emacs with Magit
# (find-youtubedl-links "/sda5/videos/" "Git in Spacemacs_Emacs with Magit" "NDP91RNgT4A" ".webm" "absminmagit")
# (find-youtubedl-links "/sda5/videos/" nil "NDP91RNgT4A" nil "absminmagit")
# (code-video "absminmagitvideo" "/sda5/videos/Git in Spacemacs_Emacs with Magit-NDP91RNgT4A.webm")
# (find-absminmagitvideo)
# (find-absminmagitvideo "0:00")
# (find-absminmagitvideo "0:40" "with the git layer enabled")
# (find-absminmagitvideo "0:51" "space g s -> magit-status")
# (find-absminmagitvideo "0:58" "space g b -> magit-blame")
# (find-absminmagitvideo "1:37" "diff")
# (find-absminmagitvideo "2:05" "let's commit a file")
# (find-absminmagitvideo "2:26" "visual selection")
# (find-absminmagitvideo "5:20" "pull changes")
# (find-absminmagitvideo "5:46" "with a nasty unmerged next to it")
# (find-absminmagitvideo "5:59" "edit this file")
# (find-absminmagitvideo "6:06" "new window called edit")
# (find-absminmagitvideo "6:58" "merge local branches")
# (find-absminmagitvideo "7:10" "git-blame")
# (find-absminmagitvideo "7:28" "stashes")

# (eev-avadj-mode)

# (find-magitnode "Top")
# (find-magitnode "Keystroke Index")





#####
#
# Configuring how magit uses emacsclient
# 2020nov01
#
#####

# «emacsclient»  (to ".emacsclient")
# (find-magitnode "Committing" "Emacsclient")
# (find-magitnode "Editing Commit Messages" "emacsclient")
# (find-magitnode "I am having problems committing" "emacsclient")
# (find-magitnode "git-commit-mode isn't used when committing from the command-line" "EDITOR=emacsclient")
# (find-magitnode "Debugging Tools" "emacsclient")
# (find-magitgrep "grep --color -niH --null -e emacsclient *")
# (find-magitfile "")

* (server-start)
* (getenv "EDITOR")
* (setenv "EDITOR" (ee-expand "~/bigsrc/emacs26/lib-src/emacsclient"))



#####
#
# with-editor
# 2021jan03
#
#####

# «with-editor»  (to ".with-editor")
# https://github.com/magit/with-editor
# https://github.com/magit/with-editor/issues/86 
# (find-node "(with-editor)Top")
# (find-node "(with-editor)Configuring With-Editor" "with-editor-locate-emacsclient")
# (find-node "(with-editor)Debugging")
# (find-epackage-links 'with-editor)
# (find-epackage       'with-editor)
# (code-c-d "witheditor" "~/.emacs.d/elpa/with-editor-20210117.2008/")
# (find-witheditorfile "")
# (find-witheditorfile "with-editor.el" "(defun with-editor-locate-emacsclient ")
# (find-witheditorfile "with-editor.el" "(defun with-editor-debug")
# (find-witheditorfile "with-editor.el" "(defmacro with-editor ")
# (require 'with-editor)
# (load    "with-editor.el")
# (load    "with-editor.elc")
# (with-editor-debug)

# (find-eppp process-environment)
# (find-efunctiondescr 'with-editor)
# (find-efunction      'with-editor)

(with-editor (find-eppp process-environment))
(find-eppp (with-editor process-environment))

# «with-editor-fix»  (to ".with-editor-fix")
# eval-buffer: Loading file /home/edrx/.emacs.d/elpa/with-editor-20210117.2008/with-editor.elc failed to provide feature ‘with-editor’

# (require 'with-editor)
# (load    "with-editor.el")
# (load    "with-editor.elc")






#####
#
# Magit Deep Dive - a talk at the EmacsConf 2019
# 2020dec06
#
#####

# «magit-deep-dive»  (to ".magit-deep-dive")
# https://emacsconf.org/2019/talks/14/
# https://mirror.csclub.uwaterloo.ca/emacsconf/2019/emacsconf-2019-14-magit-deep-dive--jonathanchu.webm
# (code-video "megitdeepdvideo" "$S/https/mirror.csclub.uwaterloo.ca/emacsconf/2019/emacsconf-2019-14-magit-deep-dive--jonathanchu.webm")
# (find-megitdeepdvideo "0:00")
# (find-megitdeepdvideo "2:53" "main four features")
# (find-megitdeepdvideo "3:40" "command-log-mode")
# (find-megitdeepdvideo "4:30" "g and G refresh")
# (find-megitdeepdvideo "5:20" "?")
# (find-megitdeepdvideo "6:30" "diffing")
# (find-megitdeepdvideo "7:30" "hunk profiling")
# (find-megitdeepdvideo "8:20" "C-c C-t to bring up the history")




#####
#
# How to use tkdiff with magit
# 2020nov03
#
#####

# «tkdiff»  (to ".tkdiff")
# (find-es "git" "gitk-tkdiff")




#####
#
# Using magit to work on the eev repo (2020oct28 version)
# 2020oct28
#
#####

# «magit-on-eev-2020oct28»  (to ".magit-on-eev-2020oct28")
# (find-eev2-links)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
* (eepitch-shell2)
(TZ=GMT date; date) > ~/eev-current/VERSION

rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

# (find-gitk "/tmp/eev-g/")

export PAGER=cat
git log --oneline --graph --all -20

# Old versions:
rm -Rfv /tmp/eev-o
mkdir   /tmp/eev-o/
cd      /tmp/eev-o/ && git clone /tmp/eev-g/ .

cd ~/eev-current/ && cp -v $(cd /tmp/eev-g/ && git ls-files) /tmp/eev-g/
cd      /tmp/eev-g/

  # cp -iv ~/eev-current/README-old.md .
  # cp -iv ~/eev-current/eev-helpful.el .
  # mv -iv README.md README-old.md
  # git rm README.md
  # git add README-old.md
  # git add eev-hydras.el
  # git add eev-helpful.el

  # cp -iv ~/eev-current/eev-rstdoc.el .
  # git add eev-rstdoc.el
  # cp -iv ~/eev-current/.dir-locals.el .
  # git add .dir-locals.el

  # git rm eev-pkg.el
  # git commit

git ls-files --modified
git ls-files --modified | my-cmp-tkdiff /tmp/eev-o/ /tmp/eev-g/
# (load "with-editor.el")
# (magit-status "/tmp/eev-g/")
# (find-gitk    "/tmp/eev-g/")

git checkout master
git merge UTF-8
# (magit-status "/tmp/eev-g/")

git checkout UTF-8
git merge UTF-8


# (find-magitnode "Status Buffer")
# (find-magitnode "Staging and Unstaging")
# (find-magitnode "Applying")
# (find-magitnode "Pushing")
#
#   (s)tage all changes
#   (c)ommit -> (c)reate
#   (P)ush -> (p)ushremote
#   https://github.com/edrx/eev

** (find-emacsclient-links)
* (server-start)
export EDITOR=emacsclient

git checkout master
git merge UTF-8
# (find-gitk    "/tmp/eev-g/")
# (magit-status "/tmp/eev-g/")

* (server-stop)

git checkout UTF-8
git merge master
git merge origin/master
#
# (find-gitk "/tmp/eev-g/")

# (find-eev2-links 2 "tar -cvzf /tmp/eev2.tgz")
# (find-efunction 'find-eev2-links "tar -cvzf /tmp/eev2.tgz")

cd /tmp/eev-g/
tar -cvzf /tmp/eev2.tgz $(cd /tmp/eev-g/ && git ls-files)
tar -cvf  /tmp/eev2.tar $(cd /tmp/eev-g/ && git ls-files)
laf       /tmp/eev2.tgz

cp /tmp/eev2.tgz ~/TH/R/eev-current/

eev2-upload
eev2-upload-tar

# Test the tar:
# (find-fline "/tmp/eep/")
rm -Rv /tmp/eep/
mkdir  /tmp/eep/
cd     /tmp/eep/
wget http://angg.twu.net/eev-current/eev2.tar
wget https://elpa.gnu.org/packages/eev-20211101.tar

# (find-eev-install-intro "5.4. `package-install-file'")
# (package-install-file "/tmp/eep/eev2.tar")
# (package-install-file "/tmp/eep/eev-20211101.tar")





#####
#
# magit-on-eev-2023dec26
# 2023dec26
#
#####

# «magit-on-eev-2023dec26»  (to ".magit-on-eev-2023dec26")
# (find-eev2-links)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Optional:
(TZ=GMT date; date) > ~/eev-current/VERSION

rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

# (find-gitk "/tmp/eev-g/")

export PAGER=cat
git log --oneline --graph --all -20

# Old versions:
rm -Rfv /tmp/eev-o
mkdir   /tmp/eev-o/
cd      /tmp/eev-o/ && git clone /tmp/eev-g/ .

cd ~/eev-current/ && cp -v $(cd /tmp/eev-g/ && git ls-files) /tmp/eev-g/
cd      /tmp/eev-g/

git ls-files --modified
git ls-files --modified | my-cmp-tkdiff /tmp/eev-o/ /tmp/eev-g/
# (load "with-editor.el")
# (magit-status "/tmp/eev-g/")
# (find-gitk    "/tmp/eev-g/")

git checkout master
git merge UTF-8
git commit -m "Trying to merge the branches."
git mergetool --tool=emerge
# (magit-status "/tmp/eev-g/")

git checkout UTF-8
git merge master
# (magit-status "/tmp/eev-g/")

git mergetool --tool=tkdiff
git mergetool --tool=emerge

git checkout UTF-8
git checkout master
git merge UTF-8
# (magit-status "/tmp/eev-g/")

git checkout UTF-8
git merge UTF-8




#####
#
# edrxrepl
# 2020nov03
#
#####

# «edrxrepl»  (to ".edrxrepl")
# https://github.com/edrx/edrxrepl
# (find-angg "edrxrepl/edrxrepl.lua")
# (find-angg "edrxrepl/README.org")
# (find-angg "edrxrepl/")

* (server-start)
* (getenv "EDITOR")
* (setenv "EDITOR" (ee-expand "~/bigsrc/emacs26/lib-src/emacsclient"))
* (setenv "EDITOR" (ee-expand "~/bigsrc/emacs27/lib-src/emacsclient"))
*
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/edrxrepl
mkdir   /tmp/edrxrepl/
cd      /tmp/edrxrepl/ && git clone https://github.com/edrx/edrxrepl .
cd      /tmp/edrxrepl/

export PAGER=cat
git log --oneline --graph --all -20

cd ~/edrxrepl/ && cp -v $(cd /tmp/edrxrepl/ && git ls-files) /tmp/edrxrepl/
cd      /tmp/edrxrepl/

Small changes in the README.

# (find-fline "/tmp/edrxrepl/")
# (magit-status "/tmp/edrxrepl/")
#
#   (s)tage all changes
#   (c)ommit -> (c)reate
#   (P)ush -> (p)ushremote
#   https://github.com/edrx/edrxrepl
#   https://github.com/edrx/edrxrepl#Introduction




#####
#
# 2020-doubt-about-merging
# 2020dec17
#
#####

# «2020-merging»  (to ".2020-merging")
# http://angg.twu.net/eev-videos/2020-doubt-about-merging.mp4
# (find-ssr-links      "merg" "2020-doubt-about-merging")
# (find-eevvideo-links "merg" "2020-doubt-about-merging" nil "0:00")
# (code-video "mergvideo" "$S/http/angg.twu.net/eev-videos/2020-doubt-about-merging.mp4")
# (find-mergvideo "0:00")
# (find-mergvideo "0:33")

# (find-git-intro "(find-gitk ")
# (find-fline   "/tmp/git-test/")
# (find-fline   "/tmp/git-test/repo1/")
# (magit-status "/tmp/git-test/repo1/")
# (find-efunctiondescr 'smerge-mode)
# (find-efunction      'smerge-mode)
# (find-efunctiondescr 'magit-diff-mode)
# (find-efunction      'magit-diff-mode)
# (find-node "(magit)Resolving Conflicts")
# (find-node "(magit)Staging and Unstaging")
# (find-node "(magit)Applying")

# (find-magitfile "magit-commit.el" "(transient-define-prefix magit-commit ")




#####
#
# Emacs Magit - Getting Started - Emacs Doom 18
# 2021aug21
#
#####

# «zaiste-video»  (to ".zaiste-video")
# https://www.youtube.com/watch?v=7ywEgcbaiys
# (find-youtubedl-links "/sda5/videos/" nil "7ywEgcbaiys" nil "sclmagit")
# (find-youtubedl-links "/sda5/videos/" "Emacs_Magit_-_Getting_Started_-_Emacs_Doom_18" "7ywEgcbaiys" ".mkv" "sclmagit")
# (code-video "sclmagitvideo" "/sda5/videos/Emacs_Magit_-_Getting_Started_-_Emacs_Doom_18-7ywEgcbaiys.mkv")
# (find-sclmagitvideo "0:00")




#####
#
# System Crafters Live! - Taking a look at Magit 3.0 - Streaming with Emacs Lisp
# 2021aug21
#
#####

# «system-crafters-live»  (to ".system-crafters-live")
# https://www.youtube.com/watch?v=6X0iDFh83-Y
# (find-youtubedl-links "/sda5/videos/" nil "6X0iDFh83-Y" nil "sclmagit")
# (find-youtubedl-links "/sda5/videos/" "System_Crafters_Live_-_Taking_a_look_at_Magit_3.0_Streaming_with_Emacs_Lisp" "6X0iDFh83-Y" ".mkv" "sclmagit")
# (code-video "sclmagitvideo" "/sda5/videos/System_Crafters_Live_-_Taking_a_look_at_Magit_3.0_Streaming_with_Emacs_Lisp-6X0iDFh83-Y.mkv")
# (find-sclmagitvideo "0:00")



#####
#
# A problem with magit and compat (jan 2023)
# 2023jan22
#
#####

# «magit-compat-jan2023»  (to ".magit-compat-jan2023")
# https://github.com/magit/magit/issues/4852

I use just package.el - I don't use use-package - so what worked for
me was this:

(package-initialize)
(package-refresh-contents)
(package-delete (ee-package-desc 'magit-section))
(package-delete (ee-package-desc 'magit))
(package-install 'magit-section)
(package-install 'magit)

but ee-package-desc is an eev-ism, defined here:
<http://angg.twu.net/eev-current/eev-elinks.el.html#ee-package-desc>...
the translation of the sexps above to a recipe that "normal"
package.el users can use is: delete both magit-section and magit by
hand, and install them again.

Deleting and reinstalling only magit and compat did not work for me,
but deleting and reinstalling magit and magit-section worked... but I
don't know why and I don't have time to discover =(




#####
#
# magit-merge-absorb
# 2023dec23
#
#####

# «magit-merge-absorb»  (to ".magit-merge-absorb")
# (find-efunctiondescr 'magit-merge-absorb)
# (find-efunction      'magit-merge-absorb)
# (find-magitnode "Merging" "magit-merge-absorb")



#####
#
# Problems with merge, dec2023
# 2023dec28
#
#####

# «merge-dec-2023»  (to ".merge-dec-2023")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/eev-a/")
rm -Rfv   /tmp/eev-a
mkdir     /tmp/eev-a/
cd        /tmp/eev-a/
git clone /tmp/eev-g/ .

export PAGER=cat
# (find-gitk "/tmp/eev-g/")
git branch
git help branch


rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

# (find-gitk "/tmp/eev-g/")

git log --oneline --graph --all -20

# Old versions:
rm -Rfv /tmp/eev-o
mkdir   /tmp/eev-o/
cd      /tmp/eev-o/ && git clone /tmp/eev-g/ .

cd ~/eev-current/ && cp -v $(cd /tmp/eev-g/ && git ls-files) /tmp/eev-g/
cd      /tmp/eev-g/

  # cp -iv ~/eev-current/README-old.md .
  # cp -iv ~/eev-current/eev-helpful.el .
  # mv -iv README.md README-old.md
  # git rm README.md
  # git add README-old.md
  # git add eev-hydras.el
  # git add eev-helpful.el

  # cp -iv ~/eev-current/eev-rstdoc.el .
  # git add eev-rstdoc.el
  # cp -iv ~/eev-current/.dir-locals.el .
  # git add .dir-locals.el

  # git rm eev-pkg.el
  # git commit

git ls-files --modified
git ls-files --modified | my-cmp-tkdiff /tmp/eev-o/ /tmp/eev-g/
# (load "with-editor.el")
# (magit-status "/tmp/eev-g/")
# (find-gitk    "/tmp/eev-g/")

git checkout master
git merge UTF-8
# (magit-status "/tmp/eev-g/")

git checkout UTF-8
git merge UTF-8




#####
#
# visual-walk-through
# 2024jun09
#
#####

# «visual-walk-through»  (to ".visual-walk-through")
# https://magit.vc/screenshots/






# https://emacs.stackexchange.com/questions/24030/git-rm-from-magit
# https://github.com/magit/magit/issues/3498 Add "delete" command to magit-file-popup #3498
# (find-magitnode "Running Git Manually" "!")

https://github.com/magit/forge




#  Local Variables:
#  coding:               utf-8-unix
#  End: