emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: files opened


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: files opened
Date: Sun, 15 Aug 2004 21:31:47 +0800
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Ccing the mailing list to see if someone can come up with a nice way
to solve this problem. =)

address@hidden writes:

> When I have only the day planner file open, and I save it after a
> modification, I find that the procedure has opened all planner pages
> that are linked to from that page. That's a bit like opening a web
> page in a browser and having it open for you all pages directly
> linked from the page. It also makes buffer lists quite large, so
> that they are harder to deal with, and highlighting takes quite a
> bit of the time as well.

> Better IMO would be to close files that were not opened before,
> unless the interactive command given by the user implies that the
> file should remain open (e.g. planner-goto, etc.). I don't really
> know how one could go about doing this. Perhaps the easiest is by
> checking if a file is opened first, and restoring the situation
> after updating it. It seems that planner-update-task() is to
> "blame". (There doesn't seem to be a simple defadvice() way round
> it.)

Excellent idea. =) Closing files immediately after planner-update-task
will result in lots of churning, though. Maybe we can do it the way
the calendar does it? I know there's similar code in
planner-kill-calendar-files. Before saving, we can make a list of all
open planner files, and then restore this list after all the saving is
finished.

> And something else: In planner-id.el, I had to comment out the
> line with
>         ((boundp 'write-file-hooks) 'write-file-hooks)
> at the end of the file, because it seemed to have a buffer-local
> effect (the global value was erased for that buffer), and
> local-write-file-hooks should be used for buffer-local settings.
> (in Emacs 21.3 - latest _release_).

Okay, think it's fixed in dev...

-- 
Sacha Chua <address@hidden> - open source geekette
interests: emacs, gnu/linux, making computer science education fun
wearable computing, personal information management
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C




reply via email to

[Prev in Thread] Current Thread [Next in Thread]