From: Jambunathan K <kjambunathan@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 12217@debbugs.gnu.org
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 [thread overview]
Message-ID: <877gs3oa8j.fsf@gmail.com> (raw)
In-Reply-To: <m2oblfljvx.fsf@igel.home> (Andreas Schwab's message of "Sun, 09 Sep 2012 09:45:22 +0200")
Andreas Schwab <schwab@linux-m68k.org> writes:
> Jambunathan K <kjambunathan@gmail.com> 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.
next prev parent reply other threads:[~2012-09-09 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 9:39 bug#12217: 24.2.50; append-to-register: Provide a convenient key binding Jambunathan K
[not found] ` <handler.12217.B.134519691317483.ack@debbugs.gnu.org>
2012-08-17 9:56 ` bug#12217: [PATCH] " Jambunathan K
2012-08-21 17:20 ` Stefan Monnier
2012-09-08 18:26 ` Jambunathan K
2012-09-08 20:09 ` Stefan Monnier
2012-09-09 8:52 ` Jambunathan K
2012-09-09 7:45 ` Andreas Schwab
2012-09-09 8:45 ` Jambunathan K [this message]
2012-09-09 9:02 ` Jambunathan K
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=877gs3oa8j.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=12217@debbugs.gnu.org \
--cc=schwab@linux-m68k.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.