all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bastian Beischer <bastian.beischer@rwth-aachen.de>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>,
	"Driscoll, Kevin R" <kevin.driscoll@honeywell.com>
Subject: Re: FW: calc-yank.el
Date: Wed, 11 Jan 2017 09:35:35 +0100	[thread overview]
Message-ID: <CAK9AuB94dT_A-ha7txNEbQkyHUP98ibO35=DVAFvT4vLmjP5iA@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY2WAwNh=XNQcmXShBOY7SdNK-3S7xKftQfLmpvVVZqtug@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4454 bytes --]

Hello,

on a related note, I would really appreciate some feedback on this bug
report:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23629

Cheers
Bastian

On Wed, Jan 11, 2017 at 4:52 AM, Kaushal Modi <kaushal.modi@gmail.com>
wrote:

> Hi Kevin,
>
> Can you please provide a git formatted patch with respect to the master
> branch?
>
> I expanded the calc-yank function last year to support  different radixes:
> http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=
> ec0d4d24fd11b5040de9f7657b486c3b1e743071
>
> On Tue, Jan 10, 2017, 10:36 PM Driscoll, Kevin R <
> kevin.driscoll@honeywell.com> wrote:
>
>> Contrary to the header of the calc-yank.el file, jay.p.belanger is no
>> longer the maintainer of calc-yank.
>> This should be updated.  And, please consider my change suggestion below.
>>
>> -----Original Message-----
>> From: Jay Belanger [mailto:jay.p.belanger@gmail.com]
>> Sent: Tuesday, January 03, 2017 14:53
>> To: Driscoll, Kevin R <kevin.driscoll@honeywell.com>
>> Subject: Re: calc-yank.el
>>
>> Hi Kevin,
>>
>> I'm a little surprised that digit-grouped numbers aren't handled properly
>> already.  But your solution looks well thought out.
>> However, I'm not using Emacs or maintaining Calc any more.
>> You should send this to emacs-devel@gnu.org, and they should make the
>> changes.
>>
>> Jay
>>
>> -----Original Message-----
>> To: Jay Belanger [mailto:jay.p.belanger@gmail.com]
>> From: Driscoll, Kevin R <kevin.driscoll@honeywell.com>
>> Subject: Re: calc-yank.el
>>
>> Please consider the changes to calc-yank.el between the commented lines
>> below.   This allows the yanking of digit-grouped numbers.  It’s a real
>> pain not having that capability, given that most large numbers to be
>> imported into calc from text are grouped.  While this could interfere with
>> yanking vectors, the grabs are actually simpler alternatives for vectors.
>> To minimize the impact of this change on the unsuspecting, a nil-default
>> calc-yank-grouped mode flag could be added and the ‘’calc-group-digits’’
>> below could be replaced with “calc-yank-grouped” or “(and calc-group-digits
>> calc-yank-grouped)”.  This doesn’t handle radix > 10; yanking these are
>> very rare for grouped numbers and there’s not a standard format (16# vs 0x).
>>
>> (defun calc-yank ()
>>   (interactive)
>>   (calc-wrapper
>>    (calc-pop-push-record-list
>>     0 "yank"
>>     (let ((thing (if (fboundp 'current-kill)
>>                                      (current-kill 0 t)
>>                                    (car kill-ring-yank-pointer))))
>>       (if (eq (car-safe calc-last-kill) thing)
>>                   (cdr calc-last-kill)
>>                 (if (stringp thing)
>> ;                   (let ((val (math-read-exprs (calc-clean-newlines
>> thing))))
>>                     (let ((val (math-read-exprs
>>                         (calc-clean-newlines
>>                          (if calc-group-digits
>>                              (replace-regexp-in-string
>>                               (concat "\\([0-9]\\)" calc-group-char
>> "\\([0-9]\
>> \)")
>>                               "\\1\\2"
>>                               thing)
>>                            thing)))))
>> ;
>>                       (if (eq (car-safe val) 'error)
>>                                   (progn
>>                                     (setq val (math-read-exprs thing))
>>                                     (if (eq (car-safe val) 'error)
>>                                                 (error "Bad format in
>> yanked
>> data")
>>                                       val))
>>                                 val))))))))
>>
>> --
>> Kevin R. Driscoll, Engineering Fellow
>>  Kevin.Driscoll@Honeywell.com
>> Phone: +1 763-954-6789 <+1%20763-954-6789>      Cell: +1 612-801-9520
>> <+1%20612-801-9520>       FAX: +1 763-954-5473 <+1%20763-954-5473>
>> Honeywell; MN10-122B; 1985 Douglas Dr. N.; Golden Valley; MN
>> 55422-3992; USA
>>
> --
>
> Kaushal Modi
>



-- 
Bastian Beischer
RWTH Aachen University of Technology

@RWTH Aachen
Office: 28 C 203
Phone: +49-241-80-27205
E-mail: beischer@physik.rwth-aachen.de
Address: I. Physikalisches Institut B, Sommerfeldstr. 14, D-52074 Aachen

@CERN
Office: Bdg 32-4-B12
Phone: +41-22-76-75750
E-mail: bastian.beischer@cern.ch
Address: CERN, CH-1211 Geneve 23

[-- Attachment #2: Type: text/html, Size: 9898 bytes --]

      reply	other threads:[~2017-01-11  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DM2PR0701MB1311E97560FC2F28BCDA0917836E0@DM2PR0701MB1311.namprd07.prod.outlook.com>
     [not found] ` <20170103205239.GA5869@belanger-laptop>
2017-01-10 23:49   ` FW: calc-yank.el Driscoll, Kevin R
2017-01-11  3:52     ` Kaushal Modi
2017-01-11  8:35       ` Bastian Beischer [this message]

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='CAK9AuB94dT_A-ha7txNEbQkyHUP98ibO35=DVAFvT4vLmjP5iA@mail.gmail.com' \
    --to=bastian.beischer@rwth-aachen.de \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=kevin.driscoll@honeywell.com \
    /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.