GNU bug report logs - #339
ffap attempts to get the whole region

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Sat, 31 May 2008 02:55:04 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 339 in the body.
You can then email your comments to 339 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#339; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: ffap attempts to get the whole region
Date: Sat, 31 May 2008 10:45:13 +0800
Because my http://jidanni.org/comp/configuration/.emacs does some
transient mark stuff along with ffap,
$ cat z
http://en.wikipedia.org/wiki/Partyman

bla bla
$ emacs z #Not -Q this time, sorry.
C-x h C-x C-f C-l

Thinks the whole region, i.e., the whole file, is the URL I want to
get. Obviously all I want is for ffap to just notice the URL of the
line I'm on.

And furthermore, as this is the first URL of the day, I needed the C-l
to wipe the windshield to see what it was prompting.

emacs-version "22.2.1".





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 339-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 339-done <at> debbugs.gnu.org
Subject: Re: bug#339: ffap attempts to get the whole region
Date: Fri, 30 May 2008 23:31:33 -0400
> Because my http://jidanni.org/comp/configuration/.emacs does some
> transient mark stuff along with ffap,
> $ cat z
> http://en.wikipedia.org/wiki/Partyman

> bla bla
> $ emacs z #Not -Q this time, sorry.
> C-x h C-x C-f C-l

> Thinks the whole region, i.e., the whole file, is the URL I want to
> get. Obviously all I want is for ffap to just notice the URL of the
> line I'm on.

> And furthermore, as this is the first URL of the day, I needed the C-l
> to wipe the windshield to see what it was prompting.

> emacs-version "22.2.1".

Thanks, the mind-reader package is still in the works,


        Stefan






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#339; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 339 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: 339 <at> debbugs.gnu.org
Subject: Re: bug#339 ffap thinks whole region is URL
Date: Sat, 31 May 2008 12:08:22 +0800
Here is a new self contained report. Please try again with it.
$ nl -b a myfile
     1  http://en.wikipedia.org/wiki/Partyman
     2
     3  bla bla
$ emacs -Q -eval "(and(setq transient-mark-mode 't highlight-nonselected-windows 't)(ffap-bindings))" myfile
C-x h C-x C-f C-l

ffap thinks the whole region, i.e., the whole file, is the URL I want to
get. Obviously all I want is for ffap to just notice the URL of the
line I'm on.

And furthermore, as this is the first URL of the day, I needed the C-l
to wipe the windshield to see what it was prompting.

emacs-version "22.2.1".




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#339; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #20 received at 339 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: 339 <at> debbugs.gnu.org
Subject: Re: bug#339: ffap thinks whole region is URL
Date: Wed, 04 Jun 2008 06:42:54 +0800
reopen 339
thanks
(Hope the above works.)

Here is a new self contained report. Please try again with it.
$ nl -b a myfile
     1  http://en.wikipedia.org/wiki/Partyman
     2
     3  bla bla
$ emacs -Q -eval "(and(setq transient-mark-mode 't highlight-nonselected-windows 't)(ffap-bindings))" myfile
C-x h C-x C-f C-l

ffap thinks the whole region, i.e., the whole file, is the URL I want to
get. Obviously all I want is for ffap to just notice the URL of the
line I'm on.

And furthermore, as this is the first URL of the day, I needed the C-l
to wipe the windshield to see what it was prompting.

emacs-version "22.2.1".








Message #21 received at 339-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: jidanni <at> jidanni.org
Cc: 339-done <at> debbugs.gnu.org
Subject: Re: bug#339: ffap thinks whole region is URL
Date: Tue, 03 Jun 2008 20:10:26 -0400
> reopen 339
> thanks
> (Hope the above works.)

> Here is a new self contained report. Please try again with it.
> $ nl -b a myfile
>      1  http://en.wikipedia.org/wiki/Partyman
>      2
>      3  bla bla
> $ emacs -Q -eval "(and(setq transient-mark-mode 't highlight-nonselected-windows 't)(ffap-bindings))" myfile
> C-x h C-x C-f C-l

> ffap thinks the whole region, i.e., the whole file, is the URL I want to
> get. Obviously all I want is for ffap to just notice the URL of the
> line I'm on.

No, it's a classic PEBKAC.  Just don't do the C-x h.


        Stefan




Message #22 received at 339-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: monnier <at> iro.umontreal.ca
Cc: 339-done <at> debbugs.gnu.org
Subject: Re: bug#339: ffap thinks whole region is URL
Date: Fri, 06 Jun 2008 02:18:59 +0800
In ffap.el, please add a new variable that will allow the user to
disable
	  (if (and transient-mark-mode mark-active)
	      (buffer-substring
	       (setcar ffap-string-at-point-region (region-beginning))...
Why?
1. The user shouldn't have to worry if he has marks active or not.
2. The goal is probably to allow users to get URLs with (,) and
Unicode in them, like Wikipedia's.
That goal is better accomplished by
(eval-after-load "ffap"
  '(setcar (cdr (assq 'url ffap-string-at-point-mode-alist))
 	   "--:=&?$+@-Z_[:lower:][:multibyte:]()~#,%;*"))
and not snarfing up the whole region, newlines and all, as one big URL.
Thank you.




Message #23 received at 339-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: jidanni <at> jidanni.org
Cc: 339-done <at> debbugs.gnu.org
Subject: Re: bug#339: ffap thinks whole region is URL
Date: Thu, 05 Jun 2008 15:13:25 -0400
> In ffap.el, please add a new variable that will allow the user to
> disable
> 	  (if (and transient-mark-mode mark-active)
> 	      (buffer-substring
> 	       (setcar ffap-string-at-point-region (region-beginning))...
> Why?

If you want to completely disable the region-feature, then I agree.
I've indeed done just that in the CVS trunk.


        Stefan




bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 04 Jul 2008 14:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.