require - Emacs; C-x C-j before loading dired, dired-x -
was trying reduce number of requires in init.el.
however, in dired-x, there awesome c-x c-j = dired-jump, jumps directory of current buffer. natural want use c-x c-j if haven't loaded dired , dired-x yet. undefined.
how reconcile?
in other words, run problem because of following concoction experimenting with:
(setq-default dired-omit-files-p t) ; old way messy (setq dired-omit-files "^\\.?#\\|^\\.$") ; `..' in dired (setq dired-details-hidden-string "") (add-hook 'dired-load-hook (lambda () (load "dired-x") (when (locate-library "dired-details") (load "dired-details") (dired-details-install) ) )) i wondered if there magic autoload function, though don't understand these. is, in dired-x.el, found
;;;###autoload (defun dired-jump ... but really, these little on head, abandoned it.
i made "simpler" solution, going delete this, have feeling others this, make question , answer you. comments , other strategies appreciated.
c-hig (dired-x) optional installation dired jump ret
in order have
dired-jump,dired-jump-other-window(*note miscellaneous commands::) work beforedired,dired-xhave been loaded should set-up autoload these functions. in.emacsfile put
(autoload 'dired-jump "dired-x" "jump dired buffer corresponding current buffer." t) (autoload 'dired-jump-other-window "dired-x" "like \\[dired-jump] (dired-jump) in other window." t) (define-key global-map "\c-x\c-j" 'dired-jump) (define-key global-map "\c-x4\c-j" 'dired-jump-other-window) i'm not sure why dired-x library remains separate default functionality. ;;;###autoload cookie has effect if emacs build process looks @ (the autoload statements resulting such comments end in 1 of loaddefs.el files), that's not happening (and presumably on purpose, guess mine why).
Comments
Post a Comment