Hacker News new | ask | show | jobs
by timonoko 28 days ago
Unrelated, but me and Gemini just invented "C-x 4" for multiscreens.

  (defun my-external-readonly-split ()
    "Open the current file in an external xfce4-terminal as read-only."
    (interactive)
    (if buffer-file-name
        (start-process "xfce-terminal-split" nil 
                       "xfce4-terminal" "-x" "emacs" "-nw" 
                       "--eval" "(find-file-read-only (pop command-line-args-left))"
                       buffer-file-name)
      (message "Current buffer is not visiting a file!")))

  (global-set-key (kbd "C-x 4") 'my-external-readonly-split)
2 comments

You should use emacsclient, so file will be actually shared. Or better yet - use GUI emacs with its ability to have multiple frames.
No Thank You

  export EDITOR="emacs -nw"
export EDITOR="emacsclient -nw"

It really speeds things up

Incredibly splendid. I just tested it myself.

Try C-x 2, C-x 3 and C-x 4