emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug: using remember can cause data corruption in other buffers
@ 2009-03-26  3:13 Samuel Wales
  2009-03-26  3:20 ` Samuel Wales
  2009-03-26  3:40 ` Carsten Dominik
  0 siblings, 2 replies; 3+ messages in thread
From: Samuel Wales @ 2009-03-26  3:13 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

The following form in org-remember.el appears to set the global value.

    (setq auto-save-visited-file-name t)

This is the right thing for remember buffers, but it should be
buffer-local.  It could lead to data corruption in other buffers if
you make changes that you don't intend to be permanent.

I think that

  (set (make-variable-buffer-local ...) t)

would fix it.

This might or might not also fix a bug where emacs thinks that another
process is locking the file that is currently being edited.  I don't
know why.

Once this is fixed, I recommend that everybody who used git within the
last day or so, and I think set the remember directory, get the fixed
version and check the value of that variable.

Thanks.

-- 
Myalgic encephalomyelitis denialism is causing death (decades early;
Jason et al. 2006) and severe suffering (worse than nearly all other
diseases studied; e.g. Schweitzer et al. 1995) and grossly corrupting
science.  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: bug: using remember can cause data corruption in other buffers
  2009-03-26  3:13 bug: using remember can cause data corruption in other buffers Samuel Wales
@ 2009-03-26  3:20 ` Samuel Wales
  2009-03-26  3:40 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2009-03-26  3:20 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Mar 25, 2009 at 20:13, Samuel Wales <samologist@gmail.com> wrote:
>  (set (make-variable-buffer-local ...) t)

That should be make-local-variable .

-- 
Myalgic encephalomyelitis denialism is causing death (decades early;
Jason et al. 2006) and severe suffering (worse than nearly all other
diseases studied; e.g. Schweitzer et al. 1995) and grossly corrupting
science.  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: bug: using remember can cause data corruption in other buffers
  2009-03-26  3:13 bug: using remember can cause data corruption in other buffers Samuel Wales
  2009-03-26  3:20 ` Samuel Wales
@ 2009-03-26  3:40 ` Carsten Dominik
  1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2009-03-26  3:40 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode


On Mar 26, 2009, at 4:13 AM, Samuel Wales wrote:

> Hi Carsten,
>
> The following form in org-remember.el appears to set the global value.
>
>    (setq auto-save-visited-file-name t)
>
> This is the right thing for remember buffers, but it should be
> buffer-local.  It could lead to data corruption in other buffers if
> you make changes that you don't intend to be permanent.
>
> I think that
>
>  (set (make-variable-buffer-local ...) t)
>
> would fix it.

Applied, thanks.

>
> This might or might not also fix a bug where emacs thinks that another
> process is locking the file that is currently being edited.  I don't
> know why.
>
> Once this is fixed, I recommend that everybody who used git within the
> last day or so, and I think set the remember directory

Yes, this wil only have caused a problem for people who actually set  
the backup
directory.

Thank you.

- Carsten

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

end of thread, other threads:[~2009-03-26  3:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-26  3:13 bug: using remember can cause data corruption in other buffers Samuel Wales
2009-03-26  3:20 ` Samuel Wales
2009-03-26  3:40 ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).