From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Kill in eww and keep the links for org Date: Tue, 07 Oct 2014 12:41:16 +0200 Message-ID: <87wq8c2mcz.fsf@nicolasgoaziou.fr> References: <84fvf01961.fsf@tm6592.fritz.box> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbSCB-0002vs-7a for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 06:40:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbSC1-0002G8-2I for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 06:40:43 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:57819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbSC0-0002G3-R4 for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 06:40:32 -0400 In-Reply-To: <84fvf01961.fsf@tm6592.fritz.box> (Marco Wahl's message of "Tue, 07 Oct 2014 12:11:34 +0200") 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: Marco Wahl Cc: emacs-orgmode@gnu.org Hello, Marco Wahl writes: > to kill in a w3m-buffer and yank into an org-mode-buffer by keeping the > links is a long known feature in org-module org-w3m. The patch below > provides this functionality for eww. Note that the code is very similar > to the code for the w3m case. > > What do you think? Shall I try to push the code? Since the file is in contrib and you're its author, you can obviously push the code. Some minor comments follow. > +;;; org-eww.el --- Store url and kill from eww-mode for Org Eww mode > +(defun org-eww-no-next-link-p () > + "Whether there is no next link after the cursor. > +Return t if there is no next link; otherwise, return nil." > + (save-excursion > + (equal (point) (org-eww-goto-next-url-property-change)))) (eq (point) (org-eww-goto-next-url-property-change)) > +(defun org-eww-url-below-point-p () > + "Return t if below point there is a url; otherwise, return nil." > + (not (eq nil (org-eww-url-below-point)))) (org-eww-url-below-point) or, if you insist on returning t, (and (org-eww-url-below-point) t) Regards, -- Nicolas Goaziou