Function: activities--switch

activities--switch is a byte-compiled function defined in activities.el.

Signature

(activities--switch ACTIVITY)

Documentation

Switch to ACTIVITY.

Select's ACTIVITY's frame, making a new one if needed. Its state is not changed.

Source Code

;; Defined in ~/.emacs.d/elpa/activities-0.7.2/activities.el
(defun activities--switch (activity)
  "Switch to ACTIVITY.
Select's ACTIVITY's frame, making a new one if needed.  Its state
is not changed."
  (if (activities-activity-active-p activity)
      (select-frame (activities--frame activity))
    (pcase activities-resume-into-frame
      ('current nil)
      ('new (select-frame (make-frame `((activity . ,activity)))))))
  (unless activities-saving-p
    ;; HACK: Don't raise the frame when saving the activity's state.
    ;; (I don't love this solution, largely because it only applies
    ;; when not using `activities-tabs-mode', but it will do for now.)
    (raise-frame))
  (when activities-set-frame-name
    (set-frame-name (activities-name-for activity))))