GNU bug report logs -
#6219
Lauching nroff command from nroff-mode
Previous Next
Reported by: Masatake YAMATO <yamato <at> redhat.com>
Date: Wed, 19 May 2010 13:14:02 UTC
Severity: wishlist
Tags: patch
Done: Chong Yidong <cyd <at> stupidchicken.com>
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 6219 in the body.
You can then email your comments to 6219 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6219
; Package
emacs
.
(Wed, 19 May 2010 13:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Masatake YAMATO <yamato <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 19 May 2010 13:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This is not a bug report. This a request to review a patch to
include the official emacs source tree.
This patch provides the way to nroff-mode user to preview one's
document quickly.
2010-04-04 Masatake YAMATO <yamato <at> redhat.com>
* textmodes/nroff-mode.el (nroff-preview-as-man-page): Add new function.
(nroff-mode-map): Put `nroff-preview-as-man-page' to the key map and
menu map.
=== modified file 'lisp/textmodes/nroff-mode.el'
--- lisp/textmodes/nroff-mode.el 2010-01-13 08:35:10 +0000
+++ lisp/textmodes/nroff-mode.el 2010-04-04 21:14:58 +0000
@@ -55,6 +55,7 @@
(define-key map "\n" 'nroff-electric-newline)
(define-key map "\en" 'nroff-forward-text-line)
(define-key map "\ep" 'nroff-backward-text-line)
+ (define-key map "\C-c\C-c" 'nroff-preview-as-man-page)
(define-key map [menu-bar nroff-mode] (cons "Nroff" menu-map))
(define-key menu-map [nn]
'(menu-item "Newline" nroff-electric-newline
@@ -73,6 +74,9 @@
nroff-electric-mode
:help "Auto insert closing requests if necessary"
:button (:toggle . nroff-electric-mode)))
+ (define-key menu-map [npm]
+ '(menu-item "Preview as man page" nroff-preview-as-man-page
+ :help "Run man on this file."))
map)
"Major mode keymap for `nroff-mode'.")
@@ -301,6 +305,15 @@
:lighter " Electric"
(or (derived-mode-p 'nroff-mode) (error "Must be in nroff mode")))
+(defun nroff-preview-as-man-page ()
+ "Run man on this file."
+ (interactive)
+ (require 'man)
+ (let* ((file (buffer-file-name)))
+ (if file
+ (Man-getpage-in-background file)
+ (error "No associated file for the current buffer"))))
+
;; Old names that were not namespace clean.
(define-obsolete-function-alias 'count-text-lines 'nroff-count-text-lines "22.1")
(define-obsolete-function-alias 'forward-text-line 'nroff-forward-text-line "22.1")
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6219
; Package
emacs
.
(Thu, 20 May 2010 15:07:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 6219 <at> debbugs.gnu.org (full text, mbox):
Masatake YAMATO <yamato <at> redhat.com> writes:
> This patch provides the way to nroff-mode user to preview one's
> document quickly.
Thanks, it seems to work well.
I suggest making the keybinding C-c C-v instead of C-c C-c, and renaming
the command `nroff-view'. This would make it more similar to Tex mode's
`tex-view' command. What do you think?
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6219
; Package
emacs
.
(Fri, 21 May 2010 03:59:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 6219 <at> debbugs.gnu.org (full text, mbox):
> Masatake YAMATO <yamato <at> redhat.com> writes:
>
>> This patch provides the way to nroff-mode user to preview one's
>> document quickly.
>
> Thanks, it seems to work well.
>
> I suggest making the keybinding C-c C-v instead of C-c C-c, and renaming
> the command `nroff-view'. This would make it more similar to Tex mode's
> `tex-view' command. What do you think?
Thank you for reviewing my patch. About the key binding I agree with you.
I use nroff only for reading man page included in source codes. So I'm
not sure whether renaming the command to `nroff-view' is good or not,
but I think we should choose the name `nroff-view' now. If someone
complains about the command is man specific, we can make it
customizable.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6219
; Package
emacs
.
(Tue, 31 Aug 2010 18:04:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 6219 <at> debbugs.gnu.org (full text, mbox):
Masatake YAMATO <yamato <at> redhat.com> writes:
> 2010-04-04 Masatake YAMATO <yamato <at> redhat.com>
>
> * textmodes/nroff-mode.el (nroff-preview-as-man-page): Add new function.
> (nroff-mode-map): Put `nroff-preview-as-man-page' to the key map and
> menu map.
I've checked your patch into the repository. Thanks.
bug closed, send any further explanations to Masatake YAMATO <yamato <at> redhat.com>
Request was from
Chong Yidong <cyd <at> stupidchicken.com>
to
control <at> debbugs.gnu.org
.
(Tue, 31 Aug 2010 18:05:01 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
.
(Wed, 29 Sep 2010 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 328 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.