Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

jasspa · JASSPA's MicroEmacs

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 127
  • Category: Cyberculture
  • Founded: Jul 7, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 2626 - 2657 of 2695   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#2626 From: Jon Green <jon@...>
Date: Thu Jan 27, 2011 11:03 pm
Subject: Re: Passing value of varaiable from command line to the start-up macro
bigfatmrmoose
Send Email Send Email
 
On 27/01/2011 20:58, igcain wrote:
> Hi there
>
> I want to invoke the ne editor such that when it starts it goes to a specified
line of text ready for over typing.  My start-up macro in ne.emf looks something
like;
>
> define-macro start-up
>    19 buffer-mode "over"
>    !force search-buffer "M" "MONTH= "
>    end-of-line
> !macro
>
> unfortunately my start-up macro (as currently written) only ever goes to the
string constant "MONTH= ".  But what I really would like to do is execute the
command line with;
>
> ne -vVarName="MONTH= " somefile
>
> where VarName can be substituted for any string that happens to be present in
the file to be ediited.  Only thing is how do I reference the variable VarName
within the start-up macro?
>
> Any help, much appreciated
> Ian
>

Hi Ian,

VarName needs to be a MicroEmacs variable i.e. $foo so you will do:

ne -v"$foo=MONTH= " somefile

Then in your start-up macro you reference the variable $foo.

search-buffer "M" $foo

You will need to be careful about how you quote the argument on the command
line if there are any special characters or spaces. This will depend on the
operating system you are using.

Before you test the start-up macro probably best to play with starting the
editor with the variable setting on the command line and checking that the
variable is coming through correctly with a

esc-x describe-variable $foo

This will show you the variable value. If it is OK then you can work on the
start-up.

Regards
Jon

#2627 From: "igcain" <igcain@...>
Date: Fri Jan 28, 2011 5:36 pm
Subject: Re: Passing value of varaiable from command line to the start-up macro
igcain
Send Email Send Email
 
--- In jasspa@yahoogroups.com, Jon Green <jon@...> wrote:
>
> On 27/01/2011 20:58, igcain wrote:
> > Hi there
> >
> > I want to invoke the ne editor such that when it starts it goes to a
specified line of text ready for over typing.  My start-up macro in ne.emf looks
something like;
> >
> > define-macro start-up
> >    19 buffer-mode "over"
> >    !force search-buffer "M" "MONTH= "
> >    end-of-line
> > !macro
> >
> > unfortunately my start-up macro (as currently written) only ever goes to the
string constant "MONTH= ".  But what I really would like to do is execute the
command line with;
> >
> > ne -vVarName="MONTH= " somefile
> >
> > where VarName can be substituted for any string that happens to be present
in the file to be ediited.  Only thing is how do I reference the variable
VarName within the start-up macro?
> >
> > Any help, much appreciated
> > Ian
> >
>
> Hi Ian,
>
> VarName needs to be a MicroEmacs variable i.e. $foo so you will do:
>
> ne -v"$foo=MONTH= " somefile
>
> Then in your start-up macro you reference the variable $foo.
>
> search-buffer "M" $foo
>
> You will need to be careful about how you quote the argument on the command
> line if there are any special characters or spaces. This will depend on the
> operating system you are using.
>
> Before you test the start-up macro probably best to play with starting the
> editor with the variable setting on the command line and checking that the
> variable is coming through correctly with a
>
> esc-x describe-variable $foo
>
> This will show you the variable value. If it is OK then you can work on the
> start-up.
>
> Regards
> Jon
>
Jon

thanks for the reply.  One question how do I know which variable I can use?

Ian

#2628 From: Jon Green <jon@...>
Date: Fri Jan 28, 2011 11:28 pm
Subject: Re: Re: Passing value of varaiable from command line to the start-up macro
bigfatmrmoose
Send Email Send Email
 
On 28/01/2011 17:36, igcain wrote:
>
> --- In jasspa@yahoogroups.com, Jon Green<jon@...>  wrote:
>> On 27/01/2011 20:58, igcain wrote:
>>> Hi there
>>>
>>> I want to invoke the ne editor such that when it starts it goes to a
specified line of text ready for over typing.  My start-up macro in ne.emf looks
something like;
>>>
>>> define-macro start-up
>>>     19 buffer-mode "over"
>>>     !force search-buffer "M" "MONTH= "
>>>     end-of-line
>>> !macro
>>>
>>> unfortunately my start-up macro (as currently written) only ever goes to the
string constant "MONTH= ".  But what I really would like to do is execute the
command line with;
>>>
>>> ne -vVarName="MONTH= " somefile
>>>
>>> where VarName can be substituted for any string that happens to be present
in the file to be ediited.  Only thing is how do I reference the variable
VarName within the start-up macro?
>>>
>>> Any help, much appreciated
>>> Ian
>>>
>> Hi Ian,
>>
>> VarName needs to be a MicroEmacs variable i.e. $foo so you will do:
>>
>> ne -v"$foo=MONTH= " somefile
>>
>> Then in your start-up macro you reference the variable $foo.
>>
>> search-buffer "M" $foo
>>
>> You will need to be careful about how you quote the argument on the command
>> line if there are any special characters or spaces. This will depend on the
>> operating system you are using.
>>
>> Before you test the start-up macro probably best to play with starting the
>> editor with the variable setting on the command line and checking that the
>> variable is coming through correctly with a
>>
>> esc-x describe-variable $foo
>>
>> This will show you the variable value. If it is OK then you can work on the
>> start-up.
>>
>> Regards
>> Jon
>>
> Jon
>
> thanks for the reply.  One question how do I know which variable I can use?
>
> Ian
>
Hi Ian,

You can use any variable that is *NOT* listed in

esc-x list-variables

These are ME's variables that are used by macros.
Also avoid any environment variable (i.e. $DISPLAY as used on UNIX).

So something like $arg1 would be a sensible choice i.e.
-v$arg1=This -v$arg2=and -v$arg3=that

Regards
Jon.

#2629 From: "igcain" <igcain@...>
Date: Sat Jan 29, 2011 9:58 am
Subject: Re: Passing value of varaiable from command line to the start-up macro
igcain
Send Email Send Email
 
--- In jasspa@yahoogroups.com, Jon Green <jon@...> wrote:
>
> On 28/01/2011 17:36, igcain wrote:
> >
> > --- In jasspa@yahoogroups.com, Jon Green<jon@>  wrote:
> >> On 27/01/2011 20:58, igcain wrote:
> >>> Hi there
> >>>
> >>> I want to invoke the ne editor such that when it starts it goes to a
specified line of text ready for over typing.  My start-up macro in ne.emf looks
something like;
> >>>
> >>> define-macro start-up
> >>>     19 buffer-mode "over"
> >>>     !force search-buffer "M" "MONTH= "
> >>>     end-of-line
> >>> !macro
> >>>
> >>> unfortunately my start-up macro (as currently written) only ever goes to
the string constant "MONTH= ".  But what I really would like to do is execute
the command line with;
> >>>
> >>> ne -vVarName="MONTH= " somefile
> >>>
> >>> where VarName can be substituted for any string that happens to be present
in the file to be ediited.  Only thing is how do I reference the variable
VarName within the start-up macro?
> >>>
> >>> Any help, much appreciated
> >>> Ian
> >>>
> >> Hi Ian,
> >>
> >> VarName needs to be a MicroEmacs variable i.e. $foo so you will do:
> >>
> >> ne -v"$foo=MONTH= " somefile
> >>
> >> Then in your start-up macro you reference the variable $foo.
> >>
> >> search-buffer "M" $foo
> >>
> >> You will need to be careful about how you quote the argument on the command
> >> line if there are any special characters or spaces. This will depend on the
> >> operating system you are using.
> >>
> >> Before you test the start-up macro probably best to play with starting the
> >> editor with the variable setting on the command line and checking that the
> >> variable is coming through correctly with a
> >>
> >> esc-x describe-variable $foo
> >>
> >> This will show you the variable value. If it is OK then you can work on the
> >> start-up.
> >>
> >> Regards
> >> Jon
> >>
> > Jon
> >
> > thanks for the reply.  One question how do I know which variable I can use?
> >
> > Ian
> >
> Hi Ian,
>
> You can use any variable that is *NOT* listed in
>
> esc-x list-variables
>
> These are ME's variables that are used by macros.
> Also avoid any environment variable (i.e. $DISPLAY as used on UNIX).
>
> So something like $arg1 would be a sensible choice i.e.
> -v$arg1=This -v$arg2=and -v$arg3=that
>
> Regards
> Jon.
>
Thanks for the advice Jon.  Unfortunately $arg1 doesn't work all I get is "arg1:
Undefined variable" when I use the command line
ne -v$arg1="Hello" greeting.dat

Do you think  the fact I am using nanoEmacs is an issue?

#2630 From: Jon Green <jon@...>
Date: Sat Jan 29, 2011 7:03 pm
Subject: Re: Re: Passing value of varaiable from command line to the start-up macro
bigfatmrmoose
Send Email Send Email
 
On 29/01/2011 09:58, igcain wrote:
>
>
> --- In jasspa@yahoogroups.com, Jon Green<jon@...>  wrote:
>>
>> On 28/01/2011 17:36, igcain wrote:
>>>
>>> --- In jasspa@yahoogroups.com, Jon Green<jon@>   wrote:
>>>> On 27/01/2011 20:58, igcain wrote:
>>>>> Hi there
>>>>>
>>>>> I want to invoke the ne editor such that when it starts it goes to a
specified line of text ready for over typing.  My start-up macro in ne.emf looks
something like;
>>>>>
>>>>> define-macro start-up
>>>>>      19 buffer-mode "over"
>>>>>      !force search-buffer "M" "MONTH= "
>>>>>      end-of-line
>>>>> !macro
>>>>>
>>>>> unfortunately my start-up macro (as currently written) only ever goes to
the string constant "MONTH= ".  But what I really would like to do is execute
the command line with;
>>>>>
>>>>> ne -vVarName="MONTH= " somefile
>>>>>
>>>>> where VarName can be substituted for any string that happens to be present
in the file to be ediited.  Only thing is how do I reference the variable
VarName within the start-up macro?
>>>>>
>>>>> Any help, much appreciated
>>>>> Ian
>>>>>
>>>> Hi Ian,
>>>>
>>>> VarName needs to be a MicroEmacs variable i.e. $foo so you will do:
>>>>
>>>> ne -v"$foo=MONTH= " somefile
>>>>
>>>> Then in your start-up macro you reference the variable $foo.
>>>>
>>>> search-buffer "M" $foo
>>>>
>>>> You will need to be careful about how you quote the argument on the command
>>>> line if there are any special characters or spaces. This will depend on the
>>>> operating system you are using.
>>>>
>>>> Before you test the start-up macro probably best to play with starting the
>>>> editor with the variable setting on the command line and checking that the
>>>> variable is coming through correctly with a
>>>>
>>>> esc-x describe-variable $foo
>>>>
>>>> This will show you the variable value. If it is OK then you can work on the
>>>> start-up.
>>>>
>>>> Regards
>>>> Jon
>>>>
>>> Jon
>>>
>>> thanks for the reply.  One question how do I know which variable I can use?
>>>
>>> Ian
>>>
>> Hi Ian,
>>
>> You can use any variable that is *NOT* listed in
>>
>> esc-x list-variables
>>
>> These are ME's variables that are used by macros.
>> Also avoid any environment variable (i.e. $DISPLAY as used on UNIX).
>>
>> So something like $arg1 would be a sensible choice i.e.
>> -v$arg1=This -v$arg2=and -v$arg3=that
>>
>> Regards
>> Jon.
>>
> Thanks for the advice Jon.  Unfortunately $arg1 doesn't work all I get is
"arg1: Undefined variable" when I use the command line
> ne -v$arg1="Hello" greeting.dat
>
> Do you think  the fact I am using nanoEmacs is an issue?
>

Hi Ian,

Should not be a problem. Problem is what O/S you are running.
So I am running on Sun Solaris at the moment and I can do:

orac% ne -v'$arg1=Hello'

ne runs up as normal

Then I can do a

esc-x describe-variable $arg1

and it is says "Hello" which is what I expect because that is what I passed.

On UNIX then I have to protect the $arg1 from the shell (zsh in my case) so I
have protected it with single quotes which stops the shell from expanding it.

If I do *NOT* quote it then the command shell complains i.e.

orac% ne -v$arg1=Hello
ne Error: Cannot set variable [] from the command-line

My best guess is that this is probably what you are seeing. So I think you are
currently fighting with your command shell and not ne. Protect the string with
a single quote pair (on UNIX/Linux/BSD), possibly it is a double quotes pair on
Windows (do not quote me on Windows as I am not an expert and a infrequent
user).

I have to admit that I do not use "ne" at all now as it does not carry all of
the baggage that I need, specifically the directory listing stuff. The only
time I have really used ne in the past is in bringing up systems where I need
an editor quickly and can FTP/HTTP the image onto the machine or where I need
to admin a system but do not want to install any packages. Given that disk
space memory is not such a problem these days then I much prefer the fully
featured "me" with UK/US spelling dictionaries installed and use the Zero
install image (http://www.jasspa.com/zeroinst.html) with a customised macro
file bundle which includes the spelling dictionaries and my extended file
template macros. The end result is that the file is much bigger but I still
have a single executable image "me" that I do not need to install and can just
run. Even on something like the EEE-PC where disk space is tight then I still
find the zero install image better. On such a space constrained device it uses
a much smaller footprint than a standard me install with the macro files
individually separately installed because the archive extension uses
compression and you do not suffer from the disk block size losses of each
individual small file.

Regards
Jon.

#2631 From: "igcain" <igcain@...>
Date: Sun Jan 30, 2011 9:00 am
Subject: Re: Passing value of varaiable from command line to the start-up macro
igcain
Send Email Send Email
 
--- In jasspa@yahoogroups.com, Jon Green <jon@...> wrote:
>
> On 29/01/2011 09:58, igcain wrote:
> >
> >
> > --- In jasspa@yahoogroups.com, Jon Green<jon@>  wrote:
> >>
> >> On 28/01/2011 17:36, igcain wrote:
> >>>
> >>> --- In jasspa@yahoogroups.com, Jon Green<jon@>   wrote:
> >>>> On 27/01/2011 20:58, igcain wrote:
> >>>>> Hi there
> >>>>>
> >>>>> I want to invoke the ne editor such that when it starts it goes to a
specified line of text ready for over typing.  My start-up macro in ne.emf looks
something like;
> >>>>>
> >>>>> define-macro start-up
> >>>>>      19 buffer-mode "over"
> >>>>>      !force search-buffer "M" "MONTH= "
> >>>>>      end-of-line
> >>>>> !macro
> >>>>>
> >>>>> unfortunately my start-up macro (as currently written) only ever goes to
the string constant "MONTH= ".  But what I really would like to do is execute
the command line with;
> >>>>>
> >>>>> ne -vVarName="MONTH= " somefile
> >>>>>
> >>>>> where VarName can be substituted for any string that happens to be
present in the file to be ediited.  Only thing is how do I reference the
variable VarName within the start-up macro?
> >>>>>
> >>>>> Any help, much appreciated
> >>>>> Ian
> >>>>>
> >>>> Hi Ian,
> >>>>
> >>>> VarName needs to be a MicroEmacs variable i.e. $foo so you will do:
> >>>>
> >>>> ne -v"$foo=MONTH= " somefile
> >>>>
> >>>> Then in your start-up macro you reference the variable $foo.
> >>>>
> >>>> search-buffer "M" $foo
> >>>>
> >>>> You will need to be careful about how you quote the argument on the
command
> >>>> line if there are any special characters or spaces. This will depend on
the
> >>>> operating system you are using.
> >>>>
> >>>> Before you test the start-up macro probably best to play with starting
the
> >>>> editor with the variable setting on the command line and checking that
the
> >>>> variable is coming through correctly with a
> >>>>
> >>>> esc-x describe-variable $foo
> >>>>
> >>>> This will show you the variable value. If it is OK then you can work on
the
> >>>> start-up.
> >>>>
> >>>> Regards
> >>>> Jon
> >>>>
> >>> Jon
> >>>
> >>> thanks for the reply.  One question how do I know which variable I can
use?
> >>>
> >>> Ian
> >>>
> >> Hi Ian,
> >>
> >> You can use any variable that is *NOT* listed in
> >>
> >> esc-x list-variables
> >>
> >> These are ME's variables that are used by macros.
> >> Also avoid any environment variable (i.e. $DISPLAY as used on UNIX).
> >>
> >> So something like $arg1 would be a sensible choice i.e.
> >> -v$arg1=This -v$arg2=and -v$arg3=that
> >>
> >> Regards
> >> Jon.
> >>
> > Thanks for the advice Jon.  Unfortunately $arg1 doesn't work all I get is
"arg1: Undefined variable" when I use the command line
> > ne -v$arg1="Hello" greeting.dat
> >
> > Do you think  the fact I am using nanoEmacs is an issue?
> >
>
> Hi Ian,
>
> Should not be a problem. Problem is what O/S you are running.
> So I am running on Sun Solaris at the moment and I can do:
>
> orac% ne -v'$arg1=Hello'
>
> ne runs up as normal
>
> Then I can do a
>
> esc-x describe-variable $arg1
>
> and it is says "Hello" which is what I expect because that is what I passed.
>
> On UNIX then I have to protect the $arg1 from the shell (zsh in my case) so I
> have protected it with single quotes which stops the shell from expanding it.
>
> If I do *NOT* quote it then the command shell complains i.e.
>
> orac% ne -v$arg1=Hello
> ne Error: Cannot set variable [] from the command-line
>
> My best guess is that this is probably what you are seeing. So I think you are
> currently fighting with your command shell and not ne. Protect the string with
> a single quote pair (on UNIX/Linux/BSD), possibly it is a double quotes pair
on
> Windows (do not quote me on Windows as I am not an expert and a infrequent
user).
>
> I have to admit that I do not use "ne" at all now as it does not carry all of
> the baggage that I need, specifically the directory listing stuff. The only
> time I have really used ne in the past is in bringing up systems where I need
> an editor quickly and can FTP/HTTP the image onto the machine or where I need
> to admin a system but do not want to install any packages. Given that disk
> space memory is not such a problem these days then I much prefer the fully
> featured "me" with UK/US spelling dictionaries installed and use the Zero
> install image (http://www.jasspa.com/zeroinst.html) with a customised macro
> file bundle which includes the spelling dictionaries and my extended file
> template macros. The end result is that the file is much bigger but I still
> have a single executable image "me" that I do not need to install and can just
> run. Even on something like the EEE-PC where disk space is tight then I still
> find the zero install image better. On such a space constrained device it uses
> a much smaller footprint than a standard me install with the macro files
> individually separately installed because the archive extension uses
> compression and you do not suffer from the disk block size losses of each
> individual small file.
>
> Regards
> Jon.
>
Jon

The single quotes did it! (can't think why I hadn't tried that before)

Thanks for all the help.

Ian

#2634 From: Jon Green <jon@...>
Date: Wed Feb 23, 2011 8:18 pm
Subject: Sorry spam!
jng614
Send Email Send Email
 
The spam poster has been removed as have messages.
Jon.

#2635 From: Jeremy Cowgar <jeremy@...>
Date: Wed May 4, 2011 2:30 pm
Subject: A Task Timer for MicroEmacs - blog post
cp200205
Send Email Send Email
 
#2636 From: "cp200205" <jeremy@...>
Date: Wed May 4, 2011 4:44 pm
Subject: Re: Overwrite Selection
cp200205
Send Email Send Email
 
Steve,

I am terribly sorry! I have not gotten an email from the Jasspa group since
11/02/2010 for some reason. I need to look at the mail logs and figure out what
went wrong. I did not see this (or any other message past that date) until I
posted one this morning. When I saw it didn't come in I came to the web
interface to see if it actually posted and now see all sorts of other messages I
have not got.

Anyway, I did apply the patch just now and it seems to be working great. About
the copying of the region to the clipboard. I personally like that. I didn't
catch on that it was doing that. However it is not the way the MS-shift stuff
works in Microsoft. So... can it be the way it works in MicroEmacs? As I said, I
personally like it that way but I'm probably not the only one using it. I guess
it matters how much MicroEmacs wants to emulate the MS shift stuff. That's your
call.

Jeremy

--- In jasspa@yahoogroups.com, Steven Phillips <bill@...> wrote:
>
> Jeremy,
>
> Can you please try out the following patch, below is a diff and attached
> is the complete emf file, I suggest you keep your current version just
> in case there is a problem. I may have missed an input key or two,
> please let me know if I have.
>
> Also while doing this I noticed a fundamental difference between ME's
> shift region and the standard - if you shift a region and then move
> (i.e. let go of the shift and then press a cursor key) ME's shift region
> implementation still copies the region to the kill buffer whereas on
> windows you must use C-c to copy it into the cut/paste buffer. I guess I
> was thinking nore of Unix style mouse behaviour when I implemented this
> rather than a true MS region interface. Should this be changed or does
> this quirk suit ME?
>
> Steve

#2637 From: Steven Phillips <bill@...>
Date: Thu May 5, 2011 9:26 am
Subject: Re: Re: Overwrite Selection
bill@...
Send Email Send Email
 
I also think it should be left as is - Windows uses C-x, C-c & C-v for copy buffer manipulation, all of these key bindings are used in ME for other things so ME's shift region support cannot be the same as Windows and if the user has to press 'esc w' once they have defined the 'shift region' what does this gain over the standard way of doing it? Not a lot.

Steve

cp200205 wrote:
 

Steve,

I am terribly sorry! I have not gotten an email from the Jasspa group since 11/02/2010 for some reason. I need to look at the mail logs and figure out what went wrong. I did not see this (or any other message past that date) until I posted one this morning. When I saw it didn't come in I came to the web interface to see if it actually posted and now see all sorts of other messages I have not got.

Anyway, I did apply the patch just now and it seems to be working great. About the copying of the region to the clipboard. I personally like that. I didn't catch on that it was doing that. However it is not the way the MS-shift stuff works in Microsoft. So... can it be the way it works in MicroEmacs? As I said, I personally like it that way but I'm probably not the only one using it. I guess it matters how much MicroEmacs wants to emulate the MS shift stuff. That's your call.

Jeremy

--- In jasspa@yahoogroups.com, Steven Phillips <bill@...> wrote:
>
> Jeremy,
>
> Can you please try out the following patch, below is a diff and attached
> is the complete emf file, I suggest you keep your current version just
> in case there is a problem. I may have missed an input key or two,
> please let me know if I have.
>
> Also while doing this I noticed a fundamental difference between ME's
> shift region and the standard - if you shift a region and then move
> (i.e. let go of the shift and then press a cursor key) ME's shift region
> implementation still copies the region to the kill buffer whereas on
> windows you must use C-c to copy it into the cut/paste buffer. I guess I
> was thinking nore of Unix style mouse behaviour when I implemented this
> rather than a true MS region interface. Should this be changed or does
> this quirk suit ME?
>
> Steve


#2638 From: "cp200205" <jeremy@...>
Date: Fri May 6, 2011 3:22 am
Subject: Smart Home Macro
cp200205
Send Email Send Email
 
I just wrote a smart home macro. When executing it will move the cursor to the
first non-blank location in the current line. If the cursor was already there,
however, it then moves the cursor to the first column. An example, assuming . is
leading space and ^ is the cursor:

....John^Doe    : execute smart-home and it will become:
....^John Doe   : execute smart-home again and it becomes:
^....John Doe   : execute again and it becomes:
....^John Doe   : each hit cycles between the two locations.

The source is included here and also available from my dotmicroemacs github repo
(as well as other macros and my configs):
https://github.com/jcowgar/dotmicroemacs

======== BEGIN ========
; Go to the first non-blank character on the current line. If already there,
; go to column 1
define-macro smart-home
     set-variable #l1 $window-acol

     beginning-of-line

     !repeat
         !force forward-char
         !if $status
             !if ¬ &sin @wc " \t"
                 set-variable #l0 1
             !endif
         !else
             set-variable #l0 1
         !endif
     !until #l0

     !if &equal $window-acol #l1
         beginning-of-line
     !end
!emacro
global-bind-key smart-home "home"
======== END ========

Jeremy Cowgar
http://jeremy.cowgar.com

#2639 From: "cp200205" <jeremy@...>
Date: Fri May 6, 2011 11:51 am
Subject: Re: Smart Home Macro
cp200205
Send Email Send Email
 
I made the macro more complex than necessary. Below is a simpler version with a
few qwirks fixed...

==== BEGIN ====
; Go to the first non-blank character on the current line. If already there,
; go to column 1
define-macro smart-home
     set-variable #l0 $window-acol

     beginning-of-line

     !while &sin @wc " \t"
         !force forward-char
     !done

     !if &equal $window-acol #l0
         beginning-of-line
     !end
!emacro
==== END ====

You can get the updated version on my github repo with other items as well,
https://github.com/jcowgar/dotmicroemacs

Jeremy

#2640 From: "vae_ik" <ilijak@...>
Date: Mon May 9, 2011 7:18 am
Subject: Re: Smart Home Macro
vae_ik
Send Email Send Email
 
Hi

There is a macro with such functionality in MicroEmacs distribution already.
Look for contrib/bol_eol.emf

Regards
Ilija



--- In jasspa@yahoogroups.com, "cp200205" <jeremy@...> wrote:
>
> I just wrote a smart home macro. When executing it will move the cursor to the
first non-blank location in the current line. If the cursor was already there,
however, it then moves the cursor to the first column. An example, assuming . is
leading space and ^ is the cursor:
>
> ....John^Doe    : execute smart-home and it will become:
> ....^John Doe   : execute smart-home again and it becomes:
> ^....John Doe   : execute again and it becomes:
> ....^John Doe   : each hit cycles between the two locations.
>
> The source is included here and also available from my dotmicroemacs github
repo (as well as other macros and my configs):
https://github.com/jcowgar/dotmicroemacs
>
> ======== BEGIN ========
> ; Go to the first non-blank character on the current line. If already there,
> ; go to column 1
> define-macro smart-home
>     set-variable #l1 $window-acol
>
>     beginning-of-line
>
>     !repeat
>         !force forward-char
>         !if $status
>             !if ¬ &sin @wc " \t"
>                 set-variable #l0 1
>             !endif
>         !else
>             set-variable #l0 1
>         !endif
>     !until #l0
>
>     !if &equal $window-acol #l1
>         beginning-of-line
>     !end
> !emacro
> global-bind-key smart-home "home"
> ======== END ========
>
> Jeremy Cowgar
> http://jeremy.cowgar.com
>

#2641 From: "cp200205" <jeremy@...>
Date: Thu May 12, 2011 2:33 pm
Subject: Re: Smart Home Macro
cp200205
Send Email Send Email
 
Opps :-/ Didn't intentionally reinvent the wheel.

Jeremy

--- In jasspa@yahoogroups.com, "vae_ik" <ilijak@...> wrote:
>
>
> Hi
>
> There is a macro with such functionality in MicroEmacs distribution already.
Look for contrib/bol_eol.emf
>

#2642 From: "cp200205" <jeremy@...>
Date: Thu May 12, 2011 3:22 pm
Subject: Go Mode for MicroEmacs... going into main Go repo
cp200205
Send Email Send Email
 
Hello,

I have written a mode for MicroEmacs for the Go language. I have a request to
place it into Go's main repository. I would like a second pair of eyes to go
over things if someone would. I showed a screen shot of MicroEmacs and quite a
few people were pretty excited about it.

http://jeremy.cowgar.com/files/microemacs-go.png

One existing problem I have right now is that the syntax highlighting is doing
so case insensitive but Go is a case sensitive language. Gotta get that fixed.
Other than that problem, does anyone see an issue or something that should be
changed?

https://github.com/jcowgar/dotmicroemacs/blob/master/hkgo.emf

Thanks for any input,

Jeremy

#2643 From: Steven Phillips <bill@...>
Date: Thu May 12, 2011 3:44 pm
Subject: Re: Go Mode for MicroEmacs... going into main Go repo
bill@...
Send Email Send Email
 
Not heard of Go, do you have a link?

To fix the case issue simply change:
    0 hilight .hilight.go 1 $global-scheme
To
    0 hilight .hilight.go 0 $global-scheme

However, as the language supports multi-line comments (i.e. /* ... to */) I suggest you take a similar approach to the C hook and use

    0 hilight .hilight.go 2 50 $global-scheme

Which makes ME look back 50 lines to try and locate an open comment.

Steve

cp200205 wrote:
 

Hello,

I have written a mode for MicroEmacs for the Go language. I have a request to place it into Go's main repository. I would like a second pair of eyes to go over things if someone would. I showed a screen shot of MicroEmacs and quite a few people were pretty excited about it.

http://jeremy.cowgar.com/files/microemacs-go.png

One existing problem I have right now is that the syntax highlighting is doing so case insensitive but Go is a case sensitive language. Gotta get that fixed. Other than that problem, does anyone see an issue or something that should be changed?

https://github.com/jcowgar/dotmicroemacs/blob/master/hkgo.emf

Thanks for any input,

Jeremy


#2644 From: "vae_ik" <ilijak@...>
Date: Thu May 12, 2011 3:49 pm
Subject: Re: Smart Home Macro
vae_ik
Send Email Send Email
 
--- In jasspa@yahoogroups.com, "cp200205" <jeremy@...> wrote:
>
> Opps :-/ Didn't intentionally reinvent the wheel.

Better two than nill. And even simple, it'a good exercise.
As for reinventing, I have reinvented it twice: 1st in C, then as a macro.

cheers
Ilija


>
> Jeremy
>
> --- In jasspa@yahoogroups.com, "vae_ik" <ilijak@> wrote:
> >
> >
> > Hi
> >
> > There is a macro with such functionality in MicroEmacs distribution already.
Look for contrib/bol_eol.emf
> >
>

#2645 From: "cp200205" <jeremy@...>
Date: Thu May 12, 2011 6:02 pm
Subject: Re: Go Mode for MicroEmacs... going into main Go repo
cp200205
Send Email Send Email
 
Thanks for the updates Steve. Go is an open source, general purpose, statically
typed, compiled language with great support for concurrent execution by Google.
You can read more about it: http://golang.org/

Jeremy

--- In jasspa@yahoogroups.com, Steven Phillips <bill@...> wrote:
>
> Not heard of Go, do you have a link?
>
> To fix the case issue simply change:
>     0 hilight .hilight.go 1 $global-scheme
> To
>     0 hilight .hilight.go 0 $global-scheme
>
> However, as the language supports multi-line comments (i.e. /* ... to
> */) I suggest you take a similar approach to the C hook and use
>
>     0 hilight .hilight.go 2 50 $global-scheme
>
> Which makes ME look back 50 lines to try and locate an open comment.
>
> Steve
>
> cp200205 wrote:
> >
> >
> > Hello,
> >
> > I have written a mode for MicroEmacs for the Go language. I have a
> > request to place it into Go's main repository. I would like a second
> > pair of eyes to go over things if someone would. I showed a screen
> > shot of MicroEmacs and quite a few people were pretty excited about it.
> >
> > http://jeremy.cowgar.com/files/microemacs-go.png
> >
> > One existing problem I have right now is that the syntax highlighting
> > is doing so case insensitive but Go is a case sensitive language.
> > Gotta get that fixed. Other than that problem, does anyone see an
> > issue or something that should be changed?
> >
> > https://github.com/jcowgar/dotmicroemacs/blob/master/hkgo.emf
> >
> > Thanks for any input,
> >
> > Jeremy
> >
> >
>

#2646 From: "cp200205" <jeremy@...>
Date: Thu May 12, 2011 6:52 pm
Subject: Mode dependent tools menu?
cp200205
Send Email Send Email
 
For the Go mode, I create a gofmt macro. Go ships with a formatting program
called gofmt. When contributing to just about any project they expect the code
to be properly formatted. For the most part the indentation does that but gofmt
may format some areas that the go mode does not, for instance variable
assignments and import statments. They are aligned. Anyway, I added:

set-variable .fhook-go.command-flag "|t|"
set-variable .fhook-go.command-name "|gofmt|"
set-variable .fhook-go.command-nbind "||"
set-variable .fhook-go.command-kbind "||"
set-variable .fhook-go.command-desc  "|Go Format|"

to my Go mode. When doing so, the normal tool menu disappeared, it use to
contain items such as Start Comment, Comment Out Line, ..., List Items, ... ...
Now all it contains is "View Help Page" and "Insert a Nortmal Tab". It does not
even incude my "Go Format" item.

What am I doing wrong? I committed my code to my github repo, but the command
stuff is commented out as to not break the existing tool menu.
https://github.com/jcowgar/dotmicroemacs/blob/master/hkgo.emf

Thanks!

Jeremy

#2647 From: "cp200205" <jeremy@...>
Date: Fri May 13, 2011 12:48 pm
Subject: Re: Mode dependent tools menu?
cp200205
Send Email Send Email
 
I got it figured out. Not sure what exactly I did differently but it's now
working.

set-variable .fhook-go.command-flag "|t|th|th|"
set-variable .fhook-go.command-name "||gofmt|gomake|"
set-variable .fhook-go.command-nbind "||||"
set-variable .fhook-go.command-kbind "||||"
set-variable .fhook-go.command-desc  "||Go \HFormat|Go \HMake|"

Jeremy

--- In jasspa@yahoogroups.com, "cp200205" <jeremy@...> wrote:
>
> For the Go mode, I create a gofmt macro. Go ships with a formatting program
called gofmt. When contributing to just about any project they expect the code
to be properly formatted. For the most part the indentation does that but gofmt
may format some areas that the go mode does not, for instance variable
assignments and import statments. They are aligned. Anyway, I added:
>
> set-variable .fhook-go.command-flag "|t|"
> set-variable .fhook-go.command-name "|gofmt|"
> set-variable .fhook-go.command-nbind "||"
> set-variable .fhook-go.command-kbind "||"
> set-variable .fhook-go.command-desc  "|Go Format|"
>
> to my Go mode. When doing so, the normal tool menu disappeared, it use to
contain items such as Start Comment, Comment Out Line, ..., List Items, ... ...
Now all it contains is "View Help Page" and "Insert a Nortmal Tab". It does not
even incude my "Go Format" item.
>
> What am I doing wrong? I committed my code to my github repo, but the command
stuff is commented out as to not break the existing tool menu.
https://github.com/jcowgar/dotmicroemacs/blob/master/hkgo.emf
>
> Thanks!
>
> Jeremy
>

#2648 From: "isaacpei" <isaacpei@...>
Date: Mon Jul 18, 2011 12:32 pm
Subject: two specific question from a new user
isaacpei
Send Email Send Email
 
Hello,

I am an new user of microemacs, I have
two specific questions:
1. is there a softwrap feature in uemacs?
2. is there the 'orgmode' in uemacs?


thanks a lot!

Best regards,
  Isaac

#2649 From: "isaacpei" <isaacpei@...>
Date: Mon Jul 18, 2011 7:08 pm
Subject: extending the macro with lua?
isaacpei
Send Email Send Email
 
hello,

another question - is it possible to extend the macro lanuage in miroemacs with
lua?

Best regards,
  Isaac

#2650 From: Steven Phillips <bill@...>
Date: Mon Jul 18, 2011 7:45 pm
Subject: Re: two specific question from a new user
bill@...
Send Email Send Email
 
Isaac,

Welcome to the group!

Sorry but I'm not familiar with the terms softwrap or orgmode - what are they?

I'd guess that softwrap is the wrapping of long lines in the display so all the text is visible? If so the answer is no (there has to be some reason why this is 'micro' emacs!)

Steve

isaacpei wrote:
 

Hello,

I am an new user of microemacs, I have
two specific questions:
1. is there a softwrap feature in uemacs?
2. is there the 'orgmode' in uemacs?

thanks a lot!

Best regards,
Isaac


#2651 From: Tom Hundt <thundt@...>
Date: Mon Jul 18, 2011 9:14 pm
Subject: Re: two specific question from a new user
thundt
Send Email Send Email
 
org mode is a mode for GNU Emacs that supports outines, checklists, etc.

I've played around with it and wish MicroEmacs had it.  I've gone so far as to have both ME and Gnu installed just to support some to-do lists.  I'm Lisp-challenged, however, and that always stops me from switching over.

I think "soft wrap" means wrapping long lines by setting an editor flag, not by inserting actual linefeeds into the text.  What Notepad does in Windows.

-Tom


On Mon, Jul 18, 2011 at 12:45 PM, Steven Phillips <bill@...> wrote:


Isaac,

Welcome to the group!

Sorry but I'm not familiar with the terms softwrap or orgmode - what are they?

I'd guess that softwrap is the wrapping of long lines in the display so all the text is visible? If so the answer is no (there has to be some reason why this is 'micro' emacs!)

Steve


isaacpei wrote:
 

Hello,

I am an new user of microemacs, I have
two specific questions:
1. is there a softwrap feature in uemacs?
2. is there the 'orgmode' in uemacs?

thanks a lot!

Best regards,
Isaac






--
Thomas Hundt <tom@...> +1-415-867-6698



#2652 From: "isaacpei" <isaacpei@...>
Date: Tue Jul 19, 2011 2:33 am
Subject: Re: two specific question from a new user
isaacpei
Send Email Send Email
 
thanks, Tom
yes, yours best explained what I am looking for. thanks!

--- In jasspa@yahoogroups.com, Tom Hundt <thundt@...> wrote:
>
> org mode is a mode for GNU Emacs that supports outines, checklists, etc.
> http://orgmode.org/
>
> I've played around with it and wish MicroEmacs had it.  I've gone so far as
> to have both ME and Gnu installed just to support some to-do lists.  I'm
> Lisp-challenged, however, and that always stops me from switching over.
>
> I think "soft wrap" means wrapping long lines by setting an editor flag, not
> by inserting actual linefeeds into the text.  What Notepad does in Windows.
> http://www.gnu.org/software/libtool/manual/emacs/Longlines.html
>
> -Tom
>
>
> On Mon, Jul 18, 2011 at 12:45 PM, Steven Phillips <bill@...> wrote:
>
> > **
> >
> >
> > Isaac,
> >
> > Welcome to the group!
> >
> > Sorry but I'm not familiar with the terms softwrap or orgmode - what are
> > they?
> >
> > I'd guess that softwrap is the wrapping of long lines in the display so all
> > the text is visible? If so the answer is no (there has to be some reason why
> > this is 'micro' emacs!)
> >
> > Steve
> >
> >
> > isaacpei wrote:
> >
> >
> >
> > Hello,
> >
> > I am an new user of microemacs, I have
> > two specific questions:
> > 1. is there a softwrap feature in uemacs?
> > 2. is there the 'orgmode' in uemacs?
> >
> > thanks a lot!
> >
> > Best regards,
> > Isaac
> >
> >
> >
> >
>
>
>
>
> --
> Thomas Hundt <tom@...> +1-415-867-6698
>

#2653 From: "isaacpei" <isaacpei@...>
Date: Thu Jul 21, 2011 4:38 pm
Subject: how different is jasspa microemacs and the uemacs?
isaacpei
Send Email Send Email
 
Hello,

after using microemacs (jasspa version), I have to say, it's a GREAT piece of
software - I had thrown python, ruby, and R codes into it, suprisingly
everything works out of the box!

I am curious how different is jasspa version vs. the uemacs
http://git.kernel.org/?p=editors/uemacs/uemacs.git;a=tree

Another question is: is there active development on microemacs (jasspa version)?
and if there is, it's in the macro side, or in the c side? thanks

Best regards,
  Isaac

#2654 From: Jon Green <jon@...>
Date: Thu Jul 21, 2011 10:46 pm
Subject: Re: how different is jasspa microemacs and the uemacs?
jng614
Send Email Send Email
 
On 21/07/2011 17:38, isaacpei wrote:
> Hello,
>
> after using microemacs (jasspa version), I have to say, it's a GREAT piece of
software - I had thrown python, ruby, and R codes into it, suprisingly
everything works out of the box!
>
Hi Issac,

> I am curious how different is jasspa version vs. the uemacs
> http://git.kernel.org/?p=editors/uemacs/uemacs.git;a=tree
>
Well the jasspa version was based on uemacs but was forked a long time ago
(refer to the history that is on the site).
It is quite diverged now, the main difference in the macro language and
features such as syntax highlighting, indentation etc.

There are also some differences in the key strokes which have migrate in some
ways towards GNU Emacs for certain commands. There is a compatibility mode that
will turn the keyboard commands back to uemacs if that is what you prefer.

> Another question is: is there active development on microemacs (jasspa
version)? and if there is, it's in the macro side, or in the c side? thanks
There is still active development, although very slowly these days, it depends
how busy we are as to how much time we can spend on it (i.e. it does not pay
the rent). There are no critical issues pending at the moment in the code and
it is generally robust (well there are a couple of issues but most people would
be hard pressed to find them just doing normal editing).

Most of the development is macro code since we can do most new things with
macros rather than writing native code. However the C code is modified from
time to time either bug fixes or new features or extensions. Development is
driven by requirements, so if there are no new requirements then we do not
change anything.

There are some bug fixes and a few new features that we have not had time to
release just yet which we really ought to some time.

As for your question on Lua, the answer is no. I have pondered on Lua for some
time and considered that it would be a nice to include, however the amount of
re-work that would be required is quite huge (assuming that Lua displaced the
existing macros). I was not sure that it was worth the effort as it would
initially be a huge step backwards before it went forwards. But I do agree that
LUA would be a good engine choice were we starting out today.

Anyway thanks for your comments.

Regards
Jon.

> Best regards,
>   Isaac
>
>
>
> ------------------------------------
>
> __________________________________________________________________________
>
> This is an unmoderated list, but new members are moderated to ensure that
there are no spam users. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To un-subscribe, send a mail message to
>
>      mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
> Yahoo! Groups Links
>
>
>

#2655 From: Ulrich Mueller <ulm@...>
Date: Fri Aug 19, 2011 10:59 am
Subject: Build failure on Linux 3.0
udalricus
Send Email Send Email
 
Hello,

I've noticed that building of Jasspa Microemacs (October 2009 version)
fails with the Linux 3.0 kernel.

The problem is due to the new numbering scheme of Linux, which is not
properly recognised by src/build:

     elif [ $PLATFORM = "Linux" ] ; then
         MACHINE=`uname -m | cut -c 1-3`
         if [ $MACHINE = "arm" ] ; then
             MAKEBAS=zaurus
         else
             KERNEL_MAJOR=`uname -r | cut -c 1-1`
             KERNEL_MINOR=`uname -r | cut -c 3-3`
             MAKEBAS="linux$KERNEL_MAJOR$KERNEL_MINOR"
             if [ ! -r $MAKEBAS.gmk ] ; then
                 MAKEBAS="linux2"
             fi
         fi

The code will look for linux30.gmk which does not exist, and then fall
back to linux2 (which subsequently fails because it tries linking
against termcap instead of ncurses).

As a workaround when packaging Jasspa Microemacs for Gentoo Linux,
I've hardcoded linux26, see the following patch:
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-editors/jasspa-micr\
oemacs/files/20091011-linux3.patch?view=markup>
Maybe in the general case a more elaborate solution is called for.

BTW, have you ever considered changing the build system to something
more modern (like Autotools or CMake)?

Ulrich

#2656 From: Larry Tjoelker <larry_tjoelker@...>
Date: Fri Aug 19, 2011 11:06 am
Subject: Larry Tjoelker is out of the office
larry_tjoelker@...
Send Email Send Email
 
I am out of the office from Fri 08/05/2011 until Mon 08/29/2011.

Please contact Daniel Moralez for immediate assistance and I will respond
when I return.

#2657 From: Jon Green <jon@...>
Date: Sat Aug 20, 2011 9:14 pm
Subject: Re: Build failure on Linux 3.0
jng614
Send Email Send Email
 
Hi Ulrich,

Thanks for this. Sorry you had to do this.
Not being on the leading edge then not encountered Linux 3 yet, all been Linux
2.x systems.
As for auto tools then this has simply been a lack of time to invest in doing
the work.

Thanks for your time here, we will try and get a patch out.

Regards
Jon.

On 19 Aug 2011, at 11:59, Ulrich Mueller <ulm@...> wrote:

> Hello,
>
> I've noticed that building of Jasspa Microemacs (October 2009 version)
> fails with the Linux 3.0 kernel.
>
> The problem is due to the new numbering scheme of Linux, which is not
> properly recognised by src/build:
>
>    elif [ $PLATFORM = "Linux" ] ; then
>        MACHINE=`uname -m | cut -c 1-3`
>        if [ $MACHINE = "arm" ] ; then
>            MAKEBAS=zaurus
>        else
>            KERNEL_MAJOR=`uname -r | cut -c 1-1`
>            KERNEL_MINOR=`uname -r | cut -c 3-3`
>            MAKEBAS="linux$KERNEL_MAJOR$KERNEL_MINOR"
>            if [ ! -r $MAKEBAS.gmk ] ; then
>                MAKEBAS="linux2"
>            fi
>        fi
>
> The code will look for linux30.gmk which does not exist, and then fall
> back to linux2 (which subsequently fails because it tries linking
> against termcap instead of ncurses).
>
> As a workaround when packaging Jasspa Microemacs for Gentoo Linux,
> I've hardcoded linux26, see the following patch:
>
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-editors/jasspa-micr\
oemacs/files/20091011-linux3.patch?view=markup>
> Maybe in the general case a more elaborate solution is called for.
>
> BTW, have you ever considered changing the build system to something
> more modern (like Autotools or CMake)?
>
> Ulrich
>
>
> ------------------------------------
>
> __________________________________________________________________________
>
> This is an unmoderated list, but new members are moderated to ensure that
there are no spam users. JASSPA is not responsible for the content of
> any material posted to this list.
>
> To un-subscribe, send a mail message to
>
>    mailto:jasspa-unsubscribe@yahoogroups.com
>
> or visit http://groups.yahoo.com/group/jasspa and
> modify your account settings manually.
>
>
> Yahoo! Groups Links
>
>
>

Messages 2626 - 2657 of 2695   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help