Author Topic: Emacs - how and where?  (Read 8101 times)

0 Members and 1 Guest are viewing this topic.

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: nz
Re: Emacs - how and where?
« Reply #50 on: December 04, 2018, 05:29:55 am »
What was the basis for sorting? (IOW, what was the machine keying off of?)

Yeah, that's not going to work for much of any programming language except traditional BASIC.
 

Online newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: Emacs - how and where?
« Reply #51 on: December 04, 2018, 06:36:08 am »
What was the basis for sorting? (IOW, what was the machine keying off of?)

Yeah, that's not going to work for much of any programming language except traditional BASIC.

It was not mandatory to use them, but the columns after 72 in a Fortran card were ignored by the compiler.
It was good practice to put a sequence number there.
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Emacs - how and where?
« Reply #52 on: December 04, 2018, 08:38:18 am »
What was the basis for sorting? (IOW, what was the machine keying off of?)

Yeah, that's not going to work for much of any programming language except traditional BASIC.

It was not mandatory to use them, but the columns after 72 in a Fortran card were ignored by the compiler.
It was good practice to put a sequence number there.

For Fortran programs, but not for other uses.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online newbrain

  • Super Contributor
  • ***
  • Posts: 1714
  • Country: se
Re: Emacs - how and where?
« Reply #53 on: December 04, 2018, 09:56:44 am »
It was not mandatory to use them, but the columns after 72 in a Fortran card were ignored by the compiler.
It was good practice to put a sequence number there.

For Fortran programs, but not for other uses.
IIRC, but I'm talking of stuff I came in contact (briefly, thanks $DEITY) 35 years ago, also the job control language ("shell scripts"  ::)) had the same provision.
I suspect many punched card era languages might have done the same...
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19281
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Emacs - how and where?
« Reply #54 on: December 04, 2018, 06:50:46 pm »
It was not mandatory to use them, but the columns after 72 in a Fortran card were ignored by the compiler.
It was good practice to put a sequence number there.

For Fortran programs, but not for other uses.
IIRC, but I'm talking of stuff I came in contact (briefly, thanks $DEITY) 35 years ago, also the job control language ("shell scripts"  ::)) had the same provision.
I suspect many punched card era languages might have done the same...

I only came into contact with punched cards at school and a tiny bit at university - which was enough to put me off.

At school I also learned Algol-60 and then came across a book on COBOL. 80% of the way through that book there was a section on advanced COBOL, e.g. "A=B+C" (cf "add C to B giving A"). That was a useful "formative experience" since it enabled me to avoid a whole section of industry that would have destroyed my soul.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Emacs - how and where?
« Reply #55 on: December 04, 2018, 08:00:36 pm »
Code: [Select]
[ebuild  N     ] net-libs/liblockfile-1.09
[ebuild  N     ] app-eselect/eselect-ctags-1.18
[ebuild  N     ] app-eselect/eselect-emacs-1.18
[ebuild  N     ] app-emacs/emacs-common-gentoo-1.6-r1  USE="X -games"
[ebuild  N     ] app-editors/emacs-25.3-r4  USE="X acl gpm gtk3 inotify ssl xpm zlib -Xaw3d -alsa (-aqua) -athena (-cairo) -dbus -dynamic-loading -games (-gconf) -gfile -gif -gsettings -gtk -gzip-el -imagemagick -jpeg -kerberos -libxml2 -livecd -m17n-lib -motif -png (-selinux) -sound -source -svg -tiff -toolkit-scroll-bars -wide-int -xft"
[ebuild  N     ] virtual/emacs-25

cooking on { HPPA, PPCBE, MIPSBE } :D
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Emacs - how and where?
« Reply #56 on: December 04, 2018, 08:01:45 pm »
(yes, decent-essential profile. It took me 45 min to choose flags)
 

Offline boffin

  • Supporter
  • ****
  • Posts: 1027
  • Country: ca
Re: Emacs - how and where?
« Reply #57 on: December 13, 2018, 04:29:27 pm »
One thing I still have to understand ... is why people still want modal text editor features through emulation
I still remember the horrors of the VAX editor. Pressing the "delete char/word/line" keys deleted different bits of text depending on what you had been doing sometime in the past. The "bright idea" was that they continued the direction of movement of the cursor. If the last move was backward it deleted the character/etc before, else it deleted the character/etc after.

I spent a day learning the editors macros, so I could get the numeric keypad keys to behave sensibly :)

That's weird, I don't remember EDT having those idiosyncrasies. Didn't you have to set the direction 1st if you wanted to go backwards? 

I do remember the GOLD key (Go onto Lower Designation), and still to this day I'm sure I could drop into EDT without really thinking about it.
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Emacs - how and where?
« Reply #58 on: December 13, 2018, 06:48:14 pm »
dunno, yesterday I bought a new license for Source Insight v4 (upgraded from v3, but on a different laptop), and ... I am still using it with a great satisfaction and productivity. I tend to avoid Eclipse CDT &C, I really prefer SciTools Understand (Ada), Source Insight(C), HDL companion (VHDL) on Windows, and Geany (C) + HDL Scriptum (VHDL) on Linux.

I still have to learn Emacs from scratch, since I am afraid I lost the minimal practical know/how (keys shortcut and tricks) I got 10 years ago when I used it at my university.

Code: [Select]
2018-12-04--18-50-20---2018-12-04--19-26-00 - [ app-editors/emacs ] - success - @2.29.1/7.3.0

But it's up on my Linux/HPPA workstation, thus I am ready  :D
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4003
  • Country: nz
Re: Emacs - how and where?
« Reply #59 on: December 14, 2018, 03:46:33 am »
dunno, yesterday I bought a new license for Source Insight v4 (upgraded from v3, but on a different laptop), and ... I am still using it with a great satisfaction and productivity. I tend to avoid Eclipse CDT &C, I really prefer SciTools Understand (Ada), Source Insight(C), HDL companion (VHDL) on Windows, and Geany (C) + HDL Scriptum (VHDL) on Linux.

I still have to learn Emacs from scratch, since I am afraid I lost the minimal practical know/how (keys shortcut and tricks) I got 10 years ago when I used it at my university.

Code: [Select]
2018-12-04--18-50-20---2018-12-04--19-26-00 - [ app-editors/emacs ] - success - @2.29.1/7.3.0

But it's up on my Linux/HPPA workstation, thus I am ready  :D

The good thing about emacs is that (with X or a decent terminal setting) you can largely use it just like NotePad or MS Word or whatever: type a character to insert it, backspace to delete left, arrow keys to move around, Home/End/PgUp/PgDn/Insert/Delete all work exactly as you'd expect. The default editing modes mean that most types of text files are automatically recognised and hitting Enter moves you to the next line and also properly indents it. Hitting TAB while at the start of a line will also properly indent it.

The only weirdness you absolutely need to know is:

C-k where k is any letter means press and hold the Control key and while it is pressed also press and release the "k" key.  M-k means to press the "ESC" key AND THEN the "k" key. Holding "META" on a special keyboard or more likely "ALT" on a PC one (or option on a Mac) while you press and release "k" might also work for M-k, depending on your terminal setting, but the "ESC" version will always work.

C-x C-u for Undo
C-x C-s for Save
C-x C-c to exit emacs
C-g to cancel any partially entered command

Then kinda useful :-)

C-s to start an incremental forward search, C-r for incremental backward search. Then just start typing what you what to look for. A 2nd C-s or C-r with an empty search string will search for the last thing you searched for.
C-s or C-r again to search for the next/previous of the same thing.
Type some more characters at any time to narrow the search, or C-w to add the next word in front of the cursor to the string being searched for (this is SUPER HANDY) or backspace to remove something from the search string.
At any time C-g to cancel the search and go back to where you started, or ENTER to cancel the search and stay where the cursor is now.

To move text around:

C-space on the first character you want to move (or one character after the last character you want to move) starts a selection. Then use arrow keys or PgUp/PgDn or C-s/C-r searching to move around. The selection between where you started and where you are might or might not be highlighted (depending on settings). You can use C-x C-x to move to the other end of the selection to extend or reduce it -- or just to confirm where it is if the selection is not highlighted.

Once you're happy press C-w to Cut the select or M-w to Copy it. Move to where you want it and press C-y to Paste it. (I'm using modern terms here, not emacs terms.)

ModernEmacs
C-xC-w
C-cM-w
C-vC-y

I'd say that's enough for someone to be immediately reasonably productive in emacs.
« Last Edit: December 14, 2018, 11:39:07 am by brucehoult »
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: Emacs - how and where?
« Reply #60 on: December 14, 2018, 11:21:30 am »
I'd say that's enough for someone to be immediately reasonably productive in emacs.

Yep. After that, add in C-x C-f (find-file) and C-x d (dired)
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Emacs - how and where?
« Reply #61 on: December 14, 2018, 11:24:20 am »
There’s an emacs tutorial built into it that’s well worth following for new users.

C-h t
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Emacs - how and where?
« Reply #62 on: December 14, 2018, 12:30:28 pm »
There’s an emacs tutorial built into it that’s well worth following for new users.

C-h t

it requires the flag 'doc' which was not set when I emerge it  :palm:
 

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Emacs - how and where?
« Reply #63 on: December 14, 2018, 12:31:47 pm »
@brucehoult
thanks, today I have time, and I will use Emacs.
Thanks for your mini-guide.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf