Show Ibuffer and jump to line listing current buffer
* lisp/ibuffer.el (ibuffer-jump): New command (Bug#25577). ; * etc/NEWS: Add entry for it.
This commit is contained in:
parent
499b43d4cc
commit
0e355e7816
2 changed files with 12 additions and 0 deletions
3
etc/NEWS
3
etc/NEWS
|
@ -393,6 +393,9 @@ added: 'C-c C-s C-m C-m'.
|
|||
|
||||
** Ibuffer
|
||||
|
||||
---
|
||||
*** New command 'ibuffer-jump'.
|
||||
|
||||
---
|
||||
*** New filter commands 'ibuffer-filter-by-basename',
|
||||
'ibuffer-filter-by-file-extension', 'ibuffer-filter-by-directory',
|
||||
|
|
|
@ -2491,6 +2491,15 @@ FORMATS is the value to use for `ibuffer-formats'.
|
|||
(unless ibuffer-expert
|
||||
(message "Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help"))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun ibuffer-jump (&optional other-window)
|
||||
"Call Ibuffer and set point at the line listing the current buffer.
|
||||
If optional arg OTHER-WINDOW is non-nil, then use another window."
|
||||
(interactive "P")
|
||||
(let ((name (buffer-name)))
|
||||
(ibuffer other-window)
|
||||
(ignore-errors (ibuffer-jump-to-buffer name))))
|
||||
|
||||
(put 'ibuffer-mode 'mode-class 'special)
|
||||
(define-derived-mode ibuffer-mode special-mode "IBuffer"
|
||||
"A major mode for viewing a list of buffers.
|
||||
|
|
Loading…
Add table
Reference in a new issue