From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: Replacing huge hidden selection when pasting text Date: Fri, 25 Dec 2015 02:18:44 +0100 Organization: Informatimago Message-ID: <87mvszgwaz.fsf@kuiper.lan.informatimago.com> References: <5da6a556-646f-42ba-9bae-f5bf4387f09e@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1451006369 10993 80.91.229.3 (25 Dec 2015 01:19:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Dec 2015 01:19:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 25 02:19:19 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aCH2M-0007yv-7Y for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Dec 2015 02:19:18 +0100 Original-Received: from localhost ([::1]:33902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCH2L-0005Xm-FF for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Dec 2015 20:19:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCH28-0005X1-KE for help-gnu-emacs@gnu.org; Thu, 24 Dec 2015 20:19:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCH23-00087v-Ex for help-gnu-emacs@gnu.org; Thu, 24 Dec 2015 20:19:04 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCH23-00087l-7u for help-gnu-emacs@gnu.org; Thu, 24 Dec 2015 20:18:59 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aCH21-0007RM-BM for help-gnu-emacs@gnu.org; Fri, 25 Dec 2015 02:18:57 +0100 Original-Received: from amontsouris-654-1-27-2.w90-2.abo.wanadoo.fr ([90.2.218.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Dec 2015 02:18:57 +0100 Original-Received: from pjb by amontsouris-654-1-27-2.w90-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Dec 2015 02:18:57 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 106 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: amontsouris-654-1-27-2.w90-2.abo.wanadoo.fr Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:YzNmZGNmOTY5NDExY2U3ZWQxNDEyOTQzN2E2YjcwYzExMDM0NDc2ZA== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108473 Archived-At: Alexandre Oberlin 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 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