Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are probably a few things wrong/going on here. The first is, your point position when you are executing this. The second is, if you are using /home/user/something, that there is a strong possibility you will have mismatch between /home/user/something and ~/something (ffap returns the latter while at the point you may have written the former).</p> <p><strong>First:</strong></p> <p>The use of <code>looking-at</code> with the regexp quoted filename expects the point to be at the beginning: e.g. <code>|/home/user/something</code>.</p> <p>Its partner, <code>looking-back</code> expects <code>/home/user/something|</code>. Being somewhere in the middle will throw this error.</p> <p>One <strong>quick fix</strong> for this is changing <code>looking-at</code> to <code>thing-at-point-looking-at</code>.</p> <p><strong>Second:</strong></p> <p>If you have written /home/user/something, ffap functions (in my case) shorten this using ~. There are probably some settings that govern this, but the easiest, quick fix I know of is using <code>expand-file-name</code>. This will take care of the first case, and if it is written as ~/something, the <code>save-excursion</code> body will replace it in the alternate case. </p> <p>The only negative result I see is that, you might sometimes replace:</p> <p><code>/home/user/something</code> with <code>~/somethingelse</code></p> <p>But, anyways, these two quick fixes just result in this complete change:</p> <p><code>(thing-at-point-looking-at (regexp-quote (expand-file-name currfile)))</code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload