Function: proced--position-info

proced--position-info is a byte-compiled function defined in proced.el.gz.

Signature

(proced--position-info POS)

Documentation

Return information of the process at POS.

The returned information will have the form (PID KEY COLUMN) where PID is the process ID of the process at point, KEY is the value of the proced-key text property at point, and COLUMN is the column for which the current value of the proced-key text property starts, or 0 if KEY is nil.

Source Code

;; Defined in /usr/src/emacs/lisp/proced.el.gz
(defun proced--position-info (pos)
  "Return information of the process at POS.

The returned information will have the form `(PID KEY COLUMN)' where
PID is the process ID of the process at point, KEY is the value of the
proced-key text property at point, and COLUMN is the column for which the
current value of the proced-key text property starts, or 0 if KEY is nil."
  ;; If point is on a field, we try to return point to that field.
  ;; Otherwise we try to return to the same column
  (save-excursion
    (goto-char pos)
    (let ((pid (proced-pid-at-point))
          (key (get-text-property (point) 'proced-key)))
      (list pid key ; can both be nil
            (if key
                (if (get-text-property (1- (point)) 'proced-key)
                    (- (point) (previous-single-property-change
                                (point) 'proced-key))
                  0)
              (current-column))))))