[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] copy cell contents to kill-ring. WAS [FR]: thing-at-point 'o
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] copy cell contents to kill-ring. WAS [FR]: thing-at-point 'org-table-cell |
Date: |
Sat, 04 May 2024 12:24:18 +0000 |
Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
> I needed this function to copy contents from an org spreadsheet to a Web
> page and I see it may be useful to others. Take a look and if you find it
> useful, I'll add the changelog stuff.
> ...
> +(defun org-table-copy-cell-as-kill (verbose)
> + "Copy the contents of the current cell to the kill buffer.
> +Print a message when verbose is not nil.
> +
> +hlines are not considered table cells"
Org mode already has a command that copies cell contents -
`org-table-copy-region'. That command has a problem though - it uses a
kludge with dynamic variable instead of copying to the kill ring.
I think that we can modify `org-table-copy-region' to copy to the kill
ring, adding text properties with cell info as metadata. Then,
`org-table-paste-rectangle' can check for these text properties instead
of relying upon `org-table-clip'.
Would you be willing to work on such refactoring?
--
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>