Perl is a great reporting language. It just happens to be inconvenient to run reports and get them into a text editor so I can look at them. This fixes that by making it easy to run perl scripts and have the output show up in a new buffer.
Usage. This creates functions for your scripts so the function to call is up to you.
M-x nab-duplicate-usernamesAn example copied from my .emacs file.
;; Domino address book stuff (perl-script nab-duplicate-employeeids "Fetch duplicate NAB employeeids" "Notes\\NAB\\DuplicateEmployeeIDs.pl") (perl-script nab-mismatch-employeeid-case "Fetch employeeids with mismatched case (AggDb vs NAB)" "Notes\\NAB\\MismatchCase.pl") (perl-script nab-duplicate-employeeids-harder "Fetch duplicate NAB employeeids harder" "Notes\\NAB\\DuplicateEmployeeIDsHarder.pl") (perl-script aggregation-duplicate-employeeids "Fetch duplicate Aggregation Db usernames" "Notes\\NAB\\AggDb-DuplicateEmployeeIDs.pl") (perl-script nab-duplicate-usernames "Fetch duplicate NAB usernames" "Notes\\NAB\\DuplicateUsernames.pl") (perl-script nab-inactive-users-in-nab "Fetch ex-employees in the NAB" "Notes\\NAB\\GDInactiveInNAB.pl")
Add the perl-script macro and some configuration variables to your .emacs file.
;; Wrap perl scripts with emacs (setq perl-program "C:\\perl\\bin\\perl.exe") (setq perl-script-path "C:\\usr\\local\\bin\\") (defmacro perl-script (name description executable) `(defun ,name () ,description (interactive) (let ((buf (generate-new-buffer ,(symbol-name name)))) (shell-command ,(concat perl-program " " perl-script-path executable) buf) buf)))
In reply to Wrap perl scripts in emacs by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |