Topic: turn a buffer's 'modified' attribute off (1 of 6), Read 72 times
Conf: VEDIT Macro Language Support
From: Deleted User
Date: Monday, March 15, 1999 08:12 AM

I would like to be able to make changes in a buffer (usually with a macro) but turn it's "modified" indicator off, so that I could quit the buffer without getting the message that it has changed. This would be helpful for use with macros that use buffers for display purposes (like my condensing macros posted in this conference), where the buffer isn't associated with a file. Perhaps one way to do this would be just that - if a buffer isn't associated with an open file, it would not give a warning on a quit (of course, having a controllable switch would be ideal).

Rich

 


Topic: turn a buffer's 'modified' attribute off (2 of 6), Read 65 times
Conf: VEDIT Macro Language Support
From: Scott Lambert
Date: Monday, March 15, 1999 10:24 AM

On 3/15/99 8:12:52 AM, Richard Hureau wrote:
>I would like to be able to
>make changes in a buffer
>(usually with a macro) but
>turn it's "modified" indicator
>off, so that I could quit the
>buffer without getting the
>message that it has changed.
>This would be helpful for use
>with macros that use buffers
>for display purposes

I must misunderstand what you want, because you can already quit/close a modified buffer, try :

Buf_quit(ok)

You could also use buf_empty(ok) followed by buf_close

Scott Lambert

 


Topic: turn a buffer's 'modified' attribute off (3 of 6), Read 68 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Monday, March 15, 1999 05:58 PM

Your requested switch/command does not exist and is not needed because there is a better way.

Use the "extra" buffers 33-36. When you exit, VEDIT makes no attempt to save their contents. You can open files in the extra buffers with the "FORCE" option, e.g. File_Open("filename",FORCE). You can even
modify files in the extra buffers if you
invoked VEDIT with the "-b" (browse-only)option.
Casual (i.e. Visual mode) users cannot access the "extra" buffers. They are designed to be general-purpose "scratch" buffers used only by the macro language.
Your macros can use Buf_Free(EXTRA) to get the number of a free/unused buffer. The WILDFILE.VDM is just one of our macros that uses the "extra" macros.

 


Topic: turn a buffer's 'modified' attribute off (4 of 6), Read 71 times
Conf: VEDIT Macro Language Support
From: Deleted User
Date: Monday, March 15, 1999 06:32 PM

Ted,
Thanks for the suggestion. I'd forgotten about those buffers, and I think when I knew about them, I didn't realize that they could be used for what I was looking for.

Scott, I know how to quit a buffer from inside a macro. What I wanted was a way for a user to quit from a display buffer that I had built in a macro, without the user having to answer the "Buffer has changed, do you really want to quit?" question.

 


Topic: turn a buffer's 'modified' attribute off (5 of 6), Read 68 times
Conf: VEDIT Macro Language Support
From: Deleted User
Date: Monday, March 29, 1999 10:23 AM

Hi. I have a question about "extra" buffers 33-36. Based on what you
said earlier, I thought I could use say buffer 33 to display some info
to a user, but then the user could quit the buffer (File->Close) without
being prompted with Save Current File? This does not seem to be the
case. I modified some of my macros like CONDCOB (which displays a
condensed view of source) to use buffer 33 for the display. However when I do a File->Close when I am viewing buffer 33, it still says Save Current File? This is what I want to avoid, since there is no file open,
and the buffer is just being used for display purposes. Am I doing
something wrong?

 


Topic: turn a buffer's 'modified' attribute off (6 of 6), Read 62 times
Conf: VEDIT Macro Language Support
From: Ted Green
Date: Wednesday, April 28, 1999 08:02 AM

If you are currently switched to an "extra" buffer (33-36), VEDIT will prompt whether you want to save it.

You should switch to the extra buffer, use it and then switch back to the original "normal" buffer. Then exit.

This is my opinion of the best balance between flexibility and safety.