如何使用Calc列规则在Emacs Org模式中实现行索引列 [英] How to achieve a row index column in Emacs Org Mode using a Calc column rule

查看:125
本文介绍了如何使用Calc列规则在Emacs Org模式中实现行索引列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在组织模式表中有一个简单的单调递增值的列,即行号,使得我插入和删除随机行,索引值自动调整。我怀疑这应该很简单,但是我觉得这太难了。请注意,我是使用Emacs和组织模式构建电子表格的新手。因此,一个简单的示例电子表格,其中有两列,一个是行索引值,另一个是固定值,这将是一个完美的答案。

I would like to have a column in an org mode table that is a simple monotonically increasing value, i.e. the row number such that wnen I insert and remove random rows the index value adjusts automagically. I suspect that this should be simple but it would appear I am making it way too difficult. Mind you, I am a novice at using Emacs and org mode to build spreadsheets. So a simple example spreadsheet where there are two columns, one the row index value and the other some fixed value, would be a perfect answer.

推荐答案

此示例使用 @#获取行号。同样, $#返回列号。

This example uses @# to get the row number. Similarly, $# returns the column number.

| row | data |
|-----+------|
| 2   | 0303 |
| 3   | 5123 |
| 4   | 41   |
| 5   | 4234 |
#+TBLFM: $1=@#

这篇关于如何使用Calc列规则在Emacs Org模式中实现行索引列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆