1. Select Current Page with Browser Object Commands
Certain commands (like 'copy', 'save' etc.) prompt for a link and show hint numbers; when you just want to select the url of the current buffer, you can just type 0 get it. Let us say you want to save the current buffer, just type the following
M-x save RET 0 RET
and you will be prompted to choose a file path. With that, you could also duplicate buffers, which is a function found in many browsers:
M-x follow-new-buffer RET 0
Note: This will not duplicate the state (like colum/line position etc.) of the buffer.
If you want to bind this to a key, you can use something like the following:
interactive("duplicate-buffer", "Duplicate buffer",
function (I) {
browser_object_follow(I.buffer, OPEN_NEW_BUFFER, I.buffer.current_uri.spec);
});
define_key(content_buffer_normal_keymap, "M-N", "duplicate-buffer");
2. Set Homepage to a File in the Home Directory
The following code is how to set your homepage to a file in your home directory, in a way that is cross-platform safe, without hard-coding the path.
let (home = get_home_directory()) {
home.append("foo.html");
homepage = home.path;
}
3. Generate a PDF file
Useful for printing:
M-x print-buffer