2

I have started to use the Simple Emacs Spreadsheet (SES) with GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17.

When I try to mark/highlight a column with (ses-mark-column), the selection doesn't operate in vertical mode. The same happens if I set mark at point and move the cursor to the upper or lower cells.

As a result of this, copy, cut, and paste does not work either.

When I set the mark an move vertically with arrows, what is highlighted is also copied and pasted, so also adjacent columns.
With (ses-mark-column), when I try to copy, I get the "Empty range" message in the minibuffer, which in the message buffer is written as ses-copy-region-helper: Empty range.

Update

This is to make the question reproducible.

After opening a new buffer and setting M-x ses-mode, I fill the buffer/spreadsheet as follows:

enter image description here

After placing the cursor in cell B2, typing (ses-mark-column), or the related key binding S-M-h, gives:

enter image description here

And this is not what a column selection is supposed to be.

7
  • I can't replicate this. For me, ses-mark-column followed by M-w successfully copies a column. Can you update your question with a recipe for replicating the issue with example data? Also state which version of Emacs you're using. Commented Dec 19, 2016 at 10:18
  • @phils: hopefully the screenshots should make clear the passages. The version is GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17 Commented Dec 20, 2016 at 1:30
  • True, the visual highlight is not confined to the column (I see the same), but the editing effect is as expected. This is similar to the traditional rectangle editing commands in Emacs, where the rectangle is defined by point and mark, and the active region highlighting is inappropriate but inconsequential. Commented Dec 20, 2016 at 1:55
  • 1
    Ah, I can replicate it in Emacs 25.1. This bug is not present in 24.5. You should M-x report-emacs-bug. Commented Dec 20, 2016 at 2:11
  • 1
    The region seems to be screwed somehow. An additional C-x C-x "repairs" the region AFAICS. Commented Dec 20, 2016 at 10:39

1 Answer 1

1

I subscribe to https://emacs.stackexchange.com/users/454/phils 's recommendation to file a bug report.

In the meantime you could try this slightly modified version of ses-mark-column.

(defun ses-mark-column ()
  "Mark the entirety of current column as a range."
  (interactive)
  (ses-check-curcell 'range)
  (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
    (row 0))
    (push-mark (point))
    (ses-goto-print (1- ses--numrows) (1+ col))
    (push-mark (point) nil t)
    (while (eq '*skip* (ses-cell-value row col))
      ;;Skip over initial cells in column that can't be selected
      (setq row (1+ row)))
    (ses-goto-print row col)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.