New answers tagged

2

This (narrow-to-region) is the exact example covered by Chris Wellon's article The Limits of Emacs Advice. As @xuchunyang has already pointed out, the issue is that this function has its own byte code value, and hence advice does not work when the code is byte-compiled. You should read the whole article, but I'll quote this: It turns out narrow-to-region ...


1

g reverts the Dired buffer. It invokes function revert-buffer, which uses the function bound to variable revert-buffer-function. In a Dired buffer, that function is dired-revert. Following what dired-revert does (e.g. using debug-on-entry) you find that it is dired-goto-file that scrolls the listing, to put the file where the cursor was when you hit g in the ...


Top 50 recent answers are included