GNU bug report logs - #3577
23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Mon, 15 Jun 2009 17:00:04 UTC

Severity: minor

Fixed in version 23.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3577 in the body.
You can then email your comments to 3577 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3577; Package emacs. (Mon, 15 Jun 2009 17:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teemu Likonen <tlikonen <at> iki.fi>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 15 Jun 2009 17:00:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
Date: Mon, 15 Jun 2009 19:54:11 +0300
Info nodes

    (emacs) Directory Variables
    (elisp) Directory Local Variables

explain or give examples of function dir-locals-set-directory-class but
neither of them mentions the mandatory third argument MTIME. I quote the
doc string of the function:

    dir-locals-set-directory-class is a compiled Lisp function in
    `files.el'.

    (dir-locals-set-directory-class directory class mtime)

    Declare that the directory root is an instance of class.
    directory is the name of a directory, a string.
    class is the name of a project class, a symbol.
    mtime is either the modification time of the directory-local
    variables file that defined this this class, or nil.

    When a file beneath directory is visited, the mode-specific
    variables from class are applied to the buffer.  The variables
    for a class are defined using `dir-locals-set-class-variables'.



Severity set to `minor' from `normal' Request was from Glenn Morris <rgm+emacsbugs <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 17 Jun 2009 07:35:11 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3577; Package emacs. (Thu, 18 Jun 2009 05:35:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teemu Likonen <tlikonen <at> iki.fi>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 18 Jun 2009 05:35:06 GMT) Full text and rfc822 format available.

Message #12 received at 3577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: 3577 <at> debbugs.gnu.org
Subject: Re: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
Date: Thu, 18 Jun 2009 08:25:48 +0300
On 2009-06-15 19:54 (+0300), Teemu Likonen wrote:

> Info nodes
>
>     (emacs) Directory Variables
>     (elisp) Directory Local Variables
>
> explain or give examples of function dir-locals-set-directory-class but
> neither of them mentions the mandatory third argument MTIME.

It other words if I copy the example from "(emacs) Directory Variables"
and perhaps use my own variables:

    (dir-locals-set-class-variables 'unwritable-directory
      '((nil . ((fill-column . 78)))))

    (dir-locals-set-directory-class
     "/usr/include/" 'unwritable-directory)

I get this:


Debugger entered--Lisp error: (wrong-number-of-arguments #[(directory
class mtime) [...]
[directory class dir-locals-class-alist mtime dir-locals-directory-cache file-name-as-directory expand-file-name error "No such class `%s'" symbol-name] 4 1821511] 2)
  dir-locals-set-directory-class("/usr/include/" unwritable-directory)
  eval((dir-locals-set-directory-class "/usr/include/" (quote unwritable-directory)))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3577; Package emacs. (Thu, 18 Jun 2009 07:05:05 GMT) Full text and rfc822 format available.

Message #15 received at 3577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm+emacsbugs <at> gnu.org>
To: Teemu Likonen <tlikonen <at> iki.fi>
Cc: 3577 <at> debbugs.gnu.org
Subject: Re: bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
Date: Thu, 18 Jun 2009 02:58:57 -0400
Teemu Likonen wrote:

>> Info nodes
>>
>>     (emacs) Directory Variables
>>     (elisp) Directory Local Variables
>>
>> explain or give examples of function dir-locals-set-directory-class but
>> neither of them mentions the mandatory third argument MTIME.
[...]
>     (dir-locals-set-directory-class
>      "/usr/include/" 'unwritable-directory)
[...]
> Debugger entered--Lisp error: (wrong-number-of-arguments #[(directory


Yes, calling a function with the wrong number of arguments causes an error.

The mtime argument is now optional, so there is no error, and no need
to mention the mtime bit in the Emacs manual, IMO. It probably should
be added to the elisp manual.



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3577; Package emacs. (Thu, 18 Jun 2009 07:50:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teemu Likonen <tlikonen <at> iki.fi>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 18 Jun 2009 07:50:06 GMT) Full text and rfc822 format available.

Message #20 received at 3577 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: 3577 <at> debbugs.gnu.org
Subject: Re: bug#3577: 23.0.94; Info manual does not explain MTIME argument for dir-locals-set-directory-class
Date: Thu, 18 Jun 2009 10:44:14 +0300
On 2009-06-18 02:58 (-0400), Glenn Morris wrote:

> The mtime argument is now optional, so there is no error, and no need
> to mention the mtime bit in the Emacs manual, IMO.

If I understand the MTIME argument correctly it is (mostly) for Emacs's
internal use to handle .dir-locals.el files. So I agree, now that MTIME
is optional argument it's not necessary to mention it in the Emacs
manual.

> It probably should be added to the elisp manual.

But as you said I think it should be documented in this lower-level
manual.



Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Fri, 25 Feb 2011 07:59:02 GMT) Full text and rfc822 format available.

Notification sent to Teemu Likonen <tlikonen <at> iki.fi>:
bug acknowledged by developer. (Fri, 25 Feb 2011 07:59:02 GMT) Full text and rfc822 format available.

Message #25 received at 3577-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 3577-done <at> debbugs.gnu.org
Subject: Re: bug#3577: 23.0.94; Info manual does not explain MTIME argument for
	dir-locals-set-directory-class
Date: Fri, 25 Feb 2011 02:58:36 -0500
Version: 23.3

I documented the mtime argument in the lispref.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#3577; Package emacs. (Fri, 25 Feb 2011 08:09:01 GMT) Full text and rfc822 format available.

Message #28 received at 3577 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 3577 <at> debbugs.gnu.org
Subject: Re: bug#3577: 23.0.94; Info manual does not explain MTIME argument for
	dir-locals-set-directory-class
Date: Fri, 25 Feb 2011 03:08:24 -0500
Actually my commit appears to be hanging at the moment, but I'll
actually commit it when I am able to.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Mar 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.