emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Improve message when file to include is missing


From: Sebastien Vauban
Subject: Re: [O] [PATCH] Improve message when file to include is missing
Date: Tue, 18 Feb 2014 21:32:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> This should answer your (fruitful) comments.
>
> Thank you for the update.
>
> It looks good.

Thanks.

> AFAIC, you can push it.

I don't have (yet) push access...

>> +    (if (or (not file) (not (file-readable-p file)))
>> +    (if (not noerror)
>> +        (error "Cannot read file \"%s\"%s" file info-from-file)
>> +      (message "Cannot read file \"%s\"%s" file info-from-file))
>> +      (with-temp-buffer
>> +    (insert-file-contents file)
>> +    (buffer-string)))))
>
> Minor stylistic issue: I find the following a bit easier to understand.
>
>   (if (and file (file-readable-p file))
>       (with-temp-buffer
>         (insert-file-contents file)
>         (buffer-string))
>     (funcall (if noerror #'message #'error)
>              "Cannot read file \"%s\"%s" file info-from-file))

So do I...

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]