jed-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

RE: How to reload a buffer


> is there a way in (plain) Jed I can reload the contents of the buffer
> if the file changed on disk? I search something like reload_buffer
> from bufutils (jed-modes).

This is what I use, and find quite helpful:

% reload if the disk file is newer as buffer
define reload ()
{
    variable file, dir, flags;
    (file,dir,,flags) = getbuf_info();
    file = dircat (dir, file);
    if (flags & 4) {
	buffer_keystring ("yes\r");	% yes = reload
	() = find_file (file);
    }
}
setkey("reload",	"^X^R");


Doing it without simulating keystrokes would be nicer.

/mark
This e-mail message and any attachments may contain 
legally privileged, confidential or proprietary Information, or 
information otherwise protected by law of ArvinMeritor, Inc., 
its affiliates, or third parties. This notice serves as marking of 
its ?Confidential? status as defined in any confidentiality 
agreements concerning the sender and recipient. If you are 
not the intended recipient(s), or the employee or agent 
responsible for delivery of this message to the intended 
recipient(s), you are hereby notified that any dissemination, 
distribution or copying of this e-mail message is strictly 
prohibited. If you have received this message in error, please 
immediately notify the sender and delete this e-mail message 
from your computer.


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]