-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Hello!
This is a feature request!
I'm trying to use emacs' ediff merge tool instead of vim's. I've found this code snippet and put it in my .bashrc:
Ediff can now be called via the command line!
function ediff() {
if [ "X${2}" = "X" ]; then
echo "USAGE: ediff <FILE 1> <FILE 2>"
else
# The --eval flag takes lisp code and evaluates it with EMACS
# the -nw means use emacs non-graphically or in the terminal
emacs -nw --eval "(ediff-files "$1" "$2")"
fi
}
make pacmatic use ediff as its program to fix pacsaves and pacnews.
export pacdiff_program="ediff"
End of .bashrc
Now when I run pacmatic, I get:
Usage: pacmatic -options [packages]
Pacmatic is a pacman wrapper that takes care of menial but critial tasks.
These include
Checking the archlinux.org news
Summarizing the arch-general mailing list
Reminding if it has been a while since the last sync
Reporting pacnew files
Editing pacnew files
The following environment variables can be set
warn_time="86400" # (seconds)
rss_feed="https://www.archlinux.org/feeds/news/"
log_file="/var/log/arch-news.log"
pacdiff_program="ediff"
pacman_program="pacman"
mail_list="https://lists.archlinux.org/pipermail/arch-general/2015-February.txt.gz"
pacman_log="/var/log/pacman.log"
To use Pacmatic's functionality in a script, source with
. /usr/bin/pacmatic --as-lib
So, emacs' ediff can be used from the command line, but unfortunately it doesn't work with pacmatic. When I type y or Y when I want to edit .pac* files, pacmatic ends. If I knew more about bash scripting I might propose a solution, but I'm not sure how to implement this feature. Am I missing something? Is there a way to use emacs' ediff instead of vim -d?
Thanks!