Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Emacs shows xrefs in code but needs an interface that's good for humans

by sfink (Deacon)
on Mar 28, 2006 at 17:22 UTC ( [id://539756]=note: print w/replies, xml ) Need Help??


in reply to Emacs shows xrefs in code but needs an interface that's good for humans

I like the idea. Seems very promising. I've been wanting something vaguely like this for some time, although for a somewhat different purpose. My immediate disorganized thoughts/suggestions/requests are:

  1. When I first tried b-xref, I loaded up a random Perl file and ran M-x b-xref. It gave me a buffer containing exactly the same code. It took me a while to figure out that I had to put the point within the code to get anything out. I would recommend inserting a brief description of what the b-xref buffer is and how to use it at the top of the script.
  2. Local keybindings for navigating to next and previous occurrences of a variable.
  3. Function and/or keybinding to rename a variable (now it's a refactoring tool!)
  4. I don't understand the markup and message pairing. If I have ">>" at the beginning of a line, I seem to get: column0=$var1, column1=$var1, column2=$var2 (and at column2, point is past the > signs, so it's on an empty space). Is this off by one?
  5. Similarly, could putting the point on "|" also tell me what the variable is?
  6. Keybinding to pop up another buffer giving an occurs-like description of the full range of the variable's definitions. Or maybe a tooltip-like window that pops up when you hover?
  7. When I run b-xref with point on a variable, I'd like to go straight to that variable instance's jot.
  8. Putting the point or mouse over a variable should highlight all occurrences.
  9. Dispose of the separate buffer altogether? Have it mark up the actual buffer using colors (eg same markup scheme, but change the background colors of the leftmost columns, alternating horizontally between two colors. Invert foreground and background for '>', just set the background for '|'. Or something?) (Hmm... gud mode inserts text into the current buffer without mangling its contents; could you do the same?)
  10. Keybinding to dump out all "live" variables at any given line (byte position?)
  11. Do type inferencing, describe the type of each variable, and list available operations.
  12. Keybinding to dump out all global variables. Or global undeclared variables.
  13. Three points for each global variable you're in range of. One point per lexical. If the sum for a given line is above a threshold, have a keybinding to display a graphical animation of the code's original author being run over by a cement truck. Loop it.
Yes, I know that several of those are... "nontrivial", I think is the word? But they're ideas, at least.
  • Comment on Re: Emacs shows xrefs in code but needs an interface that's good for humans

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://539756]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found