unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Re: list-buffers' docstring should mention how to list all
       [not found] <mailman.194.1096415922.2017.bug-gnu-emacs@gnu.org>
@ 2004-09-29 15:10 ` Kevin Rodgers
  2004-09-30  1:08   ` electric-buffer-list family-size trailing whitespace Dan Jacobson
       [not found]   ` <mailman.444.1096517435.2017.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Rodgers @ 2004-09-29 15:10 UTC (permalink / raw)


Dan Jacobson wrote:
 >   list-buffers is an interactive compiled Lisp function in...
 >   Note that buffers with names starting with spaces are omitted.
 >
 > Well, mention there how to list them too. Sizes and all.

Do you mean `electric-buffer-list'?

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* electric-buffer-list family-size trailing whitespace
  2004-09-29 15:10 ` list-buffers' docstring should mention how to list all Kevin Rodgers
@ 2004-09-30  1:08   ` Dan Jacobson
       [not found]   ` <mailman.444.1096517435.2017.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2004-09-30  1:08 UTC (permalink / raw)


>> Note that buffers with names starting with spaces are omitted.
> Well, mention there how to list them too. Sizes and all.
K> Do you mean `electric-buffer-list'?

electric-buffer-list doesn't list them either.
  electric-buffer-list is an interactive compiled Lisp function in `ebuff-menu'.
  (electric-buffer-list ARG)
And then the docstring forgets to mention what ARG is.  And whatever
it is it doesn't show buffers starting with spaces, nor does I bet
its docstring mention how.

Most annoying is if one uses electric-buffer-list with
(setq show-trailing-whitespace t)
The loads of trailing whitespace were obviously not caught in the
review phase of the electric-buffer-list project.

Nope, too electric for me. Plus banging C-h tells you to hit a "?"
when a second C-h would work just as well.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: electric-buffer-list family-size trailing whitespace
       [not found]   ` <mailman.444.1096517435.2017.bug-gnu-emacs@gnu.org>
@ 2004-10-01 16:33     ` Kevin Rodgers
  2004-10-06  1:48       ` Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2004-10-01 16:33 UTC (permalink / raw)


Dan Jacobson wrote:
 >>>Note that buffers with names starting with spaces are omitted.
 >>>
 >>Well, mention there how to list them too. Sizes and all.
 >>
 > K> Do you mean `electric-buffer-list'?
 >
 > electric-buffer-list doesn't list them either.

But it does list their size, mode, and file -- just like list-buffers.

 >   electric-buffer-list is an interactive compiled Lisp function in `ebuff-menu'.
 >   (electric-buffer-list ARG)
 > And then the docstring forgets to mention what ARG is.

It works just like list-buffers:

Non-null optional arg FILES-ONLY means mention only file buffers.

 > And whatever
 > it is it doesn't show buffers starting with spaces, nor does I bet
 > its docstring mention how.

Try the patches below, for both list-buffers and electric-buffer-list.

2004-10-04  Kevin Rodgers  <ihs_4664@yahoo.com>

             * buff-menu.el (list-internal-buffers): New option.
             (list-internal-buffers): New command.
             (list-buffers, list-buffers-noselect): Document and respect
             new option.

2004-10-04  Kevin Rodgers  <ihs_4664@yahoo.com>

             * ebuff-menu.el (electric-buffer-list): Rename and document
               optional FILES-ONLY prefix arg; document new
               list-internal-buffers option.

 > Most annoying is if one uses electric-buffer-list with
 > (setq show-trailing-whitespace t)
 > The loads of trailing whitespace were obviously not caught in the
 > review phase of the electric-buffer-list project.

It behaves the same as list-buffers.  Try this:

(add-hook 'buffer-menu-mode-hook
           (lambda () (set (make-local-variable show-trailing-whitespace) nil)))

 > Nope, too electric for me. Plus banging C-h tells you to hit a "?"
 > when a second C-h would work just as well.

Emacs is the extensible, customizable, self-documenting real-time
display editor:

(define-key electric-buffer-menu-mode-map "\C-h" 'Helper-describe-bindings)

-- 
Kevin Rodgers

*** emacs-21.3/lisp/buff-menu.el~	Wed Aug 29 08:53:31 2001
--- emacs-21.3/lisp/buff-menu.el	Fri Oct  1 10:00:42 2004
***************
*** 463,472 ****

   (define-key ctl-x-map "\C-b" 'list-buffers)

   (defun list-buffers (&optional files-only)
     "Display a list of names of existing buffers.
   The list is displayed in a buffer named `*Buffer List*'.
! Note that buffers with names starting with spaces are omitted.
   Non-null optional arg FILES-ONLY means mention only file buffers.

   The M column contains a * for buffers that are modified.
--- 463,486 ----

   (define-key ctl-x-map "\C-b" 'list-buffers)

+ (defvar list-internal-buffers nil
+   "*If non-nil, `list-buffers' displays buffers whose names start with a space.
+ If non-nil and not t, it only displays buffers whose names start with a space.
+ See `list-buffers-no-select'.")
+
+ (defun list-internal-buffers ()
+   "Display a list of names of existing buffers whose names start with a space.
+ See `list-buffers'."
+   (interactive)
+   (display-buffer (let ((list-internal-buffers 'only))
+                     (list-buffers-noselect nil))))
+
+
   (defun list-buffers (&optional files-only)
     "Display a list of names of existing buffers.
   The list is displayed in a buffer named `*Buffer List*'.
! Note that buffers with names starting with spaces are omitted
! unless `list-internal-buffers' is non-nil.
   Non-null optional arg FILES-ONLY means mention only file buffers.

   The M column contains a * for buffers that are modified.
***************
*** 477,483 ****
   (defun list-buffers-noselect (&optional files-only)
     "Create and return a buffer with a list of names of existing buffers.
   The buffer is named `*Buffer List*'.
! Note that buffers with names starting with spaces are omitted.
   Non-null optional arg FILES-ONLY means mention only file buffers.

   The M column contains a * for buffers that are modified.
--- 491,500 ----
   (defun list-buffers-noselect (&optional files-only)
     "Create and return a buffer with a list of names of existing buffers.
   The buffer is named `*Buffer List*'.
! Note that buffers with names starting with spaces are omitted
! unless `list-internal-buffers' is non-nil.  If `list-internal-buffers'
! is non-nil and not t, only buffers whose names start with a space
! are displayed.
   Non-null optional arg FILES-ONLY means mention only file buffers.

   The M column contains a * for buffers that are modified.
***************
*** 514,521 ****
                            list-buffers-directory)
                   (setq this-buffer-directory list-buffers-directory))))
             (cond
!             ;; Don't mention internal buffers.
!             ((string= (substring name 0 1) " "))
               ;; Maybe don't mention buffers without files.
               ((and files-only (not file)))
               ((string= name "*Buffer List*"))
--- 531,543 ----
                            list-buffers-directory)
                   (setq this-buffer-directory list-buffers-directory))))
             (cond
!             ;; Maybe don't mention internal buffers.
!             ((and (null list-internal-buffers)
!                   (equal (string-to-char name) ?\ ))
!             ;; Maybe mention only internal buffers.
!             ((and list-internal-buffers
!                   (not (eq list-internal-buffers t))
!                   (not (equal (string-to-char name) ?\ )))
               ;; Maybe don't mention buffers without files.
               ((and files-only (not file)))
               ((string= name "*Buffer List*"))

*** emacs-21.3/lisp/ebuff-menu.el~	Thu Aug 23 16:17:34 2001
--- emacs-21.3/lisp/ebuff-menu.el	Fri Oct  1 10:12:10 2004
***************
*** 39,45 ****
   (defvar electric-buffer-menu-mode-map nil)

   ;;;###autoload
! (defun electric-buffer-list (arg)
     "Pops up a buffer describing the set of Emacs buffers.
   Vaguely like ITS lunar select buffer; combining typeoutoid buffer
   listing with menuoid buffer selection.
--- 39,45 ----
   (defvar electric-buffer-menu-mode-map nil)

   ;;;###autoload
! (defun electric-buffer-list (&optional files-only)
     "Pops up a buffer describing the set of Emacs buffers.
   Vaguely like ITS lunar select buffer; combining typeoutoid buffer
   listing with menuoid buffer selection.
***************
*** 54,64 ****

   Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil.

   \\{electric-buffer-menu-mode-map}"
     (interactive "P")
     (let (select buffer)
       (save-window-excursion
!       (setq buffer (list-buffers-noselect arg))
         (Electric-pop-up-window buffer)
         (unwind-protect
   	  (progn
--- 54,68 ----

   Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil.

+ Note that buffers with names starting with spaces are omitted
+ unless `list-internal-buffers' is non-nil.
+ Non-null optional files-only FILES-ONLY means mention only file buffers.
+
   \\{electric-buffer-menu-mode-map}"
     (interactive "P")
     (let (select buffer)
       (save-window-excursion
!       (setq buffer (list-buffers-noselect files-only))
         (Electric-pop-up-window buffer)
         (unwind-protect
   	  (progn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: electric-buffer-list family-size trailing whitespace
  2004-10-01 16:33     ` Kevin Rodgers
@ 2004-10-06  1:48       ` Dan Jacobson
  2004-10-07 12:27         ` John Paul Wallington
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Jacobson @ 2004-10-06  1:48 UTC (permalink / raw)


K> It behaves the same as list-buffers.
Indeed it does. Somebody fix that too. I was using ibuffer these days
and wasn't aware.  ibuffer is probably not maintained these days, BTW.
K> Try this:
K> (add-hook 'buffer-menu-mode-hook (lambda () (set
K> (make-local-variable show-trailing-whitespace) nil)))
But that is just sweeping the whitespace under the rug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: electric-buffer-list family-size trailing whitespace
  2004-10-06  1:48       ` Dan Jacobson
@ 2004-10-07 12:27         ` John Paul Wallington
  0 siblings, 0 replies; 5+ messages in thread
From: John Paul Wallington @ 2004-10-07 12:27 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> ibuffer is probably not maintained these days, BTW.

Ibuffer has been integrated into the Emacs development sources.

The integration was sufficiently thorough (eg: the multi-occur
functionality was moved out of Ibuffer into Emacs, and compatibility
cruft for older versions of Emacs and for XEmacs was excised) that the
latest Ibuffer in Emacs CVS is no longer a stand-alone portable
package.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-07 12:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.194.1096415922.2017.bug-gnu-emacs@gnu.org>
2004-09-29 15:10 ` list-buffers' docstring should mention how to list all Kevin Rodgers
2004-09-30  1:08   ` electric-buffer-list family-size trailing whitespace Dan Jacobson
     [not found]   ` <mailman.444.1096517435.2017.bug-gnu-emacs@gnu.org>
2004-10-01 16:33     ` Kevin Rodgers
2004-10-06  1:48       ` Dan Jacobson
2004-10-07 12:27         ` John Paul Wallington

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).