shadow-test-remote-temporary-file-directory))
mocked-input `(,cluster1 ,file1 ,cluster2 ,file2 ,(kbd "RET")))
(with-temp-buffer
- (setq-local buffer-file-name file1)
+ (set-visited-file-name file1)
(call-interactively 'shadow-define-literal-group))
;; `shadow-literal-groups' is a list of lists.
mocked-input `(,(shadow-regexp-superquote file)
,cluster1 ,cluster2 ,(kbd "RET")))
(with-temp-buffer
- (setq-local buffer-file-name nil)
+ (set-visited-file-name nil)
(call-interactively 'shadow-define-regexp-group))
;; `shadow-regexp-groups' is a list of lists.
(message "Point 3")
;; Save file from "cluster1" definition.
(with-temp-buffer
- (setq buffer-file-name file)
+ (set-visited-file-name file)
(insert "foo")
(save-buffer))
(message "%s" file)
(message "Point 4.1")
(message "%s" file)
(message "%s" (shadow-site-primary cluster2))
- (setq buffer-file-name (concat (shadow-site-primary cluster2) file))
+ (set-visited-file-name (concat (shadow-site-primary cluster2) file))
(message "Point 4.2")
(insert "foo")
(message "%s" buffer-file-name)
(message "Point 6")
;; Save file from "cluster1" definition.
(with-temp-buffer
- (setq buffer-file-name file)
+ (set-visited-file-name file)
(insert "foo")
(save-buffer))
(should
(message "Point 7")
;; Save file from "cluster2" definition.
(with-temp-buffer
- (setq buffer-file-name (concat (shadow-site-primary cluster2) file))
+ (set-visited-file-name (concat (shadow-site-primary cluster2) file))
(insert "foo")
(save-buffer))
(should
;; Save files.
(with-temp-buffer
- (setq buffer-file-name file)
+ (set-visited-file-name file)
(insert "foo")
(save-buffer))
(with-temp-buffer
- (setq buffer-file-name (concat (shadow-site-primary cluster2) file))
+ (set-visited-file-name (concat (shadow-site-primary cluster2) file))
(insert "foo")
(save-buffer))