From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: confusing info in C-u C-x = Date: Fri, 09 Dec 2005 11:57:38 +0200 Organization: JURTA Message-ID: <87u0divrk2.fsf@jurta.org> References: <20051120.105550.163003414.wl@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134136539 15440 80.91.229.2 (9 Dec 2005 13:55:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Dec 2005 13:55:39 +0000 (UTC) Cc: schwab@suse.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 09 14:55:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ekigd-00021F-CQ for ged-emacs-devel@m.gmane.org; Fri, 09 Dec 2005 14:53:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ekigx-00036A-LZ for ged-emacs-devel@m.gmane.org; Fri, 09 Dec 2005 08:53:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkfOg-00088M-Jd for emacs-devel@gnu.org; Fri, 09 Dec 2005 05:22:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkfLl-0007mZ-8o for emacs-devel@gnu.org; Fri, 09 Dec 2005 05:19:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkfIX-0007UI-VL for emacs-devel@gnu.org; Fri, 09 Dec 2005 05:16:19 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkfJi-00010T-NW for emacs-devel@gnu.org; Fri, 09 Dec 2005 05:17:31 -0500 Original-Received: from mail.neti.ee (80-235-33-245-dsl.mus.estpak.ee [80.235.33.245]) by Relayhost1.neti.ee (Postfix) with ESMTP id 756EAC969; Fri, 9 Dec 2005 12:16:09 +0200 (EET) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Thu, 08 Dec 2005 10:49:04 +0900") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47291 Archived-At: > I've just installed two changes to fix it. > > (1) Use *Help-2* buffer if the current buffer is *Help*. > The function describe-text-properties already does it. *Help-2* is not handled correctly when same-window-regexps contains the standard regexp to handle buffers with similar names: "\\*Help\\*\\(\\|<[0-9]+>\\)". I propose using (generate-new-buffer-name "*Help*") in both functions to generate the standard unique names like *Help*<2>. Also the *Help* buffer created by `describe-char' misses "[back]" button. It is too bad because it loses the stack of visited Help items. The patch below adds "[back]" button without putting the `describe-char' item to the help stack, because there is no reliable way to recreate the Help buffer for `describe-char'. Its argument is `pos', but this position and buffer may not exist when the Help buffer for `describe-char' is recreated later after returning from its next Help item's buffer. There is one problem with having "[back]" button in describe-text-mode. TAB can't navigate to it. But this is minor disadvantage because RET still works on it. Index: lisp/descr-text.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v retrieving revision 1.43 diff -c -r1.43 descr-text.el *** lisp/descr-text.el 8 Dec 2005 01:38:50 -0000 1.43 --- lisp/descr-text.el 9 Dec 2005 09:55:57 -0000 *************** *** 160,166 **** (let ((buffer (current-buffer)) (target-buffer "*Help*")) (when (eq buffer (get-buffer target-buffer)) ! (setq target-buffer "*Help-2*")) (save-excursion (with-output-to-temp-buffer target-buffer (set-buffer standard-output) --- 160,166 ---- (let ((buffer (current-buffer)) (target-buffer "*Help*")) (when (eq buffer (get-buffer target-buffer)) ! (setq target-buffer (generate-new-buffer-name "*Help*"))) (save-excursion (with-output-to-temp-buffer target-buffer (set-buffer standard-output) *************** *** 466,472 **** (char-to-string char))))) (orig-buf (current-buffer)) (help-buf (if (eq orig-buf (get-buffer "*Help*")) ! "*Help-2*" "*Help*")) item-list max-width unicode) (if (or (< char 256) --- 466,473 ---- (char-to-string char))))) (orig-buf (current-buffer)) (help-buf (if (eq orig-buf (get-buffer "*Help*")) ! (generate-new-buffer-name "*Help*") ! "*Help*")) item-list max-width unicode) (if (or (< char 256) *************** *** 621,626 **** --- 622,629 ---- item-list))) (with-output-to-temp-buffer help-buf (with-current-buffer standard-output + (let ((help-xref-following t)) + (help-setup-xref nil nil)) (set-buffer-multibyte multibyte-p) (let ((formatter (format "%%%ds:" max-width))) (dolist (elt item-list) *************** *** 725,731 **** (save-excursion (set-buffer orig-buf) (describe-text-properties pos help-buf)) ! (describe-text-mode))))) (defalias 'describe-char-after 'describe-char) (make-obsolete 'describe-char-after 'describe-char "22.1") --- 728,737 ---- (save-excursion (set-buffer orig-buf) (describe-text-properties pos help-buf)) ! (describe-text-mode) ! (toggle-read-only 1) ! (help-make-xrefs (current-buffer)) ! (print-help-return-message))))) (defalias 'describe-char-after 'describe-char) (make-obsolete 'describe-char-after 'describe-char "22.1") -- Juri Linkov http://www.jurta.org/emacs/