简体   繁体   English

Emacs的python-mode文档

[英]python-mode documentation for Emacs

I just installed the python-mode in Emacs and it seems to be working well. 我刚刚在Emacs中安装了python-mode,它似乎运行良好。 However, I could not find documentation for the package on the official site . 但是,我在官方网站上找不到该软件包的文档。

The package comes with a doc folder where I can see two files: 该软件包附带一个doc文件夹,我可以在其中看到两个文件:

commands-python-mode.org
commands-python-mode.rst

Both files seem to be formatted for some external tool that displays the help text. 两个文件似乎都被格式化为显示帮助文本的某些外部工具。

With this: 有了这个:

  • Is there a tool I can use to navigate this documentation? 有没有一个工具可以用来浏览这个文档?
  • Does python-mode have an online site with documentation? python-mode是否有一个带文档的在线站点? Any tutorials or good walk-throughs for python-mode for Emacs? 对于Emacs的python-mode的任何教程或好的演练?

Start off with Mx describe-mode . Mx describe-mode This gives you an overview over the available key bindings. 这为您提供了可用键绑定的概述。 For each command use Cf name RET to see the built-in documentation. 对于每个命令,使用Cf name RET查看内置文档。 The .org file should be an org-mode file and easily readable with Emacs. .org文件应该是一个org-mode文件,并且可以使用Emacs轻松读取。

See also here 另见这里

A cursory inspection of those two files and the code tells me that they're basically a listing of the docstrings found in pymacs.el and python-mode.el . 粗略检查这两个文件代码告诉我,它们基本上是pymacs.elpython-mode.el找到的文档字符串的列表。 That means you'll be able to access the relevant documentation through Mx apropos or Ch a and friends (specifically, search for ^py or ^pymacs to get a listing of the mode functions). 这意味着您将能够通过Mx aproposCh a和朋友访问相关文档(具体来说,搜索^py^pymacs以获取模式函数的列表)。

As a general rule, because elisp doesn't support namespaces, all functions/variables defined by a given mode will have a consistent prefix related to the name of the mode. 作为一般规则,因为elisp不支持名称空间,所以由给定模式定义的所有函数/变量将具有与模式名称相关的一致前缀。 That makes it fairly simple to search through the Emacs documentation. 这使得搜索Emacs文档变得相当简单。

In addition to answers given: Try a walkthrough of the menu "Python", which appears at the head of window. 除了给出的答案:尝试一下菜单“Python”的演练,它出现在窗口的顶部。 It will display a short description of the commands or options. 它将显示命令或选项的简短描述。

WRT to beginnners, some introduction, examples of basic usage might be given still. WRT对初学者,一些介绍,基本用法的例子可能仍然给出。 Filed a feature request: 提交功能请求:

https://bugs.launchpad.net/python-mode/+bug/1281970 https://bugs.launchpad.net/python-mode/+bug/1281970

If your a emacs user and haven't heard of org-mode before your in for treat. 如果您是emacs用户,并且在进入治疗之前没有听说过org-mode

Open the .org file in emacs and go to org-mode ( META x org-mode ), use TAB on the header lines. 在emacs中打开.org文件并转到org-mode( META x org-mode ),在标题行上使用TAB Header-lines starts with one or more * . 标题行以一个或多个*开头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM