From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: bounds-of-thing-at-point for paragraphs Date: Sun, 1 Nov 2020 17:08:04 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38008"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 17:10:14 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZFvq-0009pw-JG for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 17:10:14 +0100 Original-Received: from localhost ([::1]:51514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZFvp-0002RO-Ed for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 11:10:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZFtq-0002RD-8P for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 11:08:10 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:56599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZFtm-0003i9-0Y for help-gnu-emacs@gnu.org; Sun, 01 Nov 2020 11:08:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604246884; bh=yGCyYIpETzG0N0VRUGbb4fdUw3ohIYvmrmwH4Z4WyNA=; h=X-UI-Sender-Class:From:To:Subject:Date; b=WFvq2Mu5IvNMexPdTSMjv832tCvihmE5u76u2YZ1DMWDvBVymD5eIslZxY+jZ1kkM 9T65Ssn9MstGN3QZN21MN/ojigbojZjV3SCoLRfW7cXJsRy4GY1ocEarXsuFfzG5U0 nSoFq/ng8kUUWdFcgjYEDzqMLjVdN/Ed6ceteVt0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs11.server.lan [172.19.170.179]) (via HTTP); Sun, 1 Nov 2020 17:08:04 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:XVxGlBbO6AUu8luL5oOPT6g8gr/9Kt8Z+4jX9o9nfyuV1AsCUhbi+GiLcOp3K+maGoD8o cjD/WrQVMZiPZSFjsmE70VqApM3TL0ywzxbNJptQXrgNvh0H7YUYpEUzVgI82t8ahgqAzFmLvazl J+2Lm/48qqkpPyASCGo/iCRVo3MUW6JLijgOtnfIqHi2tJmzs2GfI6+FSqraM57n/CzqypAFNAE9 WTUjeHC4aLN8pldWZ50t5H/jsUNwiQDj4cpUDJwAzQaJxxQhTFuvZmzLs8F3UwDgDSEbvxm4aKab pE= X-UI-Out-Filterresults: notjunk:1;V03:K0:8XYf+X/68nQ=:7ryrwjgYBYxVr1Y1oCEbde 0MGEgNRYszgYwt5nuT7uYclDQKn905yxcBsyFlV8NcmWAUkT/eO4NKcmcEvzj1PKFNBCk1T4c 29joWRA0ur1ScZ1ww2kHmospBKiiHm3FiqK4S+8gnZHdngnAmy7cBzc8JbZ4HmmgT9v4k7OWL A2awbH9tXCuEM03SO8jyvTckcLX8WnDsWXEE9GodZ/RNXXs93XD7AElNQwujWqKg8VKC59UO7 AqMJu+kIaqjYxJhi1Ekf26MOrliQbrMwJ6YNh2gSZpIjyWnNgxOrxuWgaURXAtqKzq2ijldfz DE9tc7QfIrG9LxKLUC38YKEN1W1XwgUckwVNc6b/v8/4OwELDwAjRreUtMv1n8USrR/611mle WRLT6X+2ZFsoinkBZpsrnqDecyZoE/hDRtV+0/wzKnvjP51xu/rOKnkS09aV+IdNabUyZjZO0 1+vEwc0+m4TnjlFaUAUv4Al4gSuuAT/PZz8bsNciiqumCCu0DtLejovKYzw0cBWHwmSKOnnFg 4RHAj+oMSkGCV7LkmV3aP32yYj/QlJHgygLCx0sar2sKlbeNCCvjX2y+V/KGNtQc9q6ZF3IZb 4JPPaEiwf8pIY= Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/01 11:08:04 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124871 Archived-At: Been trying to write a function to transpose two paragraphs but keep the c= ursor at the same position. How is it that bounds-of-thing-at-point does not ta= ke paragraph as argument? (defun Skip-Over-Paragraphs (arg) (let ((Prg-Bounds (bounds-of-thing-at-point 'paragraph))) ;; ---------------------------------------------------------------- (when Wrd-Bounds (let* ( (Beg (point)) (End (cdr Prg-Bounds)) (Shift (- Beg End)) ;; -------------------------------------------------------- (Cursor-Psn (save-excursion (goto-char End) ; [#A] (if (condition-case err (progn ; bodyform (transpose-paragraphs arg) ; [#B] t ) (message err) ; Handler when [#B] fails ) ;; ---------------------------------------------- (+ (point) Shift) ; Shift after executing [#B] nil ; [#B] failed ;; ---------------------------------------------- ) ) ) ;; -------------------------------------------------------- ) (when Cursor-Psn (goto-char Cursor-Psn)) ) ) ;;----------------------------------------------------------------- ) ; let bounds (start and end locations of word) )