emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some developement questions


From: hw
Subject: Re: Some developement questions
Date: Wed, 05 Sep 2018 23:48:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Ergus <address@hidden> writes:

> On Tue, Sep 04, 2018 at 05:21:40PM +0200, hw wrote:
> [...]
>>
>>But how else than modal would you edit?  The difference between vim and
>>Emacs is that Emacs` normal mode is vims insert mode, and Emacs can have
>>a whole mode hiding behind every key you press rather than only one
>>"command mode" which limits you to the keys you have available and to
>>stringing them up.
>>
> I my brain at least a text editor should edit and insert a letter if I
> press it, and extra things require extra commands.

Hm, it doesn't really matter to me if insert or command mode is the
default.

> The real issue for me is that I can only use the terminal and many
> keybinds are not available (C-backspace or S-C-backspace for
> example). That's the reason I have considered to use evil mode
> sometimes.

Yeah, that's annoying.  Maybe I should find some key bindings for things
like this that work in terminals, too.

>>After all, I'll stick with Emacs.  Vim doesn't seem to have any real
>>advantages for me, and there are some things I'd be missing.
>>
>>> It was a solution in a moment but and according to the vi creator "it
>>> was for a world that doesn't exist anymore".
>>
>>That something is for a world that doesn't exist anymore can be said for
>>a lot of things.  That doesn't mean that what replaces it is any better,
>>and indeed the replacements are usually much worse.
>>
> I agree, that's why we still use emacs :) (or vim).

I like using Emacs, and there simply is nothing better than Emacs and
vim.  There don't need to be any replacements for them.

> But I find the justification that vim users should move with hjkl (and
> so on) because it is faster and better because the fingers don't
> move... so senseless. Is just my feeling.

It's true; the problem is that this idea breaks because there are too
many occassions when you have to move with the cursor keys instead.
That makes it difficult because you always need to decide which keys you
can currently use to move, or you don't decide and always use the cursor
keys.

I use the cursor keys and Cltr-a and Ctrl-e and Ctrl-l, and that's how
vim already doesn't have any advantages for me but even disadvantages.

> But sometimes I understand them when I have to type C-a C-SPC C-e M-w to
> select a line because xterm doesn't send C-backspace to emacs.

Right:


;; my-mark-line

(defun my-mark-this-line ()
  (interactive)
  (beginning-of-line)
  (set-mark-command nil)
  (end-of-line))

(defun my-copy-this-line ()
  (interactive)
  (my-mark-this-line)
  (kill-ring-save (mark) (point))
  (message "copied current line"))

(defun my-cut-this-line ()
  (interactive)
  (my-mark-this-line)
  (kill-region (mark) (point))
  (message "cut current line"))


;; ~/.emacs

(load "~/emacs/my-mark-line")
(global-set-key "\C-xl" 'my-mark-this-line)
(global-set-key "\C-xc" 'my-copy-this-line)
(global-set-key "\C-xw" 'my-cut-this-line)


If someone needs license info:  GPL v. 2

Is something like this really not already built in?  If C-k is intended
for this, it doesn't work out quite like that.

>>> Again. It depends of your use cases. To edit simple files there is not
>>> real difference, no advantage or disadvantage as editing is the basic
>>> functionality.
>>
>>Well, that could be said for all editors.
>
> Exactly. Emacs is not just an editor, but as a simple editor even nano
> is good enough (except for the undo lacking but our redo is not as good
> as it can be without undo-tree, this is one of the default things I
> would really like to change, the default undo behavior).

Nano sucks when you want to search for something and when you want to
save something.  I don't like it.

> [...]
>>Why wouldn't people using Emacs not also use fvwm?  I'd say particularly
>>those using fvwm would be using Emacs, and the other way round.
>>
>>Besides, why would anyone use anything else than fvwm?
>>
> JA JA, I didn't even know that fvwm existed, I will give a try :p but I 
> prefer tilling wm.

Fvwm can do that, here are some hints:


DestroyMenu  MenuArrangeWindows
AddToMenu    MenuArrangeWindows
+ "Arrange Windows"                             Title
+ ""                                            Nop
+ "&V-Tile 2"                                   FvwmRearrange -tile -a -mn 2 
-noraise 0 0 100 100
+ "V-Tile 3"                                    FvwmRearrange -tile -a -mn 3 
-noraise 0 0 100 100
+ "V-Tile 4"                                    FvwmRearrange -tile -a -mn 4 
-noraise 0 0 100 100
+ ""                                            Nop
+ "H-Tile 2"                                    FvwmRearrange -tile -h -a -mn 2 
-noraise 0 0 100 100
+ "H-Tile 3"                                    FvwmRearrange -tile -h -a -mn 3 
-noraise 0 0 100 100
+ "H-Tile 4"                                    FvwmRearrange -tile -h -a -mn 4 
-noraise 0 0 100 100
+ ""                                            Nop
+ "This &Half"                                  Function HalfReplace
+ "This &Maximize"                              Function MaxReplace
+ "This &Quarter"                               Function QuarterReplace


DestroyFunc HalfReplace
AddToFunc HalfReplace
+ I Resize frame 50 100
+ I PlaceAgain
+ I WarpToWindow 50 50

DestroyFunc MaxReplace
AddToFunc MaxReplace
+ I Resize frame 100 100
+ I Move 0 0
+ I WarpToWindow 50 50

DestroyFunc QuarterReplace
AddToFunc QuarterReplace
+ I Resize frame 50 50
+ I PlaceAgain
+ I WarpToWindow 50 50

Style *           MinOverlapPercentPlacement
Style *           FixedPPosition
Style *           !UsePPosition
Style *           EWMHIgnoreStackingOrderHints
Style *           EWMHIgnoreStrutHints
Style *           EWMHPlacementIgnoreWorkingArea
Style *           EWMHIgnoreStateHints
Style *           DecorateTransient
Style *           !UseTransientPPosition
Style *           FocusFollowsMouse
Style *           SnapAttraction 16 All ScreenAll
Style *           StickyIcon
Style *           IgnoreRestack


It's not strictly tiling like i3 does, but for all intents and purposes,
the outcome is the same, while I can just do whatever I want.  It gives
you best of both floating and tiling with great elegance, simplicty and
ease.

Now fvwm manages the windows for me rather than that I have to manage
them.  Put the window menu or the functions on key bindings, and it
takes only a key or two to get the windows arranged the way you want.

It takes a while to get the hang of configuring fvwm, and it is
extremely worthwhile to learn it.  You only need to learn it so far as
to be able to configure it the way you want it.

>>>>(Uh, we probably shouldn't discuss this there --- feel free to send me
>>>>an email directly :)
>>>>
>>> Why not?
>>
>>This is a development mailing list, and I wouldn't want to start an
>>editor war.
>>
> The editor war finished a long time ago and in spite nobody won then,
> now Emacs is sadly loosing the postwar stage in my opinion. That's a long 
> discussion to have.

That doesn't mean a new one couldn't begin, or that it couldn't be
continued.  I never took part in it.

If Emacs is really loosing, it's probably because of little things, like
the tutorial Emacs has needing to become much more inviting and user
friendly.  What it does best is probably driving potential users away.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]