emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Charles Choi <kickingvegas@gmail.com>
Cc: Emacs-orgmode@gnu.org
Subject: [RFC] Insert reference to Org table cell or cell range from region selection (w/without mouse)
Date: Sun, 20 Oct 2024 09:51:22 +0000	[thread overview]
Message-ID: <87zfmzqezp.fsf@localhost> (raw)
In-Reply-To: <95CE1447-FC08-431A-9CA1-83B4C3F77BA7@gmail.com>

[ Changing subject line, so that the thread is registered as a proper request for comments ]

Charles Choi <kickingvegas@gmail.com> writes:

> I recently made a blog post describing a means of calculating an Org table reference from a selected text region or rectangle. I think this feature is compelling enough to put into Org itself and as such I am raising this idea with this group to gauge interest.
>
> This idea and its implementation are detailed in http://yummymelon.com/devnull/referencing-org-table-cells-with-text-regions.html

It would be nice if you summarized the feature request in a few
sentences in the email. The link may or may not be available for future
readers in 10+ years from now.

AFAIR, the idea is roughly the following:

1. Currently, users need to type table cell references manually in table
   formulas:
   #+tblfm: @1$2+@5$4

2. Manually counting cells is not fun
3. We do have M-x org-table-edit-formulas where you can use S-<arrow> to
   change the existing cell reference, but it still requires having a
   reference to start with

4. The proposed feature is inserting a cell/range reference from mouse
   click/drag, as it is done in GUI spreadsheet apps (like Libreoffice calc)
        
> I'm happy to respond to any feedback on this idea here. Also to
> clarify, I'm much more interested in feedback for the idea and less so
> on its current implementation. It is my hope that if the idea of it is
> appealing enough, an optimal implementation can be made by this group.

As we briefly discussed during the meetup, I believe that we can
integrate mouse support into M-x org-table-edit-formulas:
- when in fedit buffer, clicking/dragging on the original table should
  insert reference into the formula buffer

Your idea about a command to copy reference to cell/region at point also
makes sense (be it a context menu entry to a simple key binding/M-x command)

> ... an optimal implementation can be made by this group

I was hoping that you will be the person sending patches ;)
At the end, you were interested enough in the feature to write the blog
post. So, you are probably the most motivated as well.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


      reply	other threads:[~2024-10-20  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-20  0:28 Request for comment: Adding feature to calculate Org table reference from selected text region Charles Choi
2024-10-20  9:51 ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfmzqezp.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=Emacs-orgmode@gnu.org \
    --cc=kickingvegas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).