* about the manual of visited-file-modtime
@ 2018-03-12 23:51 zhang cc
2018-03-13 5:24 ` Radon Rosborough
0 siblings, 1 reply; 4+ messages in thread
From: zhang cc @ 2018-03-12 23:51 UTC (permalink / raw)
To: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
The manual says:
If the buffer has no recorded last modification time, this function
returns zero.
and also says this at the end:
If the buffer is not visiting a file, this function returns -1.
Tested with the buffer “*scratch*” and “*Messages*”, it both returned 0 not -1.
It seems that the latter sentence in manual is useless.
[-- Attachment #2: Type: text/html, Size: 1048 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: about the manual of visited-file-modtime
2018-03-12 23:51 about the manual of visited-file-modtime zhang cc
@ 2018-03-13 5:24 ` Radon Rosborough
2018-03-13 9:36 ` zhang cc
0 siblings, 1 reply; 4+ messages in thread
From: Radon Rosborough @ 2018-03-13 5:24 UTC (permalink / raw)
To: zhang cc; +Cc: emacs-devel@gnu.org
> If the buffer is not visiting a file, this function returns -1.
In my copy of Emacs 26, it says
If the visited file doesn’t exist, return -1.
Which is exactly what it does. *scratch* and *Messages* do not visit
files, so they have no recorded modtime, hence 0. If you visit a new
file but don't save it, you get -1.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: about the manual of visited-file-modtime
2018-03-13 5:24 ` Radon Rosborough
@ 2018-03-13 9:36 ` zhang cc
2018-03-13 16:39 ` Radon Rosborough
0 siblings, 1 reply; 4+ messages in thread
From: zhang cc @ 2018-03-13 9:36 UTC (permalink / raw)
To: Radon Rosborough; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
Maybe my copy of emacs 26 is too old.
If the visited file doesn’t exist, return -1.
If the visited file is deleted by external program, then does it return -1?
On 13 Mar 2018, 1:25 PM +0800, Radon Rosborough <radon.neon@gmail.com>, wrote:
If the buffer is not visiting a file, this function returns -1.
In my copy of Emacs 26, it says
If the visited file doesn’t exist, return -1.
Which is exactly what it does. *scratch* and *Messages* do not visit
files, so they have no recorded modtime, hence 0. If you visit a new
file but don't save it, you get -1.
[-- Attachment #2: Type: text/html, Size: 1855 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: about the manual of visited-file-modtime
2018-03-13 9:36 ` zhang cc
@ 2018-03-13 16:39 ` Radon Rosborough
0 siblings, 0 replies; 4+ messages in thread
From: Radon Rosborough @ 2018-03-13 16:39 UTC (permalink / raw)
To: zhang cc; +Cc: emacs-devel@gnu.org
> If the buffer is not visiting a file, this function returns -1.
> If the visited file doesn’t exist, return -1.
Ah. I re-read your message and noticed you were talking about the
manual rather than the docstring. The two are inconsistent, and you're
right that the manual should be fixed.
Sorry for the confusion.
> If the visited file is deleted by external program, then does it return -1?
No, just the same value it would have returned if the file were not deleted.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-13 16:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-12 23:51 about the manual of visited-file-modtime zhang cc
2018-03-13 5:24 ` Radon Rosborough
2018-03-13 9:36 ` zhang cc
2018-03-13 16:39 ` Radon Rosborough
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).