Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interactive help in python-mode #36457

Closed
smontanaro opened this issue Apr 18, 2002 · 6 comments
Closed

interactive help in python-mode #36457

smontanaro opened this issue Apr 18, 2002 · 6 comments
Assignees

Comments

@smontanaro
Copy link
Contributor

BPO 545439
Nosy @smontanaro, @warsaw, @theller
Files
  • [py-help.el](https://bugs.python.org/file4166/py-help.el "Uploaded as application/octet-stream; name="py-help.el" at 2002-04-18.00:31:08 by @smontanaro")
  • 545439.txt
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/warsaw'
    closed_at = <Date 2002-04-22.22:03:57.000>
    created_at = <Date 2002-04-18.00:31:07.000>
    labels = []
    title = 'interactive help in python-mode'
    updated_at = <Date 2002-04-22.22:03:57.000>
    user = 'https://github.com/smontanaro'

    bugs.python.org fields:

    activity = <Date 2002-04-22.22:03:57.000>
    actor = 'barry'
    assignee = 'barry'
    closed = True
    closed_date = None
    closer = None
    components = ['Demos and Tools']
    creation = <Date 2002-04-18.00:31:07.000>
    creator = 'skip.montanaro'
    dependencies = []
    files = ['4166', '4167']
    hgrepos = []
    issue_num = 545439
    keywords = ['patch']
    message_count = 6.0
    messages = ['39632', '39633', '39634', '39635', '39636', '39637']
    nosy_count = 3.0
    nosy_names = ['skip.montanaro', 'barry', 'theller']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue545439'
    versions = []

    @smontanaro
    Copy link
    Contributor Author

    If you apply the patch from bug 545436 to
    python-mode.el, the attached code allows programmers
    to get help from pydoc about the current possibly
    dotted expression.

    This is just a quick-n-dirty hack, but seems at
    least marginally useful.

    @theller
    Copy link

    theller commented Apr 18, 2002

    Logged In: YES
    user_id=11105

    FYI, a *somewhat* similar thing can be found at bug 541031.

    @warsaw
    Copy link
    Member

    warsaw commented Apr 22, 2002

    Logged In: YES
    user_id=12800

    One problem with your patch is that symbol-near-point is a
    XEmacs-ism. I think we can fix that, and avoid the need to
    "regexp-unquote" the return value by just inlining what we
    need of symbol-near-point. I'll work out that patch and
    check it in if it works.

    @warsaw
    Copy link
    Member

    warsaw commented Apr 22, 2002

    Logged In: YES
    user_id=12800

    Skip, check out the attached patch. This ought to work in
    Emacs too. It binds py-help-at-point to C-c C-h.

    @smontanaro
    Copy link
    Contributor Author

    Logged In: YES
    user_id=44345

    The patch works for me for methods but fails for
    symbols. I hadn't tried it for something like
    "sys.platform" before, so I'm pretty sure my original
    patch failed for that as well. When I ask for help on
    sys.platform it complains about "no help for 'linux2'".
    That makes sense, since it's asking for

      pydoc.help(sys.platform)

    Too bad Python doesn't have Lisp's quote feature! <0.5
    wink>

    Ooh! Ooh! Pydoc *does* understand quoting! Try

        pydoc.help("sys.platform")
        pydoc.help("sys.exc_info")

    Looks like the help arg should always be quoted.

    A couple other suggestions:

    • How about binding py-help-at-point to [F1]?

    • How about adding the following two lines to the
      end of py-help-at-point:

      (set-buffer "Python Output")
      (help-mode)

      That puts point in the P O buffer and makes it
      easy to dump the help buffer when you're through
      with it (just press 'q').

    S

    @warsaw
    Copy link
    Member

    warsaw commented Apr 22, 2002

    Logged In: YES
    user_id=12800

    I like the fix for sys.platform, and the binding to [f1].
    I'm less sure about the (help-mode) bit because *Python
    Output* is overloaded for other things too. Oh well, I'll
    add them all and see if anybody complains. :)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants