From c818dc77166bb27e42cfa99a25cbff45eb680166 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Wed, 17 Apr 2024 13:29:27 -0500 Subject: [PATCH] Setting function for using Emacs as manpager. --- .bashrc | 3 ++- .config/fish/config.fish | 7 +++++++ .zshrc | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index abfd646..d1f23b3 100644 --- a/.bashrc +++ b/.bashrc @@ -152,7 +152,8 @@ IFS=$SAVEIFS # Function for using Emacs as our manpage reader. # Use :q to quit out of Emacs and return to the shell. macsman() { - emacsclient -nw -e "(let ((Man-notify-method 'bully)) (man \"$1\") (define-key Man-mode-map \"q\" 'save-buffers-kill-emacs))" + # emacsclient -nw -e "(man \"$1\")" + emacsclient -nw -e "(let ((Man-notify-method 'bully)) (man \"$1\"))" } # navigation diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 7281d7e..d41372f 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -136,6 +136,13 @@ function org-search -d "send a search string to org-mode" printf $output end +# Function for using Emacs as our manpage reader. +# Use :q to quit out of Emacs and return to the shell. +function macsman + # emacsclient -nw -e "(man \"$argv\")" + emacsclient -nw -e "(let ((Man-notify-method 'bully)) (man \"$argv\"))" +end + ### END OF FUNCTIONS ### diff --git a/.zshrc b/.zshrc index 95c0f9d..128963d 100644 --- a/.zshrc +++ b/.zshrc @@ -133,7 +133,8 @@ IFS=$SAVEIFS # Function for using Emacs as our manpage reader. # Use :q to quit out of Emacs and return to the shell. macsman() { - emacsclient -nw -e "(let ((Man-notify-method 'bully)) (man \"$1\") (define-key Man-mode-map \"q\" 'save-buffers-kill-emacs))" + # emacsclient -nw -e "(man \"$1\")" + emacsclient -nw -e "(let ((Man-notify-method 'bully)) (man \"$1\"))" } # navigation