Was freezing when calling the after save-hook and rebuilding the tags. I wonder if there is more convenient location to call this. Are tags meant to go through files and basically update when there is a new file? Removing the build call in the hook seems to have helped the problem but it kinda defeats the purpose. Any thoughts? Would love to help
Debugger entered--Lisp error: (quit)
call-process("/usr/bin/zsh" nil t nil "-c" "ctags -e -R . ")
call-process-shell-command("ctags -e -R . " nil t)
#f(compiled-function (command &optional output-buffer error-buffer) "Execute string COMMAND in inferior shell; display output, if any.\nWith prefix argument, insert the COMMAND's output at point.\n\nInteractively, prompt for COMMAND in the minibuffer.\nIf `shell-command-prompt-show-cwd' is non-nil, show the current\ndirectory in the prompt.\n\nIf COMMAND ends in `&', execute it asynchronously.\nThe output appears in the buffer `*Async Shell Command*'.\nThat buffer is in shell mode. You can also use\n`async-shell-command' that automatically adds `&'.\n\nOtherwise, COMMAND is executed synchronously. The output appears in\nthe buffer `*Shell Command Output*'. If the output is short enough to\ndisplay in the echo area (which is determined by the variables\n`resize-mini-windows' and `max-mini-window-height'), it is shown\nthere, but it is nonetheless available in buffer `*Shell Command\nOutput*' even though that buffer is not automatically displayed.\n\nTo specify a coding system for converting non-ASCII characters\nin the shell command output, use \\[universal-coding-system-argument] before this command.\n\nNoninteractive callers can specify coding systems by binding\n`coding-system-for-read' and `coding-system-for-write'.\n\nThe optional second argument OUTPUT-BUFFER, if non-nil,\nsays to put the output in some other buffer.\nIf OUTPUT-BUFFER is a buffer or buffer name, erase that buffer\nand insert the output there; a non-nil value of\n`shell-command-dont-erase-buffer' prevents the buffer from being\nerased. If OUTPUT-BUFFER is not a buffer and not nil (which happens\ninteractively when the prefix argument is given), insert the\noutput in current buffer after point leaving mark after it. This\ncannot be done asynchronously.\n\nThe user option `shell-command-dont-erase-buffer', which see, controls\nwhether the output buffer is erased and where to put point after\nthe shell command.\n\nIf the command terminates without error, but generates output,\nand you did not specify \"insert it in the current buffer\",\nthe output can be displayed in the echo area or in its buffer.\nIf the output is short enough to display in the echo area\n(determined by the variable `max-mini-window-height' if\n`resize-mini-windows' is non-nil), it is shown there.\nOtherwise, the buffer containing the output is displayed.\n\nIf there is output and an error, and you did not specify \"insert it\nin the current buffer\", a message about the error goes at the end\nof the output.\n\nIf the optional third argument ERROR-BUFFER is non-nil, it is a buffer\nor buffer name to which to direct the command's standard error output.\nIf it is nil, error output is mingled with regular output.\nIn an interactive call, the variable `shell-command-default-error-buffer'\nspecifies the value of ERROR-BUFFER.\n\nIn Elisp, you will often be better served by calling `call-process' or\n`start-process' directly, since they offer more control and do not\nimpose the use of a shell (with its need to quote arguments)." (interactive #f(compiled-function () #<bytecode 0x4dc54c5>)) #<bytecode 0x1fe739969e3f>)("ctags -e -R . " t nil)
shell-command--shell-command-with-editor-mode(#f(compiled-function (command &optional output-buffer error-buffer) "Execute string COMMAND in inferior shell; display output, if any.\nWith prefix argument, insert the COMMAND's output at point.\n\nInteractively, prompt for COMMAND in the minibuffer.\nIf `shell-command-prompt-show-cwd' is non-nil, show the current\ndirectory in the prompt.\n\nIf COMMAND ends in `&', execute it asynchronously.\nThe output appears in the buffer `*Async Shell Command*'.\nThat buffer is in shell mode. You can also use\n`async-shell-command' that automatically adds `&'.\n\nOtherwise, COMMAND is executed synchronously. The output appears in\nthe buffer `*Shell Command Output*'. If the output is short enough to\ndisplay in the echo area (which is determined by the variables\n`resize-mini-windows' and `max-mini-window-height'), it is shown\nthere, but it is nonetheless available in buffer `*Shell Command\nOutput*' even though that buffer is not automatically displayed.\n\nTo specify a coding system for converting non-ASCII characters\nin the shell command output, use \\[universal-coding-system-argument] before this command.\n\nNoninteractive callers can specify coding systems by binding\n`coding-system-for-read' and `coding-system-for-write'.\n\nThe optional second argument OUTPUT-BUFFER, if non-nil,\nsays to put the output in some other buffer.\nIf OUTPUT-BUFFER is a buffer or buffer name, erase that buffer\nand insert the output there; a non-nil value of\n`shell-command-dont-erase-buffer' prevents the buffer from being\nerased. If OUTPUT-BUFFER is not a buffer and not nil (which happens\ninteractively when the prefix argument is given), insert the\noutput in current buffer after point leaving mark after it. This\ncannot be done asynchronously.\n\nThe user option `shell-command-dont-erase-buffer', which see, controls\nwhether the output buffer is erased and where to put point after\nthe shell command.\n\nIf the command terminates without error, but generates output,\nand you did not specify \"insert it in the current buffer\",\nthe output can be displayed in the echo area or in its buffer.\nIf the output is short enough to display in the echo area\n(determined by the variable `max-mini-window-height' if\n`resize-mini-windows' is non-nil), it is shown there.\nOtherwise, the buffer containing the output is displayed.\n\nIf there is output and an error, and you did not specify \"insert it\nin the current buffer\", a message about the error goes at the end\nof the output.\n\nIf the optional third argument ERROR-BUFFER is non-nil, it is a buffer\nor buffer name to which to direct the command's standard error output.\nIf it is nil, error output is mingled with regular output.\nIn an interactive call, the variable `shell-command-default-error-buffer'\nspecifies the value of ERROR-BUFFER.\n\nIn Elisp, you will often be better served by calling `call-process' or\n`start-process' directly, since they offer more control and do not\nimpose the use of a shell (with its need to quote arguments)." (interactive #f(compiled-function () #<bytecode 0x449b3f5>)) #<bytecode 0x1fe739969e3f>) "ctags -e -R . " t)
apply(shell-command--shell-command-with-editor-mode #f(compiled-function (command &optional output-buffer error-buffer) "Execute string COMMAND in inferior shell; display output, if any.\nWith prefix argument, insert the COMMAND's output at point.\n\nInteractively, prompt for COMMAND in the minibuffer.\nIf `shell-command-prompt-show-cwd' is non-nil, show the current\ndirectory in the prompt.\n\nIf COMMAND ends in `&', execute it asynchronously.\nThe output appears in the buffer `*Async Shell Command*'.\nThat buffer is in shell mode. You can also use\n`async-shell-command' that automatically adds `&'.\n\nOtherwise, COMMAND is executed synchronously. The output appears in\nthe buffer `*Shell Command Output*'. If the output is short enough to\ndisplay in the echo area (which is determined by the variables\n`resize-mini-windows' and `max-mini-window-height'), it is shown\nthere, but it is nonetheless available in buffer `*Shell Command\nOutput*' even though that buffer is not automatically displayed.\n\nTo specify a coding system for converting non-ASCII characters\nin the shell command output, use \\[universal-coding-system-argument] before this command.\n\nNoninteractive callers can specify coding systems by binding\n`coding-system-for-read' and `coding-system-for-write'.\n\nThe optional second argument OUTPUT-BUFFER, if non-nil,\nsays to put the output in some other buffer.\nIf OUTPUT-BUFFER is a buffer or buffer name, erase that buffer\nand insert the output there; a non-nil value of\n`shell-command-dont-erase-buffer' prevents the buffer from being\nerased. If OUTPUT-BUFFER is not a buffer and not nil (which happens\ninteractively when the prefix argument is given), insert the\noutput in current buffer after point leaving mark after it. This\ncannot be done asynchronously.\n\nThe user option `shell-command-dont-erase-buffer', which see, controls\nwhether the output buffer is erased and where to put point after\nthe shell command.\n\nIf the command terminates without error, but generates output,\nand you did not specify \"insert it in the current buffer\",\nthe output can be displayed in the echo area or in its buffer.\nIf the output is short enough to display in the echo area\n(determined by the variable `max-mini-window-height' if\n`resize-mini-windows' is non-nil), it is shown there.\nOtherwise, the buffer containing the output is displayed.\n\nIf there is output and an error, and you did not specify \"insert it\nin the current buffer\", a message about the error goes at the end\nof the output.\n\nIf the optional third argument ERROR-BUFFER is non-nil, it is a buffer\nor buffer name to which to direct the command's standard error output.\nIf it is nil, error output is mingled with regular output.\nIn an interactive call, the variable `shell-command-default-error-buffer'\nspecifies the value of ERROR-BUFFER.\n\nIn Elisp, you will often be better served by calling `call-process' or\n`start-process' directly, since they offer more control and do not\nimpose the use of a shell (with its need to quote arguments)." (interactive #f(compiled-function () #<bytecode 0x601297d>)) #<bytecode 0x1fe739969e3f>) ("ctags -e -R . " t))
shell-command("ctags -e -R . " t)
shell-command-to-string("ctags -e -R . ")
(message "ctags:%s" (shell-command-to-string ctags-params))
(let* ((oldir default-directory) (ctags-params (concat "ctags -e -R . "))) (setq default-directory (modern-sh-project-root)) (message "ctags:%s" (shell-command-to-string ctags-params)) (modern-sh-load-tags) (setq default-directory oldir))
modern-sh-build-tags()
(if (not (executable-find "ctags")) (message "Could not locate executable '%s'" "ctags") (modern-sh-build-tags))
(progn (modern-sh-format-buffer) (if (not (executable-find "ctags")) (message "Could not locate executable '%s'" "ctags") (modern-sh-build-tags)))
(if (eq major-mode 'sh-mode) (progn (modern-sh-format-buffer) (if (not (executable-find "ctags")) (message "Could not locate executable '%s'" "ctags") (modern-sh-build-tags))))
modern-sh-after-save-hook()
run-hooks(after-save-hook)
basic-save-buffer(t)
save-buffer(1)
funcall-interactively(save-buffer 1)
call-interactively(save-buffer nil nil)
command-execute(save-buffer)