I am trying to be able to control where a new window should go, when I use
helm-find-files. I am aware of
split-width-threshold, and it works if I set them to behave appropriately (
setq outside the defuns). But what I am trying to do is set them temporarily before calling the function that actually splits the window (here,
helm-ff-run-switch-other-window). However, even though these 2 variables have the correct values (using
let), the functions don't seem to do anything. Perhaps the code will explain it better:
(defun my/helm-switch-other-window-horizontally () (interactive) (let ((split-height-threshold 0) (split-width-threshold nil)) (helm-ff-run-switch-other-window))) (defun my/helm-switch-other-window-vertically () (interactive) (let ((split-height-threshold nil) (split-width-threshold 0)) (helm-ff-run-switch-other-window))) (define-key helm-find-files-map (kbd "C-c s") 'my/helm-switch-other-window-horizontally) (define-key helm-find-files-map (kbd "C-c v") 'my/helm-switch-other-window-vertically)
I guess I'm doing something wrong with variable binding?