From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#12217: [PATCH] Re: 24.2.50; append-to-register: Provide a convenient key binding Date: Sun, 09 Sep 2012 14:15:32 +0530 Message-ID: <877gs3oa8j.fsf@gmail.com> References: <87wr0x6emy.fsf@gmail.com> <87sjbl6duo.fsf_-_@gmail.com> <87fw6sz7zn.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347180345 10204 80.91.229.3 (9 Sep 2012 08:45:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2012 08:45:45 +0000 (UTC) Cc: 12217@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 09 10:45:45 2012 Return-path: Envelope-to: geb-bug-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 1TAd9C-0001sP-0I for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2012 10:45:42 +0200 Original-Received: from localhost ([::1]:50050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAd98-00033P-M8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2012 04:45:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAd96-000337-Ae for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 04:45:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAd94-0000Xa-Lj for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 04:45:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAd94-0000XW-IF for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 04:45:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TAd9W-0005cH-1W for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 04:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2012 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12217 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12217-submit@debbugs.gnu.org id=B12217.134718032321541 (code B ref 12217); Sun, 09 Sep 2012 08:46:01 +0000 Original-Received: (at 12217) by debbugs.gnu.org; 9 Sep 2012 08:45:23 +0000 Original-Received: from localhost ([127.0.0.1]:49557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAd8s-0005bN-Tt for submit@debbugs.gnu.org; Sun, 09 Sep 2012 04:45:23 -0400 Original-Received: from mail-ie0-f172.google.com ([209.85.223.172]:33625) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAd8n-0005bC-Mq for 12217@debbugs.gnu.org; Sun, 09 Sep 2012 04:45:19 -0400 Original-Received: by ieak13 with SMTP id k13so1506495iea.3 for <12217@debbugs.gnu.org>; Sun, 09 Sep 2012 01:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ENrAYywzAY/Rx1BMkQMDNdAPAE3oqoHeozgnRbdIu3s=; b=gqu5w+yr3vE6NiZejgzb0vPIaKCOstP1hNQ4ZwNam95BffRab98n5+RQ8BYKUZiN9E LSa61XwvC2IPFkff3S10R5l5k1mDUo1tGdjL1aCyr3knLYHnyQlFl8xbRUHwQCzTAM7R s7A+H6LxH8SNsnJA0daoE/tbmi70xqcCLGbhCzNUGIMozZmA8PyrJmEK3rAObz428xfV TEvRVprrXUo8tjkiAe4TTCeaOXCDPz0kr2XwMrCtLWhfFct/kU+dH1fWGeshe1lbtKt+ wHY9ZY64SmLseRpqLRw7k5eoqU5mLKC6eIh+KB27T4DzqYYwvNezX6BExwtnE6T53kMl WLBg== Original-Received: by 10.50.100.165 with SMTP id ez5mr6003345igb.68.1347180288952; Sun, 09 Sep 2012 01:44:48 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.227.226]) by mx.google.com with ESMTPS id ua5sm6434214igb.10.2012.09.09.01.44.45 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 01:44:48 -0700 (PDT) In-Reply-To: (Andreas Schwab's message of "Sun, 09 Sep 2012 09:45:22 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:63997 Archived-At: Andreas Schwab writes: > Jambunathan K writes: > >> I have introduced an extra indirection via a `separator-register' >> (which is nil by default) Now what gets used as a separator - a >> newline, a double newline, a comma or a tab - is under user control. > > Why the extra indirection? Why not just make it a string and use it > directly? In short, Function before form and it is also about some workflows being less intrusive than others. Let's look at some use-cases. Use-case-1 (A concrete one) I find myself collecting sexps. (This is going to happen more as I plan to explore more new codebases.) When I look at existing code - with an intention to prepare some patch - I find myself collecting recipes from 2 or 3 places. I then "insert" it in to target location and put them together. Since the recipes are collected from 2 or 3 places, they need to be visually separated. Going forward I will store "double newline" (read paragraph) as separator for these recipe blocks. Note: Org exporters are moving to new framework. Now when I am re-implementing some features in my (own) org-e-odt.el, I find myself collecting recipes from org-export.el, org-e-latex.el and felt sorry that the sexps are not visually separated. Use-case-2 (Contrived one) Now let's say I am a language learner and I am looking at a French article from within Emacs. As I read through the article, I see some words that need to be looked up. Instead of immediate lookup, I may store the word or a phrase in a register and later insert in to my language notes for further refinement. In this case, I may want to separate them with a newline or even better something like an Org-table. In that case, in my scratch buffer I will type something like this in scratch buffer, C-x r s + it and then collect away. I can then paste that in to my Notes buffer and then re-align it using Org. --8<---------------cut here---------------start------------->8--- | | --8<---------------cut here---------------end--------------->8--- This is how the collected table looks like ,---- | Now| | |looked| | |immediate| | |further `---- A string or a separator register ================================ It is easy for me to do "C-x r s" a separator rather to do a "M: (setq separator "")". There is lesser context switch. A separator register "guarantees" that the words are separated. This frees one from remembering to store the surrounding separator and just focus on collection process. > Andreas.