unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13836: 24.3.50; `put-text-property' creates lock files for indirect buffer despite `with-silent-modifications'
@ 2013-02-27 17:36 Dmitry Gutov
  2019-08-15  6:36 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2013-02-27 17:36 UTC (permalink / raw)
  To: 13836

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@gmx.de-20130227092013-ragyq0ly29qocc47
Windowing system distributor `The X.Org Foundation', version 11.0.11300000
System Description:	Ubuntu 12.10





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

* bug#13836: 24.3.50; `put-text-property' creates lock files for indirect buffer despite `with-silent-modifications'
  2013-02-27 17:36 bug#13836: 24.3.50; `put-text-property' creates lock files for indirect buffer despite `with-silent-modifications' Dmitry Gutov
@ 2019-08-15  6:36 ` Lars Ingebrigtsen
  2019-12-24 20:16   ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-08-15  6:36 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 13836

Dmitry Gutov <dgutov@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





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

* bug#13836: 24.3.50; `put-text-property' creates lock files for indirect buffer despite `with-silent-modifications'
  2019-08-15  6:36 ` Lars Ingebrigtsen
@ 2019-12-24 20:16   ` Dmitry Gutov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Gutov @ 2019-12-24 20:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 13836-done

Version: 25.1

On 15.08.2019 9:36, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov@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.





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

end of thread, other threads:[~2019-12-24 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-27 17:36 bug#13836: 24.3.50; `put-text-property' creates lock files for indirect buffer despite `with-silent-modifications' Dmitry Gutov
2019-08-15  6:36 ` Lars Ingebrigtsen
2019-12-24 20:16   ` Dmitry Gutov

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