If this still doesn't work then I suggest you visit the file you want to write 
to in Emacs and copy the full filename used by Emacs into your function. I'll 
look at this more carefully later.

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: help-emacs-windows 
<[email protected]> on behalf of T400 
<[email protected]>
Sent: Saturday, May 18, 2019 6:03:46 AM
To: [email protected]
Subject: Re: [h-e-w] interactive "r" argument passing

Thanks, Francis. I tried escaped backslashes and slashes. After this
didn't work either:


(defun save-sscratch (start end) ;; M-x sch
"Append region in *scratch* to file scratch.txt."
(interactive "r")
(with-current-buffer "*scratch*"
    (write-region start end "c:/mydocu~1/scratch.txt" t)))


I noticed that the in the alias def for sch the 'save-sscratch' function
name was spelled wrong.

;-(

Ed

On 5/17/2019 12:18, Francis Wright wrote:
> You need to double the backslashes or use forward slashes; either should 
> work. (And there should be no need to shorten filenames.)
>
> Francis
>
>> -----Original Message-----
>> From: help-emacs-windows <help-emacs-windows-
>> [email protected]> On Behalf Of T400
>> Sent: Friday, 17 May 2019 6:01 pm
>> To: w32emacs <[email protected]>
>> Subject: [h-e-w] interactive "r" argument passing
>>
>> Dear w32 emacs gurus:
>>
>> Why does this function not work? I think that similar functions I wrote long
>> ago did work.:
>>
>>
>> (defun save-sscratch (start end) ;; M-x sch alias
>> "Append region in *scratch* to file scratch.txt"
>> (interactive "r")
>> (with-current-buffer "*scratch*"
>>      (append-to-file start end "c:\mydocu~1\scratch.txt")))
>>
>> Do I need escaped backslashes? forward slashes?
>>
>>
>> Thanks,
>>
>> Ed
>>
>>

Reply via email to