Ulli Horlacher | 3 Nov 09:09 2008
Picon

Re: Using a "saved" macro

On Sun 2008-10-26 (21:01), Duke Normandin wrote:

> though... what is the intent of "macro_save_macro"?

I suppose it is code (macro.sl) that has not been finished yet.

I asked this question some time ago I got some hints, so that I have now a
function store_macro() which assigns the current macro to a key and saves
it to $HOME/.jed/macros.sl which itself get loaded at jed startup.

What still is missing is list_macros() and delete_macro().

--

-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlacher <at> rus.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/

G. Milde | 3 Nov 10:05 2008
Picon
Picon

Re: How do I set up a template?

On 29.10.08, Michele Dondi wrote:
> On Wed, 29 Oct 2008, Olesen, Mark wrote:

> I presume that positioning the cursor at a given position specified e.g.  
> by a language specific comment would be difficult enough in terms of  
> amount of code for one to consider the gain not worth the effort, right?

No. templates.sl from jedmodes.sf.net has this already and a lot more:

   replacements["<REALNAME>"] = extract_element(get_realname(), 0, ',');
   replacements["<USERNAME>"] = get_username();
   replacements["<EMAIL>"]    = get_emailaddress();
   replacements["<DATE>"]     = get_iso_date();
   replacements["<FILENAME>"] = path_basename(buffer_filename);
   replacements["<FILENAME_SANS>"] =
     path_sans_extname(replacements["<FILENAME>"]);

   % for compatibility with Mikael Hultgren's template.sl
   replacements[" <at> author <at> "] = replacements["<REALNAME>"];
   replacements[" <at> mail <at> "] = replacements["<EMAIL>"];
   replacements[" <at> filename <at> "] = replacements["<FILENAME>"];
   replacements[" <at> filename_sans <at> "] = replacements["<FILENAME_SANS>"];

Günter

G. Milde | 3 Nov 10:09 2008
Picon
Picon

Re: How do I set up a template?

On 29.10.08, Michele Dondi wrote:
> On Wed, 29 Oct 2008, Paul Boekholt wrote:

>> The templates.sl script at
>> http://jedmodes.sourceforge.net/mode/templates/ should do the trick. On
>> your Debian box you probably have it if you have the jed-extra package
>> installed.

> I'll study the code of templates.sl to see how it copes with it too.  
> Anyway I'd like all my installations to be uniform, if possible.

You should be able to use templates.sl in any Jed installation on any OS.
The advantage of Debian is that with jed-extra it works out of the box.

Günter

Michele Dondi | 3 Nov 10:19 2008
Picon
Picon

Re: How do I set up a template?

On Mon, 3 Nov 2008, G. Milde wrote:

>> I presume that positioning the cursor at a given position specified e.g.
>> by a language specific comment would be difficult enough in terms of
>> amount of code for one to consider the gain not worth the effort, right?
>
> No. templates.sl from jedmodes.sf.net has this already and a lot more:

Thank you very much. That's far more than what I had wished for. Somebody 
already pointed me to that mode, but it was fun, and instructive, to see 
how one could reinvent the wheel.

Michele
--

-- 
Remember that amateurs built Noah's Ark.
Professionals built the Titanic.

Tom Culliton | 5 Nov 03:54 2008
Picon

Re: Configuration problem

I just got burned by this on a new Ubuntu box today.  Really kind of an
obnoxious change for the debian folks to make without updating the
documentation to match.  It really shouldn't require 45+ minutes of
sleuthing through site.sl  and such to figure out that there was an
overriding defaults.sl that was loading files from /etc/jed.d/ that was
preventing my ~/.jedrc from loading because I had a ~/.jed directory.

OBTW - If the debian package maintainer is around, installing jed-extras 
breaks the info reader.  Looks like the drop-in replacement for info.sl
isn't really, it barks (and righteously so): "Unable to load
/usr/share/jed/jed-extra/pcre.slc"

> Hallo Michele,
>
> Michele Dondi <blazar <at> pcteor1.mi.infn.it> wrote:
>> On Tue, 28 Oct 2008, Jörg Sommer wrote:
>>> Michele Dondi <blazar <at> pcteor1.mi.infn.it> wrote:
>>>> then it starts loading .slc files. At a certain point
>>>> I'm left with "loading /usr/share/jed/lib/modeinfo.slc" - However I'm
>>>> in Emacs mode with the default colors, which means that my ~/.jedrc is
>>>> NEVER read.
>>>
>>> Do you have a directory ~/.jed? From
>>> /usr/share/doc/jed/README.Debian-startup:
>>>
>>>   * ~/.jed/jed.rc                  % user config file (if it exists),
>>>                                    % skipped with the -n command line
>>> option)
>>>     or ~/.jedrc                    % if ~/.jed/ doesnot exist
>>
(Continue reading)

G. Milde | 5 Nov 09:17 2008
Picon
Picon

Re: Configuration problem

On  4.11.08, Tom Culliton wrote:
> I just got burned by this on a new Ubuntu box today.  

Can you be a bit more specific? You have a new Ubuntu box and created both,
~/.jedrc and ~/.jed ? I thought this was a rather uncommon setup.

> Really kind of an obnoxious change for the debian folks to make without
> updating the documentation to match.  

Did you find the documentation in /usr/share/doc/jed/?

NEWS.Debian.gz          % I admit that this is silent on this point :-(
README.Debian-startup   % explains the Debian-specific startup scheme
README.Debian.gz	% Contains an appropriate warning
changelog.Debian.gz	% lists the change as well

> It really shouldn't require 45+ minutes of
> sleuthing through site.sl  and such to figure out that there was an
> overriding defaults.sl that was loading files from /etc/jed.d/ that was
> preventing my ~/.jedrc from loading because I had a ~/.jed directory.

Agreed. But IMO the Debian README files are the right place for this
kind of info.

> OBTW - If the debian package maintainer is around, installing jed-extras 
> breaks the info reader. 

Not here.

> Looks like the drop-in replacement for info.sl
(Continue reading)

Michele Dondi | 5 Nov 10:18 2008
Picon
Picon

Re: Configuration problem

On Tue, 4 Nov 2008, Tom Culliton wrote:

> I just got burned by this on a new Ubuntu box today.  Really kind of an
> obnoxious change for the debian folks to make without updating the
> documentation to match.  It really shouldn't require 45+ minutes of
> sleuthing through site.sl  and such to figure out that there was an
> overriding defaults.sl that was loading files from /etc/jed.d/ that was
> preventing my ~/.jedrc from loading because I had a ~/.jed directory.

I fully agree with you but as far as I'm concerned I'm fine with just 
having solved the issue!

Michele
--

-- 
Gli uomini non son fatti per vivere nei formicai...
piu' si affollano insieme, piu' si corrompono l'un l'altro.
- J.J. Rousseau

Michele Dondi | 5 Nov 10:42 2008
Picon
Picon

Re: Configuration problem

On Wed, 5 Nov 2008, G. Milde wrote:

> Can you be a bit more specific? You have a new Ubuntu box and created both,
> ~/.jedrc and ~/.jed ? I thought this was a rather uncommon setup.

In my case, as a *user*, I just tend to copy the files in my home from one 
account to another. In this case, I didn't even do so: the admins just 
changed the underlying OS: users' homes are mounted via nfs. It is 
obnoxious that my favourite editor just "stopped working" upon such a 
change, given the the OS is of "the same breed" after all...

Michele
--

-- 
// The specific idiot in this case is Office95, which likes
// to free a random pointer when you start Word95 from a desktop
// shortcut.
- private\ntos\rtl\heap.c

G. Milde | 5 Nov 12:30 2008
Picon
Picon

Re: Configuration problem

On  5.11.08, Michele Dondi wrote:

> In my case, as a *user*, I just tend to copy the files in my home from 
> one account to another. In this case, I didn't even do so: the admins 
> just changed the underlying OS: users' homes are mounted via nfs. It is  
> obnoxious that my favourite editor just "stopped working" upon such a  
> change, given the the OS is of "the same breed" after all...

The attached version of /etc/jed.d/05jed-common.sl should fix this issue and
provide backwards compatibility.

Jörg, could we apply this fix to jed-common and adapt the documentation?

Günter
% debian 05jed-common.sl              -*- slang -*-

% make delete key delete the character under the cursor
% (section 10.8 of the Debian Policy)
#ifdef XWINDOWS
x_set_keysym (0xFFFF, 0, "\e[3~");
#endif
setkey ("delete_char_cmd", "\e[3~");

% Fallback emulation (if the user has no ~/.jedrc config file)
%
% Possible values are "brief", "cua", "emacs", "edt", "ide", "jed",
% "wordstar", and (with jed-extra) "vi".
%_Jed_Default_Emulation = "emacs";  % already set in site.sl
(Continue reading)

Jörg Sommer | 6 Nov 12:41 2008
Picon

Re: Configuration problem

Hallo Tom,

"Tom Culliton" <culliton <at> io.com> wrote:
> I just got burned by this on a new Ubuntu box today.  Really kind of an
> obnoxious change for the debian folks to make without updating the
> documentation to match.

Which document do you talk about?

> It really shouldn't require 45+ minutes of sleuthing through site.sl
> and such to figure out that there was an overriding defaults.sl that
> was loading files from /etc/jed.d/ that was preventing my ~/.jedrc from
> loading because I had a ~/.jed directory.

You can use jed -batch to see what gets loaded.

Bye, Jörg.
--

-- 
Der kommt den Göttern am nächsten, der auch dann schweigen kann,
wenn er im Recht ist.                         (Cato; 234–149 v. Chr.)


Gmane