From f214a7933c223514a3f40d551bcbd6c19ed196a1 Mon Sep 17 00:00:00 2001 From: Lev Lamberov Date: Thu, 20 Oct 2016 05:06:25 -0300 Subject: Import ibuffer-projectile_0.2-1.debian.tar.xz [dgit import tarball ibuffer-projectile 0.2-1 ibuffer-projectile_0.2-1.debian.tar.xz] --- changelog | 5 +++++ compat | 1 + control | 28 ++++++++++++++++++++++++++++ copyright | 28 ++++++++++++++++++++++++++++ docs | 1 + elpa | 1 + patches/0001-remove-badges.diff | 15 +++++++++++++++ patches/0002-fix-version.diff | 16 ++++++++++++++++ patches/series | 2 ++ rules | 4 ++++ source/format | 1 + watch | 4 ++++ 12 files changed, 106 insertions(+) create mode 100644 changelog create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 docs create mode 100644 elpa create mode 100644 patches/0001-remove-badges.diff create mode 100644 patches/0002-fix-version.diff create mode 100644 patches/series create mode 100755 rules create mode 100644 source/format create mode 100644 watch diff --git a/changelog b/changelog new file mode 100644 index 0000000..00feeb3 --- /dev/null +++ b/changelog @@ -0,0 +1,5 @@ +ibuffer-projectile (0.2-1) unstable; urgency=low + + * Initial release (Closes: #838883) + + -- Lev Lamberov Thu, 20 Oct 2016 13:06:25 +0500 diff --git a/compat b/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +10 diff --git a/control b/control new file mode 100644 index 0000000..19e7096 --- /dev/null +++ b/control @@ -0,0 +1,28 @@ +Source: ibuffer-projectile +Section: lisp +Priority: optional +Maintainer: Debian Emacs addons team +Uploaders: Lev Lamberov +Build-Depends: debhelper (>= 10), + dh-elpa +Standards-Version: 3.9.8 +Testsuite: autopkgtest-pkg-elpa +Homepage: https://github.com/purcell/ibuffer-projectile +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-emacsen/pkg/ibuffer-projectile.git/ +Vcs-Git: https://anonscm.debian.org/git/pkg-emacsen/pkg/ibuffer-projectile.git + +Package: elpa-ibuffer-projectile +Architecture: all +Depends: ${elpa:Depends}, + ${misc:Depends}, + emacs, + elpa-projectile +Recommends: emacs (>= 46.0) +Enhances: emacs, + emacs24 +Built-Using: ${misc:Built-Using} +Description: group buffers in ibuffer list by Projectile project + Emacs' ibuffer-mode is a wonderful replacement for the built-in list-buffer + command, and allows buffers to be grouped programmatically, e.g. by major mode. + . + This package lets you group your buffers by their Projectile root directory. diff --git a/copyright b/copyright new file mode 100644 index 0000000..0d7f291 --- /dev/null +++ b/copyright @@ -0,0 +1,28 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ibuffer-projectile +Source: https://github.com/purcell/ibuffer-projectile + +Files: * +Copyright: (C) 2011-2014 Steve Purcell +License: GPL-3+ + +Files: debian/* +Copyright: (C) 2016 Lev Lamberov +License: GPL-3+ + +License: GPL-3+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in `/usr/share/common-licenses/GPL-3' diff --git a/docs b/docs new file mode 100644 index 0000000..dd44972 --- /dev/null +++ b/docs @@ -0,0 +1 @@ +*.md diff --git a/elpa b/elpa new file mode 100644 index 0000000..abf136d --- /dev/null +++ b/elpa @@ -0,0 +1 @@ +*.el diff --git a/patches/0001-remove-badges.diff b/patches/0001-remove-badges.diff new file mode 100644 index 0000000..06294b4 --- /dev/null +++ b/patches/0001-remove-badges.diff @@ -0,0 +1,15 @@ +From: Lev Lamberov +Subject: Remove badges from README file + +This patch removes badges from README file. These are +loaded from external resource. + +--- a/README.md ++++ b/README.md +@@ -1,6 +1,3 @@ +-[![Melpa Status](http://melpa.org/packages/ibuffer-projectile-badge.svg)](http://melpa.org/#/ibuffer-projectile) +-[![Melpa Stable Status](http://stable.melpa.org/packages/ibuffer-projectile-badge.svg)](http://stable.melpa.org/#/ibuffer-projectile) +- + # ibuffer-projectile: Group buffers in ibuffer list by projectile project # + + Emacs' `ibuffer-mode` is a wonderful replacement for the built-in diff --git a/patches/0002-fix-version.diff b/patches/0002-fix-version.diff new file mode 100644 index 0000000..7873d13 --- /dev/null +++ b/patches/0002-fix-version.diff @@ -0,0 +1,16 @@ +From: Lev Lamberov +Subject: Fix version + +This patch fixes version, since it is incorrectly defined upstream. + +--- a/ibuffer-projectile.el ++++ b/ibuffer-projectile.el +@@ -6,7 +6,7 @@ + ;; Keywords: themes + ;; Package-Requires: ((projectile "0.11.0")) + ;; URL: http://github.com/purcell/ibuffer-projectile +-;; Package-Version: 0 ++;; Package-Version: 0.2 + ;; + ;; This program is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..f9ed73f --- /dev/null +++ b/patches/series @@ -0,0 +1,2 @@ +0001-remove-badges.diff +0002-fix-version.diff diff --git a/rules b/rules new file mode 100755 index 0000000..8eb7ccb --- /dev/null +++ b/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ --parallel --with elpa diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/watch b/watch new file mode 100644 index 0000000..157fa1e --- /dev/null +++ b/watch @@ -0,0 +1,4 @@ +version=4 + opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%ibuffer-projectile-$1.tar.gz%" \ + https://github.com/purcell/ibuffer-projectile/tags \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate -- cgit v1.2.3 From ddd785fd6aa0982e810c7c06cbc71c8ce05cc7e5 Mon Sep 17 00:00:00 2001 From: Lev Lamberov Date: Thu, 20 Oct 2016 05:06:25 -0300 Subject: Import ibuffer-projectile_0.2.orig.tar.gz [dgit import orig ibuffer-projectile_0.2.orig.tar.gz] --- README.md | 46 +++++++++++++++++++ ibuffer-projectile.el | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 README.md create mode 100644 ibuffer-projectile.el diff --git a/README.md b/README.md new file mode 100644 index 0000000..fa16ed0 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +[![Melpa Status](http://melpa.org/packages/ibuffer-projectile-badge.svg)](http://melpa.org/#/ibuffer-projectile) +[![Melpa Stable Status](http://stable.melpa.org/packages/ibuffer-projectile-badge.svg)](http://stable.melpa.org/#/ibuffer-projectile) + +# ibuffer-projectile: Group buffers in ibuffer list by projectile project # + +Emacs' `ibuffer-mode` is a wonderful replacement for the built-in +`list-buffer` command, and allows buffers to be grouped +programatically, e.g. by major mode. + +`ibuffer-projectile` lets you group your buffers by their projectile +root directory. + +You can use this package manually or automatically. For manual use, +call `ibuffer-projectile-set-filter-groups`. To have this function +called when you open ibuffer, add this hook to your configuration: + +``` +(add-hook 'ibuffer-hook + (lambda () + (ibuffer-projectile-set-filter-groups) + (unless (eq ibuffer-sorting-mode 'alphabetic) + (ibuffer-do-sort-by-alphabetic)))) +``` + +Alternatively, use `ibuffer-projectile-generate-filter-groups' +to programmatically obtain a list of filter groups that you can +combine with your own custom groups. + +I personally use [ibuffer-vc](https://github.com/purcell/ibuffer-vc) +because I prefer its grouping behaviour, but I thought this would be +useful to some people too. + +## How to install ## + +Add `ibuffer-projectile.el` to your `load-path`, or (preferred) install from [Melpa][Melpa]. + + +[Melpa]: http://melpa.org "Melpa" + +
+ +[![](http://api.coderwall.com/purcell/endorsecount.png)](http://coderwall.com/purcell) + +[![](http://www.linkedin.com/img/webpromo/btn_liprofile_blue_80x15.png)](http://uk.linkedin.com/in/stevepurcell) + +[Steve Purcell's blog](http://www.sanityinc.com/) // [@sanityinc on Twitter](https://twitter.com/sanityinc) diff --git a/ibuffer-projectile.el b/ibuffer-projectile.el new file mode 100644 index 0000000..4c19449 --- /dev/null +++ b/ibuffer-projectile.el @@ -0,0 +1,121 @@ +;;; ibuffer-projectile.el --- Group ibuffer's list by projectile root +;; +;; Copyright (C) 2011-2014 Steve Purcell +;; +;; Author: Steve Purcell +;; Keywords: themes +;; Package-Requires: ((projectile "0.11.0")) +;; URL: http://github.com/purcell/ibuffer-projectile +;; Package-Version: 0 +;; +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . +;; +;;; Commentary: +;; +;; Adds functionality to ibuffer for grouping buffers by their projectile +;; root directory. +;; +;;; Use: +;; +;; To group buffers by projectile root dir: +;; +;; M-x ibuffer-projectile-set-filter-groups +;; +;; or, make this the default: +;; +;; (add-hook 'ibuffer-hook +;; (lambda () +;; (ibuffer-projectile-set-filter-groups) +;; (unless (eq ibuffer-sorting-mode 'alphabetic) +;; (ibuffer-do-sort-by-alphabetic)))) +;; +;; Alternatively, use `ibuffer-projectile-generate-filter-groups' +;; to programmatically obtain a list of filter groups that you can +;; combine with your own custom groups. +;; +;;; Code: + +(require 'ibuffer) +(require 'ibuf-ext) +(require 'projectile) + + +(defgroup ibuffer-projectile nil + "Group ibuffer entries according to their projectile root directory." + :prefix "ibuffer-projectile-" + :group 'convenience) + +(defcustom ibuffer-projectile-skip-if-remote t + "If non-nil, don't query the status of remote files." + :type 'boolean + :group 'ibuffer-projectile) + +(defcustom ibuffer-projectile-include-function 'identity + "A function which tells whether a given file should be grouped. + +The function is passed a filename, and should return non-nil if the file +is to be grouped. + +This option can be used to exclude certain files from the grouping mechanism." + :type 'function + :group 'ibuffer-projectile) + +(defun ibuffer-projectile--include-file-p (file) + "Return t iff FILE should be included in ibuffer-projectile's filtering." + (and file + (or (null ibuffer-projectile-skip-if-remote) + (not (file-remote-p file))) + (funcall ibuffer-projectile-include-function file))) + +(defun ibuffer-projectile-root (buf) + "Return root-dir for BUF. +If the file is not in a project, then nil is returned instead." + (with-current-buffer buf + (let ((file-name (or buffer-file-name default-directory))) + (when (ibuffer-projectile--include-file-p file-name) + (let ((projectile-require-project-root nil)) + (projectile-project-root)))))) + +(define-ibuffer-filter projectile-root + "Toggle current view to buffers with projectile root dir QUALIFIER." + (:description "projectile root dir" + :reader (read-from-minibuffer "Filter by projectile root dir (regexp): ")) + (ibuffer-awhen (ibuffer-projectile-root buf) + (equal qualifier it))) + +;;;###autoload +(defun ibuffer-projectile-generate-filter-groups () + "Create a set of ibuffer filter groups based on the projectile root dirs of buffers." + (let ((roots (ibuffer-remove-duplicates + (delq nil (mapcar 'ibuffer-projectile-root (buffer-list)))))) + (mapcar (lambda (root) + (cons (abbreviate-file-name root) + `((projectile-root . ,root)))) + roots))) + +;;;###autoload +(defun ibuffer-projectile-set-filter-groups () + "Set the current filter groups to filter by vc root dir." + (interactive) + (setq ibuffer-filter-groups (ibuffer-projectile-generate-filter-groups)) + (message "ibuffer-projectile: groups set") + (let ((ibuf (get-buffer "*Ibuffer*"))) + (when ibuf + (with-current-buffer ibuf + (pop-to-buffer ibuf) + (ibuffer-update nil t))))) + + +(provide 'ibuffer-projectile) +;;; ibuffer-projectile.el ends here -- cgit v1.2.3 From 382337cac7608d6fe8e540d39ab6fb036f151452 Mon Sep 17 00:00:00 2001 From: Lev Lamberov Date: Thu, 20 Oct 2016 05:06:25 -0300 Subject: Remove badges from README file This patch removes badges from README file. These are loaded from external resource. Gbp-Pq: Name 0001-remove-badges.diff --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index fa16ed0..1a3e5a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,3 @@ -[![Melpa Status](http://melpa.org/packages/ibuffer-projectile-badge.svg)](http://melpa.org/#/ibuffer-projectile) -[![Melpa Stable Status](http://stable.melpa.org/packages/ibuffer-projectile-badge.svg)](http://stable.melpa.org/#/ibuffer-projectile) - # ibuffer-projectile: Group buffers in ibuffer list by projectile project # Emacs' `ibuffer-mode` is a wonderful replacement for the built-in -- cgit v1.2.3 From 55269ce95d85ec8bc1e721f5e339dc6794ea7320 Mon Sep 17 00:00:00 2001 From: Lev Lamberov Date: Thu, 20 Oct 2016 05:06:25 -0300 Subject: Fix version This patch fixes version, since it is incorrectly defined upstream. Gbp-Pq: Name 0002-fix-version.diff --- ibuffer-projectile.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibuffer-projectile.el b/ibuffer-projectile.el index 4c19449..98c79be 100644 --- a/ibuffer-projectile.el +++ b/ibuffer-projectile.el @@ -6,7 +6,7 @@ ;; Keywords: themes ;; Package-Requires: ((projectile "0.11.0")) ;; URL: http://github.com/purcell/ibuffer-projectile -;; Package-Version: 0 +;; Package-Version: 0.2 ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -- cgit v1.2.3