unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1501: Emacs 22 loses undo buffer
@ 2008-12-05 16:51 Emerick Rogul
  2019-08-20 18:36 ` Stefan Kangas
  0 siblings, 1 reply; 17+ messages in thread
From: Emerick Rogul @ 2008-12-05 16:51 UTC (permalink / raw)
  To: bug-gnu-emacs

Using Emacs 22 on Windows (emacs-version reports "GNU Emacs 22.3.1
(i386-mingw-nt5.1.2600)  of 2008-09-06 on SOFT-MJASON"):

Started emacs with emacs -q --no-site-file.  Opened a C header file
(foo.h) containing about 100-200 lines of code.  Deleted approximately
100 or so lines of code using C-k.  Pressed and held C-/ to undo the
deletions.  Instead of eventually seeing all of my deletions restored,
Emacs complained about "No further undo information" after undeleting
several lines of text.

This works as expected with Emacs 21.2.

Please let me know if I can provide any additional information.

Thanks,

-Emerick







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

* bug#1501: Emacs 22 loses undo buffer
@ 2008-12-06  4:01 Chong Yidong
  0 siblings, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2008-12-06  4:01 UTC (permalink / raw)
  To: Emerick Rogul; +Cc: 1501

There is insufficient information to diagnose the problem you reported.
If possible, please provide the C header file that demonstrates this
problem.  Also, provide *exact* instructions for reproducing the
problem---we need the exact keystrokes you entered, not a vague
description like "deleted approximately 100 or so lines".

Thanks.






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

* bug#1501: Emacs 22 loses undo buffer
@ 2008-12-06 21:02 Emerick Rogul
  2008-12-07  1:31 ` Chong Yidong
  0 siblings, 1 reply; 17+ messages in thread
From: Emerick Rogul @ 2008-12-06 21:02 UTC (permalink / raw)
  To: 1501; +Cc: cyd

[-- Attachment #1: Type: text/plain, Size: 2302 bytes --]

Header file attached, although the problem occurs with any header file
(i.e., it's not specific to this particular file).  The trace below
contains the exact key sequence that I typed.

In GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
 of 2008-09-06 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  abbrev-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> C-x C-f <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> c l
r <tab> <return> C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-/ C-/ C-/ C-/ C-/ C-/ C-/
C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
C-/ ESC x r e p o r t - e m a <tab> <return>

Recent messages:
("C:\\emacs\\bin\\emacs.exe")
Loading encoded-kb...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading cc-mode...done
Undo! [4 times]
undo-more: No further undo information [17 times]
Loading emacsbug...done

[-- Attachment #2: clrdata.h --]
[-- Type: text/plain, Size: 32480 bytes --]



/* this ALWAYS GENERATED file contains the definitions for the interfaces */


 /* File created by MIDL compiler version 6.00.0366 */
/* Compiler settings for clrdata.idl:
    Oicf, W1, Zp8, env=Win32 (32b run)
    protocol : dce , ms_ext, c_ext, robust
    error checks: allocation ref bounds_check enum stub_data 
    VC __declspec() decoration level: 
         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
         DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING(  )

#pragma warning( disable: 4049 )  /* more than 64k source lines */


/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif

#include "rpc.h"
#include "rpcndr.h"

#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__

#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif /*COM_NO_WINDOWS_H*/

#ifndef __clrdata_h__
#define __clrdata_h__

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

/* Forward Declarations */ 

#ifndef __ICLRDataTarget_FWD_DEFINED__
#define __ICLRDataTarget_FWD_DEFINED__
typedef interface ICLRDataTarget ICLRDataTarget;
#endif 	/* __ICLRDataTarget_FWD_DEFINED__ */


#ifndef __ICLRDataTarget2_FWD_DEFINED__
#define __ICLRDataTarget2_FWD_DEFINED__
typedef interface ICLRDataTarget2 ICLRDataTarget2;
#endif 	/* __ICLRDataTarget2_FWD_DEFINED__ */


#ifndef __ICLRMetadataLocator_FWD_DEFINED__
#define __ICLRMetadataLocator_FWD_DEFINED__
typedef interface ICLRMetadataLocator ICLRMetadataLocator;
#endif 	/* __ICLRMetadataLocator_FWD_DEFINED__ */


#ifndef __ICLRDataEnumMemoryRegionsCallback_FWD_DEFINED__
#define __ICLRDataEnumMemoryRegionsCallback_FWD_DEFINED__
typedef interface ICLRDataEnumMemoryRegionsCallback ICLRDataEnumMemoryRegionsCallback;
#endif 	/* __ICLRDataEnumMemoryRegionsCallback_FWD_DEFINED__ */


#ifndef __ICLRDataEnumMemoryRegions_FWD_DEFINED__
#define __ICLRDataEnumMemoryRegions_FWD_DEFINED__
typedef interface ICLRDataEnumMemoryRegions ICLRDataEnumMemoryRegions;
#endif 	/* __ICLRDataEnumMemoryRegions_FWD_DEFINED__ */


/* header files for imported files */
#include "unknwn.h"

#ifdef __cplusplus
extern "C"{
#endif 

void * __RPC_USER MIDL_user_allocate(size_t);
void __RPC_USER MIDL_user_free( void * ); 

/* interface __MIDL_itf_clrdata_0000 */
/* [local] */ 






typedef ULONG64 CLRDATA_ADDRESS;

STDAPI CLRDataCreateInstance(REFIID iid, ICLRDataTarget* target, void** iface);
typedef HRESULT (STDAPICALLTYPE* PFN_CLRDataCreateInstance)(REFIID iid, ICLRDataTarget* target, void** iface);


extern RPC_IF_HANDLE __MIDL_itf_clrdata_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_clrdata_0000_v0_0_s_ifspec;

#ifndef __ICLRDataTarget_INTERFACE_DEFINED__
#define __ICLRDataTarget_INTERFACE_DEFINED__

/* interface ICLRDataTarget */
/* [unique][uuid][object] */ 


EXTERN_C const IID IID_ICLRDataTarget;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("3E11CCEE-D08B-43e5-AF01-32717A64DA03")
    ICLRDataTarget : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE GetMachineType( 
            /* [out] */ ULONG32 *machineType) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE GetPointerSize( 
            /* [out] */ ULONG32 *pointerSize) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE GetImageBase( 
            /* [string][in] */ LPCWSTR imagePath,
            /* [out] */ CLRDATA_ADDRESS *baseAddress) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE ReadVirtual( 
            /* [in] */ CLRDATA_ADDRESS address,
            /* [length_is][size_is][out] */ BYTE *buffer,
            /* [in] */ ULONG32 bytesRequested,
            /* [out] */ ULONG32 *bytesRead) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE WriteVirtual( 
            /* [in] */ CLRDATA_ADDRESS address,
            /* [size_is][in] */ BYTE *buffer,
            /* [in] */ ULONG32 bytesRequested,
            /* [out] */ ULONG32 *bytesWritten) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE GetTLSValue( 
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 index,
            /* [out] */ CLRDATA_ADDRESS *value) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE SetTLSValue( 
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 index,
            /* [in] */ CLRDATA_ADDRESS value) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE GetCurrentThreadID( 
            /* [out] */ ULONG32 *threadID) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE GetThreadContext( 
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 contextFlags,
            /* [in] */ ULONG32 contextSize,
            /* [size_is][out] */ BYTE *context) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE SetThreadContext( 
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 contextSize,
            /* [size_is][in] */ BYTE *context) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE Request( 
            /* [in] */ ULONG32 reqCode,
            /* [in] */ ULONG32 inBufferSize,
            /* [size_is][in] */ BYTE *inBuffer,
            /* [in] */ ULONG32 outBufferSize,
            /* [size_is][out] */ BYTE *outBuffer) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct ICLRDataTargetVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            ICLRDataTarget * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            ICLRDataTarget * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            ICLRDataTarget * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetMachineType )( 
            ICLRDataTarget * This,
            /* [out] */ ULONG32 *machineType);
        
        HRESULT ( STDMETHODCALLTYPE *GetPointerSize )( 
            ICLRDataTarget * This,
            /* [out] */ ULONG32 *pointerSize);
        
        HRESULT ( STDMETHODCALLTYPE *GetImageBase )( 
            ICLRDataTarget * This,
            /* [string][in] */ LPCWSTR imagePath,
            /* [out] */ CLRDATA_ADDRESS *baseAddress);
        
        HRESULT ( STDMETHODCALLTYPE *ReadVirtual )( 
            ICLRDataTarget * This,
            /* [in] */ CLRDATA_ADDRESS address,
            /* [length_is][size_is][out] */ BYTE *buffer,
            /* [in] */ ULONG32 bytesRequested,
            /* [out] */ ULONG32 *bytesRead);
        
        HRESULT ( STDMETHODCALLTYPE *WriteVirtual )( 
            ICLRDataTarget * This,
            /* [in] */ CLRDATA_ADDRESS address,
            /* [size_is][in] */ BYTE *buffer,
            /* [in] */ ULONG32 bytesRequested,
            /* [out] */ ULONG32 *bytesWritten);
        
        HRESULT ( STDMETHODCALLTYPE *GetTLSValue )( 
            ICLRDataTarget * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 index,
            /* [out] */ CLRDATA_ADDRESS *value);
        
        HRESULT ( STDMETHODCALLTYPE *SetTLSValue )( 
            ICLRDataTarget * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 index,
            /* [in] */ CLRDATA_ADDRESS value);
        
        HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( 
            ICLRDataTarget * This,
            /* [out] */ ULONG32 *threadID);
        
        HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( 
            ICLRDataTarget * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 contextFlags,
            /* [in] */ ULONG32 contextSize,
            /* [size_is][out] */ BYTE *context);
        
        HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( 
            ICLRDataTarget * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 contextSize,
            /* [size_is][in] */ BYTE *context);
        
        HRESULT ( STDMETHODCALLTYPE *Request )( 
            ICLRDataTarget * This,
            /* [in] */ ULONG32 reqCode,
            /* [in] */ ULONG32 inBufferSize,
            /* [size_is][in] */ BYTE *inBuffer,
            /* [in] */ ULONG32 outBufferSize,
            /* [size_is][out] */ BYTE *outBuffer);
        
        END_INTERFACE
    } ICLRDataTargetVtbl;

    interface ICLRDataTarget
    {
        CONST_VTBL struct ICLRDataTargetVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define ICLRDataTarget_QueryInterface(This,riid,ppvObject)	\
    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)

#define ICLRDataTarget_AddRef(This)	\
    (This)->lpVtbl -> AddRef(This)

#define ICLRDataTarget_Release(This)	\
    (This)->lpVtbl -> Release(This)


#define ICLRDataTarget_GetMachineType(This,machineType)	\
    (This)->lpVtbl -> GetMachineType(This,machineType)

#define ICLRDataTarget_GetPointerSize(This,pointerSize)	\
    (This)->lpVtbl -> GetPointerSize(This,pointerSize)

#define ICLRDataTarget_GetImageBase(This,imagePath,baseAddress)	\
    (This)->lpVtbl -> GetImageBase(This,imagePath,baseAddress)

#define ICLRDataTarget_ReadVirtual(This,address,buffer,bytesRequested,bytesRead)	\
    (This)->lpVtbl -> ReadVirtual(This,address,buffer,bytesRequested,bytesRead)

#define ICLRDataTarget_WriteVirtual(This,address,buffer,bytesRequested,bytesWritten)	\
    (This)->lpVtbl -> WriteVirtual(This,address,buffer,bytesRequested,bytesWritten)

#define ICLRDataTarget_GetTLSValue(This,threadID,index,value)	\
    (This)->lpVtbl -> GetTLSValue(This,threadID,index,value)

#define ICLRDataTarget_SetTLSValue(This,threadID,index,value)	\
    (This)->lpVtbl -> SetTLSValue(This,threadID,index,value)

#define ICLRDataTarget_GetCurrentThreadID(This,threadID)	\
    (This)->lpVtbl -> GetCurrentThreadID(This,threadID)

#define ICLRDataTarget_GetThreadContext(This,threadID,contextFlags,contextSize,context)	\
    (This)->lpVtbl -> GetThreadContext(This,threadID,contextFlags,contextSize,context)

#define ICLRDataTarget_SetThreadContext(This,threadID,contextSize,context)	\
    (This)->lpVtbl -> SetThreadContext(This,threadID,contextSize,context)

#define ICLRDataTarget_Request(This,reqCode,inBufferSize,inBuffer,outBufferSize,outBuffer)	\
    (This)->lpVtbl -> Request(This,reqCode,inBufferSize,inBuffer,outBufferSize,outBuffer)

#endif /* COBJMACROS */


#endif 	/* C style interface */



HRESULT STDMETHODCALLTYPE ICLRDataTarget_GetMachineType_Proxy( 
    ICLRDataTarget * This,
    /* [out] */ ULONG32 *machineType);


void __RPC_STUB ICLRDataTarget_GetMachineType_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_GetPointerSize_Proxy( 
    ICLRDataTarget * This,
    /* [out] */ ULONG32 *pointerSize);


void __RPC_STUB ICLRDataTarget_GetPointerSize_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_GetImageBase_Proxy( 
    ICLRDataTarget * This,
    /* [string][in] */ LPCWSTR imagePath,
    /* [out] */ CLRDATA_ADDRESS *baseAddress);


void __RPC_STUB ICLRDataTarget_GetImageBase_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_ReadVirtual_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ CLRDATA_ADDRESS address,
    /* [length_is][size_is][out] */ BYTE *buffer,
    /* [in] */ ULONG32 bytesRequested,
    /* [out] */ ULONG32 *bytesRead);


void __RPC_STUB ICLRDataTarget_ReadVirtual_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_WriteVirtual_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ CLRDATA_ADDRESS address,
    /* [size_is][in] */ BYTE *buffer,
    /* [in] */ ULONG32 bytesRequested,
    /* [out] */ ULONG32 *bytesWritten);


void __RPC_STUB ICLRDataTarget_WriteVirtual_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_GetTLSValue_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ ULONG32 threadID,
    /* [in] */ ULONG32 index,
    /* [out] */ CLRDATA_ADDRESS *value);


void __RPC_STUB ICLRDataTarget_GetTLSValue_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_SetTLSValue_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ ULONG32 threadID,
    /* [in] */ ULONG32 index,
    /* [in] */ CLRDATA_ADDRESS value);


void __RPC_STUB ICLRDataTarget_SetTLSValue_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_GetCurrentThreadID_Proxy( 
    ICLRDataTarget * This,
    /* [out] */ ULONG32 *threadID);


void __RPC_STUB ICLRDataTarget_GetCurrentThreadID_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_GetThreadContext_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ ULONG32 threadID,
    /* [in] */ ULONG32 contextFlags,
    /* [in] */ ULONG32 contextSize,
    /* [size_is][out] */ BYTE *context);


void __RPC_STUB ICLRDataTarget_GetThreadContext_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_SetThreadContext_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ ULONG32 threadID,
    /* [in] */ ULONG32 contextSize,
    /* [size_is][in] */ BYTE *context);


void __RPC_STUB ICLRDataTarget_SetThreadContext_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget_Request_Proxy( 
    ICLRDataTarget * This,
    /* [in] */ ULONG32 reqCode,
    /* [in] */ ULONG32 inBufferSize,
    /* [size_is][in] */ BYTE *inBuffer,
    /* [in] */ ULONG32 outBufferSize,
    /* [size_is][out] */ BYTE *outBuffer);


void __RPC_STUB ICLRDataTarget_Request_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);



#endif 	/* __ICLRDataTarget_INTERFACE_DEFINED__ */


#ifndef __ICLRDataTarget2_INTERFACE_DEFINED__
#define __ICLRDataTarget2_INTERFACE_DEFINED__

/* interface ICLRDataTarget2 */
/* [unique][uuid][object] */ 


EXTERN_C const IID IID_ICLRDataTarget2;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("6d05fae3-189c-4630-a6dc-1c251e1c01ab")
    ICLRDataTarget2 : public ICLRDataTarget
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE AllocVirtual( 
            /* [in] */ CLRDATA_ADDRESS addr,
            /* [in] */ ULONG32 size,
            /* [in] */ ULONG32 typeFlags,
            /* [in] */ ULONG32 protectFlags,
            /* [out] */ CLRDATA_ADDRESS *virt) = 0;
        
        virtual HRESULT STDMETHODCALLTYPE FreeVirtual( 
            /* [in] */ CLRDATA_ADDRESS addr,
            /* [in] */ ULONG32 size,
            /* [in] */ ULONG32 typeFlags) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct ICLRDataTarget2Vtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            ICLRDataTarget2 * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            ICLRDataTarget2 * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            ICLRDataTarget2 * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetMachineType )( 
            ICLRDataTarget2 * This,
            /* [out] */ ULONG32 *machineType);
        
        HRESULT ( STDMETHODCALLTYPE *GetPointerSize )( 
            ICLRDataTarget2 * This,
            /* [out] */ ULONG32 *pointerSize);
        
        HRESULT ( STDMETHODCALLTYPE *GetImageBase )( 
            ICLRDataTarget2 * This,
            /* [string][in] */ LPCWSTR imagePath,
            /* [out] */ CLRDATA_ADDRESS *baseAddress);
        
        HRESULT ( STDMETHODCALLTYPE *ReadVirtual )( 
            ICLRDataTarget2 * This,
            /* [in] */ CLRDATA_ADDRESS address,
            /* [length_is][size_is][out] */ BYTE *buffer,
            /* [in] */ ULONG32 bytesRequested,
            /* [out] */ ULONG32 *bytesRead);
        
        HRESULT ( STDMETHODCALLTYPE *WriteVirtual )( 
            ICLRDataTarget2 * This,
            /* [in] */ CLRDATA_ADDRESS address,
            /* [size_is][in] */ BYTE *buffer,
            /* [in] */ ULONG32 bytesRequested,
            /* [out] */ ULONG32 *bytesWritten);
        
        HRESULT ( STDMETHODCALLTYPE *GetTLSValue )( 
            ICLRDataTarget2 * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 index,
            /* [out] */ CLRDATA_ADDRESS *value);
        
        HRESULT ( STDMETHODCALLTYPE *SetTLSValue )( 
            ICLRDataTarget2 * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 index,
            /* [in] */ CLRDATA_ADDRESS value);
        
        HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )( 
            ICLRDataTarget2 * This,
            /* [out] */ ULONG32 *threadID);
        
        HRESULT ( STDMETHODCALLTYPE *GetThreadContext )( 
            ICLRDataTarget2 * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 contextFlags,
            /* [in] */ ULONG32 contextSize,
            /* [size_is][out] */ BYTE *context);
        
        HRESULT ( STDMETHODCALLTYPE *SetThreadContext )( 
            ICLRDataTarget2 * This,
            /* [in] */ ULONG32 threadID,
            /* [in] */ ULONG32 contextSize,
            /* [size_is][in] */ BYTE *context);
        
        HRESULT ( STDMETHODCALLTYPE *Request )( 
            ICLRDataTarget2 * This,
            /* [in] */ ULONG32 reqCode,
            /* [in] */ ULONG32 inBufferSize,
            /* [size_is][in] */ BYTE *inBuffer,
            /* [in] */ ULONG32 outBufferSize,
            /* [size_is][out] */ BYTE *outBuffer);
        
        HRESULT ( STDMETHODCALLTYPE *AllocVirtual )( 
            ICLRDataTarget2 * This,
            /* [in] */ CLRDATA_ADDRESS addr,
            /* [in] */ ULONG32 size,
            /* [in] */ ULONG32 typeFlags,
            /* [in] */ ULONG32 protectFlags,
            /* [out] */ CLRDATA_ADDRESS *virt);
        
        HRESULT ( STDMETHODCALLTYPE *FreeVirtual )( 
            ICLRDataTarget2 * This,
            /* [in] */ CLRDATA_ADDRESS addr,
            /* [in] */ ULONG32 size,
            /* [in] */ ULONG32 typeFlags);
        
        END_INTERFACE
    } ICLRDataTarget2Vtbl;

    interface ICLRDataTarget2
    {
        CONST_VTBL struct ICLRDataTarget2Vtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define ICLRDataTarget2_QueryInterface(This,riid,ppvObject)	\
    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)

#define ICLRDataTarget2_AddRef(This)	\
    (This)->lpVtbl -> AddRef(This)

#define ICLRDataTarget2_Release(This)	\
    (This)->lpVtbl -> Release(This)


#define ICLRDataTarget2_GetMachineType(This,machineType)	\
    (This)->lpVtbl -> GetMachineType(This,machineType)

#define ICLRDataTarget2_GetPointerSize(This,pointerSize)	\
    (This)->lpVtbl -> GetPointerSize(This,pointerSize)

#define ICLRDataTarget2_GetImageBase(This,imagePath,baseAddress)	\
    (This)->lpVtbl -> GetImageBase(This,imagePath,baseAddress)

#define ICLRDataTarget2_ReadVirtual(This,address,buffer,bytesRequested,bytesRead)	\
    (This)->lpVtbl -> ReadVirtual(This,address,buffer,bytesRequested,bytesRead)

#define ICLRDataTarget2_WriteVirtual(This,address,buffer,bytesRequested,bytesWritten)	\
    (This)->lpVtbl -> WriteVirtual(This,address,buffer,bytesRequested,bytesWritten)

#define ICLRDataTarget2_GetTLSValue(This,threadID,index,value)	\
    (This)->lpVtbl -> GetTLSValue(This,threadID,index,value)

#define ICLRDataTarget2_SetTLSValue(This,threadID,index,value)	\
    (This)->lpVtbl -> SetTLSValue(This,threadID,index,value)

#define ICLRDataTarget2_GetCurrentThreadID(This,threadID)	\
    (This)->lpVtbl -> GetCurrentThreadID(This,threadID)

#define ICLRDataTarget2_GetThreadContext(This,threadID,contextFlags,contextSize,context)	\
    (This)->lpVtbl -> GetThreadContext(This,threadID,contextFlags,contextSize,context)

#define ICLRDataTarget2_SetThreadContext(This,threadID,contextSize,context)	\
    (This)->lpVtbl -> SetThreadContext(This,threadID,contextSize,context)

#define ICLRDataTarget2_Request(This,reqCode,inBufferSize,inBuffer,outBufferSize,outBuffer)	\
    (This)->lpVtbl -> Request(This,reqCode,inBufferSize,inBuffer,outBufferSize,outBuffer)


#define ICLRDataTarget2_AllocVirtual(This,addr,size,typeFlags,protectFlags,virt)	\
    (This)->lpVtbl -> AllocVirtual(This,addr,size,typeFlags,protectFlags,virt)

#define ICLRDataTarget2_FreeVirtual(This,addr,size,typeFlags)	\
    (This)->lpVtbl -> FreeVirtual(This,addr,size,typeFlags)

#endif /* COBJMACROS */


#endif 	/* C style interface */



HRESULT STDMETHODCALLTYPE ICLRDataTarget2_AllocVirtual_Proxy( 
    ICLRDataTarget2 * This,
    /* [in] */ CLRDATA_ADDRESS addr,
    /* [in] */ ULONG32 size,
    /* [in] */ ULONG32 typeFlags,
    /* [in] */ ULONG32 protectFlags,
    /* [out] */ CLRDATA_ADDRESS *virt);


void __RPC_STUB ICLRDataTarget2_AllocVirtual_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);


HRESULT STDMETHODCALLTYPE ICLRDataTarget2_FreeVirtual_Proxy( 
    ICLRDataTarget2 * This,
    /* [in] */ CLRDATA_ADDRESS addr,
    /* [in] */ ULONG32 size,
    /* [in] */ ULONG32 typeFlags);


void __RPC_STUB ICLRDataTarget2_FreeVirtual_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);



#endif 	/* __ICLRDataTarget2_INTERFACE_DEFINED__ */


#ifndef __ICLRMetadataLocator_INTERFACE_DEFINED__
#define __ICLRMetadataLocator_INTERFACE_DEFINED__

/* interface ICLRMetadataLocator */
/* [unique][uuid][object] */ 


EXTERN_C const IID IID_ICLRMetadataLocator;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("aa8fa804-bc05-4642-b2c5-c353ed22fc63")
    ICLRMetadataLocator : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE GetMetadata( 
            /* [in] */ LPCWSTR imagePath,
            /* [in] */ ULONG32 imageTimestamp,
            /* [in] */ ULONG32 imageSize,
            /* [in] */ GUID *mvid,
            /* [in] */ ULONG32 mdRva,
            /* [in] */ ULONG32 flags,
            /* [in] */ ULONG32 bufferSize,
            /* [length_is][size_is][out] */ BYTE *buffer,
            /* [out] */ ULONG32 *dataSize) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct ICLRMetadataLocatorVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            ICLRMetadataLocator * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            ICLRMetadataLocator * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            ICLRMetadataLocator * This);
        
        HRESULT ( STDMETHODCALLTYPE *GetMetadata )( 
            ICLRMetadataLocator * This,
            /* [in] */ LPCWSTR imagePath,
            /* [in] */ ULONG32 imageTimestamp,
            /* [in] */ ULONG32 imageSize,
            /* [in] */ GUID *mvid,
            /* [in] */ ULONG32 mdRva,
            /* [in] */ ULONG32 flags,
            /* [in] */ ULONG32 bufferSize,
            /* [length_is][size_is][out] */ BYTE *buffer,
            /* [out] */ ULONG32 *dataSize);
        
        END_INTERFACE
    } ICLRMetadataLocatorVtbl;

    interface ICLRMetadataLocator
    {
        CONST_VTBL struct ICLRMetadataLocatorVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define ICLRMetadataLocator_QueryInterface(This,riid,ppvObject)	\
    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)

#define ICLRMetadataLocator_AddRef(This)	\
    (This)->lpVtbl -> AddRef(This)

#define ICLRMetadataLocator_Release(This)	\
    (This)->lpVtbl -> Release(This)


#define ICLRMetadataLocator_GetMetadata(This,imagePath,imageTimestamp,imageSize,mvid,mdRva,flags,bufferSize,buffer,dataSize)	\
    (This)->lpVtbl -> GetMetadata(This,imagePath,imageTimestamp,imageSize,mvid,mdRva,flags,bufferSize,buffer,dataSize)

#endif /* COBJMACROS */


#endif 	/* C style interface */



HRESULT STDMETHODCALLTYPE ICLRMetadataLocator_GetMetadata_Proxy( 
    ICLRMetadataLocator * This,
    /* [in] */ LPCWSTR imagePath,
    /* [in] */ ULONG32 imageTimestamp,
    /* [in] */ ULONG32 imageSize,
    /* [in] */ GUID *mvid,
    /* [in] */ ULONG32 mdRva,
    /* [in] */ ULONG32 flags,
    /* [in] */ ULONG32 bufferSize,
    /* [length_is][size_is][out] */ BYTE *buffer,
    /* [out] */ ULONG32 *dataSize);


void __RPC_STUB ICLRMetadataLocator_GetMetadata_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);



#endif 	/* __ICLRMetadataLocator_INTERFACE_DEFINED__ */


#ifndef __ICLRDataEnumMemoryRegionsCallback_INTERFACE_DEFINED__
#define __ICLRDataEnumMemoryRegionsCallback_INTERFACE_DEFINED__

/* interface ICLRDataEnumMemoryRegionsCallback */
/* [uuid][object] */ 


EXTERN_C const IID IID_ICLRDataEnumMemoryRegionsCallback;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("BCDD6908-BA2D-4ec5-96CF-DF4D5CDCB4A4")
    ICLRDataEnumMemoryRegionsCallback : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE EnumMemoryRegion( 
            /* [in] */ CLRDATA_ADDRESS address,
            /* [in] */ ULONG32 size) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct ICLRDataEnumMemoryRegionsCallbackVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            ICLRDataEnumMemoryRegionsCallback * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            ICLRDataEnumMemoryRegionsCallback * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            ICLRDataEnumMemoryRegionsCallback * This);
        
        HRESULT ( STDMETHODCALLTYPE *EnumMemoryRegion )( 
            ICLRDataEnumMemoryRegionsCallback * This,
            /* [in] */ CLRDATA_ADDRESS address,
            /* [in] */ ULONG32 size);
        
        END_INTERFACE
    } ICLRDataEnumMemoryRegionsCallbackVtbl;

    interface ICLRDataEnumMemoryRegionsCallback
    {
        CONST_VTBL struct ICLRDataEnumMemoryRegionsCallbackVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define ICLRDataEnumMemoryRegionsCallback_QueryInterface(This,riid,ppvObject)	\
    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)

#define ICLRDataEnumMemoryRegionsCallback_AddRef(This)	\
    (This)->lpVtbl -> AddRef(This)

#define ICLRDataEnumMemoryRegionsCallback_Release(This)	\
    (This)->lpVtbl -> Release(This)


#define ICLRDataEnumMemoryRegionsCallback_EnumMemoryRegion(This,address,size)	\
    (This)->lpVtbl -> EnumMemoryRegion(This,address,size)

#endif /* COBJMACROS */


#endif 	/* C style interface */



HRESULT STDMETHODCALLTYPE ICLRDataEnumMemoryRegionsCallback_EnumMemoryRegion_Proxy( 
    ICLRDataEnumMemoryRegionsCallback * This,
    /* [in] */ CLRDATA_ADDRESS address,
    /* [in] */ ULONG32 size);


void __RPC_STUB ICLRDataEnumMemoryRegionsCallback_EnumMemoryRegion_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);



#endif 	/* __ICLRDataEnumMemoryRegionsCallback_INTERFACE_DEFINED__ */


/* interface __MIDL_itf_clrdata_0012 */
/* [local] */ 

typedef 
enum CLRDataEnumMemoryFlags
    {	CLRDATA_ENUM_MEM_DEFAULT	= 0,
	CLRDATA_ENUM_MEM_MINI	= CLRDATA_ENUM_MEM_DEFAULT,
	CLRDATA_ENUM_MEM_HEAP	= 0x1
    } 	CLRDataEnumMemoryFlags;



extern RPC_IF_HANDLE __MIDL_itf_clrdata_0012_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_clrdata_0012_v0_0_s_ifspec;

#ifndef __ICLRDataEnumMemoryRegions_INTERFACE_DEFINED__
#define __ICLRDataEnumMemoryRegions_INTERFACE_DEFINED__

/* interface ICLRDataEnumMemoryRegions */
/* [uuid][object] */ 


EXTERN_C const IID IID_ICLRDataEnumMemoryRegions;

#if defined(__cplusplus) && !defined(CINTERFACE)
    
    MIDL_INTERFACE("471c35b4-7c2f-4ef0-a945-00f8c38056f1")
    ICLRDataEnumMemoryRegions : public IUnknown
    {
    public:
        virtual HRESULT STDMETHODCALLTYPE EnumMemoryRegions( 
            /* [in] */ ICLRDataEnumMemoryRegionsCallback *callback,
            /* [in] */ ULONG32 miniDumpFlags,
            /* [in] */ CLRDataEnumMemoryFlags clrFlags) = 0;
        
    };
    
#else 	/* C style interface */

    typedef struct ICLRDataEnumMemoryRegionsVtbl
    {
        BEGIN_INTERFACE
        
        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
            ICLRDataEnumMemoryRegions * This,
            /* [in] */ REFIID riid,
            /* [iid_is][out] */ void **ppvObject);
        
        ULONG ( STDMETHODCALLTYPE *AddRef )( 
            ICLRDataEnumMemoryRegions * This);
        
        ULONG ( STDMETHODCALLTYPE *Release )( 
            ICLRDataEnumMemoryRegions * This);
        
        HRESULT ( STDMETHODCALLTYPE *EnumMemoryRegions )( 
            ICLRDataEnumMemoryRegions * This,
            /* [in] */ ICLRDataEnumMemoryRegionsCallback *callback,
            /* [in] */ ULONG32 miniDumpFlags,
            /* [in] */ CLRDataEnumMemoryFlags clrFlags);
        
        END_INTERFACE
    } ICLRDataEnumMemoryRegionsVtbl;

    interface ICLRDataEnumMemoryRegions
    {
        CONST_VTBL struct ICLRDataEnumMemoryRegionsVtbl *lpVtbl;
    };

    

#ifdef COBJMACROS


#define ICLRDataEnumMemoryRegions_QueryInterface(This,riid,ppvObject)	\
    (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)

#define ICLRDataEnumMemoryRegions_AddRef(This)	\
    (This)->lpVtbl -> AddRef(This)

#define ICLRDataEnumMemoryRegions_Release(This)	\
    (This)->lpVtbl -> Release(This)


#define ICLRDataEnumMemoryRegions_EnumMemoryRegions(This,callback,miniDumpFlags,clrFlags)	\
    (This)->lpVtbl -> EnumMemoryRegions(This,callback,miniDumpFlags,clrFlags)

#endif /* COBJMACROS */


#endif 	/* C style interface */



HRESULT STDMETHODCALLTYPE ICLRDataEnumMemoryRegions_EnumMemoryRegions_Proxy( 
    ICLRDataEnumMemoryRegions * This,
    /* [in] */ ICLRDataEnumMemoryRegionsCallback *callback,
    /* [in] */ ULONG32 miniDumpFlags,
    /* [in] */ CLRDataEnumMemoryFlags clrFlags);


void __RPC_STUB ICLRDataEnumMemoryRegions_EnumMemoryRegions_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase);



#endif 	/* __ICLRDataEnumMemoryRegions_INTERFACE_DEFINED__ */


/* Additional Prototypes for ALL interfaces */

/* end of Additional Prototypes */

#ifdef __cplusplus
}
#endif

#endif



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

* bug#1501: Emacs 22 loses undo buffer
  2008-12-06 21:02 Emerick Rogul
@ 2008-12-07  1:31 ` Chong Yidong
  2008-12-07  2:03   ` Emerick Rogul
  0 siblings, 1 reply; 17+ messages in thread
From: Chong Yidong @ 2008-12-07  1:31 UTC (permalink / raw)
  To: Emerick Rogul; +Cc: 1501

"Emerick Rogul" <emerick@gmail.com> writes:

> Header file attached, although the problem occurs with any header file
> (i.e., it's not specific to this particular file).  The trace below
> contains the exact key sequence that I typed.

Thanks for the clarification.

What you're encountering is the "undo-limit", which specifies the
maximum amount of undo information to keep.  The default is 20
kilobytes, but you can raise it by changing the variable `undo-limit'.
You can also find details in the Emacs manual.






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

* bug#1501: Emacs 22 loses undo buffer
  2008-12-07  1:31 ` Chong Yidong
@ 2008-12-07  2:03   ` Emerick Rogul
  2008-12-07  5:36     ` Chong Yidong
  2008-12-07  5:48     ` Chong Yidong
  0 siblings, 2 replies; 17+ messages in thread
From: Emerick Rogul @ 2008-12-07  2:03 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1501

That's clearly not the issue at all, since the header file is only 8k
in total size.  What's more, I get the message after hitting the undo
key sequence a couple of times.  Also, this works perfectly fine in
Emacs 21.2, as I mentioned in my initial report.

On Sat, Dec 6, 2008 at 8:31 PM, Chong Yidong <cyd@stupidchicken.com> wrote:
> "Emerick Rogul" <emerick@gmail.com> writes:
>
>> Header file attached, although the problem occurs with any header file
>> (i.e., it's not specific to this particular file).  The trace below
>> contains the exact key sequence that I typed.
>
> Thanks for the clarification.
>
> What you're encountering is the "undo-limit", which specifies the
> maximum amount of undo information to keep.  The default is 20
> kilobytes, but you can raise it by changing the variable `undo-limit'.
> You can also find details in the Emacs manual.
>






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

* bug#1501: Emacs 22 loses undo buffer
  2008-12-07  2:03   ` Emerick Rogul
@ 2008-12-07  5:36     ` Chong Yidong
  2008-12-07  5:48     ` Chong Yidong
  1 sibling, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2008-12-07  5:36 UTC (permalink / raw)
  To: Emerick Rogul; +Cc: 1501

"Emerick Rogul" <emerick@gmail.com> writes:

> That's clearly not the issue at all, since the header file is only 8k
> in total size.  What's more, I get the message after hitting the undo
> key sequence a couple of times.  Also, this works perfectly fine in
> Emacs 21.2, as I mentioned in my initial report.

In the key sequence you reported:

... C-k C-k C-k C-k C-k C-k C-k C-k C-k
C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
[snip]
C-k C-k C-k C-k C-k C-k C-/ C-/ C-/ C-/ C-/ C-/ C-/
C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
C-/ ESC x r e p o r t - e m a <tab> <return>

it appears that you hit C-/ 22 times.  If Emacs kept 22 undo records,
and each undo record takes about 1 kilobyte, that is enough to hit the
default undo limit.  It might be that each undo record takes more space
in Emacs 23 than in Emacs 21, which is why you don't see the problem in
Emacs 21 (there are several reasons why this could happen, which could
be investigated).

I do observe the same behavior that you reported, using the key sequence
you supplied; furthermore, if I increase undo-limit to a larger number,
I find that Emacs can undo all the way back to the buffer's original
state.






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

* bug#1501: Emacs 22 loses undo buffer
  2008-12-07  2:03   ` Emerick Rogul
  2008-12-07  5:36     ` Chong Yidong
@ 2008-12-07  5:48     ` Chong Yidong
  2008-12-07 12:36       ` Emerick Rogul
  1 sibling, 1 reply; 17+ messages in thread
From: Chong Yidong @ 2008-12-07  5:48 UTC (permalink / raw)
  To: Emerick Rogul; +Cc: 1501

Actually, I went back and tried again.  Using the file you supplied, I
had to do C-/ about 100 times before Emacs reached its undo-limit.  That
implies 200 bytes per undo limit, which is about right.

So there does seem to be something strange about the behavior you're
seeing, where Emacs keeps only 20 or so undo records.

Did you enable any other major or minor modes before testing this?

Also, does turning font-lock-mode off change anything?






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

* bug#1501: Emacs 22 loses undo buffer
  2008-12-07  5:48     ` Chong Yidong
@ 2008-12-07 12:36       ` Emerick Rogul
  0 siblings, 0 replies; 17+ messages in thread
From: Emerick Rogul @ 2008-12-07 12:36 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1501

No, I didn't enable any other major or minor modes before testing.  I
also ran emacs with -q --no-site-file.

Your theory about it being related to font-lock-mode appears to be
correct, however!  I started emacs, loaded the header file, disabled
font-lock-mode, and ran my test again and it behaved as expected
(i.e., it retained all of my undo records).  Is font-lock-mode using
up more records (or more record space) than expected?  I wonder if
it's also Windows-specific in some way?

On Sun, Dec 7, 2008 at 12:48 AM, Chong Yidong <cyd@stupidchicken.com> wrote:
> Actually, I went back and tried again.  Using the file you supplied, I
> had to do C-/ about 100 times before Emacs reached its undo-limit.  That
> implies 200 bytes per undo limit, which is about right.
>
> So there does seem to be something strange about the behavior you're
> seeing, where Emacs keeps only 20 or so undo records.
>
> Did you enable any other major or minor modes before testing this?
>
> Also, does turning font-lock-mode off change anything?
>






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

* bug#1501: Emacs 22 loses undo buffer
@ 2009-01-27 20:58 Chong Yidong
  0 siblings, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2009-01-27 20:58 UTC (permalink / raw)
  To: 1501

I've expanded the undo limits by a factor of four.  A more sophisticated
fix, if one exists, will have to wait till after the release.






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

* bug#1501: Emacs 22 loses undo buffer
@ 2009-04-24 22:14 Suresh Kannan
  0 siblings, 0 replies; 17+ messages in thread
From: Suresh Kannan @ 2009-04-24 22:14 UTC (permalink / raw)
  To: 1501

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

Hi,

I'm getting the same problem in Emacs 22.2.1 in Ubuntu. Steps to reproduce.

1. start emacs without any resource file (.emacs or any other rc file)  <---
this is avoid if there is some problem with user init file.
2. open file called 'test.c'
3. copy content of "http://www.rfc-editor.org/rfc/rfc2547.txt" into test.c
and save it.
4. do  C-k till section "3.1 Virtual Sites" in the current buffer.
5. Trying continuous C-/, emacs is **not** getting into beginning of the
buffer. I get only few lines as undo. Just 5 lines i can do undo. Not more
than that.

Without font-lock-mode (after disabling font-lock-mode), i tried same
sequence, i can get some more lines in undo but not the whole buffer. So, as
you pointed out font-lock-mode has some impact with undo.

Increased undo-limit,undo-strong-limit,undo-outer-limit to 100,000,000. I
repeated the same steps from 1, 5. This time, I'm able to do full undo.. I
dont mind setting this value in my .emacs because memory is not a problem
for me. But, would this cause any other problem like performance or buffer
loss ?.

Thanks,
Regards,
Suresh Kannan.

[-- Attachment #2: Type: text/html, Size: 1313 bytes --]

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

* bug#1501: Emacs 22 loses undo buffer
  2008-12-05 16:51 bug#1501: Emacs 22 loses undo buffer Emerick Rogul
@ 2019-08-20 18:36 ` Stefan Kangas
  2019-08-20 18:45   ` Noam Postavsky
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2019-08-20 18:36 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Emerick Rogul, 1501

Chong Yidong <cyd@stupidchicken.com> writes:

> "Emerick Rogul" <emerick@gmail.com> writes:
>
>> That's clearly not the issue at all, since the header file is only 8k
>> in total size.  What's more, I get the message after hitting the undo
>> key sequence a couple of times.  Also, this works perfectly fine in
>> Emacs 21.2, as I mentioned in my initial report.
>
> In the key sequence you reported:
>
> ... C-k C-k C-k C-k C-k C-k C-k C-k C-k
> C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k C-k
> [snip]
> C-k C-k C-k C-k C-k C-k C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ ESC x r e p o r t - e m a <tab> <return>
>
> it appears that you hit C-/ 22 times.  If Emacs kept 22 undo records,
> and each undo record takes about 1 kilobyte, that is enough to hit the
> default undo limit.  It might be that each undo record takes more space
> in Emacs 23 than in Emacs 21, which is why you don't see the problem in
> Emacs 21 (there are several reasons why this could happen, which could
> be investigated).
>
> I do observe the same behavior that you reported, using the key sequence
> you supplied; furthermore, if I increase undo-limit to a larger number,
> I find that Emacs can undo all the way back to the buffer's original
> state.

Chong Yidong <cyd@stupidchicken.com> writes:

> I've expanded the undo limits by a factor of four.  A more sophisticated
> fix, if one exists, will have to wait till after the release.

The undo limits were recently again doubled on master in commit
9466372 in relation to Bug#31104.  The latter change will be included
in the next major version of Emacs (version 27.1).

If you're still seeing this problem on a recent version of Emacs, a
workaround is to increase the values of the variables undo-limit,
undo-outer-limit and undo-strong-limit.  You could add something like
the following to your init file:

(setq undo-limit        (* 2 undo-limit))
(setq undo-outer-limit  (* 2 undo-outer-limit))
(setq undo-strong-limit (* 2 undo-strong-limit))

Of course, you could use a bigger number than 2 should that be necessary.

Given the discussion in Bug#31104, I'm not sure there's more to do
here.  But the discussion here also suggests that there have been an
increase in the memory usage of each undo record, especially when
using font-lock-mode.  I'm not sure that is a serious problem, since
memory is only getting cheaper, but it might be worth investigating.
On the other hand, we could just decide that this is not worth the
effort and close this as wontfix.

Thanks,
Stefan Kangas





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

* bug#1501: Emacs 22 loses undo buffer
  2019-08-20 18:36 ` Stefan Kangas
@ 2019-08-20 18:45   ` Noam Postavsky
  2019-08-21 14:46     ` Stefan Kangas
  0 siblings, 1 reply; 17+ messages in thread
From: Noam Postavsky @ 2019-08-20 18:45 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Emerick Rogul, 1501, Chong Yidong

Stefan Kangas <stefan@marxist.se> writes:

> increase in the memory usage of each undo record, especially when
> using font-lock-mode.  I'm not sure that is a serious problem, since
> memory is only getting cheaper, but it might be worth investigating.
> On the other hand, we could just decide that this is not worth the
> effort and close this as wontfix.

Hmm, it sounds like the problem might just be due to saving text
properties in the undo records?  If so, maybe a simple fix is to just
drop them (or drop only face and font-lock-face properties).





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

* bug#1501: Emacs 22 loses undo buffer
  2019-08-20 18:45   ` Noam Postavsky
@ 2019-08-21 14:46     ` Stefan Kangas
  2019-08-22  1:19       ` Noam Postavsky
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2019-08-21 14:46 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emerick Rogul, 1501, Chong Yidong

Noam Postavsky <npostavs@gmail.com> writes:

> Stefan Kangas <stefan@marxist.se> writes:
>
> > increase in the memory usage of each undo record, especially when
> > using font-lock-mode.  I'm not sure that is a serious problem, since
> > memory is only getting cheaper, but it might be worth investigating.
> > On the other hand, we could just decide that this is not worth the
> > effort and close this as wontfix.
>
> Hmm, it sounds like the problem might just be due to saving text
> properties in the undo records?  If so, maybe a simple fix is to just
> drop them (or drop only face and font-lock-face properties).

Is it not worth saving also that information?

Thanks,
Stefan Kangas





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

* bug#1501: Emacs 22 loses undo buffer
  2019-08-21 14:46     ` Stefan Kangas
@ 2019-08-22  1:19       ` Noam Postavsky
  2021-10-20  1:01         ` Stefan Kangas
  0 siblings, 1 reply; 17+ messages in thread
From: Noam Postavsky @ 2019-08-22  1:19 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Emerick Rogul, 1501, Chong Yidong

Stefan Kangas <stefan@marxist.se> writes:

> Noam Postavsky <npostavs@gmail.com> writes:
>
>> Stefan Kangas <stefan@marxist.se> writes:
>>
>> > increase in the memory usage of each undo record, especially when
>> > using font-lock-mode.  I'm not sure that is a serious problem, since
>> > memory is only getting cheaper, but it might be worth investigating.
>> > On the other hand, we could just decide that this is not worth the
>> > effort and close this as wontfix.
>>
>> Hmm, it sounds like the problem might just be due to saving text
>> properties in the undo records?  If so, maybe a simple fix is to just
>> drop them (or drop only face and font-lock-face properties).
>
> Is it not worth saving also that information?

Definitely not face, since it's overwritten as soon as font-lock runs.
It's true font-lock-face can sometimes be set manually, though usually
it's computed by font-lock rules.






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

* bug#1501: Emacs 22 loses undo buffer
  2019-08-22  1:19       ` Noam Postavsky
@ 2021-10-20  1:01         ` Stefan Kangas
  2021-10-20 12:05           ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Kangas @ 2021-10-20  1:01 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emerick Rogul, 1501, Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 1796 bytes --]

tags 1501 + patch
thanks

Noam Postavsky <npostavs@gmail.com> writes:

> Stefan Kangas <stefan@marxist.se> writes:
>
>> Noam Postavsky <npostavs@gmail.com> writes:
>>
>>> Stefan Kangas <stefan@marxist.se> writes:
>>>
>>> > increase in the memory usage of each undo record, especially when
>>> > using font-lock-mode.  I'm not sure that is a serious problem, since
>>> > memory is only getting cheaper, but it might be worth investigating.
>>> > On the other hand, we could just decide that this is not worth the
>>> > effort and close this as wontfix.
>>>
>>> Hmm, it sounds like the problem might just be due to saving text
>>> properties in the undo records?  If so, maybe a simple fix is to just
>>> drop them (or drop only face and font-lock-face properties).
>>
>> Is it not worth saving also that information?
>
> Definitely not face, since it's overwritten as soon as font-lock runs.
> It's true font-lock-face can sometimes be set manually, though usually
> it's computed by font-lock rules.

This would be fairly simple to do, as in the attached patch.  But I'm
not sure that we should make this change, since both `face' and
`font-lock-face' could be used by a major mode at various times, without
getting automatically re-added by font-lock.

From (info "(elisp) Precalculated Fontification"):

    But if the mode does not use the normal Font Lock machinery, it
    should not set the variable ‘font-lock-defaults’.  In this case the
    ‘face’ property will not be overridden, so using the ‘face’ property
    could work too.

IOW, I'm not sure that the proposed change won't introduce subtle bugs.

Other than that, we have doubled all undo limits in Emacs 27.1, so maybe
that's enough of a fix for now?

Any other opinions?

[-- Attachment #2: 0001-Decrease-size-of-undo-entries.patch --]
[-- Type: text/x-diff, Size: 897 bytes --]

From 7b0fea42f793d7b7f9fa9938b3c99b1f28323531 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Wed, 20 Oct 2021 02:42:31 +0200
Subject: [PATCH] Decrease size of undo entries

* src/undo.c (record_delete): Remove the 'face' property from undo
entries to save space.  (Bug1501)
---
 src/undo.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/undo.c b/src/undo.c
index 2db401ebc7..260cf792c7 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -164,6 +164,13 @@ record_delete (ptrdiff_t beg, Lisp_Object string, bool record_markers)
 {
   Lisp_Object sbeg;
 
+  /* Remove the `face' property to save space.  (Bug1501)  */
+  if (!NILP (string))
+    Fremove_list_of_text_properties (make_fixnum (0),
+				     make_fixnum (SCHARS (string)),
+				     CALLN (Flist, Qface),
+				     string);
+
   if (EQ (BVAR (current_buffer, undo_list), Qt))
     return;
 
-- 
2.30.2


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

* bug#1501: Emacs 22 loses undo buffer
  2021-10-20  1:01         ` Stefan Kangas
@ 2021-10-20 12:05           ` Eli Zaretskii
  2021-10-21 20:46             ` Stefan Kangas
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2021-10-20 12:05 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emerick, 1501, cyd, npostavs

> From: Stefan Kangas <stefan@marxist.se>
> Date: Tue, 19 Oct 2021 18:01:43 -0700
> Cc: Emerick Rogul <emerick@gmail.com>, 1501@debbugs.gnu.org,
>  Chong Yidong <cyd@stupidchicken.com>
> 
> +  /* Remove the `face' property to save space.  (Bug1501)  */
> +  if (!NILP (string))
> +    Fremove_list_of_text_properties (make_fixnum (0),
> +				     make_fixnum (SCHARS (string)),
> +				     CALLN (Flist, Qface),
> +				     string);

This modifies the text properties of STRING, which you don't own.

Also, it will do unnecessary non-trivial processing when undo is
turned off.

I definitely think that with the enlarged undo-limit we should leave
this obscure situation alone.  It isn't worth making such significant
low-level changes due to such obscure problems, which are arguably
cockpit errors.





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

* bug#1501: Emacs 22 loses undo buffer
  2021-10-20 12:05           ` Eli Zaretskii
@ 2021-10-21 20:46             ` Stefan Kangas
  0 siblings, 0 replies; 17+ messages in thread
From: Stefan Kangas @ 2021-10-21 20:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emerick, 1501, cyd, npostavs

tags 1501 wontfix
close 1501
thanks

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stefan Kangas <stefan@marxist.se>
>> Date: Tue, 19 Oct 2021 18:01:43 -0700
>> Cc: Emerick Rogul <emerick@gmail.com>, 1501@debbugs.gnu.org,
>>  Chong Yidong <cyd@stupidchicken.com>
>>
>> +  /* Remove the `face' property to save space.  (Bug1501)  */
>> +  if (!NILP (string))
>> +    Fremove_list_of_text_properties (make_fixnum (0),
>> +				     make_fixnum (SCHARS (string)),
>> +				     CALLN (Flist, Qface),
>> +				     string);
>
> This modifies the text properties of STRING, which you don't own.
>
> Also, it will do unnecessary non-trivial processing when undo is
> turned off.
>
> I definitely think that with the enlarged undo-limit we should leave
> this obscure situation alone.  It isn't worth making such significant
> low-level changes due to such obscure problems, which are arguably
> cockpit errors.

OK, I'm therefore closing this bug as wontfix.

(Alternatively, we could just close it as "fixed" (with the doubling of
undo limits) but let's be a bit more explicit.)





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

end of thread, other threads:[~2021-10-21 20:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-05 16:51 bug#1501: Emacs 22 loses undo buffer Emerick Rogul
2019-08-20 18:36 ` Stefan Kangas
2019-08-20 18:45   ` Noam Postavsky
2019-08-21 14:46     ` Stefan Kangas
2019-08-22  1:19       ` Noam Postavsky
2021-10-20  1:01         ` Stefan Kangas
2021-10-20 12:05           ` Eli Zaretskii
2021-10-21 20:46             ` Stefan Kangas
  -- strict thread matches above, loose matches on Subject: below --
2008-12-06  4:01 Chong Yidong
2008-12-06 21:02 Emerick Rogul
2008-12-07  1:31 ` Chong Yidong
2008-12-07  2:03   ` Emerick Rogul
2008-12-07  5:36     ` Chong Yidong
2008-12-07  5:48     ` Chong Yidong
2008-12-07 12:36       ` Emerick Rogul
2009-01-27 20:58 Chong Yidong
2009-04-24 22:14 Suresh Kannan

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

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