all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Replacing huge hidden selection when pasting text
Date: Fri, 25 Dec 2015 02:18:44 +0100	[thread overview]
Message-ID: <87mvszgwaz.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: CAF-CoNrZmmTQMaxfTGD1MQqgETcyF27iFfCc5BG7k=4WJw5YNA@mail.gmail.com

Alexandre Oberlin <alxobr@gmail.com> writes:

> Hello,
>
> Thanks Drew for your understanding. I don’t think I lost much data this
> time because I automatically perform the awfully outdated rcs (hopefully
> nobody tries to "maintain" rcs to make it behave like a Microsoft
> application!) and also have some backup strategy. This time I simply lost
> about two hours, but I am still under this threat and might have other
> files corrupted without having noticed.
>
>> But if you can describe what you did in more detail it would help.
> No problem:
> C-y
> C-x C-s
> No prompt, no auto-saved copy, no warning whatsoever: farewell!

For example, try it with:

     emacs -q

As I wrote, by default emacs binds C-y to yank: it doesn't even have a
delete-region-and-yank, you have to program it yourself (or one of the
third-party modes you're using).

> What is still worse is that this does not even happen consistently (only
> say 50% of the times). The behavior is affected by repeatedly setting the
> mark (C-space). 

Again, this is clearly explained by customizations you've done, not by
the behavior of emacs which is perfectly safe.  You can test it
yourself: 

    - type something
    - C-@ C-a
    - M-x yank RET

and see how the kill buffer is INSERTED without replacing the text in
the region.


> Just reading the help for such a simple command as
> (set-mark-command ARG) is a mere piece of fun. Don’t Emacs
> developers/maintainers understand that an editor is to be USED by USERS,
> not constantly modified and absurdly complicated by people trying to show
> up their skills?

But try to put yourself in the shoes of programmers who want to be able
to modify their program to their taste and needs!  We need to have
programming documentation of each function in that software to be able
to use them in your modifications and additions!

In any case, you don't get a say about it: we're the programmers.  If
you're not happy with that, you can always write your own software.  (Or
pay Microsoft to do that, and pray they won't use it to spy you).


Oh, I seem to see what's your problem with the documentation of
set-mark-command; this sentence:

    … this is the closest equivalent in
    Emacs to what some editors call the "selection".


It should have been:

    … the closest equivalent in what word processors implemented ten or
    twenty years after emacs was developed, would be the "selection".

Perhaps you should read the emacs user manual instead of the
programmer's documentation; if it's correctly installed, you may access
it by typing C-x C-e after each expressions here:

(info "(emacs) Mark")
(info "(emacs) Killing")

Notably in the Killing section, you have two different subsections for:

    (info "(emacs) Deletion and Killing")
    (info "(emacs) Yanking")

emacs doesn't delete anything when it yanks.


Unless again, you've explicitely asked it by programming the
delete-region-and-yank command I shown you earlier, or you are using a
3rd-party mode or library than installs it for you.

You can verify what command will be executed by your key typing:

    C-h k  <key>


    C-h k  C-y
should give you the help page for yank:
"yank is an interactive compiled Lisp function in `simple.el'. …"

You should take note of the mode the buffer's in when you don't have C-y
bound to yank, and then you can complain about that mode, but not about
emacs.

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk




  parent reply	other threads:[~2015-12-25  1:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24  1:01 Replacing huge hidden selection when pasting text Alexandre Oberlin
2015-12-24  1:37 ` Drew Adams
2015-12-24 13:27   ` Alexandre Oberlin
2015-12-24 23:04     ` Stefan Monnier
2015-12-25  1:18     ` Pascal J. Bourguignon [this message]
     [not found]     ` <mailman.529.1451006347.843.help-gnu-emacs@gnu.org>
2016-01-02 21:40       ` Alexandre Oberlin
2016-01-02 22:03         ` Marcin Borkowski
     [not found]         ` <mailman.1550.1451772215.843.help-gnu-emacs@gnu.org>
2016-01-02 22:28           ` Alexandre Oberlin
2016-01-02 23:04             ` Drew Adams
     [not found]             ` <mailman.1551.1451775915.843.help-gnu-emacs@gnu.org>
2016-01-03  0:11               ` Alexandre Oberlin
2016-01-03  0:28                 ` Michael Heerdegen
     [not found]                 ` <mailman.1554.1451780942.843.help-gnu-emacs@gnu.org>
2016-01-03  0:41                   ` Alexandre Oberlin
2016-01-03  1:07                     ` Michael Heerdegen
2016-01-03  2:10                     ` Robert Thorpe
2016-01-03  2:11                 ` Drew Adams
2016-01-03  2:25                 ` Michael Heerdegen
2016-01-03  3:10                   ` Drew Adams
2016-01-03  3:21                     ` Drew Adams
2016-01-03  4:09                 ` Yuri Khan
2016-01-03  5:08                   ` Random832
     [not found]                   ` <mailman.1572.1451797753.843.help-gnu-emacs@gnu.org>
2016-01-13 17:13                     ` Alexandre Oberlin
2016-01-14 14:07                       ` Stefan Monnier
     [not found]                       ` <mailman.2334.1452780465.843.help-gnu-emacs@gnu.org>
2016-01-14 15:35                         ` Alexandre Oberlin
2016-01-14 16:11                           ` Kaushal Modi
2016-01-14 17:20                             ` Eli Zaretskii
2016-01-14 16:36                           ` Michael Heerdegen
2016-01-14 16:41                           ` Eli Zaretskii
     [not found]                           ` <mailman.2341.1452787916.843.help-gnu-emacs@gnu.org>
2016-01-14 16:45                             ` Alexandre Oberlin
2016-01-14 17:05                               ` Kaushal Modi
2016-01-14 19:37                           ` Stefan Monnier
     [not found]                           ` <mailman.2359.1452800411.843.help-gnu-emacs@gnu.org>
2016-01-14 23:41                             ` Alexandre Oberlin
     [not found]                 ` <mailman.1570.1451794187.843.help-gnu-emacs@gnu.org>
2016-01-13 16:42                   ` Alexandre Oberlin
2016-01-13 17:54                     ` Yuri Khan
     [not found]                     ` <mailman.2302.1452707668.843.help-gnu-emacs@gnu.org>
2016-01-14 13:57                       ` Alexandre Oberlin
     [not found]                 ` <mailman.1564.1451787927.843.help-gnu-emacs@gnu.org>
2016-01-13 17:26                   ` Alexandre Oberlin
     [not found]     ` <mailman.528.1450998293.843.help-gnu-emacs@gnu.org>
2016-01-14 14:00       ` Alexandre Oberlin
2016-01-14 15:02         ` Stefan Monnier
2015-12-24  5:48 ` Pascal J. Bourguignon
2015-12-24 14:40 ` Andreas Röhler
2015-12-27 22:15 ` Robert Thorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvszgwaz.fsf@kuiper.lan.informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.