From mboxrd@z Thu Jan 1 00:00:00 1970 From: Puneeth Chaganti Subject: Re: [PATCH] org-id-goto doesn't work if buffer is narrowed. Date: Sun, 25 Oct 2015 15:27:12 +0530 Message-ID: References: <874mhh1u7s.fsf@gmx.us> <87oafpz65e.fsf@gmx.us> <87pp04zc1r.fsf@gmx.us> <87k2qbbaw3.fsf@nicolasgoaziou.fr> <877fmbb7xu.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8f6433449699030522eadfcd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqI3S-0007ve-H7 for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 05:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqI3R-0007aw-DS for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 05:57:34 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:33895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqI3R-0007am-4s for emacs-orgmode@gnu.org; Sun, 25 Oct 2015 05:57:33 -0400 Received: by wikq8 with SMTP id q8so127520101wik.1 for ; Sun, 25 Oct 2015 02:57:32 -0700 (PDT) In-Reply-To: <877fmbb7xu.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Puneeth Chaganti , Rasmus , emacs-orgmode --e89a8f6433449699030522eadfcd Content-Type: text/plain; charset=UTF-8 > If CMD raises an error, you have a dangling marker in the buffer, which > is not a great idea. I suggest to wrap everything into > a `unwind-protect' and add (set-marker m nil) as an unwindform, i.e., Fixed. Thanks! --e89a8f6433449699030522eadfcd Content-Type: text/x-patch; charset=US-ASCII; name="0001-Widen-if-target-id-location-is-not-in-the-narrow.patch" Content-Disposition: attachment; filename="0001-Widen-if-target-id-location-is-not-in-the-narrow.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ig6cbtdi0 RnJvbSA4ZWM0Zjc3N2EyZTEwNzhlMWZhZGM0OGE3YzkxMzY2MjAwYTBkMzdiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQdW5lZXRoIENoYWdhbnRpIDxwdW5jaGFnYW5AbXVzZS1hbXVz ZS5pbj4KRGF0ZTogU3VuLCAyNSBPY3QgMjAxNSAxNDozNjoxNiArMDUzMApTdWJqZWN0OiBbUEFU Q0hdIFdpZGVuIGlmIHRhcmdldCBpZCBsb2NhdGlvbiBpcyBub3QgaW4gdGhlIG5hcnJvdy4KCklm IHRoZSB0YXJnZXQgbG9jYXRpb24gZm9yIGBvcmctaWQtZ290bycgb3IgYG9yZy1pZC1vcGVuJyBp cyBpbiBhCm5hcnJvd2VkIGJ1ZmZlciBidXQgbm90IGluIHRoZSBuYXJyb3dlZCByZWdpb24sIHRo ZSBidWZmZXIgaXMgd2lkZW5lZC4KLS0tCiBsaXNwL29yZy1pZC5lbCB8IDU1ICsrKysrKysrKysr KysrKysrKysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KIDEgZmlsZSBjaGFu Z2VkLCAyOSBpbnNlcnRpb25zKCspLCAyNiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNw L29yZy1pZC5lbCBiL2xpc3Avb3JnLWlkLmVsCmluZGV4IGY4NmVmMjIuLjczZThmNTQgMTAwNjQ0 Ci0tLSBhL2xpc3Avb3JnLWlkLmVsCisrKyBiL2xpc3Avb3JnLWlkLmVsCkBAIC0yOTIsMTMgKzI5 Miw3IEBAIEl0IHJldHVybnMgdGhlIElEIG9mIHRoZSBlbnRyeS4gIElmIG5lY2Vzc2FyeSwgdGhl IElEIGlz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50LCB3aGljaCB3aWxsIGJlIHVzZWQgdG8gc3dpdGNoIHRv IHRoZSBidWZmZXIKK2NvbnRhaW5pbmcgdGhlIGVudHJ5IHdpdGggaWQgSUQuIgorICAobGV0ICgo bSAob3JnLWlkLWZpbmQgaWQgJ21hcmtlcikpKQorICAgICh1bmxlc3MgbSAoZXJyb3IgIkNhbm5v dCBmaW5kIGVudHJ5IHdpdGggSUQgXCIlc1wiIiBpZCkpCisgICAgKHVud2luZC1wcm90ZWN0Cisg ICAgICAgIChwcm9nbgorICAgICAgICAgICh1bmxlc3MgKGVxIChjdXJyZW50LWJ1ZmZlcikgKG1h cmtlci1idWZmZXIgbSkpCisgICAgICAgICAgICAoZnVuY2FsbCBjbWQgKG1hcmtlci1idWZmZXIg bSkpKQorICAgICAgICAgICh3aGVuIChsZXQgKChwb3MgKG1hcmtlci1wb3NpdGlvbiBtKSkpCisg ICAgICAgICAgICAgICAgICAob3IgKDwgcG9zIChwb2ludC1taW4pKQorICAgICAgICAgICAgICAg ICAgICAgICg+IHBvcyAocG9pbnQtbWF4KSkpKQorICAgICAgICAgICAgKHdpZGVuKSkKKyAgICAg ICAgICAoZ290by1jaGFyIG0pCisgICAgICAgICAgKG9yZy1zaG93LWNvbnRleHQgJ2xpbmstc2Vh cmNoKSkKKyAgICAgIChzZXQtbWFya2VyIG0gbmlsKSkpKQorCiA7OyBpZCBsaW5rIHR5cGUKIAog OzsgQ2FsbGluZyB0aGUgZm9sbG93aW5nIGZ1bmN0aW9uIGlzIGhhcmQtY29kZWQgaW50byBgb3Jn LXN0b3JlLWxpbmsnLApAQCAtNjU5LDI1ICs2NzIsMTUgQEAgb3B0aW9uYWwgYXJndW1lbnQgTUFS S0VSUCwgcmV0dXJuIHRoZSBwb3NpdGlvbiBhcyBhIG5ldyBtYXJrZXIuIgogKGRlZnVuIG9yZy1p ZC1vcGVuIChpZCkKICAgIkdvIHRvIHRoZSBlbnRyeSB3aXRoIGlkIElELiIKICAgKG9yZy1tYXJr LXJ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VyLXdpbmRvdykKKwkJICAoZmlu ZC1maWxlLW90aGVyLWZyYW1lIC4gc3dpdGNoLXRvLWJ1ZmZlci1vdGhlci1mcmFtZSkpKSkKKwkg ICAgICAjJ3N3aXRjaC10by1idWZmZXItb3RoZXItd2luZG93KSkpCisgICAgKG9yZy1pZC1zaG93 IGlkIGNtZCkpKQogCiAob3JnLWFkZC1saW5rLXR5cGUgImlkIiAnb3JnLWlkLW9wZW4pCiAKLS0g CjIuNS4wCgo= --e89a8f6433449699030522eadfcd--