unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Buffer attributes?
@ 2015-04-08 14:04 Doug Lewan
  2015-04-08 14:21 ` Eli Zaretskii
  2015-04-10 15:15 ` Doug Lewan
  0 siblings, 2 replies; 5+ messages in thread
From: Doug Lewan @ 2015-04-08 14:04 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

All,

Is there a general idea of attributes of a buffer in emacs? A common facility, like stat(2) for files, would be nice.

Some attributes are mentioned explicitly in the elisp info: name, file name (as appropriate), modification time, read-only-ness are mentioned in the chapter on buffers. Others are scattered throughout the documentation, default-directory, for example.

The attribute I'm most interested in at the moment is the buffer's creation time, but I can't find such a thing.
Thanks.

--
,Doug
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224 or ext 4335

The human brain is the most complex thing known to man, according to the human brain.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer attributes?
       [not found] <mailman.202.1428501864.904.help-gnu-emacs@gnu.org>
@ 2015-04-08 14:13 ` Pascal J. Bourguignon
  2015-04-08 17:15 ` Emanuel Berg
  1 sibling, 0 replies; 5+ messages in thread
From: Pascal J. Bourguignon @ 2015-04-08 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

Doug Lewan <dougl@shubertticketing.com> writes:

> Is there a general idea of attributes of a buffer in emacs? A common
> facility, like stat(2) for files, would be nice.

There are buffer local variables.  They're the dynamic attributes of the
buffer objects.


> The attribute I'm most interested in at the moment is the buffer's
> creation time, but I can't find such a thing.

You can write a meat function to add to the buffer-list-update-hook,
that will save the current time to the buffer-creation-time buffer local
variable.

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer attributes?
  2015-04-08 14:04 Doug Lewan
@ 2015-04-08 14:21 ` Eli Zaretskii
  2015-04-10 15:15 ` Doug Lewan
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2015-04-08 14:21 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Doug Lewan <dougl@shubertticketing.com>
> Date: Wed, 8 Apr 2015 14:04:10 +0000
> 
> Is there a general idea of attributes of a buffer in emacs? A common facility, like stat(2) for files, would be nice.

We have instead accessor functions to get values of buffer attributes.

> The attribute I'm most interested in at the moment is the buffer's creation time, but I can't find such a thing.

AFAIK, there's no such thing: Emacs doesn't care when the buffer was
created.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Buffer attributes?
       [not found] <mailman.202.1428501864.904.help-gnu-emacs@gnu.org>
  2015-04-08 14:13 ` Buffer attributes? Pascal J. Bourguignon
@ 2015-04-08 17:15 ` Emanuel Berg
  1 sibling, 0 replies; 5+ messages in thread
From: Emanuel Berg @ 2015-04-08 17:15 UTC (permalink / raw)
  To: help-gnu-emacs

Doug Lewan <dougl@shubertticketing.com> writes:

> Is there a general idea of attributes of a buffer in
> emacs? A common facility, like stat(2) for files,
> would be nice.
>
> Some attributes are mentioned explicitly in the
> elisp info: name, file name (as appropriate),
> modification time, read-only-ness are mentioned in
> the chapter on buffers. Others are scattered
> throughout the documentation, default-directory,
> for example.

Do it yourself Doug :)

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Buffer attributes?
  2015-04-08 14:04 Doug Lewan
  2015-04-08 14:21 ` Eli Zaretskii
@ 2015-04-10 15:15 ` Doug Lewan
  1 sibling, 0 replies; 5+ messages in thread
From: Doug Lewan @ 2015-04-10 15:15 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

All,

Thanks for the suggestions. 
Basically my intuitions were confirmed. 
I'll probably take a little from each 
(whenever I get time to get back to that project).

-- 
,Doug
Douglas Lewan
Shubert Ticketing
(201) 489-8600 ext 224 or ext 4335

The human brain is the most complex thing known to man, according to the human brain.


> -----Original Message-----
> From: help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org
> [mailto:help-gnu-emacs-bounces+dougl=shubertticketing.com@gnu.org] On
> Behalf Of Doug Lewan
> Sent: Wednesday, 2015 April 08 10:04
> To: help-gnu-emacs@gnu.org
> Subject: Buffer attributes?
> 
> All,
> 
> Is there a general idea of attributes of a buffer in emacs? A common
> facility, like stat(2) for files, would be nice.
> 
> Some attributes are mentioned explicitly in the elisp info: name, file
> name (as appropriate), modification time, read-only-ness are mentioned
> in the chapter on buffers. Others are scattered throughout the
> documentation, default-directory, for example.
> 
> The attribute I'm most interested in at the moment is the buffer's
> creation time, but I can't find such a thing.
> Thanks.
> 
> --
> ,Doug
> Douglas Lewan
> Shubert Ticketing
> (201) 489-8600 ext 224 or ext 4335
> 
> The human brain is the most complex thing known to man, according to
> the human brain.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-10 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.202.1428501864.904.help-gnu-emacs@gnu.org>
2015-04-08 14:13 ` Buffer attributes? Pascal J. Bourguignon
2015-04-08 17:15 ` Emanuel Berg
2015-04-08 14:04 Doug Lewan
2015-04-08 14:21 ` Eli Zaretskii
2015-04-10 15:15 ` Doug Lewan

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).