How do I set the size of Emacs’ window?

If you want to change the size according to resolution you can do something like this (adjusting the preferred width and resolutions according to your specific needs): (defun set-frame-size-according-to-resolution () (interactive) (if window-system (progn ;; use 120 char wide window for largeish displays ;; and smaller 80 column windows for smaller displays ;; pick whatever … Read more

The function to show current file’s full path in mini buffer

It’s the built-in function buffer-file-name that gives you the full path of your file. The best thing to do is to have your emacs window to always show your system-name and the full path of the buffer you’re currently editing : (setq frame-title-format (list (format “%s %%S: %%j ” (system-name)) ‘(buffer-file-name “%f” (dired-directory dired-directory “%b”)))) … Read more

Emacs Ruby autocomplete almost working

Here’s a thought: The macro binds a flet function (rails-project:root) one time to the value that (rails-project:root) has just before the body executes. (That’s how it claims a performance increase: Apparently the outer (rails-project:root) is expensive, so calling once and caching the value seems like a good idea.) Unfortunately, if there is code inside the … Read more

Is there a (repeat-last-command) in Emacs?

Repeat functionality is provided by the repeat.el Emacs Lisp package, which is included with standard Emacs distributions. From repeat.el‘s documentation: This package defines a command that repeats the preceding command, whatever that was, including its arguments, whatever they were. This command is connected to the key C-x z. To repeat the previous command once, type … Read more

tech