• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/eshell/

Lines Matching +defs:end +defs:of +defs:output

8 ;; This file is part of GNU Emacs.
11 ;; it under the terms of the GNU General Public License as published by
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; You should have received a copy of the GNU General Public License
51 ;; Some of the other features of the command interaction mode are:
61 ;; @ <C-c C-r> will move point to the beginning of the output of the
63 ;; only that output.
65 ;; @ <C-c C-o> will delete the output from the last command.
109 `eshell-last-input-end'."
120 Each function is passed two arguments, which bounds the region of the
136 (defcustom eshell-scroll-to-bottom-on-output nil
137 "*Controls whether interpreter output causes window to scroll.
142 See variable `eshell-scroll-show-maximum-output' and function
150 (defcustom eshell-scroll-show-maximum-output t
151 "*Controls how interpreter output causes window to scroll.
152 If non-nil, then show the maximum output when the window is scrolled.
154 See variable `eshell-scroll-to-bottom-on-output' and function
163 `eshell-output-filter-functions'."
167 (defcustom eshell-output-filter-functions
170 "*Functions to call before output is displayed.
171 These functions are only called for output that is displayed
172 interactively, and not for output which is redirected."
177 "*Functions to call before output is inserted into the buffer.
191 "*A function called from beginning of line to skip the prompt."
205 ;; these are only set to `nil' initially for the sake of the
213 (defvar eshell-last-input-end nil)
214 (defvar eshell-last-output-start nil)
215 (defvar eshell-last-output-block-begin nil)
216 (defvar eshell-last-output-end nil)
321 (define-key eshell-mode-map [(meta control ?l)] 'eshell-show-output)
334 (define-key eshell-command-map [(meta ?o)] 'eshell-mark-output)
339 (define-key eshell-command-map [(control ?e)] 'eshell-show-maximum-output)
343 (define-key eshell-command-map [(control ?o)] 'eshell-kill-output)
344 (define-key eshell-command-map [(control ?r)] 'eshell-show-output)
371 ;; output will end with a newline, whether or not the source
381 (set (make-local-variable 'eshell-last-input-end) (point-marker))
382 (set (make-local-variable 'eshell-last-output-start) (point-marker))
383 (set (make-local-variable 'eshell-last-output-end) (point-marker))
384 (set (make-local-variable 'eshell-last-output-block-begin) (point))
391 ;; variables they define to be visible, since some of the core
392 ;; modules sometimes take advantage of their functionality if used.
425 (when eshell-scroll-show-maximum-output
515 "A special version of `find-tag' that ignores read-onlyness."
529 (line-end-position)))
560 (eshell-move-argument (point-max) 'forward-char 'arg-end arg))
576 "Goes to the beginning of line, then skips past the prompt, if any."
578 (beginning-of-line)
583 "Push a mark at the end of the last input text."
584 (push-mark (1- eshell-last-input-end) t))
589 "Goto the start of the last command input.
598 (eshell-output-filter nil string))
601 "This function outputs a newline if not at beginning of line."
603 (goto-char eshell-last-output-end)
612 eshell-last-input-end (point-marker)
613 eshell-last-output-start (point-marker)
614 eshell-last-output-block-begin (point)
615 eshell-last-output-end (point-marker))
621 (defun eshell-parse-command-input (beg end &optional args)
634 (setq command (eshell-parse-command (cons beg end)
637 (message "Expecting completion of delimeter %c ..."
644 "Update the input and output markers relative to point and PMARK."
646 (set-marker eshell-last-input-end (point))
647 (set-marker eshell-last-output-end (point)))
669 After `eshell-last-output-end', sends all text from that marker to
671 retrieve old input, copies it to the end of the buffer, and sends it.
692 (>= (point) eshell-last-output-end))
695 (goto-char eshell-last-output-end)
703 (eshell-update-markers eshell-last-output-end)
705 (= eshell-last-input-start eshell-last-input-end))
710 eshell-last-input-end)))
711 (if (= eshell-last-output-end (point))
717 eshell-last-output-end (1- (point))))
719 eshell-last-output-end (1- (point)))
721 eshell-last-output-end (1- (point)))))
723 (eshell-update-markers eshell-last-output-end)
726 (1- eshell-last-input-end)))
761 (kill-ring-save eshell-last-input-start eshell-last-input-end))
765 (defun eshell-output-filter (process string)
766 "Send the output from PROCESS (STRING) to the interactive display.
787 (goto-char eshell-last-output-end)
799 (if (= (point) eshell-last-input-end)
800 (set-marker eshell-last-input-end
801 (- eshell-last-input-end nchars)))
802 (set-marker eshell-last-output-start ostart)
803 (set-marker eshell-last-output-end (point))
807 (eshell-run-output-filters)
810 (defun eshell-run-output-filters ()
811 "Run the `eshell-output-filter-functions' on the current output."
813 (run-hooks 'eshell-output-filter-functions))
814 (setq eshell-last-output-block-begin
815 (marker-position eshell-last-output-end)))
819 "Go to the end of buffer in all windows showing it.
823 `hilit-yank'. Depends on the value of
831 (if (< (point) eshell-last-output-end)
846 "Go to the end of buffer in all windows showing it.
848 Depends on the value of `eshell-scroll-to-bottom-on-output' and
849 `eshell-scroll-show-maximum-output'.
851 This function should be in the list `eshell-output-filter-functions'."
854 (scroll eshell-scroll-to-bottom-on-output))
862 (if (and (< (point) eshell-last-output-end)
864 ;; Maybe user wants point to jump to end.
869 ;; If point was at the end, keep it at end.
870 (>= (point) eshell-last-output-start)))
871 (goto-char eshell-last-output-end))
873 ;; ends at the bottom of the window.
874 (if (and eshell-scroll-show-maximum-output
875 (>= (point) eshell-last-output-end))
883 (custom-add-option 'eshell-output-filter-functions
886 (defun eshell-beginning-of-input ()
887 "Return the location of the start of the previous input."
890 (defun eshell-beginning-of-output ()
891 "Return the location of the end of the previous output block."
892 eshell-last-input-end)
894 (defun eshell-end-of-output ()
895 "Return the location of the end of the previous output block."
897 eshell-last-output-start
898 eshell-last-output-end))
900 (defun eshell-kill-output ()
901 "Kill all output from interpreter since last input.
905 (goto-char (eshell-beginning-of-output))
906 (insert "*** output flushed ***\n")
907 (delete-region (point) (eshell-end-of-output))))
909 (eshell-deftest io flush-output
910 "Flush previous output"
912 (eshell-kill-output)
913 (and (eshell-match-result (regexp-quote "*** output flushed ***\n"))
915 (= (point) eshell-last-output-start)))
917 (defun eshell-show-output (&optional arg)
918 "Display start of this batch of interpreter output at top of window.
919 Sets mark to the value of point when this command is run.
920 With a prefix argument, narrows region to last command output."
922 (goto-char (eshell-beginning-of-output))
925 (goto-char (eshell-beginning-of-input))
928 (narrow-to-region (eshell-beginning-of-output)
929 (eshell-end-of-output)))
930 (eshell-end-of-output))
932 (defun eshell-mark-output (&optional arg)
933 "Display start of this batch of interpreter output at top of window.
934 Sets mark to the value of point when this command is run.
935 With a prefix argument, narrows region to last command output."
937 (push-mark (eshell-show-output arg)))
940 "Kill all text from last stuff output by interpreter to point."
942 (if (> (point) eshell-last-output-end)
943 (kill-region eshell-last-output-end (point))
948 (defun eshell-show-maximum-output (&optional interactive)
949 "Put the end of the buffer at the bottom of the window.
963 (beginning-of-line)
967 (end-of-line)
974 (goto-char eshell-last-output-end)
996 This function could be on `eshell-output-filter-functions' or bound to
1000 (goto-char eshell-last-output-end)
1004 (beginning-of-line)
1015 (custom-add-option 'eshell-output-filter-functions
1036 This function could be in the list `eshell-output-filter-functions'."
1039 (goto-char eshell-last-output-block-begin)
1040 (beginning-of-line)
1042 eshell-last-output-end t)
1045 (custom-add-option 'eshell-output-filter-functions
1052 (goto-char eshell-last-output-block-begin)
1054 (beginning-of-line))
1055 (while (< (point) eshell-last-output-end)
1059 (if (< (1+ (point)) eshell-last-output-end)
1063 (let ((end (1+ (point))))
1064 (beginning-of-line)
1065 (delete-region (point) end)))
1078 (custom-add-option 'eshell-output-filter-functions
1084 (ansi-color-apply-on-region eshell-last-output-start
1085 eshell-last-output-end))
1087 (custom-add-option 'eshell-output-filter-functions