Warning when a buffer is beeing reloaded is wise as a
general rule, but sometimes there are files you're
editing that you *know* will change. Typical examples
are:
- system log files
- reports of unit tests
Then it would be useful to have these buffers beeing
reloaded without beeing prompted.
A trivial though not ideal solution would be to add a
4th option "autmatic reload, no confirmation" to the
saving global option.
A better solution would be to provide a per-buffer
option, e.g. "don't prompt when reloading"
It would also be very useful, at least to me, to turn
off this prompt in a macro, that is, if this option
was available in the bean shell
Logged In: YES
user_id=1486645
Yes, I need the 4th option "autmatic reload, no
confirmation" too.
Logged In: YES
user_id=187628
Another option would be to use the LogViewer plugin for such
files. It sounds like the files you're talking about aren't
files that you want to edit anyway, so LogViewer might be a
good solution.
Logged In: YES
user_id=1486645
I'd like it for any file - without logviewer. It's often
very annoying to commit the dialog box...
Logged In: YES
user_id=279783
Dale,
unfortunately, the log viewer can't be regarded as a
solution for this problem. With log viewer, a file is
displayed in a very simple text area, without syntax
highlighting, folding, macros, and so on. The log viewer
gives you *one* feature (no prompt) but you miss *all*
other features that makes jedit powerful when editing and
even displaying text.
Logged In: YES
user_id=900003
At the same time, we want a cancel button to not reload the
changed text. This is helpful when I am working on a shared
file, and someone else updates that file, with cancel button
I can cancel reloading, at the same time i know there is an
update to that file, so I would copy the changes which I
have made and then reopen the file.
With this my changes would not be lost by automatic reloading
Logged In: YES
user_id=1037294
"Automatic reload, no confirmation" as a general option
would be fairly easy to implement, because the needed
options are already there.
A buffer flag to allow "instant reload" for individual
buffers could be integrated into the buffer options pane.
This flag could be made public and accessible to BeanShell
macros.
We could also have all four options on the buffer options
pane to override the global settings individually. Then a
cancel button would not be needed. The logic to check for
the right thing to do and the BeanShell connection would of
course be somewhat more complicated.
Logged In: YES
user_id=1037294
I have started to implement this feature. The global
settings are copied to each buffer on creation and can be
modified in the buffer's option pane. I think I'll keep the
current behaviour for deleted files - thoughts?
Logged In: YES
user_id=279783
Hi Martin,
thanks for your efforts. Your comment makes me wonder: will
this per-buffer option be transient or persistent when
stopping & restarting JEdit ?
Logged In: YES
user_id=1037294
For the moment it will be transient, as buffers are not
persistent. I am not quite sure where these per-buffer
options could be stored best - presumably as attributes in
the file "perspective.xml" along with the list of open buffers.
Logged In: YES
user_id=187628
Would it make sense to have these be a buffer-local property?
Logged In: YES
user_id=1037294
I checked in the code into SVN. It will be in 4.3pre8.
There is now a fourth selection "autoreload without
notification" in the combobox on the general options pane.
The same combobox appears also on the buffer options pane,
so individual buffers can override the global setting.
The buffer autoreload settings are saved to perspective.xml
and are reloaded when the file is reopened automatically
after re-starting jEdit. This seems a better solution than
to insert buffer-local properties into a log file, for
example. If the buffer is closed manually, the settings are
not stored.