From: Juri Linkov <juri@jurta.org>
Cc: schwab@suse.de, emacs-devel@gnu.org
Subject: Re: confusing info in C-u C-x =
Date: Fri, 09 Dec 2005 11:57:38 +0200 [thread overview]
Message-ID: <87u0divrk2.fsf@jurta.org> (raw)
In-Reply-To: <E1EkAu8-0004QI-00@etlken> (Kenichi Handa's message of "Thu, 08 Dec 2005 10:49:04 +0900")
> 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/
next prev parent reply other threads:[~2005-12-09 9:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-20 9:55 confusing info in C-u C-x = Werner LEMBERG
2005-11-20 15:16 ` Andreas Schwab
2005-11-20 22:07 ` [SPAM?]: " Werner LEMBERG
2005-11-21 7:35 ` Juri Linkov
2005-12-08 1:49 ` Kenichi Handa
2005-12-09 9:57 ` Juri Linkov [this message]
2005-12-09 15:07 ` Kim F. Storm
2005-12-09 21:15 ` Richard M. Stallman
2005-12-09 23:52 ` Juri Linkov
2005-12-10 16:18 ` Richard M. Stallman
2005-12-11 0:46 ` Juri Linkov
2005-12-10 22:50 ` Kim F. Storm
2005-12-11 0:55 ` Juri Linkov
2005-12-11 16:49 ` Richard M. Stallman
2005-11-20 23:21 ` Richard M. Stallman
-- strict thread matches above, loose matches on Subject: below --
2005-11-20 19:35 martin rudalics
2005-11-21 8:56 martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87u0divrk2.fsf@jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).