Dear Andrés, Please find a tentative fix [https://res.cdn.office.net/assets/mail/file-icon/png/generic_16x16.png] ses.el that allows ses-range to be expanded not in a SES buffer, provided that the result is evaluated in a SES buffer. So you can get values from the SES buffer this way (without the (eval (quote …)) workaround to delay evaluation) : (let ((range (with-current-buffer the-ses-buffer (ses-range A1 A2 >v)))) … do some processing with range. … ) Doing this way rather than getting strings with buffer-substring from the print area you get raw values, not formatted values. This may be more convenient if you need to format them otherwise than SES does. Also you do not suffer from any text truncation done by SES due to cells' limited width. This is why this is the method which I always use, even though you need to do some reformatting of these values. If you really want to read from the print area you need to call ses-write-cells before reading, to ensure that the print area is up-to-date. Please tell be if the linked ses.el works fine for you, and then I would commit it. V. ________________________________ De : Vincent Belaïche Envoyé : vendredi 3 novembre 2023 16:54 À : Stefan Monnier Cc : emacs-devel ; boruch_baum@gmx.com ; Andrés Ramírez Objet : RE: a ses question Dear Stefan, Thank you for your reply. On second thought I think that I just did a mistake in the fix I intended to do. I am investigating it and will come back with a working fix for Andrès's problem or more questions … V. ________________________________ De : Stefan Monnier Envoyé : jeudi 2 novembre 2023 19:19 À : Vincent Belaïche Cc : emacs-devel ; boruch_baum@gmx.com ; Andrés Ramírez Objet : Re: a ses question > (let ((the-ses-buffer (get-buffer "toto.ses"))) > (with-current-buffer the-ses-buffer (insert (format "%S" (ses-range A1 A1))))) `ses-range` is a macro. The exact moment at which a macro is expanded is not defined precisely. It can be expanded basically any time as long as it's before the resulting code is needed for execution. In other words, it's perfectly normal that the macro call `(ses-range A1 A1)` is macro-expanded before any of the above code is executed. If you don't want that, you need to use a function instead. Stefan