您对 Emacs 包管理器有何期望?

发布于 2024-07-12 22:29:41 字数 1431 浏览 8 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

简单气质女生网名 2024-07-19 22:29:41

我仍在学习 Emacs,所以我还没有机会研究包管理器,但一个很棒的功能是通知用户,如果他们尝试使用该包但它不在他们的系统上,则该包可用。 例如,我想在服务器上编辑一次 PHP 文件,我尝试了

M-x php-mode

一下,Emacs 一切都像

M-x php-mode [no match]

它应该的那样

php-mode available from ftp.gnu.org. install? (y/n)

,然后它会为我安装并加载 php-mode。 那会让我很开心。

I'm still learning Emacs, so I haven't had a chance to look into package managers, but a great feature would be to inform the user that the package is available if they try to use it but it's not on their system. For example, I wanted to edit a PHP file on a server once, and I tried

M-x php-mode

and Emacs was all like

M-x php-mode [no match]

when it should have been like

php-mode available from ftp.gnu.org. install? (y/n)

and then it would have installed and loaded up php-mode for me. That would have made my day right there.

痴者 2024-07-19 22:29:41

通过版本控制自动发布

我希望看到一个标准的、集中的、单一 Emacs 包管理器。 现在,我会把钱放在 ELPA 上,但还有很长的路要走。

对 Emacs 包管理器有帮助的最重要的事情就是使发布包变得非常简单。 在我看来,我希望看到这种情况与像 git 这样的版本控制系统结合在像 GitHub —— 可以让作者轻松发布他们的包,并让其他人轻松做出贡献。

与 GitHub(过去)如何轻松发布 RubyGems 类似,我希望在 Emacs 包管理器中看到类似的东西。 例如,用“vX.YZ”标记您的存储库,并让所有人自动使用您的 elisp 优点。

使用 GitHub 等流行后端的额外好处是,您会立即获得大量曝光,这将有助于推动其成功。

Automatic publishing from version control

I'd love to see a standard, central, and single Emacs package manager. Right now, I'd put my money on ELPA, but there is still a long way to go.

The biggest thing that would help an Emacs package manager would be to make it super trivial to publish packages. In my opinion, I'd like to see this happen in combination with a version control system like git on a central hosted platform like GitHub -- something that would make it easy for authors to publish their packages and would make it easy for others to contribute back.

Similar to how GitHub (used to) make it easy to publish RubyGems, I'd like to see something similar in an Emacs package manager. For example, tag your repository with "vX.Y.Z" and have your elisp goodness automatically available to all.

The added benefit of using a popular backend like GitHub is that you'd immediately get a lot of exposure which should help drive its success.

乖乖哒 2024-07-19 22:29:41

我最期望的是一切有用的东西都在上面,而且运行良好。 这要求您(或维护人员团队)积极追求为其打包所有内容,并做任何涉及的事情 - 向有用包的每个作者发送电子邮件,等等。

例如,Debian(及其衍生品:Ubuntu 等)之所以如此优秀,是因为您可以愉快地使用您的系统,而无需在存储库之外安装任何东西,并且其上的所有内容都经过彻底的测试。 包管理器的实际功能很重要,但相对于受管理的包本身来说是次要的。

What I expect most is that everything useful is on it, and works well. This requires you (or a team of maintainers) to aggressively pursue packaging everything for it, and doing whatever that involves — emailing every author of a useful package, and so on.

For instance, the reason Debian (and its derivatives: Ubuntu etc.) is so good is that you can happily use your system without ever having to install something outside the repositories, and that everything on it is thoroughly tested. The actual features of the package manager are important, but secondary to the managed packages themselves.

等风来 2024-07-19 22:29:41

轻松配置同步:我和许多人一样,在许多不同的计算机和服务器上使用 Emacs,其中一些是我自己的,有些不是。 如果包管理器有某种我可以从一台计算机传输到另一台计算机的文件,那就太棒了; 然后,在后一台计算机上,包管理器将使我的 Emacs 进入我喜欢的状态——安装所有包并设置配置。 结合能够轻松地在站点范围内安装(如果具有 root 权限)或作为单个用户安装的能力,我可以在任何地方同步所有 Emacsen。

Easy configuration synchronization: I, like many people, use Emacs on many different computers and servers, some of them my own and some not. It would be amazing if the package manager had some sort of file which I could transfer from one computer to another; then, on the latter computer, the package manager would bring my Emacs into the state I like it in -- all the packages installed and configurations set. Combined with the ability to be able to easily install either site-wide (if one has root permissions) or as a single user, I could synchronize all of Emacsen everywhere.

伴我心暖 2024-07-19 22:29:41

我几乎肯定,最好的解决方案包括向 ELPA 提交更多包并向 package.el 添加多源支持。 Emacs 维护者表示,他们会考虑在版本 24 中包含 package.el,只要它默认指向 FSF 存储库。

当然,提交也需要是一个自动化的过程; 当前向 ELPA 维护者发送邮件的方法仅适用于小规模。

I'm nearly positive that the best solution involves submitting more packages to ELPA and adding multi-source support to package.el. The Emacs maintainers have said that they would consider including package.el in version 24 as long as it pointed to an FSF repository by default.

Of course, submission also needs to be an automated process too; the current method of mailing the ELPA maintainer only works on a small scale.

草莓味的萝莉 2024-07-19 22:29:41

无论如何完成,我认为最重要的是向存储库提交包应该很简单。 同时,我们不希望这些软件包立即可用,以防止恶意代码(并且由于许可问题)。 除非有一个基于加密签名的“信任”系统。

也很有用:

  • “元包”,可以一次安装多个包。
  • 同样,我们应该能够安装一组 elisp 文件,为了可维护性,
  • 不应允许“损坏的”软件包破坏 Emacs 的启动。 这很简单,我已经在自己的 .emacs 中实现了它,
  • 能够安装脚本以外的文件。 这一点经常被忽视,但却非常有用。 例如,您可以发送图像、图标、工具栏等。
  • 版本控制:包 X 需要包 Y > 1.0
  • 测试:执行基本的健全性检查,测试冲突(键绑定、函数重新定义、预期存在但不存在的函数等)。
  • 错误跟踪:我无法充分强调这一点的重要性。 拥有一个集中的地方来报告软件包错误(并能够跟踪它们)对于确保软件包的质量非常重要。

某种压缩存档似乎最适合执行上述某些操作。


到目前为止,经过大幅改进的 ELPA 似乎是最佳选择。

No matter how this is done, the most important thing in my opinion is that it should be trivial to submit packages to the repository. At the same time, we do not want those packages to be instantly available, to guard against malicious code(and due to licensing issues). Unless there is a "trust" system in place, based on crypto signatures.

Also useful:

  • "metapackages", to install several packages at once.
  • In the same way, we should be able to install a set of elisp files, for maintainability
  • "Broken" packages should not be allowed to disrupt Emacs startup. This is easy and I have it implemented in my own .emacs
  • Ability to install files other than scripts. This is often overlooked, but very useful. You'd be able to, for instance, ship images, for icons, toolbars, etc.
  • Versioning:package X requires package Y > 1.0
  • Testing: perform basic sanity checks, testing for conflicts (keybindings, function redefinitions, functions that are expected to be present but aren't, etc).
  • BUG TRACKING: I can't stress the importance of this enough. Having a centralized place to report package bugs (and being able to track them) is extremely important to assure the quality of the packages.

Some sort of compressed archive seems to be best to do some of the above.


So far, a much improved ELPA seems the way to go.

手心的海 2024-07-19 22:29:41

我曾经花了一些时间为 Emacs 编写一个小型包管理器。

http://gmarceau.qc.ca/plugin.el

我写道:

插件是我尝试创建一个
Emacs 的包管理器。 插入
会自动下载Emacs
扩展,将它们解压到
目录,将该目录添加到
load-path,生成自动加载
注释,并修改你的 dot-emacs
文件。 自动加载注释是
Emacs 鲜为人知的功能。 一次
它们是生成的,Emacs 扩展
快速且增量地加载,这
如果你有那么多的话真的很好
像我一样安装了扩展。

您将需要两个库文件才能运行它, loop-constructs.elrecord.el

I once spent some time writing a small package manager for Emacs.

http://gmarceau.qc.ca/plugin.el

I wrote:

Plugin is my attempt at creating a
package manager for Emacs. Plugin
will automatically downloads Emacs
extensions, unpacks them in a
directory, adds that directory to the
load-path, generates auto-load
annotations, and modify your dot-emacs
file. The auto-load annotations are a
little-known feature of Emacs. Once
they are generated, Emacs extensions
load quickly and incrementally, which
is really nice if you have as many
extensions installed as I do.

You will need two library files to get it to run, loop-constructs.el and record.el

追风人 2024-07-19 22:29:41

我认为 iPhone 的黑客已经非常接近我想要的了,Ubuntu 的“apt”也是如此。

我希望能够:

  • 添加
  • 删除(仅包)
  • 删除用户设置
  • 查看文档
  • 升级(阅读更改日志后)
  • 添加新存档(又名添加存储库)
  • 查看依赖项
  • 查看版本
  • 搜索名称、关键字
  • 浏览(添加日期、日期)修改后的名称)
  • 保存所有已安装的软件包& 设置
  • 加载包集和 设置

我想要一组主要的东西,它们都能很好地工作,并且是推荐的做任何事情的方式。 然后是一个全局集合,所有工作都可以进入。然后任何人都可以托管自己的存档。

如果这一切都绑定到 git/svn/whatever 中,这样您就可以安装旧版本,那就太好了。 通过分叉等等等等来制作你自己的补丁......

I think the hackers for the iPhone got quite close to what I want, as does Ubuntu's "apt".

I like to be able to:

  • add
  • remove (package only)
  • remove user settings
  • view documentation
  • upgrade ( after reading the change log)
  • add new archive ( aka add repository )
  • see dependencies
  • see version
  • search for name, keyword
  • browse by (date added, date modified, name)
  • save all installed packages & settings
  • load set of packages & settings

I would like a main set of things that all work nicely and are the recommended way of doing whatever. Then a global set where everything working gets in. Then the ability for anyone to host their own archive.

It would be nice if this was all tied into git/svn/whatever so that you could install old versions. Make your own patches by forking off etc etc etc....

凤舞天涯 2024-07-19 22:29:41

除了上面提到的之外,我还期望 debian 和其他存储库之类的东西 - 一组稳定的、实验性的、未经测试的软件包。 能够添加我自己的存储库 - 我直接使用来自 VCS 的许多软件包,因此创建我自己的软件包可能很有用

Besides the mentioned above, i expect something like debian, and other repositories - set of the stable, experemental, untested packages. Ability to add my own repositories - i use lot of the packages directly from VCS, so it could be useful to create my own packages

浮华 2024-07-19 22:29:41

我认为包管理器应该从 Rubygems 中获得很多灵感。 我还认为它应该有一个像 Gemcutter 这样的网站。

中央存储库也可能很好(例如 Emacsmirror)。 然而,如果存在像 Gemcutter 这样收集所有包的站点,则可能没有必要。

我认为这些事情对于这项工作的开展非常重要。

  • 收集所有包的某种集中位置
  • 易于添加包
  • 易于维护包
  • 易于为其他包做出贡献
  • 易于安装、卸载和更新包
  • 可以添加包依赖项
  • 所有包的通用结构

因此,像 Rubygems 这样的包管理器带有一个站点像 Gemcutter 和像 Emacsmirror 这样的中央存储库(最好在 Github 上,因为它是社交编码)会让 Emacs 做得非常好。

总而言之,我认为应该从 Rails 以及 Rails 如何处理 Gems 中获得很多灵感。

I think that the package manager should take a lot of inspiration from Rubygems. I also think that it should have a site like Gemcutter.

A central repository could also be nice (like Emacsmirror). This however may not be necessary if a site like Gemcutter exists that collects all packages.

I think these things are important for this to work.

  • Central location of some kind that collects all packages
  • Easy to add packages
  • Easy to maintain packages
  • Easy to contribute to other packages
  • Easy to install, uninstall and update packages
  • Possibility to add package dependencies
  • Common structure for all packages

So a package manager like Rubygems with a site like Gemcutter and a central repository like Emacsmirror (preferably on Github because of it's social coding) would do Emacs really good.

All in all I think that much inspiration should be taken from Rails and how Rails handles Gems.

隱形的亼 2024-07-19 22:29:41

我不知道这个问题有多新鲜......
但我希望看到的模型是 CPAN。 我也不知道 Rubygems,但听起来和 CPAN 很相似。

CPAN是一个perl档案+图书馆管理系统。 当我需要编写一个需要... FTP或SOAP或JSON或XML或ZIP等的perl程序时,我可以运行CPAN包管理器,选择下载所需的包,查看并验证依赖关系,然后安装一切。 CPAN 被镜像......“无处不在”。

CPAN 非常适合我的目的,如果 emacs 拥有类似的东西那就太好了。 它还支持按需构建 C/C++ 代码。

这就是我想在 emacs 中看到的。

一些对要求的进一步评论。

  • 显式下载包。 没有自动安装。 没有隐形下载。 我想请求新的库或新的功能。
  • 我应该能够列出已安装软件包的名称/版本/时间戳。
  • 如果我的朋友给了我他的列表,我应该能够区分他的 emacs 状态和我的。
  • 检查更新功能。 有哪些可用更新? 他们修复什么?
  • 依赖性检查、验证和下载。 如果我安装 csharp-mode 并且它需要 cc-mode v5.0.28,那么它应该与我确认,我还必须下载 cc-mode。
  • 这些软件包应该有某种社区排名,例如在 isohunt 上对 torrent 进行排名。 我想看看一个包是否有 3 个赞成票或 3000 个
  • “交易”行为。 如果安装成功,它必须恢复到最后已知的良好状态。
  • 故障保险。 如果我将自定义 mod 放入 linum.el,它应该拒绝在我的更改上安装新版本,除非我明确允许。 它应该在开始之前警告我。 在现有安装上使用校验和/md5 执行此操作。
  • 可以选择运行压缩档案中的某些包,例如 zip 文件。 所以我毫不怀疑我没有更新任何嵌入的 elisp。
  • 能够使用镜像主机进行包分发。
  • 所有这些功能都应该可以通过 Mx library-manageemnt 或其他东西访问。

最后,如果有一种方法来隔离或组织函数库就好了。 分层命名空间。 Emacs 的平面命名空间已经非常过时了。 这与包管理的核心功能是独立的,但又是互补的。 我不是 lisp 大师,所以我不知道这有多难; 也许已经有办法做到这一点了。

I don't know how fresh this question is...
but the model I would like to see is CPAN. I also don't know Rubygems but it sounds similar to CPAN.

CPAN is a perl archive + library management system. When I need to write a perl program that requires... FTP or SOAP or JSON or XML or ZIP, or...etc, I can run the CPAN package manager, select the requisite package for download, view and verify the dependencies, then install everything. CPAN is mirrored .."everywhere".

CPAN works wonderfully for my purposes, and something similar for emacs would be nice to have. It also supports building C/C++ code on demand.

That's what I would like to see in emacs.

Some further comment on requirements.

  • explicit download of packages. No auto install. No invisible downloads. I want to ask for new libraries or new function.
  • I should be able to list the name/version/timestamp of installed packages.
  • If my friend gives me his list, I should be able to diff his emacs state against mine.
  • check-for-updates function. What updates are available? What do they fix?
  • depedency checking, verification, and download. If I install csharp-mode and it requires v5.0.28 of cc-mode, then it should confirm with me, that I must also download cc-mode.
  • there should be some sort of community ranking of these packages, like ranking torrents on isohunt. I want to see if a package has 3 upvotes or 3000.
  • "transactional" behavior. If an install goes boom, it must unwind to a last-known-good state.
  • failsafes. If I've put custom mods in linum.el, it should refuse to install a new version over my changes, unless I explicitly allow it. It should warn me before even starting. Do this with checksums/md5's over the existing install.
  • have the option of running some packages from compressed archives, like zip files. So I never have any doubt that I have not updated any of the embbedded elisp.
  • ability to use mirrored hosts for package distribution.
  • all this function should be accessible through M-x library-manageemnt or something.

Finally, it would be nice to have a way to segregate or organize libraries of functions. Hierarchical namespaces. Emacs' flat namespace is very dated. This is sort of independent but complementary to the core function of package management. I'm not a lisp guru so I don't know how hard this would be; maybe there is already a way to do it.

一萌ing 2024-07-19 22:29:41

包管理器不提供任何我看重的具有简单依赖关系的单文件 elisp 包:从 site-lisp 添加和删除从未引起问题。 依赖于外部程序(例如 ispell)的包、多文件包(例如 auctex、org-mode)可能会很棘手。 无法立即想到任何具有重要依赖关系的单文件 elisp 包。

对于这些,缺少包管理器,我希望 emacs 的 elisp-packages 获取可以集体运行的测试套件,并在依赖项失败时提供有用的信息。

Package managers don't offer anything I value w.r.t. single-file elisp packages with simple dependencies: adding and deleting from site-lisp has never caused problems. It's packages that depend on external programs (e.g., ispell), multi-file packages (e.g., auctex, org-mode) that can be tricky. Can't think of any single-file elisp package with nontrivial dependencies, offhand.

For these, short of a package manager, I'd like emacs' elisp-packages to acquire test suites which can be run en masse, and which provide useful information in the event of dependency failures.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文