Subject: 26.0.50; Ses copy-region-as-kill advice assumes non-nil beg end arguments
From: Vitalie Spinu <[email-masked]>
To: [email-masked]
Date: Thu, 10 Aug 2017 18:42:37 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Once ses is loaded I am getting the following error on kill in magit buffers:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  ses--advice-copy-region-as-kill(#[770 "\
  apply(ses--advice-copy-region-as-kill #[770 
  copy-region-as-kill(nil nil region)
  magit-copy-buffer-revision()
  funcall-interactively(magit-copy-buffer-revision)
  #<subr call-interactively>(magit-copy-buffer-revision nil nil)
  apply(#<subr call-interactively> magit-copy-buffer-revision (nil nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> magit-copy-buffer-revision nil nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (magit-copy-buffer-revision nil nil))
  call-interactively(magit-copy-buffer-revision nil nil)
  command-execute(magit-copy-buffer-revision)

Magit calls (copy-region-as-kill nil nil 'region). According to the doc first
two args should be ignored when 'region is passed. So I would assume it's the
bug in `ses--advice-copy-region-as-kill` then.

Thanks,

  Vitalie

In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-06-28 built on galago
Repository revision: 5d45ba1a05bccc53d52422e867f378a0adeb8970
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Ubuntu 16.04.2 LTS