Neil Hodgson | 1 Sep 01:35 2008
Picon

Re: request: delete bookmark if txt is deleted


Frank Wunderlich:

> in my current tests, i see, that scite/scintilla does not delete a
> bookmark if the corresponding text is deleted (instead set to the
> current cursorposition)
> ...
> now i delete lines 2,3 and 4 (cursor now in line2)...i expect, that the
> marker is also deleted (i don't need a bookmark if the bookmarked code
> does not exists) but scite/scintilla moves the bookmark to line2.

   Sometimes markers are used to refer to regions of code rather than
particular lines of code. For example, a bookmark may be placed at the
start of the global variable section or the UI code. Removing the
first global variable does not invalidate the bookmark.

   For markers in Scintilla it is less likely that deletion is
desired. In a debugger, I prefer that breakpoints survive deletion of
the particular line they are on as they are often placed to be at the
start of a code section of interest rather than on a particular line
of interest. Sometimes breakpoints have associated data, such as
watchpoints, so reestablishing the breakpoint is not trivial.

   If someone wants to implement removal of bookmarks when that line's
text is deleted then it should be optional.

   Neil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
(Continue reading)

Neil Hodgson | 1 Sep 01:43 2008
Picon

Re: [feature-request] ask for save session


Frank Wunderlich:

> i have save.session enabled, but sometimes i don't want to restore the
> session. can save.session expanded to ask the user if he wants to save
> or not (like in Firefox3)?

   You can't really control restoring the session by not saving a
session as the previous session file will still be there so will be
used at next start up. If you don't want to restore the session then
it may be possible to turn off save.session from the command line
although it is probably simpler to just close all buffers after
starting. Firefox hasn't shown a "want to save session" dialog for me
so I don't really understand.

   Neil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Frank Wunderlich | 1 Sep 02:48 2008
Picon

Re: [feature-request] ask for save session

Neil Hodgson, 01.09.2008 01:43:
>
> You can't really control restoring the session by not saving a
> session as the previous session file will still be there so will be
> used at next start up. If you don't want to restore the session then
> it may be possible to turn off save.session from the command line
> although it is probably simpler to just close all buffers after
> starting. Firefox hasn't shown a "want to save session" dialog for me
> so I don't really understand.
>   
when starting scite i mostly don't know if i want to restore the session 
on exit...(regarding disabling by command-line)
of course, if you don't want to save the session, the existing 
sessionfile should be deleted (or renamed).
i would do it by lua, but i know no event which is triggered when scite 
is closed...only OnClose for buffers, but this seems not the right event.
in attachment the firefox (3)-dialog (in german) which askes to save 
session or not.i havn't found any setting to enable/disable this box...

translation of Screenshot:

Should the open tabs restored on next startup?
[ ] don't ask again
[Save and close] [close] [cancel]

regards Frank

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
(Continue reading)

Frank Wunderlich | 1 Sep 03:01 2008
Picon

[LUA] getting list of abbrevs


Hi,
i want to put a abbrevition-List (like in the dialog) in my side-panel 
(Scite-GUI)...is there a way to access the list for current buffer?

regards Frank

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Frank Wunderlich | 1 Sep 03:37 2008
Picon

Re: request: delete bookmark if txt is deleted


ok, i've figured out, how to do that with lua :) but another 
remark...when i call scite.SendEditor(SCI_MARKERDELETE,cur,1) the 
OnSendEditor-Event is not be triggered

maybe there is a possibility to get the list of bookmarks directly, 
handling of SCI_MARKERADD/SCI_MARKERDELETE is growing ;( ?

frank

Neil Hodgson, 01.09.2008 01:35:
>
> Sometimes markers are used to refer to regions of code rather than
> particular lines of code. For example, a bookmark may be placed at the
> start of the global variable section or the UI code. Removing the
> first global variable does not invalidate the bookmark.
>
> For markers in Scintilla it is less likely that deletion is
> desired. In a debugger, I prefer that breakpoints survive deletion of
> the particular line they are on as they are often placed to be at the
> start of a code section of interest rather than on a particular line
> of interest. Sometimes breakpoints have associated data, such as
> watchpoints, so reestablishing the breakpoint is not trivial.
>
> If someone wants to implement removal of bookmarks when that line's
> text is deleted then it should be optional.
>
>    Neil

--~--~---------~--~----~------------~-------~--~----~
(Continue reading)

mozers | 1 Sep 08:07 2008
Picon

Re: [LUA] getting list of abbrevs


Monday, September 1, 2008, 5:01:09 AM, Frank wrote:

> i want to put a abbrevition-List (like in the dialog) in my side-panel
> (Scite-GUI)...is there a way to access the list for current buffer?

local abbrev_file = io.open(props['AbbrevPath'])
if abbrev_file then
        for line in abbrev_file:lines() do
                list_abbrev:add_item(line:gsub('=.+$', ''))
        end
        abbrev_file:close()
end

Note: Variables $(AbbrevPath) and $(APIPath) are only available in SciTE-Ru.

--

-- 
mozers
<http://code.google.com/p/scite-ru/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

mozers | 1 Sep 08:23 2008
Picon

Re: [feature-request] ask for save session


Sunday, August 31, 2008, 3:27:24 AM, Frank wrote:

> i have save.session enabled, but sometimes i don't want to restore the
> session. can save.session expanded to ask the user if he wants to save
> or not (like in Firefox3)?

All this is available if you use SessionManager (it is included in SciTE-Ru Pack).
Remove comment on these parameters: 
session.manager = 1 
save.session.manager.on.quit = 1 

At the beginning run SessionManager.hta instead SciTE.exe.
Then you can select the session before beginning work.

--

-- 
mozers
<http://code.google.com/p/scite-ru/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

mozers | 1 Sep 08:42 2008
Picon

Re: request: delete bookmark if txt is deleted


Monday, September 1, 2008, 5:37:08 AM, Frank wrote:

> maybe there is a possibility to get the list of bookmarks directly,
> handling of SCI_MARKERADD/SCI_MARKERDELETE is growing ;( ?

for i = 0, editor.LineCount do
        if editor:MarkerGet(i) ~= 0 then print(i+1) end
end

--

-- 
mozers
<http://code.google.com/p/scite-ru/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Frank | 1 Sep 13:25 2008
Picon

Re: [LUA] getting list of abbrevs


great...i modified it a little bit (for sciteRu) to include imported
files:

function ListAbbrevs()
  function loadAbbrevFile(file)
    local abbrev_file = io.open(file)
    if abbrev_file then
      for line in abbrev_file:lines() do
        if line~='' then
          if (string.find(line,"=")) then
            list_abbrev:add_item(line:gsub('=.+$', ''))
          elseif (string.find(line,"import")) then
            local import_file=line:gsub('^.*import ', '')
            print(import_file)
            loadAbbrevFile(abbrev_path..'\\'..import_file)
          end
        end
      end
      abbrev_file:close()
    end
  end

  list_abbrev:clear()
  abbrev_path,abbrev_file=SplitDirFile(props['AbbrevPath'])
  print(abbrev_path,abbrev_file)
  loadAbbrevFile(abbrev_path..'\\'..abbrev_file)--props['AbbrevPath'])
end

btw. i see that for lua-files the abbrev-file lua.abbrev is loaded,
(Continue reading)

mozers | 1 Sep 15:29 2008
Picon

Re: [LUA] getting list of abbrevs


Monday, September 1, 2008, 3:25:45 PM, Frank wrote:
> btw. i see that for lua-files the abbrev-file lua.abbrev is loaded,
> but i have not defined this anywhere. the file does not exists and so
> the default abbrev.properties is not loaded (which is loaded for other
> files).
> is it loaded by default in sciteRU?

Default file = $(SciteUserHome)\abbrev.properties.
It is used only for those types of files for which the "abbreviations.filepattern" properties is not specified.

--

-- 
mozers
<http://code.google.com/p/scite-ru/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane