From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: How to advice around org-insert-link to disable desc part of link? Date: Sun, 11 Nov 2018 13:47:45 +0800 Message-ID: <87efbskvwe.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLibD-0002Ug-Rk for emacs-orgmode@gnu.org; Sun, 11 Nov 2018 00:47:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLib9-000808-Sm for emacs-orgmode@gnu.org; Sun, 11 Nov 2018 00:47:55 -0500 Received: from [61.175.244.13] (port=38786 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLib9-0007r5-EG for emacs-orgmode@gnu.org; Sun, 11 Nov 2018 00:47:51 -0500 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" To: org-mode I use org-attach to add/download image file from local or web url. Then [C-c C-l] (org-insert-link) to insert link from previous added attach image file. In some places like ox-html, ox-epub, they use inline images without desc to display image. If has `[desc]` part, the image will become a link. So I hope can add an advice around function `org-insert-link` or somewhere should. Anybody knows how to do this? Can you show the code? I checked out `org-insert-link` source code, don't know how to add advice around it. -- [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3