emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alex Kosorukoff <alex@3form.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix: Capture abort: (error: The mark is not set now, so there is no region)
Date: Fri, 23 May 2014 10:56:50 -0700	[thread overview]
Message-ID: <CAHD9_tQvdiyRCp=ETeinMUr5EKOZYEOjXR2=ErPZ83nHGfbSVg@mail.gmail.com> (raw)
In-Reply-To: <87ha4gv1zo.fsf@bzg.ath.cx>

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

In fact, there is some performance issue. The steal function copies a lot
of variables as I can tell. Do you know where those variables are used? I
replaced the steal function with an advice like this

(defadvice org-capture-steal-local-variables (around do-not-steal activate))

My capture became very fast after that and I didn't notice any adverse
effects so far (using this for more than a week). The only reason I didn't
propose a patch like this is that I am still testing it for possible

On Fri, May 23, 2014 at 10:28 AM, Bastien <bzg@gnu.org> wrote:

> Hi Alex,
> Alex Kosorukoff <alex@3form.com> writes:
> > Excluding mark-active will work, the result will be the same as after
> > my patch, except performance will not be the same. Excluding variable
> > requires filtering the list of variables which takes O(n) whereas my
> > patch takes O(1). Mark-active is nil before
> > org-capture-steal-local-variables because this is a new buffer. It
> > seems in this case setting it back to nil is faster than trying to
> > preserve its original value nil.
> I see what you mean but there is no performance issue here and not
> copying the value of mark-active is cleaner than setting it back to
> nil -- we never want to copy the value of the mark at all.
> --
>  Bastien

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

  reply	other threads:[~2014-05-23 17:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-26  0:06 [PATCH] Fix: Capture abort: (error: The mark is not set now, so there is no region) Alex Kosorukoff
2014-04-29 11:05 ` Bastien
2014-05-09  3:55   ` Alex Kosorukoff
2014-05-23 12:03     ` Bastien
2014-05-23 16:37       ` Alex Kosorukoff
2014-05-23 17:28         ` Bastien
2014-05-23 17:56           ` Alex Kosorukoff [this message]
2014-05-23 19:19             ` Bastien
2014-05-23 19:53               ` Bastien

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:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHD9_tQvdiyRCp=ETeinMUr5EKOZYEOjXR2=ErPZ83nHGfbSVg@mail.gmail.com' \
    --to=alex@3form.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \


* 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 public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).