在 emacs 中为文件系统以外的其他东西实现一个 dired 接口?

发布于 2024-07-25 18:37:55 字数 473 浏览 6 评论 0原文

高能物理中常用的ROOT数据分析框架使用二进制文件格式,其内部结构类似于真实的文件系统(即文件夹和文件)。 程序的 ls() 方法输出如下所示:

  KEY: TH1D     name1
  KEY: TH1D     name2
  KEY: TH2D     name3
....

其中“TH1D”和“TH2D”等只是对象类型。 在 emacs 中以类似 dired 的界面浏览文件真是太好了。 我当然没有精力/时间从头开始为此编写一个 dired 接口(即使在 dired.el 源的帮助下)。 我的问题是:如果可能的话,我如何通过重新实现一些函数来粘贴到 dired 接口中,为上面的输出创建一个类似 dired 的接口?

我当然不期望这里有完整的解决方案,而是指向示例、教程和其他有用信息的指针。

The ROOT data analysis framework commonly used in high energy physics uses a binary file format that has internal structure like a real filesystem (i.e. folder & files). The ls() method output from the program look something like this:

  KEY: TH1D     name1
  KEY: TH1D     name2
  KEY: TH2D     name3
....

Where "TH1D" and "TH2D" etc. are just object type. It'd be so nice to browse the file in a dired-like interface in emacs. I certainly don't have the energy/time to write a dired interface for this from scratch (even with the help of the dired.el source). My question is: if possible, how can I just tape into the dired interface by re-implementing some functions to make a dired-like interface for the output like above?

I'm certainly not expecting a full-solution here, but rather pointers to examples, tutorial, and other useful info.

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

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

发布评论

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

评论(3

筑梦 2024-08-01 18:37:55

archive-modetar-mode 可能是很好的起点。

archive-mode or tar-mode might be good starting points.

静水深流 2024-08-01 18:37:55

如果它与文件系统足够相似,也许您可​​以编写某种环回驱动程序,它实际上允许您将数据文件安装为文件系统,类似于将 ISO 映像安装为文件系统的方式。 我非常有限的理解是,这在 Linux 下并不是一件非常困难的事情。

If it's similar enough to a filesystem, perhaps you could write somekind of loopback driver taht actually allows you to mount the datafile as a filesystem, similar to the way you can mount an ISO image as a filesystem. My very limited understanding is that this isn't a terribly hard thing to do under Linux.

凑诗 2024-08-01 18:37:55

slac 某人的 xRootdfs 现在似乎正在这样做。
“rootdFS 是用于 Xrootd 存储集群的 Posix 文件系统。它基于 FUSE(用户空间中的文件系统)并在用户空间中运行。”

但我希望您需要 root 访问权限才能加载 FUSE 模块。

xRootdfs from someone at slac seems to do this now.
"rootdFS is a Posix filesystem for an Xrootd storage cluster. It is based on FUSE (Filesystem in Userspace) and runs in user space."

but I expect that you need root access to load the FUSE module.

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