GNU bug report logs - #7640
[PATCH] lisp/finder.el: Define used buffer names in variables

Previous Next

Package: emacs;

Reported by: Jari Aalto <jari.aalto <at> cante.net>

Date: Tue, 14 Dec 2010 18:22:01 UTC

Severity: wishlist

Tags: patch, wontfix

Found in version 23.2+1-5.1

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7640 in the body.
You can then email your comments to 7640 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7640; Package emacs. (Tue, 14 Dec 2010 18:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jari Aalto <jari.aalto <at> cante.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 Dec 2010 18:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jari Aalto <jari.aalto <at> cante.net>
To: submit <at> debbugs.gnu.org
Subject: [PATCH] lisp/finder.el: Define used buffer names in variables
Date: Tue, 14 Dec 2010 20:27:48 +0200
[Message part 1 (text/plain, inline)]
Package: emacs
Version: 23.2+1-5.1
Severity: wishlist

Instead of using hardcoded buffer names, define and use variables
`finder-keyword-buffer-name' abd `finder-commentary-buffer-name'.

This patch is against Git:

        1595eb5 2010-12-14  Merge branch 'master' of git://git.sv.gnu.org/emacs

2010-12-14  Jari Aalto  <jari.aalto <at> cante.net>

	* finder.el (finder-keyword-buffer-name): New variable.
	(finder-commentary-buffer-name): New variable.
	(finder-list-keywords): Use `finder-keyword-buffer-name'.
	(finder-commentary): Use `finder-commentary-buffer-name'.

-- System Information
Debian Release: squeeze/sid
  APT Prefers testing
  APT policy: (990, testing) (500, unstable) (1, experimental)
Architecture: amd64
Kernel: Linux picasso 2.6.32-5-amd64 #1 SMP Fri Sep 17 21:50:19 UTC 2010 x86_64 GNU/Linux
Locale: LANG=en_DK.UTF-8

-- Versions of packages `emacs depends on'.
Depends:
emacs23         23.2+1-5.1      GNU Emacs is the extensible self-documenting 
emacs23-lucid   23.2+1-5.1      GNU Emacs is the extensible self-documenting 
emacs23-nox     23.2+1-5.1      GNU Emacs is the extensible self-documenting 

[0001-finder.el-Define-used-buffer-names-in-variables.patch (text/x-diff, inline)]
From 71ed9690581ba917c6683ce45855dc1b95f573f4 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto <at> cante.net>
Date: Tue, 14 Dec 2010 20:24:06 +0200
Subject: [PATCH] finder.el: Define used buffer names in variables.
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Instead of using hardcoded buffer names, define and use variables
`finder-keyword-buffer-name' abd `finder-commentary-buffer-name'.

Signed-off-by: Jari Aalto <jari.aalto <at> cante.net>
---
 lisp/finder.el |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lisp/finder.el b/lisp/finder.el
index 655ad53..9bfbdeb 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -35,6 +35,12 @@
 (require 'find-func) ;for find-library(-suffixes)
 (require 'finder-inf nil t)
 
+(defconst finder-keyword-buffer-name "*Finder*"
+  "Name of the byffer displayed by `finder-list-keywords'.")
+
+(defconst finder-commentary-buffer-name "*Finder-package*"
+  "Name of the byffer displayed by `finder-commentary'.)
+
 ;; These are supposed to correspond to top-level customization groups,
 ;; says rms.
 (defvar finder-known-keywords
@@ -293,9 +299,9 @@ not `finder-known-keywords'."
 (defun finder-list-keywords ()
   "Display descriptions of the keywords in the Finder buffer."
   (interactive)
-  (if (get-buffer "*Finder*")
-      (pop-to-buffer "*Finder*")
-    (pop-to-buffer (get-buffer-create "*Finder*"))
+  (if (get-buffer finder-keyword-buffer-name)
+      (pop-to-buffer finder-keyword-buffer-name)
+    (pop-to-buffer (get-buffer-create finder-keyword-buffer-name))
     (finder-mode)
     (let ((inhibit-read-only t))
       (erase-buffer)
@@ -342,7 +348,7 @@ FILE should be in a form suitable for passing to `locate-library'."
     (or str (error "Can't find any Commentary section"))
     ;; This used to use *Finder* but that would clobber the
     ;; directory of categories.
-    (pop-to-buffer "*Finder-package*")
+    (pop-to-buffer finder-commentary-buffer-name)
     (setq buffer-read-only nil
           buffer-undo-list t)
     (erase-buffer)
@@ -422,7 +428,7 @@ finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
 Delete the window and kill all Finder-related buffers."
   (interactive)
   (ignore-errors (delete-window))
-  (let ((buf "*Finder*"))
+  (let ((buf finder-keyword-buffer-name))
     (and (get-buffer buf) (kill-buffer buf))))
 
 
-- 
1.7.2.3


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7640; Package emacs. (Thu, 12 Apr 2012 19:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 7640 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Jari Aalto <jari.aalto <at> cante.net>
Cc: 7640 <at> debbugs.gnu.org
Subject: Re: bug#7640: [PATCH] lisp/finder.el: Define used buffer names in
	variables
Date: Thu, 12 Apr 2012 21:19:10 +0200
Jari Aalto <jari.aalto <at> cante.net> writes:

> Instead of using hardcoded buffer names, define and use variables
> `finder-keyword-buffer-name' abd `finder-commentary-buffer-name'.

What problem is this meant to fix?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#7640; Package emacs. (Thu, 12 Apr 2012 20:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 7640 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>,
	"'Jari Aalto'" <jari.aalto <at> cante.net>
Cc: 7640 <at> debbugs.gnu.org
Subject: RE: bug#7640: [PATCH] lisp/finder.el: Define used buffer names
	invariables
Date: Thu, 12 Apr 2012 13:07:07 -0700
> > Instead of using hardcoded buffer names, define and use variables
> > `finder-keyword-buffer-name' abd `finder-commentary-buffer-name'.
> 
> What problem is this meant to fix?

Hard-coding perhaps?





Added tag(s) wontfix. Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 30 Nov 2012 04:29:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 7640 <at> debbugs.gnu.org and Jari Aalto <jari.aalto <at> cante.net> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 30 Nov 2012 04:29:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.