From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 05:08:29 2017 Received: (at submit) by debbugs.gnu.org; 17 Jun 2017 09:08:29 +0000 Received: from localhost ([127.0.0.1]:52093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9iX-0003BD-Do for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:08:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9iV-0003B0-OD for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:08:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dM9iP-0003dC-Iy for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:08:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51710) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dM9iP-0003d1-FU for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:08:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dM9iO-0002MI-Be for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:08:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dM9iL-0003XB-5M for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:08:20 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dM9iK-0003VX-VA for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:08:17 -0400 Received: by mail-wm0-x22d.google.com with SMTP id x70so42472604wme.0 for ; Sat, 17 Jun 2017 02:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=i64VxzVXevV86Np01DZUlGaqM4Nl10/gi8nlhD45YBo=; b=fome/QVgHAiG7lGztaD8nevNtOXnrEIHEJOSDBnYs/Hs0POTknNlyxMOLMFUUA3RwQ pfu93njCj9Cul4Xv6kCVWqiT1+tn2C1DWqejYfFIboMHCzgSZmNIH3iJTmgqnJDDktqN OsY+DCweAQx0MuF2c+zhSwlRboz7H6cE3you8s3d60muhWPD+UKnXv72pb8hHsiHH1aH NNs1aaUm9jIsrxvPpVnNt0vPNJ+hdh5Mxlspy7zhpiXbIQN45xZJ6LrLBe2irjA+wpcG PwUmyzitA60ObG0/870jG6zkoDE9qg0anFv7iYp4hZ4Q3W+nEsUxETRX0DTmyOIQKhGv ckTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=i64VxzVXevV86Np01DZUlGaqM4Nl10/gi8nlhD45YBo=; b=ACezRgkgNI4h5/31qwyxPFK4n4HOx8FcEoaysC9yLYF3v0G1xScvFmSnZkIFuUc5gG mn1i0J2GpDDcKUhnVYe7kluWlo90dhQ3b/9RLMu0aNBywzuJPiMu+aAyXEVdAAkhVNSG d8/hToshdvT3Pu+LiVfUweAheu3JGWxOY6bV2LzN4EqYYkbnWTHQnCp75DflvAiZq8in WQ6QWfS6B6BbTUIc+7LgcYSKF1bEOPMfBjshnI4R+AkaTc6mTxmPu5GhL+ih4a0A+qCx gDfx8fIoBuJLIAX69LjD4NxcCiTXkcgw4YuY/Fgm7OSVey4Gh9McXBnK+FRmuVePHimR phrQ== X-Gm-Message-State: AKS2vOzfdHnIE5rI5SThsiDltJhC9yo2l37/vcPJuscefQY9egxIYL/Q Daya01AxWd/NBkz/ X-Received: by 10.28.143.16 with SMTP id r16mr10097731wmd.50.1497690495383; Sat, 17 Jun 2017 02:08:15 -0700 (PDT) Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id 18sm1596506wmt.6.2017.06.17.02.08.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Jun 2017 02:08:14 -0700 (PDT) Date: Sat, 17 Jun 2017 10:08:13 +0100 From: Pierre Neidhardt To: GNU Emacs bug Tracking System Subject: 25.2; Make eshell-next-prompt more reliable Message-ID: <20170617090813.GA889@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.8.3 (2017-05-23) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Current definition of `eshell-next-prompt' merely skips a paragraph. This won't produce the right result as soon the output contains a paragraph separator (typically an empty line). I have been using the following redefinition for a while and it works much better for me: (defun eshell-next-prompt (n) "Move to end of Nth next prompt in the buffer. See `eshell-prompt-regexp'." (interactive "p") (re-search-forward eshell-prompt-regexp nil t n) (when eshell-highlight-prompt (while (not (get-text-property (line-beginning-position) 'read-only) ) (re-search-forward eshell-prompt-regexp nil t n))) (eshell-skip-prompt)) (defun eshell-previous-prompt (n) "Move to end of Nth previous prompt in the buffer. See `eshell-prompt-regexp'." (interactive "p") (backward-char) (eshell-next-prompt (- n)))) Quite naturally, I search for the `eshell-prompt-regexp'. If that prompt is too simple (say "^\$ "), some output could easily match the regexp and the function would move the point there instead of its right location. To work around that case, I check if the text is read-only, which is a property of the prompt (if `eshell-highlight-prompt' is `t') but not of the output. What do you think? Would you accept a patch? In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 System Description: Arch Linux From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 17 18:12:15 2017 Received: (at 27405) by debbugs.gnu.org; 17 Jun 2017 22:12:15 +0000 Received: from localhost ([127.0.0.1]:53763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMLx1-0002DY-2F for submit@debbugs.gnu.org; Sat, 17 Jun 2017 18:12:15 -0400 Received: from mail-io0-f171.google.com ([209.85.223.171]:34489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMLwy-0002DE-QY; Sat, 17 Jun 2017 18:12:13 -0400 Received: by mail-io0-f171.google.com with SMTP id i7so46745978ioe.1; Sat, 17 Jun 2017 15:12:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=o5PVCXH8nniRbsac7vyDR8rW0MQQccHbSUVhXWOOWyw=; b=bvjBrHAJbHU+3dBiScV8FadJrVGt36qycW+EsNm32TaVWSYkCQnICcH15ufiWQJrL6 3hzlDQ4XwxPnGT9OHyP3Z8htPfrlJ3rlOQeRlw3KyVvKPlONKXSIo155yUWLWJhwBDrW RcNS1ggu34Ae9mNUTRe52tQ7cUqioh/E4zOIYrm4h0yJvmmBwbm6encopClih4ipSMm4 8ED39TpArieZHdpSsVXAp6YxhNw9ptoP08V1jrQkOr4Jq6R6DP921/mBINhBMZKPxhXs RMmEDvb65PcqSEplVczlB+aKLNvCm9HTTKILKLSJ37lzKfvqQxyj1JcQ+KX7vreeum/7 3UDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=o5PVCXH8nniRbsac7vyDR8rW0MQQccHbSUVhXWOOWyw=; b=SAR3SDHL8ZZVXFLEHBel1PNJa4C+z6Om3JV/DAwIxUMA+4oxI7r64kOxmVuSsgIiGW m7lLs67Ui5gW7msUjE+tAcCj25nVIxFb9kG3NVzvlWnoSQuTC0h2ctXqH+zbLU94Tujy 4qKJUGkcxS0fKEtNwxfADQ0DpNjw8BCenR9YvVq8WA9hYbh6vhM8gUMayGJ/aEAMKKbv bA6JuEwwc0TKUHSfG2XCemf3Xw5tsdltpm1hsD0ws9Dignmq8iaKbctAnRLite+qhD/9 dCdZWRc20TVIaeJyUw/vV8NHgjfTOOS63LlBVtf6//bmZypgK7dOM2CkYNiN6RRR8bCE hSZg== X-Gm-Message-State: AKS2vOwFXii4xpKLUOfGnxWIYHe014c39u8ipt2QOuiKI022tP58LrHv ssClwXaYSGF03tKc X-Received: by 10.107.157.76 with SMTP id g73mr12587060ioe.119.1497737527111; Sat, 17 Jun 2017 15:12:07 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id u186sm4289805ita.3.2017.06.17.15.12.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Jun 2017 15:12:06 -0700 (PDT) From: npostavs@users.sourceforge.net To: Pierre Neidhardt Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable References: <20170617090813.GA889@gmail.com> Date: Sat, 17 Jun 2017 18:13:44 -0400 In-Reply-To: <20170617090813.GA889@gmail.com> (Pierre Neidhardt's message of "Sat, 17 Jun 2017 10:08:13 +0100") Message-ID: <87zid6qn3b.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 27405 minor tags 27405 + confirmed quit Pierre Neidhardt writes: > Current definition of `eshell-next-prompt' merely skips a > paragraph. This won't produce the right result as soon the output > contains a paragraph separator (typically an empty line). > > I have been using the following redefinition for a while and it works much > better for me: Seems reasonable. > (defun eshell-next-prompt (n) > "Move to end of Nth next prompt in the buffer. > See `eshell-prompt-regexp'." > (interactive "p") > (re-search-forward eshell-prompt-regexp nil t n) > (when eshell-highlight-prompt > (while (not (get-text-property (line-beginning-position) 'read-only) ) > (re-search-forward eshell-prompt-regexp nil t n))) > (eshell-skip-prompt)) > > (defun eshell-previous-prompt (n) > "Move to end of Nth previous prompt in the buffer. > See `eshell-prompt-regexp'." > (interactive "p") > (backward-char) > (eshell-next-prompt (- n)))) What's the backward-char for? From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 09:29:43 2017 Received: (at 27405) by debbugs.gnu.org; 18 Jun 2017 13:29:43 +0000 Received: from localhost ([127.0.0.1]:54090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMaGs-0002BN-Vf for submit@debbugs.gnu.org; Sun, 18 Jun 2017 09:29:43 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:34265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMaGr-0002B8-2I for 27405@debbugs.gnu.org; Sun, 18 Jun 2017 09:29:41 -0400 Received: by mail-wr0-f179.google.com with SMTP id 77so58899464wrb.1 for <27405@debbugs.gnu.org>; Sun, 18 Jun 2017 06:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=w+QHaXMdiRJMy51VbzC4isBYOQtJ9rJBonbeSJSQ8rI=; b=BAeYdiAmdCg6mXCcT8BB3T9q/LcREKehniaIaCugXOyEj8XahkQL9BZZg5HFf2q4tK /5jze3sk2HlShgAPF1KslQtnOqKKhsyzV0aRONLY1jTVOtS/IGNeHB0EMswe1Q9OOyDw gin+0r4S4J88WxWXGzPL1bSW0LGNxgLbK1C46q5hnIhigFZPl/A4pu9TOrgslT4h01WI TkE+PzcaajdHvAHYA+NJECudhzgLz1XRJpRDE2vP/1OZJry66riuu/gl3qJzIUIgyqLT j07dqCOD9uJk/LiyNVl6K/osaCUB7G3yc3/Dlf6lxGiS6NdjaZ+RvFpSOTkZzPj18kj2 xFNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=w+QHaXMdiRJMy51VbzC4isBYOQtJ9rJBonbeSJSQ8rI=; b=lCNxVliwGu1zJexUscLmPGC7PO9ZLbjzsjJp2bAzmibOREXBGvD0vvFL3e9xbEGmTI M4ekkjZBiqsNjRPr031euhVjXacAcetBSWaLvtx2ULlBLFXfJxut4T1hrDxmiPcQuMGh S8Gcpp8hpPvEPhBEmsik0zrPq1kwDG6NzhOcWvqQEDJfnBilIXtGS19C3RRB2sGJI++j RPhnnlvoqwBfTEyctIeYb9BGgKcbadUkOhrbUunCOYRGNh6iNOoayDSpsTOi3azMUhG8 A1AMDrKI4IQGz2Pn5P2Tm6d8zJyI4640BChtJNoMz3pcwbJimWYFDS7YcjtykV7DEtnA 2etQ== X-Gm-Message-State: AKS2vOwLzu8orDOwBbBVauQ667Nn0+CPd4M17fcrQgdJzLWeKLu92ytE cD+zR/jFmx5CE727 X-Received: by 10.223.161.204 with SMTP id v12mr2000287wrv.125.1497792575252; Sun, 18 Jun 2017 06:29:35 -0700 (PDT) Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id 29sm13506665wrv.23.2017.06.18.06.29.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Jun 2017 06:29:34 -0700 (PDT) Date: Sun, 18 Jun 2017 14:29:32 +0100 From: Pierre Neidhardt To: npostavs@users.sourceforge.net Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable Message-ID: <20170618132932.GA2617@gmail.com> References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zid6qn3b.fsf@users.sourceforge.net> X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > > (defun eshell-previous-prompt (n) > > "Move to end of Nth previous prompt in the buffer. > > See `eshell-prompt-regexp'." > > (interactive "p") > > (backward-char) > > (eshell-next-prompt (- n)))) > > What's the backward-char for? That would have definitely deserved a comment... Without it, if point is right after the prompt, it won't move. That would be disturbing for the user. Detailed rules: - If point is on the command line _after_ eshell-bol, then go back to eshell-bol. - If point is between eshell-bol (included) and _after_ eshell-bol of the last prompt (excluded), go to the last prompt. -- Pierre Neidhardt From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 09:50:45 2017 Received: (at 27405) by debbugs.gnu.org; 18 Jun 2017 13:50:45 +0000 Received: from localhost ([127.0.0.1]:54098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMabF-0002hu-5l for submit@debbugs.gnu.org; Sun, 18 Jun 2017 09:50:45 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:34293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMabD-0002hg-60 for 27405@debbugs.gnu.org; Sun, 18 Jun 2017 09:50:43 -0400 Received: by mail-it0-f42.google.com with SMTP id m47so8317421iti.1 for <27405@debbugs.gnu.org>; Sun, 18 Jun 2017 06:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=w9T8Ysnpo3XDh/v8HLCbvBoS4wd4EMBFkF8XncI+rH8=; b=LGBHzd99+sMULHnSdWuV+p7wTpIVSPVRYwPHyJ7BYKX4re0IdTBVT3iDUVsf8zW5+X RgCt433UQ4fxfzsq1YTf7mrsUvKi/fL0DNaV4eiooLV5wgGl2KJ2UyqE3jsRM9C50hze CqT8/x9Jo5G4XZgBTesdPjGAvCR/ut00QQAlCshZGNUCchATUeHW7v9drMZ1t3ILJwL1 m3nXTkVtN+8+LSGvgHbUuVqDMVFF2TBLmBqRU0H77mQDyyBy5hkAx+uJvwOp7NRJFwrM 0/hf4embrkkMo60tARpOaNF1JfdB2hLSSzsJyQiujncuae0mVvRE0RUFvxN1iMCA4ou8 hFcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=w9T8Ysnpo3XDh/v8HLCbvBoS4wd4EMBFkF8XncI+rH8=; b=NVgVpVyrFMfnuA7xMxmlQYxjUqQKSs3Z9+KZYyxyiaL9NeaBtfLp6QnyAS4XyrC43T FiS7ozsvhLE4Q3jRcUhT+CoqkClmNwOhA6K7w7dqS2ReB7Drd7a5LVZMwoxFRuxcisRE UDpSMRA1TaCvQ2aRIEwDlGLomg9DAGbOBAnPDhmzEadM9BoSIBGapvDWEc9cR3NeUnat yL1Y6E+PoFdkCzYuykxu2DelfqJ54vkd7LqxtnOqUJhWW1AWmAkLvv+u0g9gzxHkQ+oe tBUNp/uxPAAuE9e0LvgGQ/I36Q9uAWGP95jdvN85eLxmjCizn3hjAeMz6ryltm6G9Wib 9xYg== X-Gm-Message-State: AKS2vOy5xPJrK8hdcA6eQ9M1HFi9s1hcROFpZaJJQJ08C8nBqwDoZsF2 MtB/F+69uob0VOv/ X-Received: by 10.36.35.202 with SMTP id u193mr18192022itu.90.1497793837418; Sun, 18 Jun 2017 06:50:37 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id p74sm4191014iop.10.2017.06.18.06.50.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Jun 2017 06:50:36 -0700 (PDT) From: npostavs@users.sourceforge.net To: Pierre Neidhardt Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> <20170618132932.GA2617@gmail.com> Date: Sun, 18 Jun 2017 09:52:13 -0400 In-Reply-To: <20170618132932.GA2617@gmail.com> (Pierre Neidhardt's message of "Sun, 18 Jun 2017 14:29:32 +0100") Message-ID: <87vantqu7m.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Pierre Neidhardt writes: >> > (defun eshell-previous-prompt (n) >> > "Move to end of Nth previous prompt in the buffer. >> > See `eshell-prompt-regexp'." >> > (interactive "p") >> > (backward-char) >> > (eshell-next-prompt (- n)))) >> >> What's the backward-char for? > > That would have definitely deserved a comment... > > Without it, if point is right after the prompt, it won't move. That would be > disturbing for the user. [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (npostavs[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.214.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.214.42 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Pierre Neidhardt writes: >> > (defun eshell-previous-prompt (n) >> > "Move to end of Nth previous prompt in the buffer. >> > See `eshell-prompt-regexp'." >> > (interactive "p") >> > (backward-char) >> > (eshell-next-prompt (- n)))) >> >> What's the backward-char for? > > That would have definitely deserved a comment... > > Without it, if point is right after the prompt, it won't move. That would be > disturbing for the user. [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.214.42 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.214.42 listed in list.dnswl.org] 1.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (npostavs[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different Pierre Neidhardt writes: >> > (defun eshell-previous-prompt (n) >> > "Move to end of Nth previous prompt in the buffer. >> > See `eshell-prompt-regexp'." >> > (interactive "p") >> > (backward-char) >> > (eshell-next-prompt (- n)))) >> >> What's the backward-char for? > > That would have definitely deserved a comment... > > Without it, if point is right after the prompt, it won't move. That would be > disturbing for the user. Hmm, maybe beginning-of-line would make more sense? If I have point on the same line of the prompt I can get to the beginning of the prompted line with C-a, so C-c C-p probably means I want to go farther back. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 18 10:20:09 2017 Received: (at 27405) by debbugs.gnu.org; 18 Jun 2017 14:20:09 +0000 Received: from localhost ([127.0.0.1]:55240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMb3g-0005Xe-Uh for submit@debbugs.gnu.org; Sun, 18 Jun 2017 10:20:09 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:33837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMb3e-0005XB-VB for 27405@debbugs.gnu.org; Sun, 18 Jun 2017 10:20:07 -0400 Received: by mail-wr0-f182.google.com with SMTP id 77so59244087wrb.1 for <27405@debbugs.gnu.org>; Sun, 18 Jun 2017 07:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Dxb1VkVn/MCWTRSWnanzvY1KDloBOtL88kuzDpQ+m3E=; b=HTbv2mT+SdEan4tQrTeNDlde7U7SUdB4k5uPfS6pWFLUVSzD5UGXXOIwK9wjs3dXF0 7TFaYkp76ivQB3gRlcGswCSwUMFDmpHw+ApSez1wwiNEZXMYH0RBLeJgY1tIDZd6P175 hdq9uuecJwRzZpisR4SrWR1yrPEnxEUjA6LIo5QQIQ1ACfnJRR+9AsvDrQFHnwJiJcdq 5I64DokC+WcN/Y76gWR8BbR868JEPFD5kkVI/n4wSiqoBzI8yXq+dvYDfTFuwPFZhIf0 4iu8MeB10SQqbsCyzhGYU8MZhMrVrMTAb0ZCH/5ClqmK/oQjWAebRFr5Cw6ZSlbHfVkB H2Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Dxb1VkVn/MCWTRSWnanzvY1KDloBOtL88kuzDpQ+m3E=; b=o8Ox/HJU4Lce+c4C+c7Cq1zDusvgKkKa3cieRhQxDTxL6FTY7g9y1cpxlM6gYeKKs7 lWV2pI93HW3uWsqLQ5vJWXl4sJEoF8wUzycfzZA3QppSH8TqYgVZcYWrXU2jj/ADQYK+ OM13o+fcBkcZSL2R7m8mt5c5JO2ldhQmgvyCzAX0aN4N2fOPOFgI6H2c/GFZob4ZZEv0 Y0t8m2SWVFixOIWD5zCmnlC49CUqlilr3gdNzBjckA/2InUrEf3oiPGwg5TOle2OcmbA 6yzKeYocVZWIWFBvsrijynGEPoXsjj8E+2KQxGvSl9/fJXKKxBg7O66qrQLmQWVQxHDN LWYg== X-Gm-Message-State: AKS2vOxi9pw0O2bhdNwtIAgR8la+4Z/7YUSgZRpGVivEHle3pGr+15T8 03JhHi+E6kdNzg== X-Received: by 10.223.174.237 with SMTP id y100mr3554760wrc.2.1497795601293; Sun, 18 Jun 2017 07:20:01 -0700 (PDT) Received: from gmail.com ([196.203.31.130]) by smtp.gmail.com with ESMTPSA id l6sm690345wmg.31.2017.06.18.07.20.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Jun 2017 07:20:00 -0700 (PDT) Date: Sun, 18 Jun 2017 15:19:59 +0100 From: Pierre Neidhardt To: npostavs@users.sourceforge.net Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable Message-ID: <20170618141959.GB2617@gmail.com> References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> <20170618132932.GA2617@gmail.com> <87vantqu7m.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87vantqu7m.fsf@users.sourceforge.net> X-Info: Simplicity is the ultimate sophistication. User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 17-06-18 09:52:13, npostavs@users.sourceforge.net wrote: > Pierre Neidhardt writes: > > >> > (defun eshell-previous-prompt (n) > >> > "Move to end of Nth previous prompt in the buffer. > >> > See `eshell-prompt-regexp'." > >> > (interactive "p") > >> > (backward-char) > >> > (eshell-next-prompt (- n)))) > >> > >> What's the backward-char for? > > > > That would have definitely deserved a comment... > > > > Without it, if point is right after the prompt, it won't move. That would be > > disturbing for the user. > > Hmm, maybe beginning-of-line would make more sense? If I have point on > the same line of the prompt I can get to the beginning of the prompted > line with C-a, so C-c C-p probably means I want to go farther back. Agreed. Please make the change and add a comment. -- Pierre Neidhardt From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 11 22:15:15 2017 Received: (at 27405) by debbugs.gnu.org; 12 Jul 2017 02:15:15 +0000 Received: from localhost ([127.0.0.1]:34530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dV7BL-0003r0-1V for submit@debbugs.gnu.org; Tue, 11 Jul 2017 22:15:15 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:36647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dV7BI-0003qh-SV; Tue, 11 Jul 2017 22:15:14 -0400 Received: by mail-io0-f170.google.com with SMTP id z62so5400510ioi.3; Tue, 11 Jul 2017 19:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=552PFjjW5Ztxp1MASS87z0WJhC4PCjsaRA6di8D5HDg=; b=Q9rihxJrHfb73TUadbQbdgtR4tte3QjlDU24Vr0p6U2gbwNdblmIhMKBMpyYC+7QBO tfGtUNx+jcbw+J89RHowZd9G0+kff55xQtzd6hKVP4yP5vOWpij4DZzb3y0mpSbfkMvs vTfOJ0UgRWdHpcpcKw0+QlK0F98UWeZdiyp3NmrkbKZgPFxUmHv3z3A4W6jN2dgTc4An 51cV/Cr5J/1wpIUF/6G/RB55nXDSvSQaOX6VvyfwQya5GQ4q0iKokiL9Tt4942vDMtDm vg4rENWYk0/G8orLskVxVeBAyH2fl+4dSHU/xxOFSAsVkCdDYo6NEBSQpW3RQ3qL8ago 5GYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=552PFjjW5Ztxp1MASS87z0WJhC4PCjsaRA6di8D5HDg=; b=GKYgp0WQpSlZd4zSfqzTmxfsLz0ZFxpPWV1AvrIdGgBZwzgS9PJqP7nqg8z7m+awPx mgJlrf5LF7VhR/GfqQWQJhvB0hlwqTH+KPAmb+zf7WZWbFds1JGpEQabEc/IoY9pwoLf rTGRBTrrOskgVFwC9JMvneoBPkcThAH3tedFwHgI2GIcbc3S9+X2JhgwywOerkct5Any j3b5M6pzfp3IZBlpeNKMpYtr82cAbYoYMRQZlt+hVe19gG13WJTi9xXDYBpRYUyaFPQs 5XAzgl0bDmK/oZ+5a/b2+JPsMao42nbdY/fzl+n7in3TeZvMzb2oBypU3v+Uiq/Hyuux jI4A== X-Gm-Message-State: AIVw110+Oh1rOD+7M1hIEqTL0VhxO5aEJAnCOL27u8cjvW08Y0jXV2rQ Aw9V8E84/rbAgTRO X-Received: by 10.107.18.19 with SMTP id a19mr3053992ioj.93.1499825707205; Tue, 11 Jul 2017 19:15:07 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id t18sm583917ita.25.2017.07.11.19.15.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jul 2017 19:15:06 -0700 (PDT) From: npostavs@users.sourceforge.net To: Pierre Neidhardt Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> <20170618132932.GA2617@gmail.com> <87vantqu7m.fsf@users.sourceforge.net> <20170618141959.GB2617@gmail.com> Date: Tue, 11 Jul 2017 22:16:38 -0400 In-Reply-To: <20170618141959.GB2617@gmail.com> (Pierre Neidhardt's message of "Sun, 18 Jun 2017 15:19:59 +0100") Message-ID: <87zicae6wp.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain tags 27405 + patch quit Pierre Neidhardt writes: >> >> Hmm, maybe beginning-of-line would make more sense? If I have point on >> the same line of the prompt I can get to the beginning of the prompted >> line with C-a, so C-c C-p probably means I want to go farther back. > > Agreed. Please make the change and add a comment. I think also that doing the text property check following the regexp search doesn't really make sense, one or the other should be used, not both: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0001-Make-eshell-next-prompt-more-reliable-Bug-27405.patch Content-Description: patch >From 1dd9644f1322d3b40ba98482d4aca0105db56d81 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 11 Jul 2017 22:11:19 -0400 Subject: [PATCH v2] Make eshell-next-prompt more reliable (Bug#27405) * lisp/eshell/em-prompt.el (eshell-next-prompt): Search for `eshell-prompt-regexp' (and `read-only' text-property if `eshell-highlight-prompt' is set) rather than trying to use `forward-paragraph'. (eshell-previous-prompt): Don't count prompt on current line. --- lisp/eshell/em-prompt.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 8c81b43b1f..2fd1db2113 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -161,14 +161,25 @@ (defun eshell-next-prompt (n) "Move to end of Nth next prompt in the buffer. See `eshell-prompt-regexp'." (interactive "p") - (forward-paragraph n) + (if eshell-highlight-prompt + (progn + (while (< n 0) + (while (and (re-search-backward eshell-prompt-regexp nil t) + (not (get-text-property (match-beginning 0) 'read-only)))) + (setq n (1+ n))) + (while (> n 0) + (while (and (re-search-forward eshell-prompt-regexp nil t) + (not (get-text-property (match-beginning 0) 'read-only)))) + (setq n (1- n)))) + (re-search-forward eshell-prompt-regexp nil t n)) (eshell-skip-prompt)) (defun eshell-previous-prompt (n) "Move to end of Nth previous prompt in the buffer. See `eshell-prompt-regexp'." (interactive "p") - (eshell-next-prompt (- (1+ n)))) + (beginning-of-line) ; Don't count prompt on current line. + (eshell-next-prompt (- n))) (defun eshell-skip-prompt () "Skip past the text matching regexp `eshell-prompt-regexp'. -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 12 09:06:13 2017 Received: (at 27405) by debbugs.gnu.org; 12 Jul 2017 13:06:14 +0000 Received: from localhost ([127.0.0.1]:34883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVHLJ-0001Od-QJ for submit@debbugs.gnu.org; Wed, 12 Jul 2017 09:06:13 -0400 Received: from mail-ua0-f177.google.com ([209.85.217.177]:32851) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVHLI-0001OQ-4d for 27405@debbugs.gnu.org; Wed, 12 Jul 2017 09:06:12 -0400 Received: by mail-ua0-f177.google.com with SMTP id w19so13943207uac.0 for <27405@debbugs.gnu.org>; Wed, 12 Jul 2017 06:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aULeRSztHLVK448IcaIOXTDNiZKbp2j9/7NIxK/aDyk=; b=B8zZYyXHqx7lFU3a3RnT6XsNmKDeUnba+tsleHabSrJJYdwajAbk0XLt0Kj3nhGOKy iqRrZMXr0d+Ogn1bC00r5Pd7WrBQv1gKgkn8+WQfC7AG2AkieA7CjdNB46oyyuE1q2kY IATFQCNBrESY8xD/KT70lyzelNaLdPwswmwAJ5qvJMNo0NZQJX+ST9sQNza4AnzHRFMa xiF7jZDlsYT+e2nrKy6ANgSdXn3yfn3HkTbkj2/GN1it75fg0CMfW88dBp6tQwEvKTyo n8JYaiIglgbO+SLd/56IAB3+AsFdtzmgBUfbcSWRdHJSjwYL2H26VOxwHiAot2YezEfU 7frg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aULeRSztHLVK448IcaIOXTDNiZKbp2j9/7NIxK/aDyk=; b=ImOM3e8BV1kS4sBMhDnmpANiYR7avo4Ci9oyzQ9edIhl80TlrwGQX8KfU96b4kcVCW T/McoXrB6ObyNWG7uREULYLvYeRkgdNeTwS42aZialh2PU2x85tFWI669V24oU6jWo0R Qhyct8pEvY9/fZ3pvoZvgklPEb4pqW0UU0V6c+zKCnwatteVFDQIUC72scuK5RaLVuZ6 HErM9FiJkkDPpxY2H+MRtHv9ozppIDhmVyu6Asisc3vhE6Vn9HWHDABzsz7Y1T7sX1ox cc4epjrbwFNpSmcNvmm2w7Gpnmav+/QfzQ7Bng1XcWgc1qEOw7X9U3zUE3Sgf1e3lb5B lGCA== X-Gm-Message-State: AIVw113tQF2NAbKnnE6Un7+WZC8q/TCB5FZokeHKYyc2jzUQKy7elFd7 IMgzIpoRwttrjyZCWY2YEzixOxaO/w== X-Received: by 10.176.17.239 with SMTP id q47mr3272215uac.29.1499864766616; Wed, 12 Jul 2017 06:06:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.169.218 with HTTP; Wed, 12 Jul 2017 06:06:05 -0700 (PDT) In-Reply-To: <87zicae6wp.fsf@users.sourceforge.net> References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> <20170618132932.GA2617@gmail.com> <87vantqu7m.fsf@users.sourceforge.net> <20170618141959.GB2617@gmail.com> <87zicae6wp.fsf@users.sourceforge.net> From: Pierre Neidhardt Date: Wed, 12 Jul 2017 14:06:05 +0100 Message-ID: Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable To: npostavs@users.sourceforge.net Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Agreed. If `eshell-highlight-prompt', then search for the first read-only text, otherwise search for the regexp (less reliable). No need to bother with the regexp. I don't think that anything but the prompt would be read-only, but I may be wrong. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 12 15:26:17 2017 Received: (at 27405) by debbugs.gnu.org; 12 Jul 2017 19:26:17 +0000 Received: from localhost ([127.0.0.1]:35772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVNH7-0004L0-6W for submit@debbugs.gnu.org; Wed, 12 Jul 2017 15:26:17 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:35977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVNH4-0004Kn-ED for 27405@debbugs.gnu.org; Wed, 12 Jul 2017 15:26:15 -0400 Received: by mail-oi0-f52.google.com with SMTP id x187so28276622oig.3 for <27405@debbugs.gnu.org>; Wed, 12 Jul 2017 12:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Y3mhn2aouVTo6A9JrvcS1ZamynJrLpIrDEjXxX5rExE=; b=tIMamf6EMVFt87tA/E4ZdzfkMdGbL4vRC5jqLohNpFrVg/jf44zXTNOGJpFOW3sE1V P353CfxroPEmtRQKToDcz/NtlkXN4ta00MPTJxGW4xYHOIFG37vji25I8VgPpXX0wUAG oxwwlaEEU0bnZFU9sznAIOi+982nir28ZR0eFuuhH3QEOIdZio2deurfbNax4DBUatr0 H2bnrRYslC/QlX4Xtif7vyC3xdIU+eNfY/pdh9aN3NHiYDQTgNqHba4SyVHehNtNWz37 oX1qBoqgUwBXqYgXzGjuWcIpJe0edhS8kR0OnRYa2NNGG4O5nZRWOm6FYY/5Br8KhS0e MvDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Y3mhn2aouVTo6A9JrvcS1ZamynJrLpIrDEjXxX5rExE=; b=hVufy7vWxQcFWXwRVPHt2ttovGuxBSRY9JRBv+/2URAbWe4oVJuYIhg9chlgOyESbi G2B+q+wFjDeuJDPDE35MaKgbhSCjX0PgaZOqeLure24SuJ7y+hEix3Nkemh6iMgQqiEv ySEV3eN+iU504uE0FqgaGKwAZuTb2IuNQBsiqR1WJ0cs4K3cL4F+qS8K/IVJvT3g/leh lRo2E2H/1Qj4fJqz7a+9YJYcngso8T2iCv8/2LiqZo0mVtZeAu46+sMzqtp1hclwQF80 mWtJLzg4a1jQwGVietSmADk66NebcFa6l89ztbE/EgRllmlm3ShKj/K6085ck8vM4sAL 93Gg== X-Gm-Message-State: AIVw112tcG8p+YmVaFe4py7+B0Fa/CqCSXf4jNW3VdDnV6iYuoQiSKLa N9Qp10z3iZ38exnwE7ED43z/q2Zc/A== X-Received: by 10.202.229.148 with SMTP id c142mr124958oih.60.1499887567636; Wed, 12 Jul 2017 12:26:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.113.91 with HTTP; Wed, 12 Jul 2017 12:26:07 -0700 (PDT) In-Reply-To: References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> <20170618132932.GA2617@gmail.com> <87vantqu7m.fsf@users.sourceforge.net> <20170618141959.GB2617@gmail.com> <87zicae6wp.fsf@users.sourceforge.net> From: Noam Postavsky Date: Wed, 12 Jul 2017 15:26:07 -0400 X-Google-Sender-Auth: WCpDpg_0pHvgaTFVxZ9cuYwFBu0 Message-ID: Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable To: Pierre Neidhardt Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) On Wed, Jul 12, 2017 at 9:06 AM, Pierre Neidhardt wrote: > Agreed. If `eshell-highlight-prompt', then search for the first > read-only text, otherwise search for the regexp (less reliable). No > need to bother with the regexp. I don't think that anything but the > prompt would be read-only, but I may be wrong. Nothing else will be read-only by default, but I think it's safer not to assume things will always be that way. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 20 22:43:28 2017 Received: (at 27405) by debbugs.gnu.org; 21 Jul 2017 02:43:28 +0000 Received: from localhost ([127.0.0.1]:50191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYNua-0007eZ-DY for submit@debbugs.gnu.org; Thu, 20 Jul 2017 22:43:28 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:33714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYNuV-0007eB-VA; Thu, 20 Jul 2017 22:43:24 -0400 Received: by mail-io0-f179.google.com with SMTP id 5so18307631iow.0; Thu, 20 Jul 2017 19:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=u/L9ZKWtuUHq8R8f7+203gueR/JAH/xTJwbXM8RKzl8=; b=LcPZjKsI7L8ksUcCSc02BuGFY6oV+hdP5PUpFomdsaIuy5LzSOd57ogiBa6RUCEdAG L0SUHn2Sml3B5AkOOJd+M05LoeD8kA+s7tTjuiLm9SqRSy7dPVYX9eAzzjZ16HJLkPAj kwd2oUWqJ9YkCXTXoKgxYzb6BGxM95OdRwtqud+HpqbQe2hqXXtHp5Lkjnf4CX2Y7u5J fsvTA7ILZVRi5fA1S3DSwAD7pmlAjZ6qOLvgUxakw2p3TTtPurrO5ees912IPyJ09O9T mYUCA4G2oD8Nbf8V2MtAhm9K2s1ixIrJxvTG8iBlbwq5eBvXPDBuAzEynbqR0wxUEXPW 5SzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=u/L9ZKWtuUHq8R8f7+203gueR/JAH/xTJwbXM8RKzl8=; b=MkpGBWKGNRsezIXtxBtU3vsI4pIAu7vQ/YWLKfI32HIWjsesqi3aMjgDxLP7/aLTue 2maEwSIm9n130iP+G39ch54t58QAnkpZE3BKLO95VBNQ/rHRGyfh/hq+NQPXAjuAF+/l 423CE3Ta8/Q+7BmyhXSmPjl4S3+DTjVIF7iVkeqY2DKVkTfjG+K2kTGszvQE5NU26Rez jYKbUsPPIfak3kWv/PYa/YSaVUCxg/8BOcQtxPawPaP9BYUo9khjtheud+No/cE941iu TSD5V1RRIfDkEOH4Fcw63JSH8AZL1TvE9eRMegKuezVP7kHsyc1KXbPtMrPbamDc5ZTv UoRQ== X-Gm-Message-State: AIVw112MgZW8JgfqrHMyCoMRNkOJJAioZfof22rFo4+UPy+hyQvDhFbD T65dKgiJN6YHrXZ6 X-Received: by 10.107.149.10 with SMTP id x10mr6496509iod.71.1500604998227; Thu, 20 Jul 2017 19:43:18 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id b187sm1899401ioe.67.2017.07.20.19.43.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Jul 2017 19:43:17 -0700 (PDT) From: npostavs@users.sourceforge.net To: Pierre Neidhardt Subject: Re: bug#27405: 25.2; Make eshell-next-prompt more reliable References: <20170617090813.GA889@gmail.com> <87zid6qn3b.fsf@users.sourceforge.net> <20170618132932.GA2617@gmail.com> <87vantqu7m.fsf@users.sourceforge.net> <20170618141959.GB2617@gmail.com> <87zicae6wp.fsf@users.sourceforge.net> Date: Thu, 20 Jul 2017 22:44:52 -0400 In-Reply-To: (Noam Postavsky's message of "Wed, 12 Jul 2017 15:26:07 -0400") Message-ID: <87lgnia4pn.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 27405 Cc: 27405@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) tags 27405 fixed close 27405 26.1 quit I pushed to master [1: 7a0ca227af]: 2017-07-20 22:40:34 -0400 Make eshell-next-prompt more reliable (Bug#27405) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7a0ca227af1081ca7ada2e82a87b1a575ef04759> From unknown Sat Sep 20 08:01:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Aug 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator