all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21577: 24.5; `ibuffer-copy-filename-as-kill' dont ignore buffers with no name
@ 2015-09-28 13:22 Tino Calancha
  2016-02-23  9:13 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Tino Calancha @ 2015-09-28 13:22 UTC (permalink / raw)
  To: 21577

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]


Documentation string says those buffers are ignored, but they have the 
effect of adding white spaces to the output. If the intention is ignore 
those buffers, then, they should have no effect on the output at all.

[-- Attachment #2: Type: text/plain, Size: 1892 bytes --]

*** ibuf-ext.el	        2015-09-28 22:18:08.250651824 +0900
--- ibuf-ext_patch2.el	2015-09-28 22:18:08.293651824 +0900
***************
*** 1411,1430 ****
        (ibuffer-map-marked-lines
         #'(lambda (buf _mark)
  	   (setq ibuffer-copy-filename-as-kill-result
! 		 (concat ibuffer-copy-filename-as-kill-result
! 			 (let ((name (buffer-file-name buf)))
! 			   (if name
! 			       (pcase type
! 				 (`full
! 				  name)
! 				 (`relative
! 				  (file-relative-name
! 				   name (or ibuffer-default-directory
! 					    default-directory)))
! 				 (_
! 				  (file-name-nondirectory name)))
! 			     ""))
! 			 " "))))
        (kill-new ibuffer-copy-filename-as-kill-result))))
  
  (defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group)
--- 1411,1433 ----
        (ibuffer-map-marked-lines
         #'(lambda (buf _mark)
  	   (setq ibuffer-copy-filename-as-kill-result
!           (concat ibuffer-copy-filename-as-kill-result
!            (let ((name (buffer-file-name buf)))
!              (cond (name
!                     (concat 
!                      (pcase type
!                        (`full
!                         name)
!                        (`relative
!                         (file-relative-name
!                          name (or ibuffer-default-directory
!                                   default-directory)))
!                        (_
!                         (file-name-nondirectory name))) " "))
!                    (t "")))))))
!       (when (not (zerop (length ibuffer-copy-filename-as-kill-result)))
!         (setq ibuffer-copy-filename-as-kill-result
!               (substring ibuffer-copy-filename-as-kill-result 0 -1)))
        (kill-new ibuffer-copy-filename-as-kill-result))))
  
  (defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group)

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

* bug#21577: 24.5; `ibuffer-copy-filename-as-kill' dont ignore buffers with no name
  2015-09-28 13:22 bug#21577: 24.5; `ibuffer-copy-filename-as-kill' dont ignore buffers with no name Tino Calancha
@ 2016-02-23  9:13 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-23  9:13 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 21577

Tino Calancha <f92capac@gmail.com> writes:

> Documentation string says those buffers are ignored, but they have the
> effect of adding white spaces to the output. If the intention is
> ignore those buffers, then, they should have no effect on the output
> at all.

Thanks; applied to the Emacs trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2016-02-23  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 13:22 bug#21577: 24.5; `ibuffer-copy-filename-as-kill' dont ignore buffers with no name Tino Calancha
2016-02-23  9:13 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.