GNU bug report logs - #13836
24.3.50; `put-text-property' creates lock files for indirect buffer despite `with-silent-modifications'

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 27 Feb 2013 17:40:02 UTC

Severity: normal

Found in version 24.3.50

Fixed in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

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 13836 in the body.
You can then email your comments to 13836 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-gnu-emacs <at> gnu.org:
bug#13836; Package emacs. (Wed, 27 Feb 2013 17:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Feb 2013 17:40:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
	`put-text-property' creates lock files for indirect buffer despite
	`with-silent-modifications'
Date: Wed, 27 Feb 2013 21:36:25 +0400
1. Open a file that has some syntax highlighting in the associated mode
(e.g. ~/test.js, in js-mode).
2. (switch-to-buffer (make-indirect-buffer (current-buffer) "foo"))
3. M-x js-mode
4. Observe the created .#test.js symlink.

* (buffer-modified-p) returns nil in both buffers.
* The lock file won't be removed when the indirect and the base buffer
  are killed, and even after Emacs is killed.
* If I remove the lock file manually, it will be re-created each time
  `put-text-property' is called.
* Possibly related to Bug#3038.
* Reproduces in 24.2 and 23.4, so not a regression, as far as 24.3 is
  concerned.

Here's a typical Lisp-level backtrace:

(gdb) xbacktrace
"put-text-property" (0xffff7ea0)
"jit-lock-refontify" (0xffff83b0)
"jit-lock-mode" (0xffff88e0)
"jit-lock-register" (0xffff8de0)
"font-lock-turn-on-thing-lock" (0xffff92f0)
"font-lock-mode-internal" (0xffff97f0)
"font-lock-default-function" (0xffff9cf0)
"font-lock-mode" (0xffffa1f0)
"turn-on-font-lock" (0xffffa6d0)
"turn-on-font-lock-if-desired" (0xffffabc0)
"global-font-lock-mode-enable-in-buffers" (0xffffb148)
"run-hooks" (0xffffb230)
"run-mode-hooks" (0xffffb730)
"js-mode" (0xffffbc40)

(Same thing happens inside `syntax-propertize', so it's not just jit-lock).

Abbreviated C backtrace:

(gdb) backtrace
#0  lock_file (fn=26156449) at filelock.c:615
#1  0x0000000000630043 in prepare_to_modify_buffer (start=1, end=38, 
    preserve_ptr=0x0) at insdel.c:1829
#2  0x000000000062faf0 in modify_region_1 (start=1, end=38, 
    preserve_chars_modiff=true) at insdel.c:1763
#3  0x0000000000759df0 in modify_region (buffer=40447669, start=4, end=152)
    at textprop.c:97
#4  0x000000000075e9f0 in Fadd_text_properties (start=4, end=152, 
    properties=39370150, object=40447669) at textprop.c:1178
#5  0x000000000075ee63 in Fput_text_property (start=4, end=152, 
    property=15828690, value=15589922, object=15589922) at textprop.c:1240
#6  0x00000000006ba77c in Ffuncall (nargs=5, args=0x7fffffff7e98)
    at eval.c:2691
#7  0x000000000072bf41 in exec_byte_code (bytestr=13193993, vector=13194165, 
    maxdepth=24, args_template=15589922, nargs=0, args=0x0) at bytecode.c:898

In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0)
 of 2013-02-27 on vbx
Bzr revision: 111886 michael.albinus <at> gmx.de-20130227092013-ragyq0ly29qocc47
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Ubuntu 12.10




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13836; Package emacs. (Thu, 15 Aug 2019 06:37:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13836 <at> debbugs.gnu.org
Subject: Re: bug#13836: 24.3.50; `put-text-property' creates lock files for
 indirect buffer despite `with-silent-modifications'
Date: Wed, 14 Aug 2019 23:36:34 -0700
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> 1. Open a file that has some syntax highlighting in the associated mode
> (e.g. ~/test.js, in js-mode).
> 2. (switch-to-buffer (make-indirect-buffer (current-buffer) "foo"))
> 3. M-x js-mode
> 4. Observe the created .#test.js symlink.

I'm unable to reproduce this bug in Emacs 27.  Instead I get (when
saying `M-x js-mode'):

---
Not enabling jit-lock: it does not work in indirect buffer
---

So has this been fixed by now or is this just some...  other thing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Tue, 24 Dec 2019 20:17:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Tue, 24 Dec 2019 20:17:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 13836-done <at> debbugs.gnu.org
Subject: Re: bug#13836: 24.3.50; `put-text-property' creates lock files for
 indirect buffer despite `with-silent-modifications'
Date: Tue, 24 Dec 2019 22:16:13 +0200
Version: 25.1

On 15.08.2019 9:36, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
> 
>> 1. Open a file that has some syntax highlighting in the associated mode
>> (e.g. ~/test.js, in js-mode).
>> 2. (switch-to-buffer (make-indirect-buffer (current-buffer) "foo"))
>> 3. M-x js-mode
>> 4. Observe the created .#test.js symlink.
> 
> I'm unable to reproduce this bug in Emacs 27.  Instead I get (when
> saying `M-x js-mode'):
> 
> ---
> Not enabling jit-lock: it does not work in indirect buffer
> ---
> 
> So has this been fixed by now or is this just some...  other thing?

Thanks for looking into this.

Seems fixed to me as well. Actually can't reproduce going as far back as 
Emacs 25 (even by calling put-text-property inside 
with-silent-modifications manually). So, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Jan 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 101 days ago.

Previous Next


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