* [sven_joachim@web.de: Pressing RET in woman-mode calls man]
@ 2005-10-13 4:52 Richard Stallman
2005-10-13 9:39 ` Masatake YAMATO
0 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2005-10-13 4:52 UTC (permalink / raw)
Cc: emacs-devel
[I sent this message two weeks ago but did not get a response.]
Since this concerns buttons, can you tell us where we should look?
------- Start of forwarded message -------
Date: Mon, 26 Sep 2005 13:49:54 +0200
From: Sven Joachim <sven_joachim@web.de>
X-Accept-Language: de-DE, de, en-us, en
To: emacs-pretest-bug@gnu.org
X-Sender: sven_joachim@web.de
Subject: Pressing RET in woman-mode calls man
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level:
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63
Pressing RET in woman-mode when point is on a "reference word" (e.g. in the
"SEE ALSO" section of the man page) invokes man, not woman, on the manpage.
The same applies to mouse-1 and mouse-2. Pressing C-h k in woman-mode gives
the following information:
<mouse-1> at that spot is remapped to <mouse-2>
which runs the command push-button
which is an interactive compiled Lisp function in `button'.
It is bound to <mouse-2>, RET.
(push-button &optional pos use-mouse-action)
If I want to invoke woman instead of man, I have to press M-mouse-2, which
is cumbersome:
woman-follow-word is on <M-mouse-2>.
I used "M-x debug-on entry man-follow" to find out that push-button in turn
calls man-follow, as seen in the backtrace:
Debugger entered--entering a function:
* man-follow("dpatch")
#[(button) "ÁÂ\b!!" [button man-follow button-label] 3](#<marker (moves after insertion) at 11300 in *WoMan 1 dpatch*>)
push-button(11300)
call-interactively(push-button)
Probably push-button should call woman-follow-word rather than man-follow
in woman-mode.
I noticed this in
GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2005-09-23 on debian, modified by Debian
X server distributor `The X.Org Foundation', version 11.0.60802000 .
_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sven_joachim@web.de: Pressing RET in woman-mode calls man]
2005-10-13 4:52 [sven_joachim@web.de: Pressing RET in woman-mode calls man] Richard Stallman
@ 2005-10-13 9:39 ` Masatake YAMATO
2005-10-13 16:53 ` Masatake YAMATO
0 siblings, 1 reply; 5+ messages in thread
From: Masatake YAMATO @ 2005-10-13 9:39 UTC (permalink / raw)
Cc: emacs-devel, miles
> Pressing RET in woman-mode when point is on a "reference word" (e.g. in the
> "SEE ALSO" section of the man page) invokes man, not woman, on the manpage.
> The same applies to mouse-1 and mouse-2. Pressing C-h k in woman-mode gives
> the following information:
I'll take charge of this issue.
I cannot remember the reason, but I did:
2003-04-02 Masatake YAMATO <jet@gyve.org>
* woman.el (woman-xref): Removed.
(woman-mode): Use `Man-highlight-references' instead of
`WoMan-highlight-references'.
(WoMan-highlight-references): Removed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [sven_joachim@web.de: Pressing RET in woman-mode calls man]
2005-10-13 9:39 ` Masatake YAMATO
@ 2005-10-13 16:53 ` Masatake YAMATO
2005-10-14 5:10 ` Richard M. Stallman
0 siblings, 1 reply; 5+ messages in thread
From: Masatake YAMATO @ 2005-10-13 16:53 UTC (permalink / raw)
Cc: miles, emacs-devel
[-- Attachment #1: Type: Text/Plain, Size: 4464 bytes --]
> > Pressing RET in woman-mode when point is on a "reference word" (e.g. in the
> > "SEE ALSO" section of the man page) invokes man, not woman, on the manpage.
> > The same applies to mouse-1 and mouse-2. Pressing C-h k in woman-mode gives
> > the following information:
>
> I'll take charge of this issue.
>
> I cannot remember the reason, but I did:
>
> 2003-04-02 Masatake YAMATO <jet@gyve.org>
>
> * woman.el (woman-xref): Removed.
> (woman-mode): Use `Man-highlight-references' instead of
> `WoMan-highlight-references'.
> (WoMan-highlight-references): Removed.
>
I took a mistake when I unified common code in man.el and woman.el.
Here is the fix. If you think the patch is overkill, let me know.
2005-10-13 Masatake YAMATO <jet@gyve.org>
* woman.el (WoMan-xref-man-page): New button type derived
from `Man-abstract-xref-man-page'.
(woman-mode): Pass `WoMan-xref-man-page' to
`Man-highlight-references'.
* man.el (Man-abstract-xref-man-page): New button type.
(Man-xref-man-page): Make it derived from `Man-abstract-xref-man-page'.
(Man-highlight-references): Add new optiolnal argument `xref-man-type'.
*** man.el 03 10æ 2005 02:37:48 +0900 1.154
--- man.el 13 10æ 2005 22:57:02 +0900
***************
*** 415,424 ****
(define-key Man-mode-map "?" 'describe-mode))
;; buttons
! (define-button-type 'Man-xref-man-page
! 'action (lambda (button) (man-follow (button-label button)))
'follow-link t
! 'help-echo "mouse-2, RET: display this man page")
(define-button-type 'Man-xref-header-file
'action (lambda (button)
--- 415,432 ----
(define-key Man-mode-map "?" 'describe-mode))
;; buttons
! (define-button-type 'Man-abstract-xref-man-page
'follow-link t
! 'help-echo "mouse-2, RET: display this man page"
! 'func nil
! 'action (lambda (button) (funcall
! (button-get button 'func)
! (button-label button))))
!
! (define-button-type 'Man-xref-man-page
! :supertype 'Man-abstract-xref-man-page
! 'func 'man-follow)
!
(define-button-type 'Man-xref-header-file
'action (lambda (button)
***************
*** 903,916 ****
'face Man-overstrike-face)))
(message "%s man page formatted" Man-arguments))
! (defun Man-highlight-references ()
"Highlight the references on mouse-over.
References include items in the SEE ALSO section,
! header file (#include <foo.h>) and files in FILES."
(let ((dummy 0))
(Man-highlight-references0
Man-see-also-regexp Man-reference-regexp 1 dummy
! 'Man-xref-man-page)
(Man-highlight-references0
Man-synopsis-regexp Man-header-regexp 0 2
'Man-xref-header-file)
--- 911,927 ----
'face Man-overstrike-face)))
(message "%s man page formatted" Man-arguments))
! (defun Man-highlight-references (&optional xref-man-type)
"Highlight the references on mouse-over.
References include items in the SEE ALSO section,
! header file (#include <foo.h>) and files in FILES.
! If XREF-MAN-TYPE is used as the button type for items
! in SEE ALSO section. If it is nil, default type,
! `Man-xref-man-page' is used."
(let ((dummy 0))
(Man-highlight-references0
Man-see-also-regexp Man-reference-regexp 1 dummy
! (or xref-man-type 'Man-xref-man-page))
(Man-highlight-references0
Man-synopsis-regexp Man-header-regexp 0 2
'Man-xref-header-file)
*** woman.el 03 10月 2005 02:37:50 +0900 1.40
--- woman.el 13 10月 2005 22:53:14 +0900
***************
*** 424,429 ****
--- 424,434 ----
(defvar woman-version "0.551 (beta)" "WoMan version information.")
(require 'man)
+ (require 'button)
+ (define-button-type 'WoMan-xref-man-page
+ :supertype 'Man-abstract-xref-man-page
+ 'func 'woman)
+
(eval-when-compile ; to avoid compiler warnings
(require 'dired)
(require 'apropos))
***************
*** 1864,1870 ****
(setq woman-imenu-done nil)
(if woman-imenu (woman-imenu))
(let (buffer-read-only)
! (Man-highlight-references))
(set-buffer-modified-p nil)
(run-mode-hooks 'woman-mode-hook))
--- 1869,1875 ----
(setq woman-imenu-done nil)
(if woman-imenu (woman-imenu))
(let (buffer-read-only)
! (Man-highlight-references 'WoMan-xref-man-page))
(set-buffer-modified-p nil)
(run-mode-hooks 'woman-mode-hook))
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sven_joachim@web.de: Pressing RET in woman-mode calls man]
@ 2005-09-28 17:11 Richard M. Stallman
0 siblings, 0 replies; 5+ messages in thread
From: Richard M. Stallman @ 2005-09-28 17:11 UTC (permalink / raw)
Cc: emacs-devel
Since this concerns buttons, can you tell us where we should look?
------- Start of forwarded message -------
Date: Mon, 26 Sep 2005 13:49:54 +0200
From: Sven Joachim <sven_joachim@web.de>
X-Accept-Language: de-DE, de, en-us, en
To: emacs-pretest-bug@gnu.org
X-Sender: sven_joachim@web.de
Subject: Pressing RET in woman-mode calls man
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level:
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63
Pressing RET in woman-mode when point is on a "reference word" (e.g. in the
"SEE ALSO" section of the man page) invokes man, not woman, on the manpage.
The same applies to mouse-1 and mouse-2. Pressing C-h k in woman-mode gives
the following information:
<mouse-1> at that spot is remapped to <mouse-2>
which runs the command push-button
which is an interactive compiled Lisp function in `button'.
It is bound to <mouse-2>, RET.
(push-button &optional pos use-mouse-action)
If I want to invoke woman instead of man, I have to press M-mouse-2, which
is cumbersome:
woman-follow-word is on <M-mouse-2>.
I used "M-x debug-on entry man-follow" to find out that push-button in turn
calls man-follow, as seen in the backtrace:
Debugger entered--entering a function:
* man-follow("dpatch")
#[(button) "ÁÂ\b!!" [button man-follow button-label] 3](#<marker (moves after insertion) at 11300 in *WoMan 1 dpatch*>)
push-button(11300)
call-interactively(push-button)
Probably push-button should call woman-follow-word rather than man-follow
in woman-mode.
I noticed this in
GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2005-09-23 on debian, modified by Debian
X server distributor `The X.Org Foundation', version 11.0.60802000 .
_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-10-14 5:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-13 4:52 [sven_joachim@web.de: Pressing RET in woman-mode calls man] Richard Stallman
2005-10-13 9:39 ` Masatake YAMATO
2005-10-13 16:53 ` Masatake YAMATO
2005-10-14 5:10 ` Richard M. Stallman
-- strict thread matches above, loose matches on Subject: below --
2005-09-28 17:11 Richard M. Stallman
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).