Bug 125757

Summary: [RFE] Add mouse bindings for .emacs/psgml setup
Product: [Fedora] Fedora Documentation Reporter: Mark Johnson <mjohnson>
Component: docs-requestsAssignee: Karsten Wade <kwade>
Status: CLOSED WONTFIX QA Contact: Tammy Fox <tammy.c.fox>
Severity: medium Docs Contact:
Priority: medium    
Version: develCC: mattdm, stickster
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://fedora.redhat.com/participate/documentation-guide/ch-emacs.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-30 15:56:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 131160    

Description Mark Johnson 2004-06-10 21:08:06 UTC
Description of problem:

Some people may like to use the mouse to insert tags. The following
snippet will generate popup menus when the cursor point is either on a
start tag or in a region where elements are allowed. 

Such an addition may make Emacs a bit for friendly for a new user...

----========----

;; Mouse Bindings: right-click generates context-aware
elements/attributes popup menu.
                                                                     
          
    (define-key sgml-mode-map [mouse-3] 'sgml-tags-menu)

----========----

For screenshots, see 
http://dulug.duke.edu/~mark/psgmlx/doc/blue-screenshot.html
(See Green Theme for attribute menu.)

Comment 1 Tammy Fox 2004-08-13 15:16:53 UTC
I tried this in FC2, and it get the following error:

Symbol's value as variable is void: sgml-mode-map

Do you have to have any special modes installed to use this?

Comment 2 Mark Johnson 2004-08-14 21:03:57 UTC
Naw, I think all you need to do is to tell emacs to only use these key
bindings when in sgml/xml-mode. To do so, wrap the sgml-mode-map
statement as follows:

------------------------------------------------------------------
(add-hook
 'sgml-mode-hook        ; These only apply in sgml-mode
 (function
  (lambda()

;; Mouse Bindings: right-click generates elements/attributes menu

    (define-key sgml-mode-map [mouse-3] 'sgml-tags-menu)

 )))
------------------------------------------------------------------

The final three parentheses are not optional. 

Comment 3 Tammy Fox 2004-09-17 16:41:42 UTC
I finally got around to adding the correct lines to my .emacs file,
and it works. Interesting how it divides the valid elements into
categories.

I am blocking bug #131160 with this one since it is a Docs Guide RFE.
If you already have a patch to add it to docs-emacs-en.xml, then pass
it along. Otherwise, I'll write it up and add it soon.

Comment 4 Matthew Miller 2005-04-26 15:18:02 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 5 Paul W. Frields 2005-04-28 12:49:51 UTC
Mark or Tammy, can you change the version to "fc3" to ensure that this bug does
not get closed as part of the Fedora Legacy bug-scrubbing?  Or is that not
necessary?

Comment 6 eric 2009-06-30 15:56:23 UTC
These guides are no longer being supported or updated.  If you feel your ticket could better be supported in one of our other guides please feel free to reopen and reassign the ticket to that guide.

Thank you for taking the time to submit your bug.

Comment 7 eric 2009-07-07 04:08:15 UTC
Ticket moved to allow products to be removed from BZ.