GNU bug report logs -
#12217
24.2.50; append-to-register: Provide a convenient key binding
Previous Next
Reported by: Jambunathan K <kjambunathan <at> gmail.com>
Date: Fri, 17 Aug 2012 09:49:02 UTC
Severity: wishlist
Tags: patch
Found in version 24.2.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 12217 <at> debbugs.gnu.org (full text, mbox):
Andreas Schwab <schwab <at> linux-m68k.org> writes:
> Jambunathan K <kjambunathan <at> 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.
This bug report was last modified 12 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.